summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules
diff options
context:
space:
mode:
authorKat Marchán <kzm@zkat.tech>2018-07-18 13:55:52 -0700
committerMichaël Zasso <targos@protonmail.com>2018-07-29 14:16:56 +0200
commit5842366ae83a36065d626e3937ad8fc327efab30 (patch)
tree663eb6d493b00788d83d7a71fc2489adabd24527 /deps/npm/node_modules
parent2aca0957f46af0be33368a1fcb398e63a35c46ef (diff)
downloadandroid-node-v8-5842366ae83a36065d626e3937ad8fc327efab30.tar.gz
android-node-v8-5842366ae83a36065d626e3937ad8fc327efab30.tar.bz2
android-node-v8-5842366ae83a36065d626e3937ad8fc327efab30.zip
deps: upgrade npm to 6.2.0
PR-URL: https://github.com/nodejs/node/pull/21592 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'deps/npm/node_modules')
-rw-r--r--deps/npm/node_modules/JSONStream/.npmignore2
-rwxr-xr-xdeps/npm/node_modules/JSONStream/index.js3
-rw-r--r--deps/npm/node_modules/JSONStream/package.json28
-rw-r--r--deps/npm/node_modules/JSONStream/test/doubledot1.js (renamed from deps/npm/node_modules/JSONStream/test/disabled/doubledot1.js)0
-rw-r--r--deps/npm/node_modules/JSONStream/test/doubledot2.js (renamed from deps/npm/node_modules/JSONStream/test/disabled/doubledot2.js)5
-rw-r--r--deps/npm/node_modules/JSONStream/test/fixtures/depth.json6
-rw-r--r--deps/npm/node_modules/ajv/dist/ajv.min.js3
-rw-r--r--deps/npm/node_modules/ajv/dist/ajv.min.js.map1
-rw-r--r--deps/npm/node_modules/ajv/dist/nodent.min.js2
-rw-r--r--deps/npm/node_modules/ajv/dist/regenerator.min.js2
-rw-r--r--deps/npm/node_modules/ajv/lib/$data.js49
-rw-r--r--deps/npm/node_modules/ajv/lib/ajv.js502
-rw-r--r--deps/npm/node_modules/ajv/lib/compile/async.js90
-rw-r--r--deps/npm/node_modules/ajv/lib/compile/equal.js3
-rw-r--r--deps/npm/node_modules/ajv/lib/compile/error_classes.js34
-rw-r--r--deps/npm/node_modules/ajv/lib/compile/formats.js135
-rw-r--r--deps/npm/node_modules/ajv/lib/compile/rules.js58
-rw-r--r--deps/npm/node_modules/ajv/lib/dot/_limit.jst96
-rw-r--r--deps/npm/node_modules/ajv/lib/dot/contains.jst57
-rw-r--r--deps/npm/node_modules/ajv/lib/dot/propertyNames.jst54
-rw-r--r--deps/npm/node_modules/ajv/lib/dotjs/contains.js81
-rw-r--r--deps/npm/node_modules/ajv/lib/dotjs/dependencies.js167
-rw-r--r--deps/npm/node_modules/ajv/lib/dotjs/propertyNames.js81
-rw-r--r--deps/npm/node_modules/ajv/lib/dotjs/validate.js458
-rw-r--r--deps/npm/node_modules/ajv/lib/patternGroups.js36
-rw-r--r--deps/npm/node_modules/ajv/lib/refs/$data.json17
-rw-r--r--deps/npm/node_modules/ajv/lib/refs/json-schema-draft-06.json154
-rw-r--r--deps/npm/node_modules/ansi-regex/index.js10
-rw-r--r--deps/npm/node_modules/ansi-regex/license20
-rw-r--r--deps/npm/node_modules/ansi-regex/package.json62
-rw-r--r--deps/npm/node_modules/ansi-regex/readme.md21
-rw-r--r--deps/npm/node_modules/assert-plus/CHANGES.md6
-rw-r--r--deps/npm/node_modules/assert-plus/README.md9
-rw-r--r--deps/npm/node_modules/assert-plus/assert.js5
-rw-r--r--deps/npm/node_modules/assert-plus/package.json29
-rw-r--r--deps/npm/node_modules/aws-sign2/index.js2
-rw-r--r--deps/npm/node_modules/aws-sign2/package.json22
-rw-r--r--deps/npm/node_modules/bcrypt-pbkdf/CONTRIBUTING.md13
-rw-r--r--deps/npm/node_modules/bcrypt-pbkdf/LICENSE66
-rw-r--r--deps/npm/node_modules/bcrypt-pbkdf/README.md10
-rw-r--r--deps/npm/node_modules/bcrypt-pbkdf/package.json20
-rw-r--r--deps/npm/node_modules/boom/.npmignore17
-rwxr-xr-xdeps/npm/node_modules/boom/.travis.yml7
-rw-r--r--deps/npm/node_modules/boom/CONTRIBUTING.md1
-rwxr-xr-xdeps/npm/node_modules/boom/LICENSE5
-rwxr-xr-xdeps/npm/node_modules/boom/README.md196
-rwxr-xr-xdeps/npm/node_modules/boom/images/boom.pngbin0 -> 29479 bytes
-rwxr-xr-xdeps/npm/node_modules/boom/lib/index.js189
-rw-r--r--deps/npm/node_modules/boom/package.json38
-rwxr-xr-xdeps/npm/node_modules/boom/test/index.js654
-rw-r--r--deps/npm/node_modules/cidr-regex/package.json37
-rw-r--r--deps/npm/node_modules/cli-columns/node_modules/ansi-regex/index.js4
-rw-r--r--deps/npm/node_modules/cli-columns/node_modules/ansi-regex/package.json108
-rw-r--r--deps/npm/node_modules/cli-columns/node_modules/ansi-regex/readme.md39
-rw-r--r--deps/npm/node_modules/cli-columns/node_modules/strip-ansi/index.js6
-rw-r--r--deps/npm/node_modules/cli-columns/node_modules/strip-ansi/license21
-rw-r--r--deps/npm/node_modules/cli-table2/.npmignore5
-rw-r--r--deps/npm/node_modules/cli-table2/.travis.yml6
-rw-r--r--deps/npm/node_modules/cli-table2/advanced-usage.md246
-rw-r--r--deps/npm/node_modules/cli-table2/basic-usage.md145
-rw-r--r--deps/npm/node_modules/cli-table2/examples/basic-usage-examples.js222
-rw-r--r--deps/npm/node_modules/cli-table2/examples/col-and-row-span-examples.js358
-rw-r--r--deps/npm/node_modules/cli-table2/examples/screenshots/basic-usage-with-colors.pngbin6265 -> 0 bytes
-rw-r--r--deps/npm/node_modules/cli-table2/examples/screenshots/multi-line-colors.pngbin13063 -> 0 bytes
-rw-r--r--deps/npm/node_modules/cli-table2/examples/screenshots/truncation-with-colors.pngbin5018 -> 0 bytes
-rw-r--r--deps/npm/node_modules/cli-table2/gulpfile.js73
-rw-r--r--deps/npm/node_modules/cli-table2/lib/print-example.js123
-rw-r--r--deps/npm/node_modules/cli-table2/node_modules/ansi-regex/index.js4
-rw-r--r--deps/npm/node_modules/cli-table2/node_modules/ansi-regex/license21
-rw-r--r--deps/npm/node_modules/cli-table2/node_modules/ansi-regex/package.json108
-rw-r--r--deps/npm/node_modules/cli-table2/node_modules/is-fullwidth-code-point/index.js46
-rw-r--r--deps/npm/node_modules/cli-table2/node_modules/is-fullwidth-code-point/license21
-rw-r--r--deps/npm/node_modules/cli-table2/node_modules/is-fullwidth-code-point/package.json77
-rw-r--r--deps/npm/node_modules/cli-table2/node_modules/is-fullwidth-code-point/readme.md39
-rw-r--r--deps/npm/node_modules/cli-table2/node_modules/string-width/index.js37
-rw-r--r--deps/npm/node_modules/cli-table2/node_modules/string-width/license21
-rw-r--r--deps/npm/node_modules/cli-table2/node_modules/string-width/package.json88
-rw-r--r--deps/npm/node_modules/cli-table2/node_modules/string-width/readme.md42
-rw-r--r--deps/npm/node_modules/cli-table2/node_modules/strip-ansi/index.js6
-rw-r--r--deps/npm/node_modules/cli-table2/node_modules/strip-ansi/license21
-rw-r--r--deps/npm/node_modules/cli-table2/node_modules/strip-ansi/package.json101
-rw-r--r--deps/npm/node_modules/cli-table2/package.json90
-rw-r--r--deps/npm/node_modules/cli-table2/src/cell.js364
-rw-r--r--deps/npm/node_modules/cli-table2/src/layout-manager.js235
-rw-r--r--deps/npm/node_modules/cli-table2/src/table.js78
-rw-r--r--deps/npm/node_modules/cli-table2/src/utils.js304
-rw-r--r--deps/npm/node_modules/cli-table2/test/cell-test.js935
-rw-r--r--deps/npm/node_modules/cli-table2/test/example-tests.js6
-rw-r--r--deps/npm/node_modules/cli-table2/test/layout-manager-test.js163
-rw-r--r--deps/npm/node_modules/cli-table2/test/original-cli-table-index-tests.js294
-rw-r--r--deps/npm/node_modules/cli-table2/test/original-cli-table-newlines-test.js85
-rw-r--r--deps/npm/node_modules/cli-table2/test/table-layout-test.js466
-rw-r--r--deps/npm/node_modules/cli-table2/test/table-test.js87
-rw-r--r--deps/npm/node_modules/cli-table2/test/utils-test.js414
-rw-r--r--deps/npm/node_modules/cli-table2/test/verify-legacy-compatibility-test.js158
-rw-r--r--deps/npm/node_modules/cli-table3/CHANGELOG.md48
-rw-r--r--deps/npm/node_modules/cli-table3/LICENSE (renamed from deps/npm/node_modules/fast-deep-equal/LICENSE)2
-rw-r--r--deps/npm/node_modules/cli-table3/README.md (renamed from deps/npm/node_modules/cli-table2/README.md)43
-rw-r--r--deps/npm/node_modules/cli-table3/index.js (renamed from deps/npm/node_modules/cli-table2/index.js)0
-rw-r--r--deps/npm/node_modules/cli-table3/package.json128
-rw-r--r--deps/npm/node_modules/cli-table3/src/cell.js371
-rw-r--r--deps/npm/node_modules/cli-table3/src/layout-manager.js232
-rw-r--r--deps/npm/node_modules/cli-table3/src/table.js77
-rw-r--r--deps/npm/node_modules/cli-table3/src/utils.js303
-rw-r--r--deps/npm/node_modules/cliui/node_modules/ansi-regex/index.js10
-rw-r--r--deps/npm/node_modules/cliui/node_modules/ansi-regex/license9
-rw-r--r--deps/npm/node_modules/cliui/node_modules/ansi-regex/package.json (renamed from deps/npm/node_modules/gauge/node_modules/ansi-regex/package.json)57
-rw-r--r--deps/npm/node_modules/cliui/node_modules/ansi-regex/readme.md (renamed from deps/npm/node_modules/gauge/node_modules/ansi-regex/readme.md)21
-rw-r--r--deps/npm/node_modules/cliui/node_modules/strip-ansi/index.js4
-rw-r--r--deps/npm/node_modules/cliui/node_modules/strip-ansi/license9
-rw-r--r--deps/npm/node_modules/cliui/node_modules/strip-ansi/package.json (renamed from deps/npm/node_modules/columnify/node_modules/strip-ansi/package.json)47
-rw-r--r--deps/npm/node_modules/cliui/node_modules/strip-ansi/readme.md (renamed from deps/npm/node_modules/cli-columns/node_modules/strip-ansi/readme.md)18
-rw-r--r--deps/npm/node_modules/columnify/node_modules/ansi-regex/index.js4
-rw-r--r--deps/npm/node_modules/columnify/node_modules/ansi-regex/license21
-rw-r--r--deps/npm/node_modules/columnify/node_modules/ansi-regex/package.json108
-rw-r--r--deps/npm/node_modules/columnify/node_modules/ansi-regex/readme.md39
-rw-r--r--deps/npm/node_modules/columnify/node_modules/strip-ansi/index.js6
-rw-r--r--deps/npm/node_modules/columnify/node_modules/strip-ansi/license21
-rw-r--r--deps/npm/node_modules/columnify/node_modules/strip-ansi/readme.md33
-rw-r--r--deps/npm/node_modules/cryptiles/.npmignore20
-rwxr-xr-xdeps/npm/node_modules/cryptiles/.travis.yml7
-rwxr-xr-xdeps/npm/node_modules/cryptiles/LICENSE2
-rw-r--r--[-rwxr-xr-x]deps/npm/node_modules/cryptiles/README.md3
-rwxr-xr-xdeps/npm/node_modules/cryptiles/lib/index.js42
-rwxr-xr-xdeps/npm/node_modules/cryptiles/node_modules/boom/LICENSE29
-rwxr-xr-xdeps/npm/node_modules/cryptiles/node_modules/boom/README.md784
-rwxr-xr-xdeps/npm/node_modules/cryptiles/node_modules/boom/lib/index.js457
-rw-r--r--deps/npm/node_modules/cryptiles/node_modules/boom/package.json61
-rwxr-xr-xdeps/npm/node_modules/cryptiles/package.json34
-rwxr-xr-xdeps/npm/node_modules/cryptiles/test/index.js102
-rw-r--r--deps/npm/node_modules/dashdash/node_modules/assert-plus/AUTHORS6
-rw-r--r--deps/npm/node_modules/dashdash/node_modules/assert-plus/CHANGES.md14
-rw-r--r--deps/npm/node_modules/dashdash/node_modules/assert-plus/README.md162
-rw-r--r--deps/npm/node_modules/dashdash/node_modules/assert-plus/assert.js211
-rw-r--r--deps/npm/node_modules/dashdash/node_modules/assert-plus/package.json82
-rw-r--r--deps/npm/node_modules/fast-deep-equal/README.md55
-rw-r--r--deps/npm/node_modules/fast-deep-equal/index.d.ts4
-rw-r--r--deps/npm/node_modules/fast-deep-equal/index.js55
-rw-r--r--deps/npm/node_modules/fast-deep-equal/package.json85
-rw-r--r--deps/npm/node_modules/fast-json-stable-stringify/.eslintrc.yml26
-rw-r--r--deps/npm/node_modules/fast-json-stable-stringify/.npmignore4
-rw-r--r--deps/npm/node_modules/fast-json-stable-stringify/.travis.yml8
-rw-r--r--deps/npm/node_modules/fast-json-stable-stringify/README.md119
-rw-r--r--deps/npm/node_modules/fast-json-stable-stringify/benchmark/index.js31
-rw-r--r--deps/npm/node_modules/fast-json-stable-stringify/benchmark/test.json137
-rw-r--r--deps/npm/node_modules/fast-json-stable-stringify/index.js59
-rw-r--r--deps/npm/node_modules/fast-json-stable-stringify/package.json78
-rw-r--r--deps/npm/node_modules/fast-json-stable-stringify/test/str.js46
-rw-r--r--deps/npm/node_modules/form-data/README.md29
-rw-r--r--deps/npm/node_modules/form-data/README.md.bak234
-rw-r--r--deps/npm/node_modules/form-data/lib/form_data.js43
-rw-r--r--deps/npm/node_modules/form-data/package.json24
-rw-r--r--deps/npm/node_modules/gauge/node_modules/ansi-regex/index.js4
-rw-r--r--deps/npm/node_modules/gauge/node_modules/ansi-regex/license21
-rw-r--r--deps/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/index.js46
-rw-r--r--deps/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/license21
-rw-r--r--deps/npm/node_modules/gauge/node_modules/strip-ansi/index.js6
-rw-r--r--deps/npm/node_modules/gauge/node_modules/strip-ansi/license21
-rw-r--r--deps/npm/node_modules/gauge/node_modules/strip-ansi/package.json102
-rw-r--r--deps/npm/node_modules/gauge/node_modules/strip-ansi/readme.md33
-rw-r--r--deps/npm/node_modules/getpass/node_modules/assert-plus/AUTHORS6
-rw-r--r--deps/npm/node_modules/getpass/node_modules/assert-plus/CHANGES.md14
-rw-r--r--deps/npm/node_modules/getpass/node_modules/assert-plus/README.md162
-rw-r--r--deps/npm/node_modules/getpass/node_modules/assert-plus/assert.js211
-rw-r--r--deps/npm/node_modules/getpass/node_modules/assert-plus/package.json82
-rw-r--r--deps/npm/node_modules/har-schema/lib/afterRequest.json3
-rw-r--r--deps/npm/node_modules/har-schema/lib/beforeRequest.json3
-rw-r--r--deps/npm/node_modules/har-schema/lib/browser.json3
-rw-r--r--deps/npm/node_modules/har-schema/lib/cache.json3
-rw-r--r--deps/npm/node_modules/har-schema/lib/content.json3
-rw-r--r--deps/npm/node_modules/har-schema/lib/cookie.json3
-rw-r--r--deps/npm/node_modules/har-schema/lib/creator.json3
-rw-r--r--deps/npm/node_modules/har-schema/lib/entry.json3
-rw-r--r--deps/npm/node_modules/har-schema/lib/har.json3
-rw-r--r--deps/npm/node_modules/har-schema/lib/header.json3
-rw-r--r--deps/npm/node_modules/har-schema/lib/log.json3
-rw-r--r--deps/npm/node_modules/har-schema/lib/page.json3
-rw-r--r--deps/npm/node_modules/har-schema/lib/pageTimings.json3
-rw-r--r--deps/npm/node_modules/har-schema/lib/postData.json3
-rw-r--r--deps/npm/node_modules/har-schema/lib/query.json3
-rw-r--r--deps/npm/node_modules/har-schema/lib/request.json3
-rw-r--r--deps/npm/node_modules/har-schema/lib/response.json3
-rw-r--r--deps/npm/node_modules/har-schema/lib/timings.json3
-rw-r--r--deps/npm/node_modules/har-schema/package.json24
-rw-r--r--deps/npm/node_modules/har-validator/README.md27
-rw-r--r--deps/npm/node_modules/har-validator/lib/browser/async.js96
-rw-r--r--deps/npm/node_modules/har-validator/lib/browser/error.js15
-rw-r--r--deps/npm/node_modules/har-validator/lib/browser/promise.js93
-rw-r--r--deps/npm/node_modules/har-validator/lib/node4/async.js136
-rw-r--r--deps/npm/node_modules/har-validator/lib/node4/error.js22
-rw-r--r--deps/npm/node_modules/har-validator/lib/node4/promise.js132
-rw-r--r--deps/npm/node_modules/har-validator/lib/node6/async.js133
-rw-r--r--deps/npm/node_modules/har-validator/lib/node6/error.js22
-rw-r--r--deps/npm/node_modules/har-validator/lib/node6/promise.js130
-rw-r--r--deps/npm/node_modules/har-validator/lib/node7/async.js133
-rw-r--r--deps/npm/node_modules/har-validator/lib/node7/error.js22
-rw-r--r--deps/npm/node_modules/har-validator/lib/node7/promise.js130
-rw-r--r--deps/npm/node_modules/har-validator/lib/promise.js95
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/.tonic_example.js (renamed from deps/npm/node_modules/ajv/.tonic_example.js)2
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/LICENSE (renamed from deps/npm/node_modules/ajv/LICENSE)0
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/README.md (renamed from deps/npm/node_modules/ajv/README.md)420
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/dist/ajv.bundle.js (renamed from deps/npm/node_modules/ajv/dist/ajv.bundle.js)4176
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/dist/ajv.min.js6
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/dist/ajv.min.js.map1
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/dist/nodent.min.js8
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/dist/regenerator.min.js32
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/ajv.d.ts (renamed from deps/npm/node_modules/ajv/lib/ajv.d.ts)210
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/ajv.js420
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/async.js218
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/cache.js (renamed from deps/npm/node_modules/ajv/lib/cache.js)0
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/_rules.js (renamed from deps/npm/node_modules/ajv/lib/compile/_rules.js)3
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/equal.js45
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/formats.js164
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/index.js (renamed from deps/npm/node_modules/ajv/lib/compile/index.js)68
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/resolve.js (renamed from deps/npm/node_modules/ajv/lib/compile/resolve.js)104
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/rules.js40
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/schema_obj.js (renamed from deps/npm/node_modules/ajv/lib/compile/schema_obj.js)0
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/ucs2length.js (renamed from deps/npm/node_modules/ajv/lib/compile/ucs2length.js)0
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/util.js (renamed from deps/npm/node_modules/ajv/lib/compile/util.js)28
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/validation_error.js14
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/_limit.jst49
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/_limitItems.jst (renamed from deps/npm/node_modules/ajv/lib/dot/_limitItems.jst)0
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/_limitLength.jst (renamed from deps/npm/node_modules/ajv/lib/dot/_limitLength.jst)0
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/_limitProperties.jst (renamed from deps/npm/node_modules/ajv/lib/dot/_limitProperties.jst)0
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/allOf.jst (renamed from deps/npm/node_modules/ajv/lib/dot/allOf.jst)0
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/anyOf.jst (renamed from deps/npm/node_modules/ajv/lib/dot/anyOf.jst)2
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/coerce.def (renamed from deps/npm/node_modules/ajv/lib/dot/coerce.def)0
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/custom.jst (renamed from deps/npm/node_modules/ajv/lib/dot/custom.jst)23
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/defaults.def (renamed from deps/npm/node_modules/ajv/lib/dot/defaults.def)0
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/definitions.def (renamed from deps/npm/node_modules/ajv/lib/dot/definitions.def)25
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/dependencies.jst (renamed from deps/npm/node_modules/ajv/lib/dot/dependencies.jst)37
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/enum.jst (renamed from deps/npm/node_modules/ajv/lib/dot/enum.jst)0
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/errors.def (renamed from deps/npm/node_modules/ajv/lib/dot/errors.def)23
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/format.jst (renamed from deps/npm/node_modules/ajv/lib/dot/format.jst)40
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/items.jst (renamed from deps/npm/node_modules/ajv/lib/dot/items.jst)1
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/missing.def (renamed from deps/npm/node_modules/ajv/lib/dot/missing.def)19
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/multipleOf.jst (renamed from deps/npm/node_modules/ajv/lib/dot/multipleOf.jst)0
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/not.jst (renamed from deps/npm/node_modules/ajv/lib/dot/not.jst)0
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/oneOf.jst (renamed from deps/npm/node_modules/ajv/lib/dot/oneOf.jst)2
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/pattern.jst (renamed from deps/npm/node_modules/ajv/lib/dot/pattern.jst)0
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/properties.jst (renamed from deps/npm/node_modules/ajv/lib/dot/properties.jst)80
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/ref.jst (renamed from deps/npm/node_modules/ajv/lib/dot/ref.jst)21
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/required.jst (renamed from deps/npm/node_modules/ajv/lib/dot/required.jst)20
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/uniqueItems.jst (renamed from deps/npm/node_modules/ajv/lib/dot/uniqueItems.jst)0
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/v5/_formatLimit.jst116
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/v5/constant.jst (renamed from deps/npm/node_modules/ajv/lib/dot/const.jst)3
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/v5/patternRequired.jst28
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/v5/switch.jst73
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/validate.jst (renamed from deps/npm/node_modules/ajv/lib/dot/validate.jst)184
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/README.md (renamed from deps/npm/node_modules/ajv/lib/dotjs/README.md)0
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/_formatLimit.js176
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/_limit.js (renamed from deps/npm/node_modules/ajv/lib/dotjs/_limit.js)65
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/_limitItems.js (renamed from deps/npm/node_modules/ajv/lib/dotjs/_limitItems.js)4
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/_limitLength.js (renamed from deps/npm/node_modules/ajv/lib/dotjs/_limitLength.js)4
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/_limitProperties.js (renamed from deps/npm/node_modules/ajv/lib/dotjs/_limitProperties.js)4
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/allOf.js (renamed from deps/npm/node_modules/ajv/lib/dotjs/allOf.js)2
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/anyOf.js (renamed from deps/npm/node_modules/ajv/lib/dotjs/anyOf.js)14
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/constant.js (renamed from deps/npm/node_modules/ajv/lib/dotjs/const.js)9
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/custom.js (renamed from deps/npm/node_modules/ajv/lib/dotjs/custom.js)24
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/dependencies.js147
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/enum.js (renamed from deps/npm/node_modules/ajv/lib/dotjs/enum.js)4
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/format.js (renamed from deps/npm/node_modules/ajv/lib/dotjs/format.js)35
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/items.js (renamed from deps/npm/node_modules/ajv/lib/dotjs/items.js)8
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/multipleOf.js (renamed from deps/npm/node_modules/ajv/lib/dotjs/multipleOf.js)6
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/not.js (renamed from deps/npm/node_modules/ajv/lib/dotjs/not.js)2
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/oneOf.js (renamed from deps/npm/node_modules/ajv/lib/dotjs/oneOf.js)16
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/pattern.js (renamed from deps/npm/node_modules/ajv/lib/dotjs/pattern.js)4
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/patternRequired.js51
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/properties.js (renamed from deps/npm/node_modules/ajv/lib/dotjs/properties.js)121
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/ref.js (renamed from deps/npm/node_modules/ajv/lib/dotjs/ref.js)26
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/required.js (renamed from deps/npm/node_modules/ajv/lib/dotjs/required.js)49
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/switch.js128
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/uniqueItems.js (renamed from deps/npm/node_modules/ajv/lib/dotjs/uniqueItems.js)4
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/validate.js375
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/keyword.js (renamed from deps/npm/node_modules/ajv/lib/keyword.js)14
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/refs/json-schema-draft-04.json (renamed from deps/npm/node_modules/ajv/lib/refs/json-schema-draft-04.json)0
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/refs/json-schema-v5.json (renamed from deps/npm/node_modules/ajv/lib/refs/json-schema-v5.json)84
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/v5.js52
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/package.json (renamed from deps/npm/node_modules/ajv/package.json)65
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/scripts/.eslintrc.yml (renamed from deps/npm/node_modules/ajv/scripts/.eslintrc.yml)0
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/scripts/bundle.js (renamed from deps/npm/node_modules/ajv/scripts/bundle.js)19
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/scripts/compile-dots.js (renamed from deps/npm/node_modules/ajv/scripts/compile-dots.js)4
-rwxr-xr-xdeps/npm/node_modules/har-validator/node_modules/ajv/scripts/info (renamed from deps/npm/node_modules/ajv/scripts/info)0
-rwxr-xr-xdeps/npm/node_modules/har-validator/node_modules/ajv/scripts/prepare-tests (renamed from deps/npm/node_modules/ajv/scripts/prepare-tests)0
-rwxr-xr-xdeps/npm/node_modules/har-validator/node_modules/ajv/scripts/travis-gh-pages (renamed from deps/npm/node_modules/ajv/scripts/travis-gh-pages)0
-rw-r--r--deps/npm/node_modules/har-validator/package.json73
-rw-r--r--deps/npm/node_modules/har-validator/src/async.js (renamed from deps/npm/node_modules/har-validator/lib/async.js)52
-rw-r--r--deps/npm/node_modules/har-validator/src/error.js (renamed from deps/npm/node_modules/har-validator/lib/error.js)6
-rw-r--r--deps/npm/node_modules/har-validator/src/promise.js93
-rw-r--r--[-rwxr-xr-x]deps/npm/node_modules/hawk/.npmignore24
-rwxr-xr-xdeps/npm/node_modules/hawk/.travis.yml4
-rwxr-xr-xdeps/npm/node_modules/hawk/LICENSE2
-rwxr-xr-xdeps/npm/node_modules/hawk/README.md99
-rw-r--r--deps/npm/node_modules/hawk/bower.json24
-rwxr-xr-xdeps/npm/node_modules/hawk/client.js3
-rw-r--r--deps/npm/node_modules/hawk/component.json19
-rw-r--r--deps/npm/node_modules/hawk/dist/browser.js793
-rw-r--r--deps/npm/node_modules/hawk/dist/client.js343
-rwxr-xr-xdeps/npm/node_modules/hawk/example/usage.js77
-rwxr-xr-xdeps/npm/node_modules/hawk/images/hawk.pngbin0 -> 6945 bytes
-rwxr-xr-xdeps/npm/node_modules/hawk/images/logo.pngbin0 -> 71732 bytes
-rwxr-xr-xdeps/npm/node_modules/hawk/lib/browser.js150
-rwxr-xr-xdeps/npm/node_modules/hawk/lib/client.js119
-rwxr-xr-xdeps/npm/node_modules/hawk/lib/crypto.js42
-rwxr-xr-xdeps/npm/node_modules/hawk/lib/index.js2
-rwxr-xr-xdeps/npm/node_modules/hawk/lib/server.js116
-rwxr-xr-xdeps/npm/node_modules/hawk/lib/utils.js30
-rwxr-xr-xdeps/npm/node_modules/hawk/package.json48
-rwxr-xr-xdeps/npm/node_modules/hawk/test/browser.js1492
-rwxr-xr-xdeps/npm/node_modules/hawk/test/client.js440
-rwxr-xr-xdeps/npm/node_modules/hawk/test/crypto.js70
-rwxr-xr-xdeps/npm/node_modules/hawk/test/index.js378
-rwxr-xr-xdeps/npm/node_modules/hawk/test/readme.js94
-rwxr-xr-xdeps/npm/node_modules/hawk/test/server.js1328
-rwxr-xr-xdeps/npm/node_modules/hawk/test/uri.js837
-rwxr-xr-xdeps/npm/node_modules/hawk/test/utils.js149
-rw-r--r--deps/npm/node_modules/hoek/.npmignore21
-rw-r--r--deps/npm/node_modules/hoek/.travis.yml7
-rw-r--r--deps/npm/node_modules/hoek/CONTRIBUTING.md1
-rw-r--r--deps/npm/node_modules/hoek/LICENSE3
-rw-r--r--deps/npm/node_modules/hoek/README.md572
-rw-r--r--deps/npm/node_modules/hoek/images/hoek.pngbin0 -> 37939 bytes
-rw-r--r--[-rwxr-xr-x]deps/npm/node_modules/hoek/lib/escape.js60
-rw-r--r--[-rwxr-xr-x]deps/npm/node_modules/hoek/lib/index.js355
-rw-r--r--deps/npm/node_modules/hoek/package.json29
-rw-r--r--deps/npm/node_modules/hoek/test/escaper.js88
-rw-r--r--deps/npm/node_modules/hoek/test/index.js2513
-rw-r--r--deps/npm/node_modules/hoek/test/modules/ignore.txt0
-rw-r--r--deps/npm/node_modules/hoek/test/modules/test1.js1
-rw-r--r--deps/npm/node_modules/hoek/test/modules/test2.js1
-rw-r--r--deps/npm/node_modules/hoek/test/modules/test3.js1
-rw-r--r--deps/npm/node_modules/http-signature/lib/parser.js27
-rw-r--r--deps/npm/node_modules/http-signature/lib/signer.js4
-rw-r--r--deps/npm/node_modules/http-signature/package.json38
-rw-r--r--deps/npm/node_modules/is-cidr/README.md4
-rw-r--r--deps/npm/node_modules/is-cidr/package.json34
-rw-r--r--deps/npm/node_modules/is-fullwidth-code-point/index.js72
-rw-r--r--deps/npm/node_modules/is-fullwidth-code-point/package.json42
-rw-r--r--deps/npm/node_modules/is-fullwidth-code-point/readme.md4
-rw-r--r--deps/npm/node_modules/json-schema-traverse/.eslintrc.yml27
-rw-r--r--deps/npm/node_modules/json-schema-traverse/.npmignore60
-rw-r--r--deps/npm/node_modules/json-schema-traverse/.travis.yml8
-rw-r--r--deps/npm/node_modules/json-schema-traverse/LICENSE21
-rw-r--r--deps/npm/node_modules/json-schema-traverse/README.md69
-rw-r--r--deps/npm/node_modules/json-schema-traverse/index.js81
-rw-r--r--deps/npm/node_modules/json-schema-traverse/package.json70
-rw-r--r--deps/npm/node_modules/json-schema-traverse/spec/.eslintrc.yml6
-rw-r--r--deps/npm/node_modules/json-schema-traverse/spec/fixtures/schema.js125
-rw-r--r--deps/npm/node_modules/json-schema-traverse/spec/index.spec.js102
-rw-r--r--deps/npm/node_modules/json-stable-stringify/.npmignore1
-rw-r--r--deps/npm/node_modules/json-stable-stringify/.travis.yml (renamed from deps/npm/node_modules/npm-profile/node_modules/pump/.travis.yml)3
-rw-r--r--deps/npm/node_modules/json-stable-stringify/LICENSE (renamed from deps/npm/node_modules/fast-json-stable-stringify/LICENSE)0
-rw-r--r--deps/npm/node_modules/json-stable-stringify/example/key_cmp.js (renamed from deps/npm/node_modules/fast-json-stable-stringify/example/key_cmp.js)0
-rw-r--r--deps/npm/node_modules/json-stable-stringify/example/nested.js (renamed from deps/npm/node_modules/fast-json-stable-stringify/example/nested.js)0
-rw-r--r--deps/npm/node_modules/json-stable-stringify/example/str.js (renamed from deps/npm/node_modules/fast-json-stable-stringify/example/str.js)0
-rw-r--r--deps/npm/node_modules/json-stable-stringify/example/value_cmp.js (renamed from deps/npm/node_modules/fast-json-stable-stringify/example/value_cmp.js)0
-rw-r--r--deps/npm/node_modules/json-stable-stringify/index.js84
-rw-r--r--deps/npm/node_modules/json-stable-stringify/package.json74
-rw-r--r--deps/npm/node_modules/json-stable-stringify/readme.markdown130
-rw-r--r--deps/npm/node_modules/json-stable-stringify/test/cmp.js (renamed from deps/npm/node_modules/fast-json-stable-stringify/test/cmp.js)2
-rw-r--r--deps/npm/node_modules/json-stable-stringify/test/nested.js (renamed from deps/npm/node_modules/fast-json-stable-stringify/test/nested.js)13
-rw-r--r--deps/npm/node_modules/json-stable-stringify/test/replacer.js74
-rw-r--r--deps/npm/node_modules/json-stable-stringify/test/space.js59
-rw-r--r--deps/npm/node_modules/json-stable-stringify/test/str.js32
-rw-r--r--deps/npm/node_modules/json-stable-stringify/test/to-json.js (renamed from deps/npm/node_modules/fast-json-stable-stringify/test/to-json.js)14
-rw-r--r--deps/npm/node_modules/jsonify/README.markdown34
-rw-r--r--deps/npm/node_modules/jsonify/index.js2
-rw-r--r--deps/npm/node_modules/jsonify/lib/parse.js273
-rw-r--r--deps/npm/node_modules/jsonify/lib/stringify.js154
-rw-r--r--deps/npm/node_modules/jsonify/package.json62
-rw-r--r--deps/npm/node_modules/jsonify/test/parse.js16
-rw-r--r--deps/npm/node_modules/jsonify/test/stringify.js15
-rw-r--r--deps/npm/node_modules/jsprim/node_modules/assert-plus/AUTHORS6
-rw-r--r--deps/npm/node_modules/jsprim/node_modules/assert-plus/CHANGES.md14
-rw-r--r--deps/npm/node_modules/jsprim/node_modules/assert-plus/README.md162
-rw-r--r--deps/npm/node_modules/jsprim/node_modules/assert-plus/assert.js211
-rw-r--r--deps/npm/node_modules/jsprim/node_modules/assert-plus/package.json82
-rw-r--r--deps/npm/node_modules/lodash/LICENSE22
-rw-r--r--deps/npm/node_modules/lodash/README.md121
-rw-r--r--deps/npm/node_modules/lodash/array.js44
-rw-r--r--deps/npm/node_modules/lodash/array/chunk.js46
-rw-r--r--deps/npm/node_modules/lodash/array/compact.js30
-rw-r--r--deps/npm/node_modules/lodash/array/difference.js29
-rw-r--r--deps/npm/node_modules/lodash/array/drop.js39
-rw-r--r--deps/npm/node_modules/lodash/array/dropRight.js40
-rw-r--r--deps/npm/node_modules/lodash/array/dropRightWhile.js59
-rw-r--r--deps/npm/node_modules/lodash/array/dropWhile.js59
-rw-r--r--deps/npm/node_modules/lodash/array/fill.js44
-rw-r--r--deps/npm/node_modules/lodash/array/findIndex.js53
-rw-r--r--deps/npm/node_modules/lodash/array/findLastIndex.js53
-rw-r--r--deps/npm/node_modules/lodash/array/first.js22
-rw-r--r--deps/npm/node_modules/lodash/array/flatten.js32
-rw-r--r--deps/npm/node_modules/lodash/array/flattenDeep.js21
-rw-r--r--deps/npm/node_modules/lodash/array/head.js1
-rw-r--r--deps/npm/node_modules/lodash/array/indexOf.js53
-rw-r--r--deps/npm/node_modules/lodash/array/initial.js20
-rw-r--r--deps/npm/node_modules/lodash/array/intersection.js58
-rw-r--r--deps/npm/node_modules/lodash/array/last.js19
-rw-r--r--deps/npm/node_modules/lodash/array/lastIndexOf.js60
-rw-r--r--deps/npm/node_modules/lodash/array/object.js1
-rw-r--r--deps/npm/node_modules/lodash/array/pull.js52
-rw-r--r--deps/npm/node_modules/lodash/array/pullAt.js40
-rw-r--r--deps/npm/node_modules/lodash/array/remove.js64
-rw-r--r--deps/npm/node_modules/lodash/array/rest.js21
-rw-r--r--deps/npm/node_modules/lodash/array/slice.js30
-rw-r--r--deps/npm/node_modules/lodash/array/sortedIndex.js53
-rw-r--r--deps/npm/node_modules/lodash/array/sortedLastIndex.js25
-rw-r--r--deps/npm/node_modules/lodash/array/tail.js1
-rw-r--r--deps/npm/node_modules/lodash/array/take.js39
-rw-r--r--deps/npm/node_modules/lodash/array/takeRight.js40
-rw-r--r--deps/npm/node_modules/lodash/array/takeRightWhile.js59
-rw-r--r--deps/npm/node_modules/lodash/array/takeWhile.js59
-rw-r--r--deps/npm/node_modules/lodash/array/union.js24
-rw-r--r--deps/npm/node_modules/lodash/array/uniq.js71
-rw-r--r--deps/npm/node_modules/lodash/array/unique.js1
-rw-r--r--deps/npm/node_modules/lodash/array/unzip.js47
-rw-r--r--deps/npm/node_modules/lodash/array/unzipWith.js41
-rw-r--r--deps/npm/node_modules/lodash/array/without.js27
-rw-r--r--deps/npm/node_modules/lodash/array/xor.js35
-rw-r--r--deps/npm/node_modules/lodash/array/zip.js21
-rw-r--r--deps/npm/node_modules/lodash/array/zipObject.js43
-rw-r--r--deps/npm/node_modules/lodash/array/zipWith.js36
-rw-r--r--deps/npm/node_modules/lodash/chain.js16
-rw-r--r--deps/npm/node_modules/lodash/chain/chain.js35
-rw-r--r--deps/npm/node_modules/lodash/chain/commit.js1
-rw-r--r--deps/npm/node_modules/lodash/chain/concat.js1
-rw-r--r--deps/npm/node_modules/lodash/chain/lodash.js125
-rw-r--r--deps/npm/node_modules/lodash/chain/plant.js1
-rw-r--r--deps/npm/node_modules/lodash/chain/reverse.js1
-rw-r--r--deps/npm/node_modules/lodash/chain/run.js1
-rw-r--r--deps/npm/node_modules/lodash/chain/tap.js29
-rw-r--r--deps/npm/node_modules/lodash/chain/thru.js26
-rw-r--r--deps/npm/node_modules/lodash/chain/toJSON.js1
-rw-r--r--deps/npm/node_modules/lodash/chain/toString.js1
-rw-r--r--deps/npm/node_modules/lodash/chain/value.js1
-rw-r--r--deps/npm/node_modules/lodash/chain/valueOf.js1
-rw-r--r--deps/npm/node_modules/lodash/chain/wrapperChain.js32
-rw-r--r--deps/npm/node_modules/lodash/chain/wrapperCommit.js32
-rw-r--r--deps/npm/node_modules/lodash/chain/wrapperConcat.js34
-rw-r--r--deps/npm/node_modules/lodash/chain/wrapperPlant.js45
-rw-r--r--deps/npm/node_modules/lodash/chain/wrapperReverse.js43
-rw-r--r--deps/npm/node_modules/lodash/chain/wrapperToString.js17
-rw-r--r--deps/npm/node_modules/lodash/chain/wrapperValue.js20
-rw-r--r--deps/npm/node_modules/lodash/collection.js44
-rw-r--r--deps/npm/node_modules/lodash/collection/all.js1
-rw-r--r--deps/npm/node_modules/lodash/collection/any.js1
-rw-r--r--deps/npm/node_modules/lodash/collection/at.js29
-rw-r--r--deps/npm/node_modules/lodash/collection/collect.js1
-rw-r--r--deps/npm/node_modules/lodash/collection/contains.js1
-rw-r--r--deps/npm/node_modules/lodash/collection/countBy.js54
-rw-r--r--deps/npm/node_modules/lodash/collection/detect.js1
-rw-r--r--deps/npm/node_modules/lodash/collection/each.js1
-rw-r--r--deps/npm/node_modules/lodash/collection/eachRight.js1
-rw-r--r--deps/npm/node_modules/lodash/collection/every.js66
-rw-r--r--deps/npm/node_modules/lodash/collection/filter.js61
-rw-r--r--deps/npm/node_modules/lodash/collection/find.js56
-rw-r--r--deps/npm/node_modules/lodash/collection/findLast.js25
-rw-r--r--deps/npm/node_modules/lodash/collection/findWhere.js37
-rw-r--r--deps/npm/node_modules/lodash/collection/foldl.js1
-rw-r--r--deps/npm/node_modules/lodash/collection/foldr.js1
-rw-r--r--deps/npm/node_modules/lodash/collection/forEach.js37
-rw-r--r--deps/npm/node_modules/lodash/collection/forEachRight.js26
-rw-r--r--deps/npm/node_modules/lodash/collection/groupBy.js59
-rw-r--r--deps/npm/node_modules/lodash/collection/include.js1
-rw-r--r--deps/npm/node_modules/lodash/collection/includes.js57
-rw-r--r--deps/npm/node_modules/lodash/collection/indexBy.js53
-rw-r--r--deps/npm/node_modules/lodash/collection/inject.js1
-rw-r--r--deps/npm/node_modules/lodash/collection/invoke.js42
-rw-r--r--deps/npm/node_modules/lodash/collection/map.js68
-rw-r--r--deps/npm/node_modules/lodash/collection/max.js1
-rw-r--r--deps/npm/node_modules/lodash/collection/min.js1
-rw-r--r--deps/npm/node_modules/lodash/collection/partition.js66
-rw-r--r--deps/npm/node_modules/lodash/collection/pluck.js31
-rw-r--r--deps/npm/node_modules/lodash/collection/reduce.js44
-rw-r--r--deps/npm/node_modules/lodash/collection/reduceRight.js29
-rw-r--r--deps/npm/node_modules/lodash/collection/reject.js50
-rw-r--r--deps/npm/node_modules/lodash/collection/sample.js50
-rw-r--r--deps/npm/node_modules/lodash/collection/select.js1
-rw-r--r--deps/npm/node_modules/lodash/collection/shuffle.js24
-rw-r--r--deps/npm/node_modules/lodash/collection/size.js30
-rw-r--r--deps/npm/node_modules/lodash/collection/some.js67
-rw-r--r--deps/npm/node_modules/lodash/collection/sortBy.js71
-rw-r--r--deps/npm/node_modules/lodash/collection/sortByAll.js52
-rw-r--r--deps/npm/node_modules/lodash/collection/sortByOrder.js55
-rw-r--r--deps/npm/node_modules/lodash/collection/sum.js1
-rw-r--r--deps/npm/node_modules/lodash/collection/where.js37
-rw-r--r--deps/npm/node_modules/lodash/date.js3
-rw-r--r--deps/npm/node_modules/lodash/date/now.js24
-rw-r--r--deps/npm/node_modules/lodash/function.js28
-rw-r--r--deps/npm/node_modules/lodash/function/after.js48
-rw-r--r--deps/npm/node_modules/lodash/function/ary.js34
-rw-r--r--deps/npm/node_modules/lodash/function/backflow.js1
-rw-r--r--deps/npm/node_modules/lodash/function/before.js42
-rw-r--r--deps/npm/node_modules/lodash/function/bind.js56
-rw-r--r--deps/npm/node_modules/lodash/function/bindAll.js50
-rw-r--r--deps/npm/node_modules/lodash/function/bindKey.js66
-rw-r--r--deps/npm/node_modules/lodash/function/compose.js1
-rw-r--r--deps/npm/node_modules/lodash/function/curry.js51
-rw-r--r--deps/npm/node_modules/lodash/function/curryRight.js48
-rw-r--r--deps/npm/node_modules/lodash/function/debounce.js181
-rw-r--r--deps/npm/node_modules/lodash/function/defer.js25
-rw-r--r--deps/npm/node_modules/lodash/function/delay.js26
-rw-r--r--deps/npm/node_modules/lodash/function/flow.js25
-rw-r--r--deps/npm/node_modules/lodash/function/flowRight.js25
-rw-r--r--deps/npm/node_modules/lodash/function/memoize.js80
-rw-r--r--deps/npm/node_modules/lodash/function/modArgs.js58
-rw-r--r--deps/npm/node_modules/lodash/function/negate.js32
-rw-r--r--deps/npm/node_modules/lodash/function/once.js24
-rw-r--r--deps/npm/node_modules/lodash/function/partial.js43
-rw-r--r--deps/npm/node_modules/lodash/function/partialRight.js42
-rw-r--r--deps/npm/node_modules/lodash/function/rearg.js40
-rw-r--r--deps/npm/node_modules/lodash/function/restParam.js58
-rw-r--r--deps/npm/node_modules/lodash/function/spread.js44
-rw-r--r--deps/npm/node_modules/lodash/function/throttle.js62
-rw-r--r--deps/npm/node_modules/lodash/function/wrap.js33
-rw-r--r--deps/npm/node_modules/lodash/index.js12351
-rw-r--r--deps/npm/node_modules/lodash/internal/LazyWrapper.js26
-rw-r--r--deps/npm/node_modules/lodash/internal/LodashWrapper.js21
-rw-r--r--deps/npm/node_modules/lodash/internal/MapCache.js24
-rw-r--r--deps/npm/node_modules/lodash/internal/SetCache.js29
-rw-r--r--deps/npm/node_modules/lodash/internal/arrayConcat.js25
-rw-r--r--deps/npm/node_modules/lodash/internal/arrayCopy.js20
-rw-r--r--deps/npm/node_modules/lodash/internal/arrayEach.js22
-rw-r--r--deps/npm/node_modules/lodash/internal/arrayEachRight.js21
-rw-r--r--deps/npm/node_modules/lodash/internal/arrayEvery.js23
-rw-r--r--deps/npm/node_modules/lodash/internal/arrayExtremum.js30
-rw-r--r--deps/npm/node_modules/lodash/internal/arrayFilter.js25
-rw-r--r--deps/npm/node_modules/lodash/internal/arrayMap.js21
-rw-r--r--deps/npm/node_modules/lodash/internal/arrayPush.js20
-rw-r--r--deps/npm/node_modules/lodash/internal/arrayReduce.js26
-rw-r--r--deps/npm/node_modules/lodash/internal/arrayReduceRight.js24
-rw-r--r--deps/npm/node_modules/lodash/internal/arraySome.js23
-rw-r--r--deps/npm/node_modules/lodash/internal/arraySum.js20
-rw-r--r--deps/npm/node_modules/lodash/internal/assignDefaults.js13
-rw-r--r--deps/npm/node_modules/lodash/internal/assignOwnDefaults.js26
-rw-r--r--deps/npm/node_modules/lodash/internal/assignWith.js32
-rw-r--r--deps/npm/node_modules/lodash/internal/baseAssign.js19
-rw-r--r--deps/npm/node_modules/lodash/internal/baseAt.js32
-rw-r--r--deps/npm/node_modules/lodash/internal/baseCallback.js35
-rw-r--r--deps/npm/node_modules/lodash/internal/baseClone.js128
-rw-r--r--deps/npm/node_modules/lodash/internal/baseCompareAscending.js34
-rw-r--r--deps/npm/node_modules/lodash/internal/baseCopy.js23
-rw-r--r--deps/npm/node_modules/lodash/internal/baseCreate.js23
-rw-r--r--deps/npm/node_modules/lodash/internal/baseDelay.js21
-rw-r--r--deps/npm/node_modules/lodash/internal/baseDifference.js55
-rw-r--r--deps/npm/node_modules/lodash/internal/baseEach.js15
-rw-r--r--deps/npm/node_modules/lodash/internal/baseEachRight.js15
-rw-r--r--deps/npm/node_modules/lodash/internal/baseEvery.js22
-rw-r--r--deps/npm/node_modules/lodash/internal/baseExtremum.js29
-rw-r--r--deps/npm/node_modules/lodash/internal/baseFill.js31
-rw-r--r--deps/npm/node_modules/lodash/internal/baseFilter.js22
-rw-r--r--deps/npm/node_modules/lodash/internal/baseFind.js25
-rw-r--r--deps/npm/node_modules/lodash/internal/baseFindIndex.js23
-rw-r--r--deps/npm/node_modules/lodash/internal/baseFlatten.js41
-rw-r--r--deps/npm/node_modules/lodash/internal/baseFor.js17
-rw-r--r--deps/npm/node_modules/lodash/internal/baseForIn.js17
-rw-r--r--deps/npm/node_modules/lodash/internal/baseForOwn.js17
-rw-r--r--deps/npm/node_modules/lodash/internal/baseForOwnRight.js17
-rw-r--r--deps/npm/node_modules/lodash/internal/baseForRight.js15
-rw-r--r--deps/npm/node_modules/lodash/internal/baseFunctions.js27
-rw-r--r--deps/npm/node_modules/lodash/internal/baseGet.js29
-rw-r--r--deps/npm/node_modules/lodash/internal/baseIndexOf.js27
-rw-r--r--deps/npm/node_modules/lodash/internal/baseIsEqual.js28
-rw-r--r--deps/npm/node_modules/lodash/internal/baseIsEqualDeep.js102
-rw-r--r--deps/npm/node_modules/lodash/internal/baseIsFunction.js15
-rw-r--r--deps/npm/node_modules/lodash/internal/baseIsMatch.js52
-rw-r--r--deps/npm/node_modules/lodash/internal/baseLodash.js10
-rw-r--r--deps/npm/node_modules/lodash/internal/baseMap.js23
-rw-r--r--deps/npm/node_modules/lodash/internal/baseMatches.js30
-rw-r--r--deps/npm/node_modules/lodash/internal/baseMatchesProperty.js45
-rw-r--r--deps/npm/node_modules/lodash/internal/baseMerge.js56
-rw-r--r--deps/npm/node_modules/lodash/internal/baseMergeDeep.js67
-rw-r--r--deps/npm/node_modules/lodash/internal/baseProperty.js14
-rw-r--r--deps/npm/node_modules/lodash/internal/basePropertyDeep.js19
-rw-r--r--deps/npm/node_modules/lodash/internal/basePullAt.js30
-rw-r--r--deps/npm/node_modules/lodash/internal/baseRandom.js18
-rw-r--r--deps/npm/node_modules/lodash/internal/baseReduce.js24
-rw-r--r--deps/npm/node_modules/lodash/internal/baseSetData.js17
-rw-r--r--deps/npm/node_modules/lodash/internal/baseSlice.js32
-rw-r--r--deps/npm/node_modules/lodash/internal/baseSome.js23
-rw-r--r--deps/npm/node_modules/lodash/internal/baseSortBy.js21
-rw-r--r--deps/npm/node_modules/lodash/internal/baseSortByOrder.js31
-rw-r--r--deps/npm/node_modules/lodash/internal/baseSum.js20
-rw-r--r--deps/npm/node_modules/lodash/internal/baseToString.js13
-rw-r--r--deps/npm/node_modules/lodash/internal/baseUniq.js60
-rw-r--r--deps/npm/node_modules/lodash/internal/baseValues.js22
-rw-r--r--deps/npm/node_modules/lodash/internal/baseWhile.js24
-rw-r--r--deps/npm/node_modules/lodash/internal/baseWrapperValue.js29
-rw-r--r--deps/npm/node_modules/lodash/internal/binaryIndex.js39
-rw-r--r--deps/npm/node_modules/lodash/internal/binaryIndexBy.js57
-rw-r--r--deps/npm/node_modules/lodash/internal/bindCallback.js39
-rw-r--r--deps/npm/node_modules/lodash/internal/bufferClone.js20
-rw-r--r--deps/npm/node_modules/lodash/internal/cacheIndexOf.js19
-rw-r--r--deps/npm/node_modules/lodash/internal/cachePush.js20
-rw-r--r--deps/npm/node_modules/lodash/internal/charsLeftIndex.js18
-rw-r--r--deps/npm/node_modules/lodash/internal/charsRightIndex.js17
-rw-r--r--deps/npm/node_modules/lodash/internal/compareAscending.js16
-rw-r--r--deps/npm/node_modules/lodash/internal/compareMultiple.js44
-rw-r--r--deps/npm/node_modules/lodash/internal/composeArgs.js34
-rw-r--r--deps/npm/node_modules/lodash/internal/composeArgsRight.js36
-rw-r--r--deps/npm/node_modules/lodash/internal/createAggregator.js35
-rw-r--r--deps/npm/node_modules/lodash/internal/createAssigner.js41
-rw-r--r--deps/npm/node_modules/lodash/internal/createBaseEach.js31
-rw-r--r--deps/npm/node_modules/lodash/internal/createBaseFor.js27
-rw-r--r--deps/npm/node_modules/lodash/internal/createBindWrapper.js22
-rw-r--r--deps/npm/node_modules/lodash/internal/createCache.js21
-rw-r--r--deps/npm/node_modules/lodash/internal/createCompounder.js26
-rw-r--r--deps/npm/node_modules/lodash/internal/createCtorWrapper.js37
-rw-r--r--deps/npm/node_modules/lodash/internal/createCurry.js23
-rw-r--r--deps/npm/node_modules/lodash/internal/createDefaults.js22
-rw-r--r--deps/npm/node_modules/lodash/internal/createExtremum.js33
-rw-r--r--deps/npm/node_modules/lodash/internal/createFind.js25
-rw-r--r--deps/npm/node_modules/lodash/internal/createFindIndex.js21
-rw-r--r--deps/npm/node_modules/lodash/internal/createFindKey.js18
-rw-r--r--deps/npm/node_modules/lodash/internal/createFlow.js74
-rw-r--r--deps/npm/node_modules/lodash/internal/createForEach.js20
-rw-r--r--deps/npm/node_modules/lodash/internal/createForIn.js20
-rw-r--r--deps/npm/node_modules/lodash/internal/createForOwn.js19
-rw-r--r--deps/npm/node_modules/lodash/internal/createHybridWrapper.js111
-rw-r--r--deps/npm/node_modules/lodash/internal/createObjectMapper.js26
-rw-r--r--deps/npm/node_modules/lodash/internal/createPadDir.js18
-rw-r--r--deps/npm/node_modules/lodash/internal/createPadding.js29
-rw-r--r--deps/npm/node_modules/lodash/internal/createPartial.js20
-rw-r--r--deps/npm/node_modules/lodash/internal/createPartialWrapper.js43
-rw-r--r--deps/npm/node_modules/lodash/internal/createReduce.js22
-rw-r--r--deps/npm/node_modules/lodash/internal/createRound.js23
-rw-r--r--deps/npm/node_modules/lodash/internal/createSortedIndex.js20
-rw-r--r--deps/npm/node_modules/lodash/internal/createWrapper.js86
-rw-r--r--deps/npm/node_modules/lodash/internal/deburrLetter.js33
-rw-r--r--deps/npm/node_modules/lodash/internal/equalArrays.js51
-rw-r--r--deps/npm/node_modules/lodash/internal/equalByTag.js48
-rw-r--r--deps/npm/node_modules/lodash/internal/equalObjects.js67
-rw-r--r--deps/npm/node_modules/lodash/internal/escapeHtmlChar.js22
-rw-r--r--deps/npm/node_modules/lodash/internal/escapeRegExpChar.js38
-rw-r--r--deps/npm/node_modules/lodash/internal/escapeStringChar.js22
-rw-r--r--deps/npm/node_modules/lodash/internal/getData.js15
-rw-r--r--deps/npm/node_modules/lodash/internal/getFuncName.js25
-rw-r--r--deps/npm/node_modules/lodash/internal/getLength.js15
-rw-r--r--deps/npm/node_modules/lodash/internal/getMatchData.js21
-rw-r--r--deps/npm/node_modules/lodash/internal/getNative.js16
-rw-r--r--deps/npm/node_modules/lodash/internal/getView.js33
-rw-r--r--deps/npm/node_modules/lodash/internal/indexOfNaN.js23
-rw-r--r--deps/npm/node_modules/lodash/internal/initCloneArray.js26
-rw-r--r--deps/npm/node_modules/lodash/internal/initCloneByTag.js63
-rw-r--r--deps/npm/node_modules/lodash/internal/initCloneObject.js16
-rw-r--r--deps/npm/node_modules/lodash/internal/invokePath.js26
-rw-r--r--deps/npm/node_modules/lodash/internal/isArrayLike.js15
-rw-r--r--deps/npm/node_modules/lodash/internal/isIndex.js24
-rw-r--r--deps/npm/node_modules/lodash/internal/isIterateeCall.js28
-rw-r--r--deps/npm/node_modules/lodash/internal/isKey.js28
-rw-r--r--deps/npm/node_modules/lodash/internal/isLaziable.js27
-rw-r--r--deps/npm/node_modules/lodash/internal/isLength.js20
-rw-r--r--deps/npm/node_modules/lodash/internal/isObjectLike.js12
-rw-r--r--deps/npm/node_modules/lodash/internal/isSpace.js14
-rw-r--r--deps/npm/node_modules/lodash/internal/isStrictComparable.js15
-rw-r--r--deps/npm/node_modules/lodash/internal/lazyClone.js23
-rw-r--r--deps/npm/node_modules/lodash/internal/lazyReverse.js23
-rw-r--r--deps/npm/node_modules/lodash/internal/lazyValue.js72
-rw-r--r--deps/npm/node_modules/lodash/internal/mapDelete.js14
-rw-r--r--deps/npm/node_modules/lodash/internal/mapGet.js14
-rw-r--r--deps/npm/node_modules/lodash/internal/mapHas.js20
-rw-r--r--deps/npm/node_modules/lodash/internal/mapSet.js18
-rw-r--r--deps/npm/node_modules/lodash/internal/mergeData.js89
-rw-r--r--deps/npm/node_modules/lodash/internal/mergeDefaults.js15
-rw-r--r--deps/npm/node_modules/lodash/internal/metaMap.js9
-rw-r--r--deps/npm/node_modules/lodash/internal/pickByArray.js28
-rw-r--r--deps/npm/node_modules/lodash/internal/pickByCallback.js22
-rw-r--r--deps/npm/node_modules/lodash/internal/reEscape.js4
-rw-r--r--deps/npm/node_modules/lodash/internal/reEvaluate.js4
-rw-r--r--deps/npm/node_modules/lodash/internal/reInterpolate.js4
-rw-r--r--deps/npm/node_modules/lodash/internal/realNames.js4
-rw-r--r--deps/npm/node_modules/lodash/internal/reorder.js29
-rw-r--r--deps/npm/node_modules/lodash/internal/replaceHolders.js28
-rw-r--r--deps/npm/node_modules/lodash/internal/setData.js41
-rw-r--r--deps/npm/node_modules/lodash/internal/shimKeys.js41
-rw-r--r--deps/npm/node_modules/lodash/internal/sortedUniq.js29
-rw-r--r--deps/npm/node_modules/lodash/internal/toIterable.js22
-rw-r--r--deps/npm/node_modules/lodash/internal/toObject.js14
-rw-r--r--deps/npm/node_modules/lodash/internal/toPath.js28
-rw-r--r--deps/npm/node_modules/lodash/internal/trimmedLeftIndex.js19
-rw-r--r--deps/npm/node_modules/lodash/internal/trimmedRightIndex.js18
-rw-r--r--deps/npm/node_modules/lodash/internal/unescapeHtmlChar.js22
-rw-r--r--deps/npm/node_modules/lodash/internal/wrapperClone.js18
-rw-r--r--deps/npm/node_modules/lodash/lang.js32
-rw-r--r--deps/npm/node_modules/lodash/lang/clone.js70
-rw-r--r--deps/npm/node_modules/lodash/lang/cloneDeep.js55
-rw-r--r--deps/npm/node_modules/lodash/lang/eq.js1
-rw-r--r--deps/npm/node_modules/lodash/lang/gt.js25
-rw-r--r--deps/npm/node_modules/lodash/lang/gte.js25
-rw-r--r--deps/npm/node_modules/lodash/lang/isArguments.js34
-rw-r--r--deps/npm/node_modules/lodash/lang/isArray.js40
-rw-r--r--deps/npm/node_modules/lodash/lang/isBoolean.js35
-rw-r--r--deps/npm/node_modules/lodash/lang/isDate.js35
-rw-r--r--deps/npm/node_modules/lodash/lang/isElement.js24
-rw-r--r--deps/npm/node_modules/lodash/lang/isEmpty.js47
-rw-r--r--deps/npm/node_modules/lodash/lang/isEqual.js54
-rw-r--r--deps/npm/node_modules/lodash/lang/isError.js36
-rw-r--r--deps/npm/node_modules/lodash/lang/isFinite.js35
-rw-r--r--deps/npm/node_modules/lodash/lang/isFunction.js38
-rw-r--r--deps/npm/node_modules/lodash/lang/isMatch.js49
-rw-r--r--deps/npm/node_modules/lodash/lang/isNaN.js34
-rw-r--r--deps/npm/node_modules/lodash/lang/isNative.js48
-rw-r--r--deps/npm/node_modules/lodash/lang/isNull.js21
-rw-r--r--deps/npm/node_modules/lodash/lang/isNumber.js41
-rw-r--r--deps/npm/node_modules/lodash/lang/isObject.js28
-rw-r--r--deps/npm/node_modules/lodash/lang/isPlainObject.js71
-rw-r--r--deps/npm/node_modules/lodash/lang/isRegExp.js35
-rw-r--r--deps/npm/node_modules/lodash/lang/isString.js35
-rw-r--r--deps/npm/node_modules/lodash/lang/isTypedArray.js74
-rw-r--r--deps/npm/node_modules/lodash/lang/isUndefined.js21
-rw-r--r--deps/npm/node_modules/lodash/lang/lt.js25
-rw-r--r--deps/npm/node_modules/lodash/lang/lte.js25
-rw-r--r--deps/npm/node_modules/lodash/lang/toArray.js32
-rw-r--r--deps/npm/node_modules/lodash/lang/toPlainObject.js31
-rw-r--r--deps/npm/node_modules/lodash/math.js9
-rw-r--r--deps/npm/node_modules/lodash/math/add.js19
-rw-r--r--deps/npm/node_modules/lodash/math/ceil.js25
-rw-r--r--deps/npm/node_modules/lodash/math/floor.js25
-rw-r--r--deps/npm/node_modules/lodash/math/max.js56
-rw-r--r--deps/npm/node_modules/lodash/math/min.js56
-rw-r--r--deps/npm/node_modules/lodash/math/round.js25
-rw-r--r--deps/npm/node_modules/lodash/math/sum.js50
-rw-r--r--deps/npm/node_modules/lodash/number.js4
-rw-r--r--deps/npm/node_modules/lodash/number/inRange.js47
-rw-r--r--deps/npm/node_modules/lodash/number/random.js70
-rw-r--r--deps/npm/node_modules/lodash/object.js31
-rw-r--r--deps/npm/node_modules/lodash/object/assign.js43
-rw-r--r--deps/npm/node_modules/lodash/object/create.js47
-rw-r--r--deps/npm/node_modules/lodash/object/defaults.js25
-rw-r--r--deps/npm/node_modules/lodash/object/defaultsDeep.js25
-rw-r--r--deps/npm/node_modules/lodash/object/extend.js1
-rw-r--r--deps/npm/node_modules/lodash/object/findKey.js54
-rw-r--r--deps/npm/node_modules/lodash/object/findLastKey.js54
-rw-r--r--deps/npm/node_modules/lodash/object/forIn.js33
-rw-r--r--deps/npm/node_modules/lodash/object/forInRight.js31
-rw-r--r--deps/npm/node_modules/lodash/object/forOwn.js33
-rw-r--r--deps/npm/node_modules/lodash/object/forOwnRight.js31
-rw-r--r--deps/npm/node_modules/lodash/object/functions.js23
-rw-r--r--deps/npm/node_modules/lodash/object/get.js33
-rw-r--r--deps/npm/node_modules/lodash/object/has.js57
-rw-r--r--deps/npm/node_modules/lodash/object/invert.js60
-rw-r--r--deps/npm/node_modules/lodash/object/keys.js45
-rw-r--r--deps/npm/node_modules/lodash/object/keysIn.js64
-rw-r--r--deps/npm/node_modules/lodash/object/mapKeys.js25
-rw-r--r--deps/npm/node_modules/lodash/object/mapValues.js46
-rw-r--r--deps/npm/node_modules/lodash/object/merge.js54
-rw-r--r--deps/npm/node_modules/lodash/object/methods.js1
-rw-r--r--deps/npm/node_modules/lodash/object/omit.js47
-rw-r--r--deps/npm/node_modules/lodash/object/pairs.js33
-rw-r--r--deps/npm/node_modules/lodash/object/pick.js42
-rw-r--r--deps/npm/node_modules/lodash/object/result.js49
-rw-r--r--deps/npm/node_modules/lodash/object/set.js55
-rw-r--r--deps/npm/node_modules/lodash/object/transform.js61
-rw-r--r--deps/npm/node_modules/lodash/object/values.js33
-rw-r--r--deps/npm/node_modules/lodash/object/valuesIn.js31
-rw-r--r--deps/npm/node_modules/lodash/package.json81
-rw-r--r--deps/npm/node_modules/lodash/string.js25
-rw-r--r--deps/npm/node_modules/lodash/string/camelCase.js27
-rw-r--r--deps/npm/node_modules/lodash/string/capitalize.js21
-rw-r--r--deps/npm/node_modules/lodash/string/deburr.js29
-rw-r--r--deps/npm/node_modules/lodash/string/endsWith.js40
-rw-r--r--deps/npm/node_modules/lodash/string/escape.js48
-rw-r--r--deps/npm/node_modules/lodash/string/escapeRegExp.js32
-rw-r--r--deps/npm/node_modules/lodash/string/kebabCase.js26
-rw-r--r--deps/npm/node_modules/lodash/string/pad.js47
-rw-r--r--deps/npm/node_modules/lodash/string/padLeft.js27
-rw-r--r--deps/npm/node_modules/lodash/string/padRight.js27
-rw-r--r--deps/npm/node_modules/lodash/string/parseInt.js46
-rw-r--r--deps/npm/node_modules/lodash/string/repeat.js47
-rw-r--r--deps/npm/node_modules/lodash/string/snakeCase.js26
-rw-r--r--deps/npm/node_modules/lodash/string/startCase.js26
-rw-r--r--deps/npm/node_modules/lodash/string/startsWith.js36
-rw-r--r--deps/npm/node_modules/lodash/string/template.js226
-rw-r--r--deps/npm/node_modules/lodash/string/templateSettings.js67
-rw-r--r--deps/npm/node_modules/lodash/string/trim.js42
-rw-r--r--deps/npm/node_modules/lodash/string/trimLeft.js36
-rw-r--r--deps/npm/node_modules/lodash/string/trimRight.js36
-rw-r--r--deps/npm/node_modules/lodash/string/trunc.js105
-rw-r--r--deps/npm/node_modules/lodash/string/unescape.js33
-rw-r--r--deps/npm/node_modules/lodash/string/words.js38
-rw-r--r--deps/npm/node_modules/lodash/support.js10
-rw-r--r--deps/npm/node_modules/lodash/utility.js18
-rw-r--r--deps/npm/node_modules/lodash/utility/attempt.js32
-rw-r--r--deps/npm/node_modules/lodash/utility/callback.js53
-rw-r--r--deps/npm/node_modules/lodash/utility/constant.js23
-rw-r--r--deps/npm/node_modules/lodash/utility/identity.js20
-rw-r--r--deps/npm/node_modules/lodash/utility/iteratee.js1
-rw-r--r--deps/npm/node_modules/lodash/utility/matches.js33
-rw-r--r--deps/npm/node_modules/lodash/utility/matchesProperty.js32
-rw-r--r--deps/npm/node_modules/lodash/utility/method.js33
-rw-r--r--deps/npm/node_modules/lodash/utility/methodOf.js32
-rw-r--r--deps/npm/node_modules/lodash/utility/mixin.js82
-rw-r--r--deps/npm/node_modules/lodash/utility/noop.js19
-rw-r--r--deps/npm/node_modules/lodash/utility/property.js31
-rw-r--r--deps/npm/node_modules/lodash/utility/propertyOf.js30
-rw-r--r--deps/npm/node_modules/lodash/utility/range.js66
-rw-r--r--deps/npm/node_modules/lodash/utility/times.js60
-rw-r--r--deps/npm/node_modules/lodash/utility/uniqueId.js27
-rw-r--r--deps/npm/node_modules/node-gyp/.github/ISSUE_TEMPLATE.md25
-rw-r--r--deps/npm/node_modules/node-gyp/.github/PULL_REQUEST_TEMPLATE.md16
-rw-r--r--deps/npm/node_modules/node-gyp/.npmignore3
-rw-r--r--deps/npm/node_modules/node-gyp/CHANGELOG.md6
-rw-r--r--deps/npm/node_modules/node-gyp/CONTRIBUTING.md34
-rw-r--r--deps/npm/node_modules/node-gyp/README.md65
-rw-r--r--deps/npm/node_modules/node-gyp/addon.gypi14
-rw-r--r--deps/npm/node_modules/node-gyp/gyp/.npmignore1
-rw-r--r--deps/npm/node_modules/node-gyp/gyp/buildbot/aosp_manifest.xml466
-rwxr-xr-xdeps/npm/node_modules/node-gyp/gyp/buildbot/buildbot_run.py136
-rw-r--r--deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/OWNERS6
-rw-r--r--deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/README3
-rw-r--r--deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/cq_config.json15
-rwxr-xr-xdeps/npm/node_modules/node-gyp/gyp/gyptest.py274
-rw-r--r--deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py4
-rw-r--r--deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py8
-rw-r--r--deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py31
-rw-r--r--deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py2
-rw-r--r--deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py15
-rw-r--r--deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py9
-rw-r--r--deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py15
-rw-r--r--deps/npm/node_modules/node-gyp/lib/build.js4
-rw-r--r--deps/npm/node_modules/node-gyp/lib/configure.js43
-rw-r--r--deps/npm/node_modules/node-gyp/lib/find-vs2017.js6
-rw-r--r--deps/npm/node_modules/node-gyp/lib/install.js28
-rw-r--r--deps/npm/node_modules/node-gyp/package.json35
-rw-r--r--deps/npm/node_modules/node-gyp/test/fixtures/test-charmap.py22
-rw-r--r--deps/npm/node_modules/node-gyp/test/test-addon.js95
-rw-r--r--deps/npm/node_modules/node-gyp/test/test-install.js37
-rw-r--r--deps/npm/node_modules/npm-audit-report/CHANGELOG.md22
-rw-r--r--deps/npm/node_modules/npm-audit-report/README.md16
-rw-r--r--deps/npm/node_modules/npm-audit-report/index.js3
-rw-r--r--deps/npm/node_modules/npm-audit-report/lib/utils.js25
-rw-r--r--deps/npm/node_modules/npm-audit-report/package.json34
-rw-r--r--deps/npm/node_modules/npm-audit-report/reporters/detail.js15
-rw-r--r--deps/npm/node_modules/npm-audit-report/reporters/install.js13
-rw-r--r--deps/npm/node_modules/npm-audit-report/reporters/parseable.js96
-rw-r--r--deps/npm/node_modules/npm-audit-report/reporters/quiet.js12
-rw-r--r--deps/npm/node_modules/npm-profile/CHANGELOG.md6
-rw-r--r--deps/npm/node_modules/npm-profile/index.js4
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/CHANGELOG.md478
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/LICENSE.md16
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/README.es.md628
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/README.md624
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/en.js3
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/es.js3
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/get.js190
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/index.js3
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/lib/content/path.js26
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/lib/content/read.js125
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/lib/content/rm.js21
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/lib/content/write.js162
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/lib/entry-index.js225
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/lib/memoization.js69
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/lib/util/fix-owner.js44
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/lib/util/hash-to-segments.js11
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/lib/util/move-file.js51
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/lib/util/tmp.js32
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/lib/util/y.js25
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/lib/verify.js213
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/locales/en.js44
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/locales/en.json6
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/locales/es.js46
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/locales/es.json6
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/ls.js6
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/node_modules/mississippi/changelog.md7
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/node_modules/mississippi/index.js10
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/node_modules/mississippi/license7
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/node_modules/mississippi/package.json62
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/node_modules/mississippi/readme.md411
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/package.json137
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/put.js71
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/rm.js28
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/cacache/verify.js3
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/CHANGELOG.md509
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/LICENSE3
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/README.md404
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/agent.js171
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/cache.js257
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/index.js482
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/package.json95
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/warning.js24
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/mississippi/index.js10
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/.travis.yml5
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/LICENSE21
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/README.md56
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/index.js80
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/package.json59
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/test-browser.js58
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/test.js46
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/mississippi/package.json62
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/mississippi/readme.md399
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/pump/LICENSE21
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/pump/README.md56
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/pump/index.js82
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/pump/package.json59
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/pump/test-browser.js62
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/pump/test-node.js53
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/smart-buffer/.npmignore5
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/smart-buffer/.travis.yml11
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/smart-buffer/LICENSE20
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/smart-buffer/README.md307
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/smart-buffer/build/smartbuffer.js726
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/smart-buffer/build/smartbuffer.js.map1
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/smart-buffer/lib/smart-buffer.js371
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/smart-buffer/package.json70
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/smart-buffer/test/smart-buffer.test.js410
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/smart-buffer/typings/index.d.ts383
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/.npmignore1
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/.travis.yml22
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/History.md96
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/README.md134
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/index.js141
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/package.json66
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/test/ssl-cert-snakeoil.key15
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/test/ssl-cert-snakeoil.pem12
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/test/test.js144
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/socks/.npmignore4
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/socks/LICENSE20
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/socks/README.md339
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/socks/examples/associate.js33
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/socks/examples/bind.js30
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/socks/examples/connect.js31
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/socks/index.js6
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/socks/lib/socks-agent.js108
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/socks/lib/socks-client.js306
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/socks/package.json68
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/ssri/CHANGELOG.md256
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/ssri/LICENSE.md16
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/ssri/README.md488
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/ssri/index.js379
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/ssri/package.json90
-rw-r--r--deps/npm/node_modules/npm-profile/package.json65
-rw-r--r--deps/npm/node_modules/performance-now/.travis.yml6
-rw-r--r--deps/npm/node_modules/performance-now/Makefile25
-rw-r--r--deps/npm/node_modules/performance-now/README.md20
-rw-r--r--deps/npm/node_modules/performance-now/lib/performance-now.js12
-rw-r--r--deps/npm/node_modules/performance-now/lib/performance-now.js.map10
-rw-r--r--deps/npm/node_modules/performance-now/license.txt2
-rw-r--r--deps/npm/node_modules/performance-now/package.json48
-rw-r--r--deps/npm/node_modules/performance-now/src/index.d.ts8
-rw-r--r--deps/npm/node_modules/performance-now/src/performance-now.coffee6
-rw-r--r--deps/npm/node_modules/performance-now/test/performance-now.coffee69
-rw-r--r--deps/npm/node_modules/performance-now/test/scripts.coffee27
-rwxr-xr-xdeps/npm/node_modules/performance-now/test/scripts/delayed-call.coffee11
-rwxr-xr-xdeps/npm/node_modules/performance-now/test/scripts/delayed-require.coffee12
-rwxr-xr-xdeps/npm/node_modules/performance-now/test/scripts/difference.coffee6
-rwxr-xr-xdeps/npm/node_modules/performance-now/test/scripts/initial-value.coffee10
-rw-r--r--deps/npm/node_modules/qs/.editorconfig30
-rw-r--r--deps/npm/node_modules/qs/.jscs.json175
-rw-r--r--deps/npm/node_modules/qs/CHANGELOG.md51
-rw-r--r--deps/npm/node_modules/qs/README.md117
-rw-r--r--deps/npm/node_modules/qs/dist/qs.js205
-rw-r--r--deps/npm/node_modules/qs/lib/parse.js67
-rw-r--r--deps/npm/node_modules/qs/lib/stringify.js15
-rw-r--r--deps/npm/node_modules/qs/lib/utils.js125
-rw-r--r--deps/npm/node_modules/qs/package.json36
-rw-r--r--deps/npm/node_modules/qs/test/parse.js61
-rw-r--r--deps/npm/node_modules/qs/test/stringify.js42
-rw-r--r--deps/npm/node_modules/qs/test/utils.js12
-rw-r--r--deps/npm/node_modules/request/CHANGELOG.md34
-rw-r--r--deps/npm/node_modules/request/README.md120
-rwxr-xr-xdeps/npm/node_modules/request/index.js27
-rw-r--r--deps/npm/node_modules/request/lib/auth.js11
-rw-r--r--deps/npm/node_modules/request/lib/cookies.js15
-rw-r--r--deps/npm/node_modules/request/lib/getProxyFromURI.js36
-rw-r--r--deps/npm/node_modules/request/lib/har.js20
-rw-r--r--deps/npm/node_modules/request/lib/helpers.js20
-rw-r--r--deps/npm/node_modules/request/lib/multipart.js13
-rw-r--r--deps/npm/node_modules/request/lib/oauth.js44
-rw-r--r--deps/npm/node_modules/request/lib/querystring.js5
-rw-r--r--deps/npm/node_modules/request/lib/redirect.js17
-rw-r--r--deps/npm/node_modules/request/lib/tunnel.js51
-rw-r--r--deps/npm/node_modules/request/package.json68
-rw-r--r--deps/npm/node_modules/request/request.js221
-rw-r--r--[-rwxr-xr-x]deps/npm/node_modules/sntp/.npmignore20
-rwxr-xr-xdeps/npm/node_modules/sntp/.travis.yml4
-rwxr-xr-xdeps/npm/node_modules/sntp/LICENSE2
-rwxr-xr-xdeps/npm/node_modules/sntp/Makefile8
-rwxr-xr-xdeps/npm/node_modules/sntp/examples/offset.js15
-rwxr-xr-xdeps/npm/node_modules/sntp/examples/time.js24
-rwxr-xr-xdeps/npm/node_modules/sntp/index.js1
-rwxr-xr-xdeps/npm/node_modules/sntp/lib/index.js166
-rwxr-xr-xdeps/npm/node_modules/sntp/package.json42
-rwxr-xr-xdeps/npm/node_modules/sntp/test/index.js434
-rwxr-xr-xdeps/npm/node_modules/sshpk/bin/sshpk-verify3
-rw-r--r--deps/npm/node_modules/sshpk/lib/algs.js38
-rw-r--r--deps/npm/node_modules/sshpk/lib/certificate.js5
-rw-r--r--deps/npm/node_modules/sshpk/lib/dhe.js29
-rw-r--r--deps/npm/node_modules/sshpk/lib/ed-compat.js9
-rw-r--r--deps/npm/node_modules/sshpk/lib/fingerprint.js5
-rw-r--r--deps/npm/node_modules/sshpk/lib/formats/auto.js3
-rw-r--r--deps/npm/node_modules/sshpk/lib/formats/dnssec.js15
-rw-r--r--deps/npm/node_modules/sshpk/lib/formats/openssh-cert.js11
-rw-r--r--deps/npm/node_modules/sshpk/lib/formats/pem.js9
-rw-r--r--deps/npm/node_modules/sshpk/lib/formats/pkcs1.js17
-rw-r--r--deps/npm/node_modules/sshpk/lib/formats/pkcs8.js20
-rw-r--r--deps/npm/node_modules/sshpk/lib/formats/rfc4253.js3
-rw-r--r--deps/npm/node_modules/sshpk/lib/formats/ssh-private.js13
-rw-r--r--deps/npm/node_modules/sshpk/lib/formats/ssh.js7
-rw-r--r--deps/npm/node_modules/sshpk/lib/formats/x509-pem.js5
-rw-r--r--deps/npm/node_modules/sshpk/lib/formats/x509.js8
-rw-r--r--deps/npm/node_modules/sshpk/lib/identity.js3
-rw-r--r--deps/npm/node_modules/sshpk/lib/private-key.js7
-rw-r--r--deps/npm/node_modules/sshpk/lib/signature.js3
-rw-r--r--deps/npm/node_modules/sshpk/lib/ssh-buffer.js7
-rw-r--r--deps/npm/node_modules/sshpk/lib/utils.js21
-rw-r--r--deps/npm/node_modules/sshpk/node_modules/assert-plus/AUTHORS6
-rw-r--r--deps/npm/node_modules/sshpk/node_modules/assert-plus/CHANGES.md14
-rw-r--r--deps/npm/node_modules/sshpk/node_modules/assert-plus/README.md162
-rw-r--r--deps/npm/node_modules/sshpk/node_modules/assert-plus/assert.js211
-rw-r--r--deps/npm/node_modules/sshpk/node_modules/assert-plus/package.json82
-rw-r--r--deps/npm/node_modules/sshpk/package.json11
-rw-r--r--deps/npm/node_modules/string-width/node_modules/ansi-regex/index.js10
-rw-r--r--deps/npm/node_modules/string-width/node_modules/ansi-regex/license9
-rw-r--r--deps/npm/node_modules/string-width/node_modules/ansi-regex/package.json (renamed from deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/package.json)57
-rw-r--r--deps/npm/node_modules/string-width/node_modules/ansi-regex/readme.md (renamed from deps/npm/node_modules/cli-table2/node_modules/ansi-regex/readme.md)21
-rw-r--r--deps/npm/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js46
-rw-r--r--deps/npm/node_modules/string-width/node_modules/is-fullwidth-code-point/license (renamed from deps/npm/node_modules/cli-columns/node_modules/ansi-regex/license)0
-rw-r--r--deps/npm/node_modules/string-width/node_modules/is-fullwidth-code-point/package.json (renamed from deps/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/package.json)40
-rw-r--r--deps/npm/node_modules/string-width/node_modules/is-fullwidth-code-point/readme.md (renamed from deps/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/readme.md)4
-rw-r--r--deps/npm/node_modules/string-width/node_modules/strip-ansi/index.js4
-rw-r--r--deps/npm/node_modules/string-width/node_modules/strip-ansi/license9
-rw-r--r--deps/npm/node_modules/string-width/node_modules/strip-ansi/package.json (renamed from deps/npm/node_modules/cli-columns/node_modules/strip-ansi/package.json)47
-rw-r--r--deps/npm/node_modules/string-width/node_modules/strip-ansi/readme.md (renamed from deps/npm/node_modules/cli-table2/node_modules/strip-ansi/readme.md)18
-rw-r--r--deps/npm/node_modules/stringstream/.travis.yml4
-rw-r--r--deps/npm/node_modules/stringstream/LICENSE.txt22
-rw-r--r--deps/npm/node_modules/stringstream/README.md38
-rw-r--r--deps/npm/node_modules/stringstream/example.js27
-rw-r--r--deps/npm/node_modules/stringstream/package.json51
-rw-r--r--deps/npm/node_modules/stringstream/stringstream.js102
-rw-r--r--deps/npm/node_modules/strip-ansi/index.js6
-rw-r--r--deps/npm/node_modules/strip-ansi/license20
-rw-r--r--deps/npm/node_modules/strip-ansi/package.json63
-rw-r--r--deps/npm/node_modules/strip-ansi/readme.md18
-rw-r--r--deps/npm/node_modules/tar/README.md4
-rw-r--r--deps/npm/node_modules/tar/lib/header.js2
-rw-r--r--deps/npm/node_modules/tar/lib/mode-fix.js14
-rw-r--r--deps/npm/node_modules/tar/lib/pack.js1
-rw-r--r--deps/npm/node_modules/tar/lib/write-entry.js17
-rw-r--r--deps/npm/node_modules/tar/package.json28
-rw-r--r--deps/npm/node_modules/uuid/CHANGELOG.md75
-rw-r--r--deps/npm/node_modules/uuid/README.md12
-rw-r--r--deps/npm/node_modules/uuid/lib/bytesToUuid.js17
-rw-r--r--deps/npm/node_modules/uuid/lib/rng-browser.js8
-rw-r--r--deps/npm/node_modules/uuid/lib/v35.js6
-rw-r--r--deps/npm/node_modules/uuid/package.json46
-rw-r--r--deps/npm/node_modules/verror/node_modules/assert-plus/AUTHORS6
-rw-r--r--deps/npm/node_modules/verror/node_modules/assert-plus/CHANGES.md14
-rw-r--r--deps/npm/node_modules/verror/node_modules/assert-plus/README.md162
-rw-r--r--deps/npm/node_modules/verror/node_modules/assert-plus/assert.js211
-rw-r--r--deps/npm/node_modules/verror/node_modules/assert-plus/package.json82
-rw-r--r--deps/npm/node_modules/which/CHANGELOG.md5
-rw-r--r--deps/npm/node_modules/which/package.json32
-rw-r--r--deps/npm/node_modules/wide-align/node_modules/ansi-regex/index.js4
-rw-r--r--deps/npm/node_modules/wide-align/node_modules/ansi-regex/license21
-rw-r--r--deps/npm/node_modules/wide-align/node_modules/ansi-regex/package.json108
-rw-r--r--deps/npm/node_modules/wide-align/node_modules/ansi-regex/readme.md39
-rw-r--r--deps/npm/node_modules/wide-align/node_modules/is-fullwidth-code-point/index.js46
-rw-r--r--deps/npm/node_modules/wide-align/node_modules/is-fullwidth-code-point/license21
-rw-r--r--deps/npm/node_modules/wide-align/node_modules/is-fullwidth-code-point/package.json77
-rw-r--r--deps/npm/node_modules/wide-align/node_modules/is-fullwidth-code-point/readme.md39
-rw-r--r--deps/npm/node_modules/wide-align/node_modules/strip-ansi/index.js6
-rw-r--r--deps/npm/node_modules/wide-align/node_modules/strip-ansi/license21
-rw-r--r--deps/npm/node_modules/wide-align/node_modules/strip-ansi/package.json101
-rw-r--r--deps/npm/node_modules/wide-align/node_modules/strip-ansi/readme.md33
-rw-r--r--deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/index.js4
-rw-r--r--deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/license21
-rw-r--r--deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md39
-rw-r--r--deps/npm/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.js46
-rw-r--r--deps/npm/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/license21
-rw-r--r--deps/npm/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/package.json77
-rw-r--r--deps/npm/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/readme.md39
-rw-r--r--deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/index.js6
-rw-r--r--deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/license21
-rw-r--r--deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/package.json102
-rw-r--r--deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md33
1075 files changed, 24446 insertions, 58274 deletions
diff --git a/deps/npm/node_modules/JSONStream/.npmignore b/deps/npm/node_modules/JSONStream/.npmignore
deleted file mode 100644
index a9a9d586e5..0000000000
--- a/deps/npm/node_modules/JSONStream/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-node_modules/*
-node_modules
diff --git a/deps/npm/node_modules/JSONStream/index.js b/deps/npm/node_modules/JSONStream/index.js
index 4e3b0ef678..359e3b8454 100755
--- a/deps/npm/node_modules/JSONStream/index.js
+++ b/deps/npm/node_modules/JSONStream/index.js
@@ -102,7 +102,7 @@ exports.parse = function (path, map) {
count ++
var actualPath = this.stack.slice(1).map(function(element) { return element.key }).concat([this.key])
- var data = this.value[this.key]
+ var data = value
if(null != data)
if(null != (data = map ? map(data, actualPath) : data)) {
if (emitKey || emitPath) {
@@ -115,7 +115,6 @@ exports.parse = function (path, map) {
stream.queue(data)
}
- delete this.value[this.key]
for(var k in this.stack)
if (!Object.isFrozen(this.stack[k]))
this.stack[k].value = null
diff --git a/deps/npm/node_modules/JSONStream/package.json b/deps/npm/node_modules/JSONStream/package.json
index 5f6be1368e..deeeb9d465 100644
--- a/deps/npm/node_modules/JSONStream/package.json
+++ b/deps/npm/node_modules/JSONStream/package.json
@@ -1,31 +1,27 @@
{
- "_args": [
- [
- "JSONStream@1.3.2",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "JSONStream@1.3.2",
- "_id": "JSONStream@1.3.2",
+ "_from": "JSONStream@1.3.3",
+ "_id": "JSONStream@1.3.3",
"_inBundle": false,
- "_integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=",
+ "_integrity": "sha512-3Sp6WZZ/lXl+nTDoGpGWHEpTnnC6X5fnkolYZR6nwIfzbxxvA8utPWe1gCt7i0m9uVGsSz2IS8K8mJ7HmlduMg==",
"_location": "/JSONStream",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "JSONStream@1.3.2",
+ "raw": "JSONStream@1.3.3",
"name": "JSONStream",
"escapedName": "JSONStream",
- "rawSpec": "1.3.2",
+ "rawSpec": "1.3.3",
"saveSpec": null,
- "fetchSpec": "1.3.2"
+ "fetchSpec": "1.3.3"
},
"_requiredBy": [
+ "#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz",
- "_spec": "1.3.2",
+ "_resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.3.tgz",
+ "_shasum": "27b4b8fbbfeab4e71bcf551e7f27be8d952239bf",
+ "_spec": "JSONStream@1.3.3",
"_where": "/Users/rebecca/code/npm",
"author": {
"name": "Dominic Tarr",
@@ -38,10 +34,12 @@
"bugs": {
"url": "https://github.com/dominictarr/JSONStream/issues"
},
+ "bundleDependencies": false,
"dependencies": {
"jsonparse": "^1.2.0",
"through": ">=2.2.7 <3"
},
+ "deprecated": false,
"description": "rawStream.pipe(JSONStream.parse()).pipe(streamOfObjects)",
"devDependencies": {
"assertions": "~2.2.2",
@@ -73,5 +71,5 @@
"scripts": {
"test": "set -e; for t in test/*.js; do echo '***' $t '***'; node $t; done"
},
- "version": "1.3.2"
+ "version": "1.3.3"
}
diff --git a/deps/npm/node_modules/JSONStream/test/disabled/doubledot1.js b/deps/npm/node_modules/JSONStream/test/doubledot1.js
index ceaa3edb33..ceaa3edb33 100644
--- a/deps/npm/node_modules/JSONStream/test/disabled/doubledot1.js
+++ b/deps/npm/node_modules/JSONStream/test/doubledot1.js
diff --git a/deps/npm/node_modules/JSONStream/test/disabled/doubledot2.js b/deps/npm/node_modules/JSONStream/test/doubledot2.js
index c957683db7..980024153c 100644
--- a/deps/npm/node_modules/JSONStream/test/disabled/doubledot2.js
+++ b/deps/npm/node_modules/JSONStream/test/doubledot2.js
@@ -22,8 +22,9 @@
})
process.on('exit', function () {
- it(called).equal(5)
+ var expectedValues = [0, [1], {"a": 2}, "3", 4]
+ it(called).equal(expectedValues.length)
for (var i = 0 ; i < 5 ; i++)
- it(parsed[i]).deepEqual(i)
+ it(parsed[i]).deepEqual(expectedValues[i])
console.error('PASSED')
})
diff --git a/deps/npm/node_modules/JSONStream/test/fixtures/depth.json b/deps/npm/node_modules/JSONStream/test/fixtures/depth.json
index 868062f306..682887dc2f 100644
--- a/deps/npm/node_modules/JSONStream/test/fixtures/depth.json
+++ b/deps/npm/node_modules/JSONStream/test/fixtures/depth.json
@@ -7,9 +7,9 @@
"some": "property"
}
},
- {"value": 1},
- {"value": 2},
- {"blbl": [{}, {"a":0, "b":1, "value":3}, 10]},
+ {"value": [1]},
+ {"value": {"a":2}},
+ {"blbl": [{}, {"a":0, "b":1, "value":"3"}, 10]},
{"value": 4}
]
} \ No newline at end of file
diff --git a/deps/npm/node_modules/ajv/dist/ajv.min.js b/deps/npm/node_modules/ajv/dist/ajv.min.js
deleted file mode 100644
index f5267c9a5a..0000000000
--- a/deps/npm/node_modules/ajv/dist/ajv.min.js
+++ /dev/null
@@ -1,3 +0,0 @@
-/* ajv 5.5.2: 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{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Ajv=e()}}(function(){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 h=new Error("Cannot find module '"+i+"'");throw h.code="MODULE_NOT_FOUND",h}var u=t[i]={exports:{}};r[i][0].call(u.exports,function(e){var t=r[i][1][e];return s(t||e)},u,u.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";var a=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];r.exports=function(e,r){for(var t=0;t<r.length;t++){e=JSON.parse(JSON.stringify(e));var s,o=r[t].split("/"),i=e;for(s=1;s<o.length;s++)i=i[o[s]];for(s=0;s<a.length;s++){var n=a[s],l=i[n];l&&(i[n]={anyOf:[l,{$ref:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#"}]})}}return e}},{}],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"),const:e("../dotjs/const"),contains:e("../dotjs/contains"),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"),propertyNames:e("../dotjs/propertyNames"),required:e("../dotjs/required"),uniqueItems:e("../dotjs/uniqueItems"),validate:e("../dotjs/validate")}},{"../dotjs/_limit":13,"../dotjs/_limitItems":14,"../dotjs/_limitLength":15,"../dotjs/_limitProperties":16,"../dotjs/allOf":17,"../dotjs/anyOf":18,"../dotjs/const":19,"../dotjs/contains":20,"../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":30,"../dotjs/propertyNames":31,"../dotjs/ref":32,"../dotjs/required":33,"../dotjs/uniqueItems":34,"../dotjs/validate":35}],4:[function(e,r,t){"use strict";function a(e,r,t){function o(e){var r=e.$schema;return r&&!n.getSchema(r)?a.call(n,{$ref:r},!0):Promise.resolve()}function i(e){try{return n._compile(e)}catch(t){if(t instanceof s)return function(t){function a(){delete n._loadingSchemas[l]}function s(e){return n._refs[e]||n._schemas[e]}var l=t.missingSchema;if(s(l))throw new Error("Schema "+l+" is loaded but "+t.missingRef+" cannot be resolved");var h=n._loadingSchemas[l];return h||(h=n._loadingSchemas[l]=n._opts.loadSchema(l)).then(a,a),h.then(function(e){if(!s(l))return o(e).then(function(){s(l)||n.addSchema(e,l,void 0,r)})}).then(function(){return i(e)})}(t);throw t}}var n=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof r&&(t=r,r=void 0);var l=o(e).then(function(){var t=n._addSchema(e,void 0,r);return t.validate||i(t)});return t&&l.then(function(e){t(null,e)},t),l}var s=e("./error_classes").MissingRef;r.exports=a},{"./error_classes":5}],5:[function(e,r,t){"use strict";function a(e,r,t){this.message=t||a.message(e,r),this.missingRef=o.url(e,r),this.missingSchema=o.normalizeId(o.fullPath(this.missingRef))}function s(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var o=e("./resolve");r.exports={Validation:s(function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0}),MissingRef:s(a)},a.message=function(e,r){return"can't resolve reference "+r+" from id "+e}},{"./resolve":8}],6:[function(e,r,t){"use strict";function a(e){return e="full"==e?"full":"fast",n.copy(a[e])}function s(e){var r=e.match(l);if(!r)return!1;var t=+r[1],a=+r[2];return t>=1&&t<=12&&a>=1&&a<=h[t]}function o(e,r){var t=e.match(u);if(!t)return!1;return t[1]<=23&&t[2]<=59&&t[3]<=59&&(!r||t[5])}function i(e){if(E.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var n=e("./util"),l=/^\d\d\d\d-(\d\d)-(\d\d)$/,h=[0,31,29,31,30,31,30,31,31,30,31,30,31],u=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i,c=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i,d=/^(?:[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,f=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,p=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,m=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,v=/^(?:\/(?:[^~/]|~0|~1)*)*$|^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,y=/^(?: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,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i,"uri-template":f,url:p,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:c,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:i,uuid:m,"json-pointer":v,"relative-json-pointer":y},a.full={date:s,time:o,"date-time":function(e){var r=e.split(g);return 2==r.length&&s(r[0])&&o(r[1],!0)},uri:function(e){return P.test(e)&&d.test(e)},"uri-reference":/^(?:[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,"uri-template":f,url:p,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:function(e){return e.length<=255&&c.test(e)},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:i,uuid:m,"json-pointer":v,"relative-json-pointer":y};var g=/t|\s/i,P=/\/|:/,E=/[^\\]\\Z/},{"./util":12}],7:[function(e,r,t){"use strict";function a(e,r,t,P){function E(){var e=C.validate,r=e.apply(null,arguments);return E.errors=e.errors,r}function w(e,t,s,f){var P=!t||t&&t.schema==e;if(t.schema!=r.schema)return a.call($,e,t,s,f);var E=!0===e.$async,w=p({isTop:!0,schema:e,isRoot:P,baseId:f,root:t,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:d.MissingRef,RULES:U,validate:p,util:c,resolve:u,resolveRef:b,usePattern:_,useDefault:x,useCustomRule:F,opts:R,formats:Q,logger:$.logger,self:$});w=h(O,n)+h(I,o)+h(k,i)+h(L,l)+w,R.processCode&&(w=R.processCode(w));var S;try{S=new Function("self","RULES","formats","root","refVal","defaults","customRules","co","equal","ucs2length","ValidationError",w)($,U,Q,r,O,k,L,m,y,v,g),O[0]=S}catch(e){throw $.logger.error("Error compiling schema, function code:",w),e}return S.schema=e,S.errors=null,S.refs=D,S.refVal=O,S.root=P?S:t,E&&(S.$async=!0),!0===R.sourceCode&&(S.source={code:w,patterns:I,defaults:k}),S}function b(e,s,o){s=u.url(e,s);var i,n,l=D[s];if(void 0!==l)return i=O[l],n="refVal["+l+"]",j(i,n);if(!o&&r.refs){var h=r.refs[s];if(void 0!==h)return i=r.refVal[h],n=S(s,i),j(i,n)}n=S(s);var c=u.call($,w,r,s);if(void 0===c){var d=t&&t[s];d&&(c=u.inlineRef(d,R.inlineRefs)?d:a.call($,d,r,t,e))}if(void 0!==c)return function(e,r){O[D[e]]=r}(s,c),j(c,n);!function(e){delete D[e]}(s)}function S(e,r){var t=O.length;return O[t]=r,D[e]=t,"refVal"+t}function j(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&e.$async}}function _(e){var r=A[e];return void 0===r&&(r=A[e]=I.length,I[r]=e),"pattern"+r}function x(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return c.toQuotedString(e);case"object":if(null===e)return"null";var r=f(e),t=q[r];return void 0===t&&(t=q[r]=k.length,k[t]=e),"default"+t}}function F(e,r,t,a){var s=e.definition.validateSchema;if(s&&!1!==$._opts.validateSchema){if(!s(r)){var o="keyword schema is invalid: "+$.errorsText(s.errors);if("log"!=$._opts.validateSchema)throw new Error(o);$.logger.error(o)}}var i,n=e.definition.compile,l=e.definition.inline,h=e.definition.macro;if(n)i=n.call($,r,t,a);else if(h)i=h.call($,r,t,a),!1!==R.validateSchema&&$.validateSchema(i,!0);else if(l)i=l.call($,a,e.keyword,r,t);else if(!(i=e.definition.validate))return;if(void 0===i)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var u=L.length;return L[u]=i,{code:"customRule"+u,validate:i}}var $=this,R=this._opts,O=[void 0],D={},I=[],A={},k=[],q={},L=[],z=function(e,r,t){var a=s.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})}.call(this,e,r=r||{schema:e,refVal:O,refs:D},P),C=this._compilations[z.index];if(z.compiling)return C.callValidate=E;var Q=this._formats,U=this.RULES;try{var V=w(e,r,t,P);C.validate=V;var N=C.callValidate;return N&&(N.schema=V.schema,N.errors=null,N.refs=V.refs,N.refVal=V.refVal,N.root=V.root,N.$async=V.$async,R.sourceCode&&(N.source=V.source)),V}finally{(function(e,r,t){var a=s.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}).call(this,e,r,P)}}function s(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 o(e,r){return"var pattern"+e+" = new RegExp("+c.toQuotedString(r[e])+");"}function i(e){return"var default"+e+" = defaults["+e+"];"}function n(e,r){return void 0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}function l(e){return"var customRule"+e+" = customRules["+e+"];"}function h(e,r){if(!e.length)return"";for(var t="",a=0;a<e.length;a++)t+=r(a,e);return t}var u=e("./resolve"),c=e("./util"),d=e("./error_classes"),f=e("fast-json-stable-stringify"),p=e("../dotjs/validate"),m=e("co"),v=c.ucs2length,y=e("fast-deep-equal"),g=d.Validation;r.exports=a},{"../dotjs/validate":35,"./error_classes":5,"./resolve":8,"./util":12,co:40,"fast-deep-equal":41,"fast-json-stable-stringify":42}],8:[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])instanceof v)return i(o.schema,this._opts.inlineRefs)?o.schema:o.validate||this._compile(o);var n,l,h,u=s.call(this,r,t);return u&&(n=u.schema,r=u.root,h=u.baseId),n instanceof v?l=n.validate||e.call(this,n.schema,r,void 0,h):void 0!==n&&(l=i(n,this._opts.inlineRefs)?n:e.call(this,n,r,void 0,h)),l}function s(e,r){var t=f.parse(r,!1,!0),a=u(t),i=h(this._getId(e.schema));if(a!==i){var n=c(a),l=this._refs[n];if("string"==typeof l)return function(e,r,t){var a=s.call(this,e,r);if(a){var i=a.schema,n=a.baseId;e=a.root;var l=this._getId(i);return l&&(n=d(n,l)),o.call(this,t,n,i,e)}}.call(this,e,l,t);if(l instanceof v)l.validate||this._compile(l),e=l;else{if(!((l=this._schemas[n])instanceof v))return;if(l.validate||this._compile(l),n==c(r))return{schema:l,root:e,baseId:i};e=l}if(!e.schema)return;i=h(this._getId(e.schema))}return o.call(this,t,i,e.schema,e)}function o(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=m.unescapeFragment(n),void 0===(t=t[n]))break;var l;if(!g[n]&&((l=this._getId(t))&&(r=d(r,l)),t.$ref)){var h=d(r,t.$ref),u=s.call(this,a,h);u&&(t=u.schema,a=u.root,r=u.baseId)}}}return void 0!==t&&t!==a.schema?{schema:t,root:a,baseId:r}:void 0}}function i(e,r){return!1!==r&&(void 0===r||!0===r?n(e):r?l(e)<=r:void 0)}function n(e){var r;if(Array.isArray(e)){for(var t=0;t<e.length;t++)if("object"==typeof(r=e[t])&&!n(r))return!1}else for(var a in e){if("$ref"==a)return!1;if("object"==typeof(r=e[a])&&!n(r))return!1}return!0}function l(e){var r,t=0;if(Array.isArray(e)){for(var a=0;a<e.length;a++)if("object"==typeof(r=e[a])&&(t+=l(r)),t==1/0)return 1/0}else for(var s in e){if("$ref"==s)return 1/0;if(P[s])t++;else if("object"==typeof(r=e[s])&&(t+=l(r)+1),t==1/0)return 1/0}return t}function h(e,r){!1!==r&&(e=c(e));return u(f.parse(e,!1,!0))}function u(e){var r=e.protocol||"//"==e.href.slice(0,2)?"//":"";return(e.protocol||"")+r+(e.host||"")+(e.path||"")+"#"}function c(e){return e?e.replace(E,""):""}function d(e,r){return r=c(r),f.resolve(e,r)}var f=e("url"),p=e("fast-deep-equal"),m=e("./util"),v=e("./schema_obj"),y=e("json-schema-traverse");r.exports=a,a.normalizeId=c,a.fullPath=h,a.url=d,a.ids=function(e){var r=c(this._getId(e)),t={"":r},a={"":h(r,!1)},s={},o=this;return y(e,{allKeys:!0},function(e,r,i,n,l,h,u){if(""!==r){var d=o._getId(e),v=t[n],y=a[n]+"/"+l;if(void 0!==u&&(y+="/"+("number"==typeof u?u:m.escapeFragment(u))),"string"==typeof d){d=v=c(v?f.resolve(v,d):d);var g=o._refs[d];if("string"==typeof g&&(g=o._refs[g]),g&&g.schema){if(!p(e,g.schema))throw new Error('id "'+d+'" resolves to more than one schema')}else if(d!=c(y))if("#"==d[0]){if(s[d]&&!p(e,s[d]))throw new Error('id "'+d+'" resolves to more than one schema');s[d]=e}else o._refs[d]=y}t[r]=v,a[r]=y}}),s},a.inlineRef=i,a.schema=s;var g=m.toHash(["properties","patternProperties","enum","dependencies","definitions"]),P=m.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]),E=/#\/?$/},{"./schema_obj":10,"./util":12,"fast-deep-equal":41,"json-schema-traverse":43,url:48}],9:[function(e,r,t){"use strict";var a=e("./_rules"),s=e("./util").toHash;r.exports=function(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","uniqueItems","contains","items"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf"]}],r=["type"];return e.all=s(r),e.types=s(["number","integer","string","array","object","boolean","null"]),e.forEach(function(t){t.rules=t.rules.map(function(t){var s;if("object"==typeof t){var o=Object.keys(t)[0];s=t[o],t=o,s.forEach(function(t){r.push(t),e.all[t]=!0})}r.push(t);return e.all[t]={keyword:t,code:a[t],implements:s}}),t.type&&(e.types[t.type]=t)}),e.keywords=s(r.concat(["additionalItems","$schema","$id","id","title","description","default","definitions"])),e.custom={},e}},{"./_rules":3,"./util":12}],10:[function(e,r,t){"use strict";var a=e("./util");r.exports=function(e){a.copy(e,this)}},{"./util":12}],11:[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++))>=55296&&r<=56319&&s<a&&56320==(64512&(r=e.charCodeAt(s)))&&s++;return t}},{}],12:[function(e,r,t){"use strict";function a(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 s(e){for(var r={},t=0;t<e.length;t++)r[e[t]]=!0;return r}function o(e){return"number"==typeof e?"["+e+"]":d.test(e)?"."+e:"['"+i(e)+"']"}function i(e){return e.replace(f,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function n(e){return"'"+i(e)+"'"}function l(e,r){return'""'==e?r:(e+" + "+r).replace(/' \+ '/g,"")}function h(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function u(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}r.exports={copy:function(e,r){r=r||{};for(var t in e)r[t]=e[t];return r},checkDataType:a,checkDataTypes:function(e,r){switch(e.length){case 1:return a(e[0],r,!0);default:var t="",o=s(e);o.array&&o.object&&(t=o.null?"(":"(!"+r+" || ",t+="typeof "+r+' !== "object")',delete o.null,delete o.array,delete o.object),o.number&&delete o.integer;for(var i in o)t+=(t?" && ":"")+a(i,r,!0);return t}},coerceToTypes:function(e,r){if(Array.isArray(r)){for(var t=[],a=0;a<r.length;a++){var s=r[a];c[s]?t[t.length]=s:"array"===e&&"array"===s&&(t[t.length]=s)}if(t.length)return t}else{if(c[r])return[r];if("array"===e&&"array"===r)return["array"]}},toHash:s,getProperty:o,escapeQuotes:i,equal:e("fast-deep-equal"),ucs2length:e("./ucs2length"),varOccurences:function(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0},varReplace:function(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")},cleanUpCode:function(e){return e.replace(p,"").replace(m,"").replace(v,"if (!($1))")},finalCleanUpCode:function(e,r){var t=e.match(y);return t&&2==t.length&&(e=r?e.replace(P,"").replace(b,S):e.replace(g,"").replace(E,w)),(t=e.match(j))&&3===t.length?e.replace(_,""):e},schemaHasRules:function(e,r){if("boolean"==typeof e)return!e;for(var t in e)if(r[t])return!0},schemaHasRulesExcept:function(e,r,t){if("boolean"==typeof e)return!e&&"not"!=t;for(var a in e)if(a!=t&&r[a])return!0},toQuotedString:n,getPathExpr:function(e,r,t,a){return l(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")},getPath:function(e,r,t){return l(e,n(t?"/"+h(r):o(r)))},getData:function(e,r,t){var a,s,i,n;if(""===e)return"rootData";if("/"==e[0]){if(!x.test(e))throw new Error("Invalid JSON-pointer: "+e);s=e,i="rootData"}else{if(!(n=e.match(F)))throw new Error("Invalid JSON-pointer: "+e);if(a=+n[1],"#"==(s=n[2])){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(i="data"+(r-a||""),!s)return i}for(var l=i,h=s.split("/"),c=0;c<h.length;c++){var d=h[c];d&&(l+=" && "+(i+=o(u(d))))}return l},unescapeFragment:function(e){return u(decodeURIComponent(e))},unescapeJsonPointer:u,escapeFragment:function(e){return encodeURIComponent(h(e))},escapeJsonPointer:h};var c=s(["string","number","integer","boolean","null"]),d=/^[a-z$_][a-z$_0-9]*$/i,f=/'|\\/g,p=/else\s*{\s*}/g,m=/if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g,v=/if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g,y=/[^v.]errors/g,g=/var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g,P=/var errors = 0;|var vErrors = null;/g,E="return errors === 0;",w="validate.errors = null; return true;",b=/if \(errors === 0\) return data;\s*else throw new ValidationError\(vErrors\);/,S="return data;",j=/[^A-Za-z_$]rootData[^A-Za-z0-9_$]/g,_=/if \(rootData === undefined\) rootData = data;/,x=/^\/(?:[^~]|~0|~1)*$/,F=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/},{"./ucs2length":11,"fast-deep-equal":41}],13:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var f="maximum"==r,p=f?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[p],v=f?"<":">",y=f?">":"<",g=void 0;if(e.opts.$data&&m&&m.$data){var P=e.util.getData(m.$data,i,e.dataPathArr),E="exclusive"+o,w="exclType"+o,b="exclIsNumber"+o,S="' + "+(_="op"+o)+" + '";s+=" var schemaExcl"+o+" = "+P+"; ",s+=" var "+E+"; var "+w+" = typeof "+(P="schemaExcl"+o)+"; if ("+w+" != 'boolean' && "+w+" != 'undefined' && "+w+" != 'number') { ";g=p;(x=x||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(g||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: {} ",!1!==e.opts.messages&&(s+=" , message: '"+p+" should be boolean' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var j=s;s=x.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+j+"]); ":" validate.errors = ["+j+"]; return false; ":" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } else if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+w+" == 'number' ? ( ("+E+" = "+a+" === undefined || "+P+" "+v+"= "+a+") ? "+c+" "+y+"= "+P+" : "+c+" "+y+" "+a+" ) : ( ("+E+" = "+P+" === true) ? "+c+" "+y+"= "+a+" : "+c+" "+y+" "+a+" ) || "+c+" !== "+c+") { var op"+o+" = "+E+" ? '"+v+"' : '"+v+"=';"}else{S=v;if((b="number"==typeof m)&&d){var _="'"+S+"'";s+=" if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" ( "+a+" === undefined || "+m+" "+v+"= "+a+" ? "+c+" "+y+"= "+m+" : "+c+" "+y+" "+a+" ) || "+c+" !== "+c+") { "}else{b&&void 0===n?(E=!0,g=p,h=e.errSchemaPath+"/"+p,a=m,y+="="):(b&&(a=Math[f?"min":"max"](m,n)),m===(!b||a)?(E=!0,g=p,h=e.errSchemaPath+"/"+p,y+="="):(E=!1,S+="="));_="'"+S+"'";s+=" if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+c+" "+y+" "+a+" || "+c+" !== "+c+") { "}}g=g||r;var x;(x=x||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(g||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { comparison: "+_+", limit: "+a+", exclusive: "+E+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be "+S+" ",s+=d?"' + "+a:a+"'"),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";j=s;return s=x.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+j+"]); ":" validate.errors = ["+j+"]; return false; ":" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",u&&(s+=" else { "),s}},{}],14:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+c+".length "+("maxItems"==r?">":"<")+" "+a+") { ";var f=r,p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxItems"==r?"more":"less",s+=" than ",s+=d?"' + "+a+" + '":""+n,s+=" items' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&u?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+="} ",u&&(s+=" else { "),s}},{}],15:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=!1===e.opts.unicode?" "+c+".length ":" ucs2length("+c+") ",s+=" "+("maxLength"==r?">":"<")+" "+a+") { ";var f=r,p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT be ",s+="maxLength"==r?"longer":"shorter",s+=" than ",s+=d?"' + "+a+" + '":""+n,s+=" characters' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&u?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+="} ",u&&(s+=" else { "),s}},{}],16:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" Object.keys("+c+").length "+("maxProperties"==r?">":"<")+" "+a+") { ";var f=r,p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxProperties"==r?"more":"less",s+=" than ",s+=d?"' + "+a+" + '":""+n,s+=" properties' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&u?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+="} ",u&&(s+=" else { "),s}},{}],17:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.schema[r],o=e.schemaPath+e.util.getProperty(r),i=e.errSchemaPath+"/"+r,n=!e.opts.allErrors,l=e.util.copy(e),h="";l.level++;var u="valid"+l.level,c=l.baseId,d=!0,f=s;if(f)for(var p,m=-1,v=f.length-1;m<v;)p=f[m+=1],e.util.schemaHasRules(p,e.RULES.all)&&(d=!1,l.schema=p,l.schemaPath=o+"["+m+"]",l.errSchemaPath=i+"/"+m,a+=" "+e.validate(l)+" ",l.baseId=c,n&&(a+=" if ("+u+") { ",h+="}"));return n&&(a+=d?" if (true) { ":" "+h.slice(0,-1)+" "),a=e.util.cleanUpCode(a)}},{}],18:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="valid"+s,d="errs__"+s,f=e.util.copy(e),p="";f.level++;var m="valid"+f.level;if(i.every(function(r){return e.util.schemaHasRules(r,e.RULES.all)})){var v=f.baseId;a+=" var "+d+" = errors; var "+c+" = false; ";var y=e.compositeRule;e.compositeRule=f.compositeRule=!0;var g=i;if(g)for(var P,E=-1,w=g.length-1;E<w;)P=g[E+=1],f.schema=P,f.schemaPath=n+"["+E+"]",f.errSchemaPath=l+"/"+E,a+=" "+e.validate(f)+" ",f.baseId=v,a+=" "+c+" = "+c+" || "+m+"; if (!"+c+") { ",p+="}";e.compositeRule=f.compositeRule=y,a+=" "+p+" if (!"+c+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&h&&(a+=e.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; "),a+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } "),a=e.util.cleanUpCode(a)}else h&&(a+=" if (true) { ");return a}},{}],19:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="valid"+s,d=e.opts.$data&&i&&i.$data;d&&(a+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; "),d||(a+=" var schema"+s+" = validate.schema"+n+";"),a+="var "+c+" = equal("+u+", schema"+s+"); if (!"+c+") { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var p=a;return a=f.pop(),a+=!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++; ",a+=" }",h&&(a+=" else { "),a}},{}],20:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="valid"+s,d="errs__"+s,f=e.util.copy(e);f.level++;var p="valid"+f.level,m="i"+s,v=f.dataLevel=e.dataLevel+1,y="data"+v,g=e.baseId,P=e.util.schemaHasRules(i,e.RULES.all);if(a+="var "+d+" = errors;var "+c+";",P){var E=e.compositeRule;e.compositeRule=f.compositeRule=!0,f.schema=i,f.schemaPath=n,f.errSchemaPath=l,a+=" var "+p+" = false; for (var "+m+" = 0; "+m+" < "+u+".length; "+m+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var w=u+"["+m+"]";f.dataPathArr[v]=m;var b=e.validate(f);f.baseId=g,e.util.varOccurences(b,y)<2?a+=" "+e.util.varReplace(b,y,w)+" ":a+=" var "+y+" = "+w+"; "+b+" ",a+=" if ("+p+") break; } ",e.compositeRule=f.compositeRule=E,a+=" if (!"+p+") {"}else a+=" if ("+u+".length == 0) {";var S=S||[];S.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var j=a;return a=S.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+j+"]); ":" validate.errors = ["+j+"]; return false; ":" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",P&&(a+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a=e.util.cleanUpCode(a)}},{}],21:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s,o=" ",i=e.level,n=e.dataLevel,l=e.schema[r],h=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(n||""),f="valid"+i,p="errs__"+i,m=e.opts.$data&&l&&l.$data;m?(o+=" var schema"+i+" = "+e.util.getData(l.$data,n,e.dataPathArr)+"; ",s="schema"+i):s=l;var v,y,g,P,E,w="definition"+i,b=this.definition,S="";if(m&&b.$data){var j=b.validateSchema;o+=" var "+w+" = RULES.custom['"+r+"'].definition; var "+(E="keywordValidate"+i)+" = "+w+".validate;"}else{if(!(P=e.useCustomRule(this,l,e.schema,e)))return;s="validate.schema"+h,E=P.code,v=b.compile,y=b.inline,g=b.macro}var _=E+".errors",x="i"+i,F="ruleErr"+i,$=b.async;if($&&!e.async)throw new Error("async keyword in sync schema");if(y||g||(o+=_+" = null;"),o+="var "+p+" = errors;var "+f+";",m&&b.$data&&(S+="}",o+=" if ("+s+" === undefined) { "+f+" = true; } else { ",j&&(S+="}",o+=" "+f+" = "+w+".validateSchema("+s+"); if ("+f+") { ")),y)o+=b.statements?" "+P.validate+" ":" "+f+" = "+P.validate+"; ";else if(g){var R=e.util.copy(e);S="";R.level++;var O="valid"+R.level;R.schema=P.validate,R.schemaPath="";var D=e.compositeRule;e.compositeRule=R.compositeRule=!0;var I=e.validate(R).replace(/validate\.schema/g,E);e.compositeRule=R.compositeRule=D,o+=" "+I}else{(L=L||[]).push(o),o="",o+=" "+E+".call( ",o+=e.opts.passContext?"this":"self",o+=v||!1===b.schema?" , "+d+" ":" , "+s+" , "+d+" , validate.schema"+e.schemaPath+" ",o+=" , (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath);var A=n?"data"+(n-1||""):"parentData",k=n?e.dataPathArr[n]:"parentDataProperty",q=o+=" , "+A+" , "+k+" , rootData ) ";o=L.pop(),!1===b.errors?(o+=" "+f+" = ",$&&(o+=""+e.yieldAwait),o+=q+"; "):o+=$?" var "+(_="customErrors"+i)+" = null; try { "+f+" = "+e.yieldAwait+q+"; } catch (e) { "+f+" = false; if (e instanceof ValidationError) "+_+" = e.errors; else throw e; } ":" "+_+" = null; "+f+" = "+q+"; "}if(b.modifying&&(o+=" if ("+A+") "+d+" = "+A+"["+k+"];"),o+=""+S,b.valid)c&&(o+=" if (true) { ");else{o+=" if ( ",void 0===b.valid?(o+=" !",o+=g?""+O:""+f):o+=" "+!b.valid+" ",o+=") { ",a=this.keyword;(L=L||[]).push(o),o="";var L;(L=L||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(o+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(o+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var z=o;o=L.pop();var C=o+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+z+"]); ":" validate.errors = ["+z+"]; return false; ":" var err = "+z+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";o=L.pop(),y?b.errors?"full"!=b.errors&&(o+=" for (var "+x+"="+p+"; "+x+"<errors; "+x+"++) { var "+F+" = vErrors["+x+"]; if ("+F+".dataPath === undefined) "+F+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+F+".schemaPath === undefined) { "+F+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(o+=" "+F+".schema = "+s+"; "+F+".data = "+d+"; "),o+=" } "):!1===b.errors?o+=" "+C+" ":(o+=" if ("+p+" == errors) { "+C+" } else { for (var "+x+"="+p+"; "+x+"<errors; "+x+"++) { var "+F+" = vErrors["+x+"]; if ("+F+".dataPath === undefined) "+F+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+F+".schemaPath === undefined) { "+F+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(o+=" "+F+".schema = "+s+"; "+F+".data = "+d+"; "),o+=" } } "):g?(o+=" var err = ",!1!==e.createErrors?(o+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(o+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(o+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ",o+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(o+=e.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; ")):!1===b.errors?o+=" "+C+" ":(o+=" if (Array.isArray("+_+")) { if (vErrors === null) vErrors = "+_+"; else vErrors = vErrors.concat("+_+"); errors = vErrors.length; for (var "+x+"="+p+"; "+x+"<errors; "+x+"++) { var "+F+" = vErrors["+x+"]; if ("+F+".dataPath === undefined) "+F+".dataPath = (dataPath || '') + "+e.errorPath+"; "+F+'.schemaPath = "'+u+'"; ',e.opts.verbose&&(o+=" "+F+".schema = "+s+"; "+F+".data = "+d+"; "),o+=" } } else { "+C+" } "),o+=" } ",c&&(o+=" else { ")}return o}},{}],22:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="errs__"+s,d=e.util.copy(e),f="";d.level++;var p="valid"+d.level,m={},v={},y=e.opts.ownProperties;for(w in i){var g=i[w],P=Array.isArray(g)?v:m;P[w]=g}a+="var "+c+" = errors;";var E=e.errorPath;a+="var missing"+s+";";for(var w in v)if((P=v[w]).length){if(a+=" if ( "+u+e.util.getProperty(w)+" !== undefined ",y&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),h){a+=" && ( ";var b=P;if(b)for(var S=-1,j=b.length-1;S<j;){O=b[S+=1],S&&(a+=" || ");a+=" ( ( "+(k=u+(A=e.util.getProperty(O)))+" === undefined ",y&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(O)+"') "),a+=") && (missing"+s+" = "+e.util.toQuotedString(e.opts.jsonPointers?O:A)+") ) "}a+=")) { ";var _="missing"+s,x="' + "+_+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(E,_,!0):E+" + "+_);var F=F||[];F.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+x+"', depsCount: "+P.length+", deps: '"+e.util.escapeQuotes(1==P.length?P[0]:P.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",a+=1==P.length?"property "+e.util.escapeQuotes(P[0]):"properties "+e.util.escapeQuotes(P.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var $=a;a=F.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+$+"]); ":" validate.errors = ["+$+"]; return false; ":" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var R=P;if(R)for(var O,D=-1,I=R.length-1;D<I;){O=R[D+=1];var A=e.util.getProperty(O),k=(x=e.util.escapeQuotes(O),u+A);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(E,O,e.opts.jsonPointers)),a+=" if ( "+k+" === undefined ",y&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(O)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+x+"', depsCount: "+P.length+", deps: '"+e.util.escapeQuotes(1==P.length?P[0]:P.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",a+=1==P.length?"property "+e.util.escapeQuotes(P[0]):"properties "+e.util.escapeQuotes(P.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",h&&(f+="}",a+=" else { ")}e.errorPath=E;var q=d.baseId;for(var w in m){e.util.schemaHasRules(g=m[w],e.RULES.all)&&(a+=" "+p+" = true; if ( "+u+e.util.getProperty(w)+" !== undefined ",y&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),a+=") { ",d.schema=g,d.schemaPath=n+e.util.getProperty(w),d.errSchemaPath=l+"/"+e.util.escapeFragment(w),a+=" "+e.validate(d)+" ",d.baseId=q,a+=" } ",h&&(a+=" if ("+p+") { ",f+="}"))}return h&&(a+=" "+f+" if ("+c+" == errors) {"),a=e.util.cleanUpCode(a)}},{}],23:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="valid"+s,d=e.opts.$data&&i&&i.$data;d&&(a+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; ");var f="i"+s,p="schema"+s;d||(a+=" var "+p+" = validate.schema"+n+";"),a+="var "+c+";",d&&(a+=" if (schema"+s+" === undefined) "+c+" = true; else if (!Array.isArray(schema"+s+")) "+c+" = false; else {"),a+=c+" = false;for (var "+f+"=0; "+f+"<"+p+".length; "+f+"++) if (equal("+u+", "+p+"["+f+"])) { "+c+" = true; break; }",d&&(a+=" } "),a+=" if (!"+c+") { ";var m=m||[];m.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+s+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var v=a;return a=m.pop(),a+=!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++; ",a+=" }",h&&(a+=" else { "),a}},{}],24:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||"");if(!1===e.opts.format)return h&&(a+=" if (true) { "),a;var c,d=e.opts.$data&&i&&i.$data;d?(a+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; ",c="schema"+s):c=i;var f=e.opts.unknownFormats,p=Array.isArray(f);if(d){a+=" var "+(m="format"+s)+" = formats["+c+"]; var "+(v="isObject"+s)+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+(y="formatType"+s)+" = "+v+" && "+m+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+s+" = "+m+".async; "),a+=" "+m+" = "+m+".validate; } if ( ",d&&(a+=" ("+c+" !== undefined && typeof "+c+" != 'string') || "),a+=" (","ignore"!=f&&(a+=" ("+c+" && !"+m+" ",p&&(a+=" && self._opts.unknownFormats.indexOf("+c+") == -1 "),a+=") || "),a+=" ("+m+" && "+y+" == '"+t+"' && !(typeof "+m+" == 'function' ? ",a+=e.async?" (async"+s+" ? "+e.yieldAwait+" "+m+"("+u+") : "+m+"("+u+")) ":" "+m+"("+u+") ",a+=" : "+m+".test("+u+"))))) {"}else{var m;if(!(m=e.formats[i])){if("ignore"==f)return e.logger.warn('unknown format "'+i+'" ignored in schema at path "'+e.errSchemaPath+'"'),h&&(a+=" if (true) { "),a;if(p&&f.indexOf(i)>=0)return h&&(a+=" if (true) { "),a;throw new Error('unknown format "'+i+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,y=(v="object"==typeof m&&!(m instanceof RegExp)&&m.validate)&&m.type||"string";if(v){var g=!0===m.async;m=m.validate}if(y!=t)return h&&(a+=" if (true) { "),a;if(g){if(!e.async)throw new Error("async format in sync schema");var P="formats"+e.util.getProperty(i)+".validate";a+=" if (!("+e.yieldAwait+" "+P+"("+u+"))) { "}else{a+=" if (! ";P="formats"+e.util.getProperty(i);v&&(P+=".validate"),a+="function"==typeof m?" "+P+"("+u+") ":" "+P+".test("+u+") ",a+=") { "}}var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=d?""+c:""+e.util.toQuotedString(i),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=d?"' + "+c+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=d?"validate.schema"+n:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var w=a;return a=E.pop(),a+=!e.compositeRule&&h?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+=" } ",h&&(a+=" else { "),a}},{}],25:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="valid"+s,d="errs__"+s,f=e.util.copy(e),p="";f.level++;var m="valid"+f.level,v="i"+s,y=f.dataLevel=e.dataLevel+1,g="data"+y,P=e.baseId;if(a+="var "+d+" = errors;var "+c+";",Array.isArray(i)){var E=e.schema.additionalItems;if(!1===E){a+=" "+c+" = "+u+".length <= "+i.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+c+") { ";var b=b||[];b.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+i.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+i.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var S=a;a=b.pop(),a+=!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++; ",a+=" } ",l=w,h&&(p+="}",a+=" else { ")}var j=i;if(j)for(var _,x=-1,F=j.length-1;x<F;)if(_=j[x+=1],e.util.schemaHasRules(_,e.RULES.all)){a+=" "+m+" = true; if ("+u+".length > "+x+") { ";var $=u+"["+x+"]";f.schema=_,f.schemaPath=n+"["+x+"]",f.errSchemaPath=l+"/"+x,f.errorPath=e.util.getPathExpr(e.errorPath,x,e.opts.jsonPointers,!0),f.dataPathArr[y]=x;var R=e.validate(f);f.baseId=P,e.util.varOccurences(R,g)<2?a+=" "+e.util.varReplace(R,g,$)+" ":a+=" var "+g+" = "+$+"; "+R+" ",a+=" } ",h&&(a+=" if ("+m+") { ",p+="}")}if("object"==typeof E&&e.util.schemaHasRules(E,e.RULES.all)){f.schema=E,f.schemaPath=e.schemaPath+".additionalItems",f.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+m+" = true; if ("+u+".length > "+i.length+") { for (var "+v+" = "+i.length+"; "+v+" < "+u+".length; "+v+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);$=u+"["+v+"]";f.dataPathArr[y]=v;R=e.validate(f);f.baseId=P,e.util.varOccurences(R,g)<2?a+=" "+e.util.varReplace(R,g,$)+" ":a+=" var "+g+" = "+$+"; "+R+" ",h&&(a+=" if (!"+m+") break; "),a+=" } } ",h&&(a+=" if ("+m+") { ",p+="}")}}else if(e.util.schemaHasRules(i,e.RULES.all)){f.schema=i,f.schemaPath=n,f.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+u+".length; "+v+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);$=u+"["+v+"]";f.dataPathArr[y]=v;R=e.validate(f);f.baseId=P,e.util.varOccurences(R,g)<2?a+=" "+e.util.varReplace(R,g,$)+" ":a+=" var "+g+" = "+$+"; "+R+" ",h&&(a+=" if (!"+m+") break; "),a+=" }"}return h&&(a+=" "+p+" if ("+d+" == errors) {"),a=e.util.cleanUpCode(a)}},{}],26:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n,s+="var division"+o+";if (",d&&(s+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),s+=" (division"+o+" = "+c+" / "+a+", ",s+=e.opts.multipleOfPrecision?" Math.abs(Math.round(division"+o+") - division"+o+") > 1e-"+e.opts.multipleOfPrecision+" ":" division"+o+" !== parseInt(division"+o+") ",s+=" ) ",d&&(s+=" ) "),s+=" ) { ";var f=f||[];f.push(s),s="",!1!==e.createErrors?(s+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be multiple of ",s+=d?"' + "+a:a+"'"),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var p=s;return s=f.pop(),s+=!e.compositeRule&&u?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+="} ",u&&(s+=" else { "),s}},{}],27:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="errs__"+s,d=e.util.copy(e);d.level++;var f="valid"+d.level;if(e.util.schemaHasRules(i,e.RULES.all)){d.schema=i,d.schemaPath=n,d.errSchemaPath=l,a+=" var "+c+" = errors; ";var p=e.compositeRule;e.compositeRule=d.compositeRule=!0,d.createErrors=!1;var m;d.opts.allErrors&&(m=d.opts.allErrors,d.opts.allErrors=!1),a+=" "+e.validate(d)+" ",d.createErrors=!0,m&&(d.opts.allErrors=m),e.compositeRule=d.compositeRule=p,a+=" if ("+f+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var y=a;a=v.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+y+"]); ":" validate.errors = ["+y+"]; return false; ":" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+c+"; if (vErrors !== null) { if ("+c+") vErrors.length = "+c+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",h&&(a+=" if (false) { ");return a}},{}],28:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="valid"+s,d="errs__"+s,f=e.util.copy(e),p="";f.level++;var m="valid"+f.level;a+="var "+d+" = errors;var prevValid"+s+" = false;var "+c+" = false;";var v=f.baseId,y=e.compositeRule;e.compositeRule=f.compositeRule=!0;var g=i;if(g)for(var P,E=-1,w=g.length-1;E<w;)P=g[E+=1],e.util.schemaHasRules(P,e.RULES.all)?(f.schema=P,f.schemaPath=n+"["+E+"]",f.errSchemaPath=l+"/"+E,a+=" "+e.validate(f)+" ",f.baseId=v):a+=" var "+m+" = true; ",E&&(a+=" if ("+m+" && prevValid"+s+") "+c+" = false; else { ",p+="}"),a+=" if ("+m+") "+c+" = prevValid"+s+" = true;";return e.compositeRule=f.compositeRule=y,a+=p+"if (!"+c+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&h&&(a+=e.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; "),a+="} else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a}},{}],29:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var f=d?"(new RegExp("+a+"))":e.usePattern(n);s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),s+=" !"+f+".test("+c+") ) { ";var p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { pattern: ",s+=d?""+a:""+e.util.toQuotedString(n),s+=" } ",!1!==e.opts.messages&&(s+=" , message: 'should match pattern \"",s+=d?"' + "+a+" + '":""+e.util.escapeQuotes(n),s+="\"' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+e.util.toQuotedString(n),s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&u?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+="} ",u&&(s+=" else { "),s}},{}],30:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="valid"+s,d="errs__"+s,f=e.util.copy(e),p="";f.level++;var m="valid"+f.level,v="key"+s,y="idx"+s,g=f.dataLevel=e.dataLevel+1,P="data"+g,E="dataProperties"+s,w=Object.keys(i||{}),b=e.schema.patternProperties||{},S=Object.keys(b),j=e.schema.additionalProperties,_=w.length||S.length,x=!1===j,F="object"==typeof j&&Object.keys(j).length,$=e.opts.removeAdditional,R=x||F||$,O=e.opts.ownProperties,D=e.baseId,I=e.schema.required;if(I&&(!e.opts.v5||!I.$data)&&I.length<e.opts.loopRequired)var A=e.util.toHash(I);if(e.opts.patternGroups)var k=e.schema.patternGroups||{},q=Object.keys(k);if(a+="var "+d+" = errors;var "+m+" = true;",O&&(a+=" var "+E+" = undefined;"),R){if(a+=O?" "+E+" = "+E+" || Object.keys("+u+"); for (var "+y+"=0; "+y+"<"+E+".length; "+y+"++) { var "+v+" = "+E+"["+y+"]; ":" for (var "+v+" in "+u+") { ",_){if(a+=" var isAdditional"+s+" = !(false ",w.length)if(w.length>5)a+=" || validate.schema"+n+"["+v+"] ";else{var L=w;if(L)for(var z=-1,C=L.length-1;z<C;)X=L[z+=1],a+=" || "+v+" == "+e.util.toQuotedString(X)+" "}if(S.length){var Q=S;if(Q)for(var U=-1,V=Q.length-1;U<V;)ne=Q[U+=1],a+=" || "+e.usePattern(ne)+".test("+v+") "}if(e.opts.patternGroups&&q.length){var N=q;if(N){U=-1;for(var T=N.length-1;U<T;)ce=N[U+=1],a+=" || "+e.usePattern(ce)+".test("+v+") "}}a+=" ); if (isAdditional"+s+") { "}if("all"==$)a+=" delete "+u+"["+v+"]; ";else{var M=e.errorPath,H="' + "+v+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers)),x)if($)a+=" delete "+u+"["+v+"]; ";else{a+=" "+m+" = false; ";var K=l;l=e.errSchemaPath+"/additionalProperties";(we=we||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+H+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have additional properties' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var B=a;a=we.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+B+"]); ":" validate.errors = ["+B+"]; return false; ":" var err = "+B+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=K,h&&(a+=" break; ")}else if(F)if("failing"==$){a+=" var "+d+" = errors; ";var G=e.compositeRule;e.compositeRule=f.compositeRule=!0,f.schema=j,f.schemaPath=e.schemaPath+".additionalProperties",f.errSchemaPath=e.errSchemaPath+"/additionalProperties",f.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers);var J=u+"["+v+"]";f.dataPathArr[g]=v;var Z=e.validate(f);f.baseId=D,e.util.varOccurences(Z,P)<2?a+=" "+e.util.varReplace(Z,P,J)+" ":a+=" var "+P+" = "+J+"; "+Z+" ",a+=" if (!"+m+") { errors = "+d+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+u+"["+v+"]; } ",e.compositeRule=f.compositeRule=G}else{f.schema=j,f.schemaPath=e.schemaPath+".additionalProperties",f.errSchemaPath=e.errSchemaPath+"/additionalProperties",f.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers);J=u+"["+v+"]";f.dataPathArr[g]=v;Z=e.validate(f);f.baseId=D,e.util.varOccurences(Z,P)<2?a+=" "+e.util.varReplace(Z,P,J)+" ":a+=" var "+P+" = "+J+"; "+Z+" ",h&&(a+=" if (!"+m+") break; ")}e.errorPath=M}_&&(a+=" } "),a+=" } ",h&&(a+=" if ("+m+") { ",p+="}")}var Y=e.opts.useDefaults&&!e.compositeRule;if(w.length){var W=w;if(W)for(var X,ee=-1,re=W.length-1;ee<re;){X=W[ee+=1];if(e.util.schemaHasRules(pe=i[X],e.RULES.all)){var te=e.util.getProperty(X),ae=(J=u+te,Y&&void 0!==pe.default);f.schema=pe,f.schemaPath=n+te,f.errSchemaPath=l+"/"+e.util.escapeFragment(X),f.errorPath=e.util.getPath(e.errorPath,X,e.opts.jsonPointers),f.dataPathArr[g]=e.util.toQuotedString(X);Z=e.validate(f);if(f.baseId=D,e.util.varOccurences(Z,P)<2){Z=e.util.varReplace(Z,P,J);var se=J}else{se=P;a+=" var "+P+" = "+J+"; "}if(ae)a+=" "+Z+" ";else{if(A&&A[X]){a+=" if ( "+se+" === undefined ",O&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(X)+"') "),a+=") { "+m+" = false; ";M=e.errorPath,K=l;var oe=e.util.escapeQuotes(X);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(M,X,e.opts.jsonPointers)),l=e.errSchemaPath+"/required";(we=we||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+oe+"' } ",!1!==e.opts.messages&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+oe+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";B=a;a=we.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+B+"]); ":" validate.errors = ["+B+"]; return false; ":" var err = "+B+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=K,e.errorPath=M,a+=" } else { "}else h?(a+=" if ( "+se+" === undefined ",O&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(X)+"') "),a+=") { "+m+" = true; } else { "):(a+=" if ("+se+" !== undefined ",O&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(X)+"') "),a+=" ) { ");a+=" "+Z+" } "}}h&&(a+=" if ("+m+") { ",p+="}")}}if(S.length){var ie=S;if(ie)for(var ne,le=-1,he=ie.length-1;le<he;){ne=ie[le+=1];if(e.util.schemaHasRules(pe=b[ne],e.RULES.all)){f.schema=pe,f.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ne),f.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ne),a+=O?" "+E+" = "+E+" || Object.keys("+u+"); for (var "+y+"=0; "+y+"<"+E+".length; "+y+"++) { var "+v+" = "+E+"["+y+"]; ":" for (var "+v+" in "+u+") { ",a+=" if ("+e.usePattern(ne)+".test("+v+")) { ",f.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers);J=u+"["+v+"]";f.dataPathArr[g]=v;Z=e.validate(f);f.baseId=D,e.util.varOccurences(Z,P)<2?a+=" "+e.util.varReplace(Z,P,J)+" ":a+=" var "+P+" = "+J+"; "+Z+" ",h&&(a+=" if (!"+m+") break; "),a+=" } ",h&&(a+=" else "+m+" = true; "),a+=" } ",h&&(a+=" if ("+m+") { ",p+="}")}}}if(e.opts.patternGroups&&q.length){var ue=q;if(ue)for(var ce,de=-1,fe=ue.length-1;de<fe;){var pe,me=k[ce=ue[de+=1]];if(e.util.schemaHasRules(pe=me.schema,e.RULES.all)){f.schema=pe,f.schemaPath=e.schemaPath+".patternGroups"+e.util.getProperty(ce)+".schema",f.errSchemaPath=e.errSchemaPath+"/patternGroups/"+e.util.escapeFragment(ce)+"/schema",a+=" var pgPropCount"+s+" = 0; ",a+=O?" "+E+" = "+E+" || Object.keys("+u+"); for (var "+y+"=0; "+y+"<"+E+".length; "+y+"++) { var "+v+" = "+E+"["+y+"]; ":" for (var "+v+" in "+u+") { ",a+=" if ("+e.usePattern(ce)+".test("+v+")) { pgPropCount"+s+"++; ",f.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers);J=u+"["+v+"]";f.dataPathArr[g]=v;Z=e.validate(f);f.baseId=D,e.util.varOccurences(Z,P)<2?a+=" "+e.util.varReplace(Z,P,J)+" ":a+=" var "+P+" = "+J+"; "+Z+" ",h&&(a+=" if (!"+m+") break; "),a+=" } ",h&&(a+=" else "+m+" = true; "),a+=" } ",h&&(a+=" if ("+m+") { ",p+="}");var ve=me.minimum,ye=me.maximum;if(void 0!==ve||void 0!==ye){a+=" var "+c+" = true; ";K=l;if(void 0!==ve){var ge=ve,Pe="minimum",Ee="less";a+=" "+c+" = pgPropCount"+s+" >= "+ve+"; ",l=e.errSchemaPath+"/patternGroups/minimum",a+=" if (!"+c+") { ";(we=we||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { reason: '"+Pe+"', limit: "+ge+", pattern: '"+e.util.escapeQuotes(ce)+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have "+Ee+" than "+ge+' properties matching pattern "'+e.util.escapeQuotes(ce)+"\"' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";B=a;a=we.pop(),a+=!e.compositeRule&&h?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+=" } ",void 0!==ye&&(a+=" else ")}if(void 0!==ye){ge=ye,Pe="maximum",Ee="more";a+=" "+c+" = pgPropCount"+s+" <= "+ye+"; ",l=e.errSchemaPath+"/patternGroups/maximum",a+=" if (!"+c+") { ";var we;(we=we||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { reason: '"+Pe+"', limit: "+ge+", pattern: '"+e.util.escapeQuotes(ce)+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have "+Ee+" than "+ge+' properties matching pattern "'+e.util.escapeQuotes(ce)+"\"' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";B=a;a=we.pop(),a+=!e.compositeRule&&h?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=K,h&&(a+=" if ("+c+") { ",p+="}")}}}}return h&&(a+=" "+p+" if ("+d+" == errors) {"),a=e.util.cleanUpCode(a)}},{}],31:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="errs__"+s,d=e.util.copy(e);d.level++;var f="valid"+d.level;if(e.util.schemaHasRules(i,e.RULES.all)){d.schema=i,d.schemaPath=n,d.errSchemaPath=l;var p="key"+s,m="idx"+s,v="i"+s,y="' + "+p+" + '",g="data"+(d.dataLevel=e.dataLevel+1),P="dataProperties"+s,E=e.opts.ownProperties,w=e.baseId;a+=" var "+c+" = errors; ",E&&(a+=" var "+P+" = undefined; "),a+=E?" "+P+" = "+P+" || Object.keys("+u+"); for (var "+m+"=0; "+m+"<"+P+".length; "+m+"++) { var "+p+" = "+P+"["+m+"]; ":" for (var "+p+" in "+u+") { ",a+=" var startErrs"+s+" = errors; ";var b=p,S=e.compositeRule;e.compositeRule=d.compositeRule=!0;var j=e.validate(d);d.baseId=w,e.util.varOccurences(j,g)<2?a+=" "+e.util.varReplace(j,g,b)+" ":a+=" var "+g+" = "+b+"; "+j+" ",e.compositeRule=d.compositeRule=S,a+=" if (!"+f+") { for (var "+v+"=startErrs"+s+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+p+"; } var err = ",!1!==e.createErrors?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { propertyName: '"+y+"' } ",!1!==e.opts.messages&&(a+=" , message: 'property name \\'"+y+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&h&&(a+=e.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; "),h&&(a+=" break; "),a+=" } }"}return h&&(a+=" if ("+c+" == errors) {"),a=e.util.cleanUpCode(a)}},{}],32:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s,o=" ",i=e.dataLevel,n=e.schema[r],l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(i||""),c="valid"+e.level;if("#"==n||"#/"==n)e.isRoot?(a=e.async,s="validate"):(a=!0===e.root.schema.$async,s="root.refVal[0]");else{var d=e.resolveRef(e.baseId,n,e.isRoot);if(void 0===d){var f=e.MissingRefError.message(e.baseId,n);if("fail"==e.opts.missingRefs){e.logger.error(f);(y=y||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { ref: '"+e.util.escapeQuotes(n)+"' } ",!1!==e.opts.messages&&(o+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(n)+"' "),e.opts.verbose&&(o+=" , schema: "+e.util.toQuotedString(n)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),o+=" } "):o+=" {} ";var p=o;o=y.pop(),o+=!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++; ",h&&(o+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,n,f);e.logger.warn(f),h&&(o+=" if (true) { ")}}else if(d.inline){var m=e.util.copy(e);m.level++;var v="valid"+m.level;m.schema=d.schema,m.schemaPath="",m.errSchemaPath=n;o+=" "+e.validate(m).replace(/validate\.schema/g,d.code)+" ",h&&(o+=" if ("+v+") { ")}else a=!0===d.$async,s=d.code}if(s){var y;(y=y||[]).push(o),o="",o+=e.opts.passContext?" "+s+".call(this, ":" "+s+"( ",o+=" "+u+", (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath);var g=o+=" , "+(i?"data"+(i-1||""):"parentData")+" , "+(i?e.dataPathArr[i]:"parentDataProperty")+", rootData) ";if(o=y.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");h&&(o+=" var "+c+"; "),o+=" try { "+e.yieldAwait+" "+g+"; ",h&&(o+=" "+c+" = true; "),o+=" } 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+=" "+c+" = false; "),o+=" } ",h&&(o+=" if ("+c+") { ")}else o+=" if (!"+g+") { 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,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="valid"+s,d=e.opts.$data&&i&&i.$data;d&&(a+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; ");var f="schema"+s;if(!d)if(i.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var p=[],m=i;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 p=i;if(d||p.length){var E=e.errorPath,w=d||p.length>=e.opts.loopRequired,b=e.opts.ownProperties;if(h)if(a+=" var missing"+s+"; ",w){d||(a+=" var "+f+" = validate.schema"+n+"; ");var S="' + "+(R="schema"+s+"["+(x="i"+s)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(E,R,e.opts.jsonPointers)),a+=" var "+c+" = true; ",d&&(a+=" if (schema"+s+" === undefined) "+c+" = true; else if (!Array.isArray(schema"+s+")) "+c+" = false; else {"),a+=" for (var "+x+" = 0; "+x+" < "+f+".length; "+x+"++) { "+c+" = "+u+"["+f+"["+x+"]] !== undefined ",b&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", "+f+"["+x+"]) "),a+="; if (!"+c+") break; } ",d&&(a+=" } "),a+=" if (!"+c+") { ";($=$||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var j=a;a=$.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+j+"]); ":" validate.errors = ["+j+"]; return false; ":" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var _=p;if(_)for(var x=-1,F=_.length-1;x<F;){D=_[x+=1],x&&(a+=" || ");a+=" ( ( "+(q=u+(k=e.util.getProperty(D)))+" === undefined ",b&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(D)+"') "),a+=") && (missing"+s+" = "+e.util.toQuotedString(e.opts.jsonPointers?D:k)+") ) "}a+=") { ";S="' + "+(R="missing"+s)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(E,R,!0):E+" + "+R);var $;($=$||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";j=a;a=$.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+j+"]); ":" validate.errors = ["+j+"]; return false; ":" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(w){d||(a+=" var "+f+" = validate.schema"+n+"; ");var R;S="' + "+(R="schema"+s+"["+(x="i"+s)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(E,R,e.opts.jsonPointers)),d&&(a+=" if ("+f+" && !Array.isArray("+f+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+f+" !== undefined) { "),a+=" for (var "+x+" = 0; "+x+" < "+f+".length; "+x+"++) { if ("+u+"["+f+"["+x+"]] === undefined ",b&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", "+f+"["+x+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",d&&(a+=" } ")}else{var O=p;if(O)for(var D,I=-1,A=O.length-1;I<A;){D=O[I+=1];var k=e.util.getProperty(D),q=(S=e.util.escapeQuotes(D),u+k);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(E,D,e.opts.jsonPointers)),a+=" if ( "+q+" === undefined ",b&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(D)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=E}else h&&(a+=" if (true) {");return a}},{}],34:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),d="valid"+o,f=e.opts.$data&&n&&n.$data;if(f?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n,(n||f)&&!1!==e.opts.uniqueItems){f&&(s+=" var "+d+"; if ("+a+" === false || "+a+" === undefined) "+d+" = true; else if (typeof "+a+" != 'boolean') "+d+" = false; else { "),s+=" var "+d+" = true; if ("+c+".length > 1) { var i = "+c+".length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal("+c+"[i], "+c+"[j])) { "+d+" = false; break outer; } } } } ",f&&(s+=" } "),s+=" if (!"+d+") { ";var p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var m=s;s=p.pop(),s+=!e.compositeRule&&u?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+=" } ",u&&(s+=" else { ")}else u&&(s+=" if (true) { ");return s}},{}],35:[function(e,r,t){"use strict";r.exports=function(e,r,t){function a(e){for(var r=e.rules,t=0;t<r.length;t++)if(s(r[t]))return!0}function s(r){return void 0!==e.schema[r.keyword]||r.implements&&function(r){for(var t=r.implements,a=0;a<t.length;a++)if(void 0!==e.schema[t[a]])return!0}(r)}var o="",i=!0===e.schema.$async,n=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),l=e.self._getId(e.schema);if(e.isTop){if(i){e.async=!0;var h="es7"==e.opts.async;e.yieldAwait=h?"await":"yield"}o+=" var validate = ",i?h?o+=" (async function ":("*"!=e.opts.async&&(o+="co.wrap"),o+="(function* "):o+=" (function ",o+=" (data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",l&&(e.opts.sourceCode||e.opts.processCode)&&(o+=" /*# sourceURL="+l+" */ ")}if("boolean"==typeof e.schema||!n&&!e.schema.$ref){var u=e.level,c=e.dataLevel,d=e.schema[r="false schema"],f=e.schemaPath+e.util.getProperty(r),p=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,v="data"+(c||""),y="valid"+u;if(!1===e.schema){e.isTop?m=!0:o+=" var "+y+" = false; ";(Y=Y||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(E||"false schema")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(o+=" , message: 'boolean schema is false' "),e.opts.verbose&&(o+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),o+=" } "):o+=" {} ";var g=o;o=Y.pop(),o+=!e.compositeRule&&m?e.async?" throw new ValidationError(["+g+"]); ":" validate.errors = ["+g+"]; return false; ":" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else o+=e.isTop?i?" return data; ":" validate.errors = null; return true; ":" var "+y+" = true; ";return e.isTop&&(o+=" }); return validate; "),o}if(e.isTop){var P=e.isTop;u=e.level=0,c=e.dataLevel=0,v="data";e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[void 0],o+=" var vErrors = null; ",o+=" var errors = 0; ",o+=" if (rootData === undefined) rootData = data; "}else{u=e.level,v="data"+((c=e.dataLevel)||"");if(l&&(e.baseId=e.resolve.url(e.baseId,l)),i&&!e.async)throw new Error("async schema in sync schema");o+=" var errs_"+u+" = errors;"}y="valid"+u,m=!e.opts.allErrors;var E,w="",b="",S=e.schema.type,j=Array.isArray(S);if(j&&1==S.length&&(S=S[0],j=!1),e.schema.$ref&&n){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(n=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(S){if(e.opts.coerceTypes)var _=e.util.coerceToTypes(e.opts.coerceTypes,S);var x=e.RULES.types[S];if(_||j||!0===x||x&&!a(x)){f=e.schemaPath+".type",p=e.errSchemaPath+"/type",f=e.schemaPath+".type",p=e.errSchemaPath+"/type";if(o+=" if ("+e.util[j?"checkDataTypes":"checkDataType"](S,v,!0)+") { ",_){var F="dataType"+u,$="coerced"+u;o+=" var "+F+" = typeof "+v+"; ","array"==e.opts.coerceTypes&&(o+=" if ("+F+" == 'object' && Array.isArray("+v+")) "+F+" = 'array'; "),o+=" var "+$+" = undefined; ";var R="",O=_;if(O)for(var D,I=-1,A=O.length-1;I<A;)D=O[I+=1],I&&(o+=" if ("+$+" === undefined) { ",R+="}"),"array"==e.opts.coerceTypes&&"array"!=D&&(o+=" if ("+F+" == 'array' && "+v+".length == 1) { "+$+" = "+v+" = "+v+"[0]; "+F+" = typeof "+v+"; } "),"string"==D?o+=" if ("+F+" == 'number' || "+F+" == 'boolean') "+$+" = '' + "+v+"; else if ("+v+" === null) "+$+" = ''; ":"number"==D||"integer"==D?(o+=" if ("+F+" == 'boolean' || "+v+" === null || ("+F+" == 'string' && "+v+" && "+v+" == +"+v+" ","integer"==D&&(o+=" && !("+v+" % 1)"),o+=")) "+$+" = +"+v+"; "):"boolean"==D?o+=" if ("+v+" === 'false' || "+v+" === 0 || "+v+" === null) "+$+" = false; else if ("+v+" === 'true' || "+v+" === 1) "+$+" = true; ":"null"==D?o+=" if ("+v+" === '' || "+v+" === 0 || "+v+" === false) "+$+" = null; ":"array"==e.opts.coerceTypes&&"array"==D&&(o+=" if ("+F+" == 'string' || "+F+" == 'number' || "+F+" == 'boolean' || "+v+" == null) "+$+" = ["+v+"]; ");o+=" "+R+" if ("+$+" === undefined) { ";(Y=Y||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(E||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",o+=j?""+S.join(","):""+S,o+="' } ",!1!==e.opts.messages&&(o+=" , message: 'should be ",o+=j?""+S.join(","):""+S,o+="' "),e.opts.verbose&&(o+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),o+=" } "):o+=" {} ";g=o;o=Y.pop(),o+=!e.compositeRule&&m?e.async?" throw new ValidationError(["+g+"]); ":" validate.errors = ["+g+"]; return false; ":" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else { ";var k=c?"data"+(c-1||""):"parentData";o+=" "+v+" = "+$+"; ",c||(o+="if ("+k+" !== undefined)"),o+=" "+k+"["+(c?e.dataPathArr[c]:"parentDataProperty")+"] = "+$+"; } "}else{(Y=Y||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(E||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",o+=j?""+S.join(","):""+S,o+="' } ",!1!==e.opts.messages&&(o+=" , message: 'should be ",o+=j?""+S.join(","):""+S,o+="' "),e.opts.verbose&&(o+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),o+=" } "):o+=" {} ";g=o;o=Y.pop(),o+=!e.compositeRule&&m?e.async?" throw new ValidationError(["+g+"]); ":" validate.errors = ["+g+"]; return false; ":" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}o+=" } "}}if(e.schema.$ref&&!n)o+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",m&&(o+=" } if (errors === ",o+=P?"0":"errs_"+u,o+=") { ",b+="}");else{e.opts.v5&&e.schema.patternGroups&&e.logger.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.');var q=e.RULES;if(q)for(var L=-1,z=q.length-1;L<z;)if(x=q[L+=1],a(x)){if(x.type&&(o+=" if ("+e.util.checkDataType(x.type,v)+") { "),e.opts.useDefaults&&!e.compositeRule)if("object"==x.type&&e.schema.properties){d=e.schema.properties;var C=Object.keys(d);if(C)for(var Q,U=-1,V=C.length-1;U<V;){if(void 0!==(T=d[Q=C[U+=1]]).default){o+=" if ("+(H=v+e.util.getProperty(Q))+" === undefined) "+H+" = ",o+="shared"==e.opts.useDefaults?" "+e.useDefault(T.default)+" ":" "+JSON.stringify(T.default)+" ",o+="; "}}}else if("array"==x.type&&Array.isArray(e.schema.items)){var N=e.schema.items;if(N){I=-1;for(var T,M=N.length-1;I<M;)if(void 0!==(T=N[I+=1]).default){var H;o+=" if ("+(H=v+"["+I+"]")+" === undefined) "+H+" = ",o+="shared"==e.opts.useDefaults?" "+e.useDefault(T.default)+" ":" "+JSON.stringify(T.default)+" ",o+="; "}}}var K=x.rules;if(K)for(var B,G=-1,J=K.length-1;G<J;)if(B=K[G+=1],s(B)){var Z=B.code(e,B.keyword,x.type);Z&&(o+=" "+Z+" ",m&&(w+="}"))}if(m&&(o+=" "+w+" ",w=""),x.type&&(o+=" } ",S&&S===x.type&&!_)){o+=" else { ";var Y;f=e.schemaPath+".type",p=e.errSchemaPath+"/type";(Y=Y||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(E||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",o+=j?""+S.join(","):""+S,o+="' } ",!1!==e.opts.messages&&(o+=" , message: 'should be ",o+=j?""+S.join(","):""+S,o+="' "),e.opts.verbose&&(o+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),o+=" } "):o+=" {} ";g=o;o=Y.pop(),o+=!e.compositeRule&&m?e.async?" throw new ValidationError(["+g+"]); ":" validate.errors = ["+g+"]; return false; ":" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } "}m&&(o+=" if (errors === ",o+=P?"0":"errs_"+u,o+=") { ",b+="}")}}return m&&(o+=" "+b+" "),P?(i?(o+=" if (errors === 0) return data; ",o+=" else throw new ValidationError(vErrors); "):(o+=" validate.errors = vErrors; ",o+=" return errors === 0; "),o+=" }); return validate;"):o+=" var "+y+" = errors === errs_"+u+";",o=e.util.cleanUpCode(o),P&&(o=e.util.finalCleanUpCode(o,i)),o}},{}],36:[function(e,r,t){"use strict";var a=/^[a-z_$][a-z0-9_$-]*$/i,s=e("./dotjs/custom");r.exports={add:function(e,r){function t(e,r,t){for(var a,o=0;o<i.length;o++){var n=i[o];if(n.type==r){a=n;break}}a||i.push(a={type:r,rules:[]});var l={keyword:e,definition:t,custom:!0,code:s,implements:t.implements};a.rules.push(l),i.custom[e]=l}function o(e){if(!i.types[e])throw new Error("Unknown type "+e)}var i=this.RULES;if(i.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){if(r.macro&&void 0!==r.valid)throw new Error('"valid" option cannot be used with macro keywords');var n=r.type;if(Array.isArray(n)){var l,h=n.length;for(l=0;l<h;l++)o(n[l]);for(l=0;l<h;l++)t(e,n[l],r)}else n&&o(n),t(e,n,r);var u=!0===r.$data&&this._opts.$data;if(u&&!r.validate)throw new Error('$data support: "validate" function is not defined');var c=r.metaSchema;c&&(u&&(c={anyOf:[c,{$ref:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#"}]}),r.validateSchema=this.compile(c,!0))}return i.keywords[e]=i.all[e]=!0,this},get:function(e){var r=this.RULES.custom[e];return r?r.definition:this.RULES.keywords[e]||!1},remove:function(e){var r=this.RULES;delete r.keywords[e],delete r.all[e],delete r.custom[e];for(var t=0;t<r.length;t++)for(var a=r[t].rules,s=0;s<a.length;s++)if(a[s].keyword==e){a.splice(s,1);break}return this}}},{"./dotjs/custom":21}],37:[function(e,r,t){"use strict";var a="http://json-schema.org/draft-06/schema";r.exports=function(e){var r=e._opts.defaultMeta,t="string"==typeof r?{$ref:r}:e.getSchema(a)?{$ref:a}:{};e.addKeyword("patternGroups",{metaSchema:{type:"object",additionalProperties:{type:"object",required:["schema"],properties:{maximum:{type:"integer",minimum:0},minimum:{type:"integer",minimum:0},schema:t},additionalProperties:!1}}}),e.RULES.all.properties.implements.push("patternGroups")}},{}],38:[function(e,r,t){r.exports={$schema:"http://json-schema.org/draft-06/schema#",$id:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#",description:"Meta-schema for $data reference (JSON-schema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}},{}],39:[function(e,r,t){r.exports={$schema:"http://json-schema.org/draft-06/schema#",$id:"http://json-schema.org/draft-06/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},title:{type:"string"},description:{type:"string"},default:{},examples:{type:"array",items:{}},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},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"}]}},propertyNames:{$ref:"#"},const:{},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:{}}},{}],40:[function(e,r,t){function a(e){var r=this,t=n.call(arguments,1);return new Promise(function(a,i){function n(r){var t;try{t=e.next(r)}catch(e){return i(e)}h(t)}function l(r){var t;try{t=e.throw(r)}catch(e){return i(e)}h(t)}function h(e){if(e.done)return a(e.value);var t=s.call(r,e.value);return t&&o(t)?t.then(n,l):l(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(e.value)+'"'))}if("function"==typeof e&&(e=e.apply(r,t)),!e||"function"!=typeof e.next)return a(e);n()})}function s(e){return e?o(e)?e:function(e){var r=e.constructor;return!!r&&("GeneratorFunction"===r.name||"GeneratorFunction"===r.displayName||i(r.prototype))}(e)||i(e)?a.call(this,e):"function"==typeof e?function(e){var r=this;return new Promise(function(t,a){e.call(r,function(e,r){if(e)return a(e);arguments.length>2&&(r=n.call(arguments,1)),t(r)})})}.call(this,e):Array.isArray(e)?function(e){return Promise.all(e.map(s,this))}.call(this,e):function(e){return Object==e.constructor}(e)?function(e){for(var r=new e.constructor,t=Object.keys(e),a=[],i=0;i<t.length;i++){var n=t[i],l=s.call(this,e[n]);l&&o(l)?function(e,t){r[t]=void 0,a.push(e.then(function(e){r[t]=e}))}(l,n):r[n]=e[n]}return Promise.all(a).then(function(){return r})}.call(this,e):e:e}function o(e){return"function"==typeof e.then}function i(e){return"function"==typeof e.next&&"function"==typeof e.throw}var n=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}},{}],41:[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;var n=r instanceof Date,l=t instanceof Date;if(n&&l)return r.getTime()==t.getTime();if(n!=l)return!1;var h=r instanceof RegExp,u=t instanceof RegExp;if(h&&u)return r.toString()==t.toString();if(h!=u)return!1;for(a=0;a<i.length;a++)if(!Object.prototype.hasOwnProperty.call(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}},{}],42:[function(e,r,t){"use strict";r.exports=function(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});var t="boolean"==typeof r.cycles&&r.cycles,a=r.cmp&&function(e){return function(r){return function(t,a){return e({key:t,value:r[t]},{key:a,value:r[a]})}}}(r.cmp),s=[];return function e(r){if(r&&r.toJSON&&"function"==typeof r.toJSON&&(r=r.toJSON()),void 0!==r){if("number"==typeof r)return isFinite(r)?""+r:"null";if("object"!=typeof r)return JSON.stringify(r);var o,i;if(Array.isArray(r)){for(i="[",o=0;o<r.length;o++)o&&(i+=","),i+=e(r[o])||"null";return i+"]"}if(null===r)return"null";if(-1!==s.indexOf(r)){if(t)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var n=s.push(r)-1,l=Object.keys(r).sort(a&&a(r));for(i="",o=0;o<l.length;o++){var h=l[o],u=e(r[h]);u&&(i&&(i+=","),i+=JSON.stringify(h)+":"+u)}return s.splice(n,1),"{"+i+"}"}}(e)}},{}],43:[function(e,r,t){"use strict";function a(e,r,t,o,i,n,l,h,u){if(t&&"object"==typeof t&&!Array.isArray(t)){r(t,o,i,n,l,h,u);for(var c in t){var d=t[c];if(Array.isArray(d)){if(c in s.arrayKeywords)for(var f=0;f<d.length;f++)a(e,r,d[f],o+"/"+c+"/"+f,i,o,c,t,f)}else if(c in s.propsKeywords){if(d&&"object"==typeof d)for(var p in d)a(e,r,d[p],o+"/"+c+"/"+function(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}(p),i,o,c,t,p)}else(c in s.keywords||e.allKeys&&!(c in s.skipKeywords))&&a(e,r,d,o+"/"+c,i,o,c,t)}}}var s=r.exports=function(e,r,t){"function"==typeof r&&(t=r,r={}),a(r,t,e,"",e)};s.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},s.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},s.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},s.skipKeywords={enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},{}],44:[function(e,r,t){(function(e){!function(a){function s(e){throw new RangeError(D[e])}function o(e,r){for(var t=e.length,a=[];t--;)a[t]=r(e[t]);return a}function i(e,r){var t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]);return a+o((e=e.replace(O,".")).split("."),r).join(".")}function n(e){for(var r,t,a=[],s=0,o=e.length;s<o;)(r=e.charCodeAt(s++))>=55296&&r<=56319&&s<o?56320==(64512&(t=e.charCodeAt(s++)))?a.push(((1023&r)<<10)+(1023&t)+65536):(a.push(r),s--):a.push(r);return a}function l(e){return o(e,function(e){var r="";return e>65535&&(r+=k((e-=65536)>>>10&1023|55296),e=56320|1023&e),r+=k(e)}).join("")}function h(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:E}function u(e,r){return e+22+75*(e<26)-((0!=r)<<5)}function c(e,r,t){var a=0;for(e=t?A(e/j):e>>1,e+=A(e/r);e>I*b>>1;a+=E)e=A(e/I);return A(a+(I+1)*e/(e+S))}function d(e){var r,t,a,o,i,n,u,d,f,p,m=[],v=e.length,y=0,g=x,S=_;for((t=e.lastIndexOf(F))<0&&(t=0),a=0;a<t;++a)e.charCodeAt(a)>=128&&s("not-basic"),m.push(e.charCodeAt(a));for(o=t>0?t+1:0;o<v;){for(i=y,n=1,u=E;o>=v&&s("invalid-input"),((d=h(e.charCodeAt(o++)))>=E||d>A((P-y)/n))&&s("overflow"),y+=d*n,f=u<=S?w:u>=S+b?b:u-S,!(d<f);u+=E)n>A(P/(p=E-f))&&s("overflow"),n*=p;S=c(y-i,r=m.length+1,0==i),A(y/r)>P-g&&s("overflow"),g+=A(y/r),y%=r,m.splice(y++,0,g)}return l(m)}function f(e){var r,t,a,o,i,l,h,d,f,p,m,v,y,g,S,j=[];for(v=(e=n(e)).length,r=x,t=0,i=_,l=0;l<v;++l)(m=e[l])<128&&j.push(k(m));for(a=o=j.length,o&&j.push(F);a<v;){for(h=P,l=0;l<v;++l)(m=e[l])>=r&&m<h&&(h=m);for(h-r>A((P-t)/(y=a+1))&&s("overflow"),t+=(h-r)*y,r=h,l=0;l<v;++l)if((m=e[l])<r&&++t>P&&s("overflow"),m==r){for(d=t,f=E;p=f<=i?w:f>=i+b?b:f-i,!(d<p);f+=E)j.push(k(u(p+(S=d-p)%(g=E-p),0))),d=A(S/g);j.push(k(u(d,0))),i=c(t,y,a==o),t=0,++a}++t,++r}return j.join("")}var p="object"==typeof t&&t&&!t.nodeType&&t,m="object"==typeof r&&r&&!r.nodeType&&r,v="object"==typeof e&&e;v.global!==v&&v.window!==v&&v.self!==v||(a=v);var y,g,P=2147483647,E=36,w=1,b=26,S=38,j=700,_=72,x=128,F="-",$=/^xn--/,R=/[^\x20-\x7E]/,O=/[\x2E\u3002\uFF0E\uFF61]/g,D={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=E-w,A=Math.floor,k=String.fromCharCode;if(y={version:"1.4.1",ucs2:{decode:n,encode:l},decode:d,encode:f,toASCII:function(e){return i(e,function(e){return R.test(e)?"xn--"+f(e):e})},toUnicode:function(e){return i(e,function(e){return $.test(e)?d(e.slice(4).toLowerCase()):e})}},p&&m)if(r.exports==p)m.exports=y;else for(g in y)y.hasOwnProperty(g)&&(p[g]=y[g]);else a.punycode=y}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],45:[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 h=e.length;l>0&&h>l&&(h=l);for(var u=0;u<h;++u){var c,d,f,p,m=e[u].replace(n,"%20"),v=m.indexOf(t);v>=0?(c=m.substr(0,v),d=m.substr(v+1)):(c=m,d=""),f=decodeURIComponent(c),p=decodeURIComponent(d),a(i,f)?s(i[f])?i[f].push(p):i[f]=[i[f],p]:i[f]=p}return i};var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],46:[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}},{}],47:[function(e,r,t){"use strict";t.decode=t.parse=e("./decode"),t.encode=t.stringify=e("./encode")},{"./decode":45,"./encode":46}],48:[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&&i.isObject(e)&&e instanceof a)return e;var s=new a;return s.parse(e,r,t),s}var o=e("punycode"),i=e("./util");t.parse=s,t.resolve=function(e,r){return s(e,!1,!0).resolve(r)},t.resolveObject=function(e,r){return e?s(e,!1,!0).resolveObject(r):r},t.format=function(e){return i.isString(e)&&(e=s(e)),e instanceof a?e.format():a.prototype.format.call(e)},t.Url=a;var n=/^([a-z0-9.+-]+:)/i,l=/:[0-9]*$/,h=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(u),d=["%","/","?",";","#"].concat(c),f=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},P=e("querystring");a.prototype.parse=function(e,r,t){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),s=-1!==a&&a<e.indexOf("#")?"?":"#",l=e.split(s);l[0]=l[0].replace(/\\/g,"/");var u=e=l.join(s);if(u=u.trim(),!t&&1===e.split("#").length){var E=h.exec(u);if(E)return this.path=u,this.href=u,this.pathname=E[1],E[2]?(this.search=E[2],this.query=r?P.parse(this.search.substr(1)):this.search.substr(1)):r&&(this.search="",this.query={}),this}var w=n.exec(u);if(w){var b=(w=w[0]).toLowerCase();this.protocol=b,u=u.substr(w.length)}if(t||w||u.match(/^\/\/[^@\/]+@[^@\/]+/)){var S="//"===u.substr(0,2);!S||w&&y[w]||(u=u.substr(2),this.slashes=!0)}if(!y[w]&&(S||w&&!g[w])){for(var j=-1,_=0;_<f.length;_++){-1!==($=u.indexOf(f[_]))&&(-1===j||$<j)&&(j=$)}var x,F;-1!==(F=-1===j?u.lastIndexOf("@"):u.lastIndexOf("@",j))&&(x=u.slice(0,F),u=u.slice(F+1),this.auth=decodeURIComponent(x)),j=-1;for(_=0;_<d.length;_++){var $;-1!==($=u.indexOf(d[_]))&&(-1===j||$<j)&&(j=$)}-1===j&&(j=u.length),this.host=u.slice(0,j),u=u.slice(j),this.parseHost(),this.hostname=this.hostname||"";var R="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!R)for(var O=this.hostname.split(/\./),D=(_=0,O.length);_<D;_++){var I=O[_];if(I&&!I.match(p)){for(var A="",k=0,q=I.length;k<q;k++)I.charCodeAt(k)>127?A+="x":A+=I[k];if(!A.match(p)){var L=O.slice(0,_),z=O.slice(_+1),C=I.match(m);C&&(L.push(C[1]),z.unshift(C[2])),z.length&&(u="/"+z.join(".")+u),this.hostname=L.join(".");break}}}this.hostname=this.hostname.length>255?"":this.hostname.toLowerCase(),R||(this.hostname=o.toASCII(this.hostname));var Q=this.port?":"+this.port:"";this.host=(this.hostname||"")+Q,this.href+=this.host,R&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==u[0]&&(u="/"+u))}if(!v[b])for(_=0,D=c.length;_<D;_++){var U=c[_];if(-1!==u.indexOf(U)){var V=encodeURIComponent(U);V===U&&(V=escape(U)),u=u.split(U).join(V)}}var N=u.indexOf("#");-1!==N&&(this.hash=u.substr(N),u=u.slice(0,N));var T=u.indexOf("?");if(-1!==T?(this.search=u.substr(T),this.query=u.substr(T+1),r&&(this.query=P.parse(this.query)),u=u.slice(0,T)):r&&(this.search="",this.query={}),u&&(this.pathname=u),g[b]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){this.path=(Q=this.pathname||"")+(this.search||"")}return this.href=this.format(),this},a.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(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+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(s+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(o=P.stringify(this.query));var n=this.search||o&&"?"+o||"";return r&&":"!==r.substr(-1)&&(r+=":"),this.slashes||(!r||g[r])&&!1!==s?(s="//"+(s||""),t&&"/"!==t.charAt(0)&&(t="/"+t)):s||(s=""),a&&"#"!==a.charAt(0)&&(a="#"+a),n&&"?"!==n.charAt(0)&&(n="?"+n),t=t.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),n=n.replace("#","%23"),r+s+t+n+a},a.prototype.resolve=function(e){return this.resolveObject(s(e,!1,!0)).format()},a.prototype.resolveObject=function(e){if(i.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 n=s[o];t[n]=this[n]}if(t.hash=e.hash,""===e.href)return t.href=t.format(),t;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),h=0;h<l.length;h++){var u=l[h];"protocol"!==u&&(t[u]=e[u])}return g[t.protocol]&&t.hostname&&!t.pathname&&(t.path=t.pathname="/"),t.href=t.format(),t}if(e.protocol&&e.protocol!==t.protocol){if(!g[e.protocol]){for(var c=Object.keys(e),d=0;d<c.length;d++){var f=c[d];t[f]=e[f]}return t.href=t.format(),t}if(t.protocol=e.protocol,e.host||y[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){t.path=(t.pathname||"")+(t.search||"")}return t.slashes=t.slashes||e.slashes,t.href=t.format(),t}var m=t.pathname&&"/"===t.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),P=v||m||t.host&&e.pathname,E=P,w=t.pathname&&t.pathname.split("/")||[],b=(p=e.pathname&&e.pathname.split("/")||[],t.protocol&&!g[t.protocol]);if(b&&(t.hostname="",t.port=null,t.host&&(""===w[0]?w[0]=t.host:w.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]||""===w[0])),v)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,w=p;else if(p.length)w||(w=[]),w.pop(),w=w.concat(p),t.search=e.search,t.query=e.query;else if(!i.isNullOrUndefined(e.search)){if(b){t.hostname=t.host=w.shift();($=!!(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,i.isNull(t.pathname)&&i.isNull(t.search)||(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.href=t.format(),t}if(!w.length)return t.pathname=null,t.path=t.search?"/"+t.search:null,t.href=t.format(),t;for(var S=w.slice(-1)[0],j=(t.host||e.host||w.length>1)&&("."===S||".."===S)||""===S,_=0,x=w.length;x>=0;x--)"."===(S=w[x])?w.splice(x,1):".."===S?(w.splice(x,1),_++):_&&(w.splice(x,1),_--);if(!P&&!E)for(;_--;_)w.unshift("..");!P||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),j&&"/"!==w.join("/").substr(-1)&&w.push("");var F=""===w[0]||w[0]&&"/"===w[0].charAt(0);if(b){t.hostname=t.host=F?"":w.length?w.shift():"";var $;($=!!(t.host&&t.host.indexOf("@")>0)&&t.host.split("@"))&&(t.auth=$.shift(),t.host=t.hostname=$.shift())}return(P=P||t.host&&w.length)&&!F&&w.unshift(""),w.length?t.pathname=w.join("/"):(t.pathname=null,t.path=null),i.isNull(t.pathname)&&i.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=l.exec(e);r&&(":"!==(r=r[0])&&(this.port=r.substr(1)),e=e.substr(0,e.length-r.length)),e&&(this.hostname=e)}},{"./util":49,punycode:44,querystring:47}],49:[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}}},{}],ajv:[function(e,r,t){"use strict";function a(r){if(!(this instanceof a))return new a(r);r=this._opts=E.copy(r)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:u,warn:u,error:u};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw new Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=v(r.format);var t=this._schemaUriFormat=this._formats["uri-reference"];this._schemaUriFormatFunc=function(e){return t.test(e)},this._cache=r.cache||new f,this._loadingSchemas={},this._compilations=[],this.RULES=y(),this._getId=function(e){switch(e.schemaId){case"$id":return n;case"id":return i;default:return l}}(r),r.loopRequired=r.loopRequired||1/0,"property"==r.errorDataPath&&(r._errorDataPathProperty=!0),void 0===r.serialize&&(r.serialize=m),this._metaOpts=function(e){for(var r=E.copy(e._opts),t=0;t<_.length;t++)delete r[_[t]];return r}(this),r.formats&&function(e){for(var r in e._opts.formats){var t=e._opts.formats[r];e.addFormat(r,t)}}(this),function(r){var t;r._opts.$data&&(t=e("./refs/$data.json"),r.addMetaSchema(t,t.$id,!0));if(!1===r._opts.meta)return;var a=e("./refs/json-schema-draft-06.json");r._opts.$data&&(a=g(a,x));r.addMetaSchema(a,j,!0),r._refs["http://json-schema.org/schema"]=j}(this),"object"==typeof r.meta&&this.addMetaSchema(r.meta),function(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this),r.patternGroups&&P(this)}function s(e,r){return r=d.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function o(e,r,t){for(var a in r){var s=r[a];s.meta||t&&!t.test(a)||(e._cache.del(s.cacheKey),delete r[a])}}function i(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function n(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function l(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function h(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function u(){}var c=e("./compile"),d=e("./compile/resolve"),f=e("./cache"),p=e("./compile/schema_obj"),m=e("fast-json-stable-stringify"),v=e("./compile/formats"),y=e("./compile/rules"),g=e("./$data"),P=e("./patternGroups"),E=e("./compile/util"),w=e("co");r.exports=a,a.prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var s=t(r);return!0===t.$async?"*"==this._opts.async?w(s):s:(this.errors=t.errors,s)},a.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},a.prototype.addSchema=function(e,r,t,a){if(Array.isArray(e)){for(var s=0;s<e.length;s++)this.addSchema(e[s],void 0,t,a);return this}var o=this._getId(e);if(void 0!==o&&"string"!=typeof o)throw new Error("schema id must be string");return r=d.normalizeId(r||o),h(this,r),this._schemas[r]=this._addSchema(e,t,a,!0),this},a.prototype.addMetaSchema=function(e,r,t){return this.addSchema(e,r,t,!0),this},a.prototype.validateSchema=function(e,r){var t=e.$schema;if(void 0!==t&&"string"!=typeof t)throw new Error("$schema must be a string");if(!(t=t||this._opts.defaultMeta||function(e){var r=e._opts.meta;return e._opts.defaultMeta="object"==typeof r?e._getId(r)||r:e.getSchema(j)?j:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var a=this._formats.uri;this._formats.uri="function"==typeof a?this._schemaUriFormatFunc:this._schemaUriFormat;var s;try{s=this.validate(t,e)}finally{this._formats.uri=a}if(!s&&r){var o="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(o);this.logger.error(o)}return s},a.prototype.getSchema=function(e){var r=s(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return function(e,r){var t=d.schema.call(e,{schema:{}},r);if(t){var a=t.schema,s=t.root,o=t.baseId,i=c.call(e,a,s,void 0,o);return e._fragments[r]=new p({ref:r,fragment:!0,schema:a,root:s,baseId:o,validate:i}),i}}(this,e)}},a.prototype.removeSchema=function(e){if(e instanceof RegExp)return o(this,this._schemas,e),o(this,this._refs,e),this;switch(typeof e){case"undefined":return o(this,this._schemas),o(this,this._refs),this._cache.clear(),this;case"string":var r=s(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var t=this._opts.serialize,a=t?t(e):e;this._cache.del(a);var i=this._getId(e);i&&(i=d.normalizeId(i),delete this._schemas[i],delete this._refs[i])}return this},a.prototype.addFormat=function(e,r){return"string"==typeof r&&(r=new RegExp(r)),this._formats[e]=r,this},a.prototype.errorsText=function(e,r){if(!(e=e||this.errors))return"No errors";for(var t=void 0===(r=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)},a.prototype._addSchema=function(e,r,t,a){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var s=this._opts.serialize,o=s?s(e):e,i=this._cache.get(o);if(i)return i;a=a||!1!==this._opts.addUsedSchema;var n=d.normalizeId(this._getId(e));n&&a&&h(this,n);var l,u=!1!==this._opts.validateSchema&&!r;u&&!(l=n&&n==d.normalizeId(e.$schema))&&this.validateSchema(e,!0);var c=d.ids.call(this,e),f=new p({id:n,schema:e,localRefs:c,cacheKey:o,meta:t});return"#"!=n[0]&&a&&(this._refs[n]=f),this._cache.put(o,f),u&&l&&this.validateSchema(e,!0),f},a.prototype._compile=function(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||t,!0===e.schema.$async&&(t.$async=!0),t;e.compiling=!0;var a;e.meta&&(a=this._opts,this._opts=this._metaOpts);var s;try{s=c.call(this,e.schema,r,e.localRefs)}finally{e.compiling=!1,e.meta&&(this._opts=a)}return e.validate=s,e.refs=s.refs,e.refVal=s.refVal,e.root=s.root,s},a.prototype.compileAsync=e("./compile/async");var b=e("./keyword");a.prototype.addKeyword=b.add,a.prototype.getKeyword=b.get,a.prototype.removeKeyword=b.remove;var S=e("./compile/error_classes");a.ValidationError=S.Validation,a.MissingRefError=S.MissingRef,a.$dataMetaSchema=g;var j="http://json-schema.org/draft-06/schema",_=["removeAdditional","useDefaults","coerceTypes"],x=["/properties"]},{"./$data":1,"./cache":2,"./compile":7,"./compile/async":4,"./compile/error_classes":5,"./compile/formats":6,"./compile/resolve":8,"./compile/rules":9,"./compile/schema_obj":10,"./compile/util":12,"./keyword":36,"./patternGroups":37,"./refs/$data.json":38,"./refs/json-schema-draft-06.json":39,co:40,"fast-json-stable-stringify":42}]},{},[])("ajv")});
-//# sourceMappingURL=ajv.min.js.map \ No newline at end of file
diff --git a/deps/npm/node_modules/ajv/dist/ajv.min.js.map b/deps/npm/node_modules/ajv/dist/ajv.min.js.map
deleted file mode 100644
index e591b58a64..0000000000
--- a/deps/npm/node_modules/ajv/dist/ajv.min.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["0"],"names":["f","exports","module","define","amd","window","global","self","this","Ajv","e","t","n","r","s","o","u","a","require","i","Error","code","l","call","length","1","KEYWORDS","metaSchema","keywordsJsonPointers","JSON","parse","stringify","j","segments","split","keywords","key","schema","anyOf","$ref","2","Cache","_cache","prototype","put","value","get","del","clear","3","allOf","const","contains","dependencies","enum","format","items","maximum","minimum","maxItems","minItems","maxLength","minLength","maxProperties","minProperties","multipleOf","not","oneOf","pattern","properties","propertyNames","required","uniqueItems","validate","../dotjs/_limit","../dotjs/_limitItems","../dotjs/_limitLength","../dotjs/_limitProperties","../dotjs/allOf","../dotjs/anyOf","../dotjs/const","../dotjs/contains","../dotjs/dependencies","../dotjs/enum","../dotjs/format","../dotjs/items","../dotjs/multipleOf","../dotjs/not","../dotjs/oneOf","../dotjs/pattern","../dotjs/properties","../dotjs/propertyNames","../dotjs/ref","../dotjs/required","../dotjs/uniqueItems","../dotjs/validate","4","compileAsync","meta","callback","loadMetaSchemaOf","sch","$schema","getSchema","Promise","resolve","_compileAsync","schemaObj","_compile","MissingRefError","removePromise","_loadingSchemas","ref","added","_refs","_schemas","missingSchema","missingRef","schemaPromise","_opts","loadSchema","then","addSchema","undefined","loadMissingSchema","p","_addSchema","v","MissingRef","./error_classes","5","baseId","message","url","normalizeId","fullPath","errorSubclass","Subclass","Object","create","constructor","Validation","errors","ajv","validation","./resolve","6","formats","mode","util","copy","date","str","matches","match","DATE","month","day","DAYS","time","full","TIME","regex","Z_ANCHOR","test","RegExp","HOSTNAME","URI","URITEMPLATE","URL","UUID","JSON_POINTER","RELATIVE_JSON_POINTER","fast","date-time","uri","uri-reference","uri-template","email","hostname","ipv4","ipv6","uuid","json-pointer","relative-json-pointer","dateTime","DATE_TIME_SEPARATOR","NOT_URI_FRAGMENT","./util","7","compile","root","localRefs","callValidate","compilation","result","apply","arguments","localCompile","_schema","_root","isRoot","$async","sourceCode","validateGenerator","isTop","schemaPath","errSchemaPath","errorPath","errorClasses","RULES","resolveRef","usePattern","useDefault","useCustomRule","opts","logger","vars","refVal","refValCode","patterns","patternCode","defaults","defaultCode","customRules","customRuleCode","processCode","Function","makeValidate","co","equal","ucs2length","ValidationError","error","refs","source","_refVal","refCode","refIndex","resolvedRef","rootRefId","addLocalRef","localSchema","inlineRef","inlineRefs","replaceLocalRef","removeLocalRef","refId","inline","regexStr","index","patternsHash","toQuotedString","valueStr","stableStringify","defaultsHash","rule","parentSchema","it","validateSchema","definition","errorsText","macro","keyword","c","compIndex","compiling","_compilations","_formats","cv","splice","arr","statement","fast-deep-equal","fast-json-stable-stringify","8","SchemaObject","res","resolveSchema","refPath","_getFullPath","getFullPath","_getId","id","parsedRef","resolveUrl","getJsonPointer","hash","slice","parts","part","unescapeFragment","PREVENT_SCOPE_CHANGE","limit","checkNoRef","countKeys","item","Array","isArray","count","Infinity","SIMPLE_INLINED","normalize","protocolSeparator","protocol","href","host","path","replace","TRAILING_SLASH_HASH","traverse","ids","schemaId","baseIds","","fullPaths","allKeys","jsonPtr","rootSchema","parentJsonPtr","parentKeyword","keyIndex","escapeFragment","toHash","./schema_obj","json-schema-traverse","9","ruleModules","type","rules","ALL","all","types","forEach","group","map","implKeywords","keys","k","push","implements","concat","custom","./_rules","10","obj","11","len","pos","charCodeAt","12","checkDataType","dataType","data","negate","EQUAL","AND","OK","NOT","getProperty","IDENTIFIER","escapeQuotes","SINGLE_QUOTE","joinPaths","b","escapeJsonPointer","unescapeJsonPointer","to","checkDataTypes","dataTypes","array","object","null","number","integer","coerceToTypes","optionCoerceTypes","COERCE_TO_TYPES","varOccurences","dataVar","varReplace","expr","cleanUpCode","out","EMPTY_ELSE","EMPTY_IF_NO_ELSE","EMPTY_IF_WITH_ELSE","finalCleanUpCode","async","ERRORS_REGEXP","REMOVE_ERRORS_ASYNC","RETURN_ASYNC","RETURN_DATA_ASYNC","REMOVE_ERRORS","RETURN_VALID","RETURN_TRUE","ROOTDATA_REGEXP","REMOVE_ROOTDATA","schemaHasRules","schemaHasRulesExcept","exceptKeyword","getPathExpr","currentPath","jsonPointers","isNumber","getPath","prop","getData","$data","lvl","paths","up","jsonPointer","segment","decodeURIComponent","encodeURIComponent","./ucs2length","13","$keyword","$ruleType","$schemaValue","$lvl","level","$dataLvl","dataLevel","$schemaPath","$errSchemaPath","$breakOnError","allErrors","$isData","dataPathArr","$isMax","$exclusiveKeyword","$schemaExcl","$op","$notOp","$errorKeyword","$schemaValueExcl","$exclusive","$exclType","$exclIsNumber","$opStr","$opExpr","$$outStack","createErrors","messages","verbose","__err","pop","compositeRule","Math","14","15","unicode","16","17","$it","$closingBraces","$nextValid","$currentBaseId","$allSchemasEmpty","arr1","$sch","$i","l1","18","$valid","$errs","every","$wasComposite","19","20","$idx","$dataNxt","$nextData","$nonEmptySchema","$passData","$code","21","$compile","$inline","$macro","$ruleValidate","$validateCode","$definition","$rDef","$validateSchema","$ruleErrs","$ruleErr","$asyncKeyword","statements","passContext","$parentData","$parentDataProperty","def_callRuleValidate","modifying","valid","def_customError","22","$schemaDeps","$propertyDeps","$ownProperties","ownProperties","$property","$deps","$currentErrorPath","$propertyKey","$useData","$prop","$propertyPath","$missingProperty","_errorDataPathProperty","join","arr2","i2","l2","23","$vSchema","24","$unknownFormats","unknownFormats","$allowUnknown","$format","$isObject","$formatType","warn","indexOf","$formatRef","25","$additionalItems","additionalItems","$currErrSchemaPath","26","multipleOfPrecision","27","$allErrorsOption","28","29","$regexp","30","$key","$dataProperties","$schemaKeys","$pProperties","patternProperties","$pPropertyKeys","$aProperties","additionalProperties","$someProperties","$noAdditional","$additionalIsSchema","$removeAdditional","removeAdditional","$checkAdditional","$required","v5","loopRequired","$requiredHash","patternGroups","$pgProperties","$pgPropertyKeys","i1","$pProperty","arr3","l3","$pgProperty","$additionalProperty","$useDefaults","useDefaults","arr4","i4","l4","$hasDefault","default","arr5","i5","l5","arr6","i6","l6","$pgSchema","$pgMin","$pgMax","$limit","$reason","$moreOrLess","31","$invalidName","32","$refCode","$refVal","$message","missingRefs","__callValidate","33","$propertySch","$loopRequired","i3","34","35","$shouldUseGroup","$rulesGroup","$shouldUseRule","$rule","impl","$ruleImplementsSomeKeyword","$refKeywords","$id","$es7","yieldAwait","$top","rootId","$closingBraces1","$closingBraces2","$typeSchema","$typeIsArray","extendRefs","coerceTypes","$coerceToTypes","$dataType","$coerced","$bracesCoercion","$type","36","add","_addRule","ruleGroup","rg","remove","./dotjs/custom","37","META_SCHEMA_ID","defaultMeta","metaSchemaRef","addKeyword","38","description","39","title","definitions","schemaArray","nonNegativeInteger","nonNegativeIntegerDefault0","simpleTypes","stringArray","examples","exclusiveMinimum","exclusiveMaximum","40","gen","ctx","args","reject","onFulfilled","ret","next","onRejected","err","throw","done","toPromise","isPromise","TypeError","String","name","displayName","isGenerator","isGeneratorFunction","fn","val","isObject","results","promises","promise","defer","wrap","createPromise","__generatorFunction__","41","arrA","arrB","dateA","Date","dateB","getTime","regexpA","regexpB","toString","hasOwnProperty","42","cmp","cycles","node","seen","toJSON","isFinite","seenIndex","sort","43","_traverse","cb","arrayKeywords","propsKeywords","escapeJsonPtr","skipKeywords","44","RangeError","mapDomain","string","regexSeparators","ucs2decode","extra","output","counter","ucs2encode","stringFromCharCode","basicToDigit","codePoint","base","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","floor","damp","baseMinusTMin","tMax","skew","decode","input","basic","oldi","w","baseMinusT","inputLength","initialN","bias","initialBias","lastIndexOf","delimiter","maxInt","tMin","encode","handledCPCount","basicLength","m","q","currentValue","handledCPCountPlusOne","qMinusT","freeExports","nodeType","freeModule","freeGlobal","punycode","regexPunycode","regexNonASCII","overflow","not-basic","invalid-input","fromCharCode","version","ucs2","toASCII","toUnicode","toLowerCase","45","qs","sep","eq","options","regexp","maxKeys","kstr","vstr","x","idx","substr","xs","46","stringifyPrimitive","objectKeys","ks","47","./decode","./encode","48","Url","slashes","auth","port","search","query","pathname","urlParse","parseQueryString","slashesDenoteHost","relative","resolveObject","isString","protocolPattern","portPattern","simplePathPattern","unwise","autoEscape","nonHostChars","hostEndingChars","hostnamePartPattern","hostnamePartStart","unsafeProtocol","javascript","javascript:","hostlessProtocol","slashedProtocol","http","https","ftp","gopher","file","http:","https:","ftp:","gopher:","file:","querystring","queryIndex","splitter","uSplit","rest","trim","simplePath","exec","proto","lowerProto","hostEnd","hec","atSign","parseHost","ipv6Hostname","hostparts","newpart","validParts","notHost","bit","unshift","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","49","arg","log","noop","console","setLogger","_fragments","schemaUriFormat","_schemaUriFormat","_schemaUriFormatFunc","cache","_get$Id","_get$IdOrId","chooseGetId","errorDataPath","serialize","_metaOpts","metaOpts","META_IGNORE_OPTIONS","getMetaSchemaOptions","addFormat","addInitialFormats","$dataSchema","addMetaSchema","$dataMetaSchema","META_SUPPORT_DATA","addDraft6MetaSchema","optsSchemas","schemas","addInitialSchemas","_getSchemaObj","keyRef","_removeAllSchemas","cacheKey","checkUnique","compileSchema","schemaKeyRef","_meta","_skipValidation","skipValidation","throwOrLogError","currentUriFormat","fragment","_getSchemaFragment","removeSchema","separator","text","dataPath","shouldAddSchema","cached","addUsedSchema","recursiveMeta","willValidate","_validate","currentOpts","customKeyword","getKeyword","removeKeyword","./$data","./cache","./compile","./compile/async","./compile/error_classes","./compile/formats","./compile/resolve","./compile/rules","./compile/schema_obj","./compile/util","./keyword","./patternGroups","./refs/$data.json","./refs/json-schema-draft-06.json"],"mappings":"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","file":"ajv.min.js"} \ No newline at end of file
diff --git a/deps/npm/node_modules/ajv/dist/nodent.min.js b/deps/npm/node_modules/ajv/dist/nodent.min.js
deleted file mode 100644
index 330005546b..0000000000
--- a/deps/npm/node_modules/ajv/dist/nodent.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/* nodent 3.1.5: 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||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){t.exports=function(t){switch(parseInt(t.version)){case 2:case 3:t.plugins.asyncawait=e("./acorn-v3");break;case 4:case 5:t.plugins.asyncawait=e("./acorn-v4");break;default:throw new Error("acorn-es7-plugin requires Acorn v2, 3, 4 or 5")}return t}},{"./acorn-v3":2,"./acorn-v4":3}],2:[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,t,n,r){var i=new e.constructor(e.options,e.input,t);if(n)for(var s in n)i[s]=n[s];var o=e,a=i;return["inFunction","inAsyncFunction","inAsync","inGenerator","inModule"].forEach(function(e){e in o&&(a[e]=o[e])}),r&&(i.options.preserveParens=!0),i.nextToken(),i}var o={},a=/^async[\t ]+(return|throw)/,u=/^async[\t ]+function/,c=/^\s*[():;]/,l=/([^\n])\/\*(\*(?!\/)|[^\n*])*\*\/([^\n])/g,p=/\s*(get|set)\s*\(/;t.exports=function(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(u,this))||e.apply(this,arguments)}}),e.extend("parseStatement",function(e){return function(n,r){var s=this.start,o=this.startLoc;if("name"===this.type.label)if(i(u,this,!0)){var c=this.inAsyncFunction;try{return this.inAsyncFunction=!0,this.next(),(l=this.parseStatement(n,r)).async=!0,l.start=s,l.loc&&(l.loc.start=o),l.range&&(l.range[0]=s),l}finally{this.inAsyncFunction=c}}else if("object"==typeof t&&t.asyncExits&&i(a,this)){this.next();var l;return(l=this.parseStatement(n,r)).async=!0,l.start=s,l.loc&&(l.loc.start=o),l.range&&(l.range[0]=s),l}return e.apply(this,arguments)}}),e.extend("parseIdent",function(e){return function(t){var n=e.apply(this,arguments);return this.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,u=this.start,l=this.startLoc,p=e.apply(this,arguments);if("Identifier"===p.type)if("async"!==p.name||r(this,p.end)){if("await"===p.name){var h=this.startNodeAt(p.start,p.loc&&p.loc.start);if(this.inAsyncFunction)return a=this.parseExprSubscripts(),h.operator="await",h.argument=a,h=this.finishNodeAt(h,"AwaitExpression",a.end,a.loc&&a.loc.end),n(h),h;if(this.input.slice(p.end).match(c))return t.awaitAnywhere||"module"!==this.options.sourceType?p:this.raise(p.start,"'await' is reserved within modules");if("object"==typeof t&&t.awaitAnywhere&&(u=this.start,(a=s(this,u-4).parseExprSubscripts()).end<=u))return a=s(this,u).parseExprSubscripts(),h.operator="await",h.argument=a,h=this.finishNodeAt(h,"AwaitExpression",a.end,a.loc&&a.loc.end),this.pos=a.end,this.end=a.end,this.endLoc=a.endLoc,this.next(),n(h),h;if(!t.awaitAnywhere&&"module"===this.options.sourceType)return this.raise(p.start,"'await' is reserved within modules")}}else{var f=this.inAsyncFunction;try{this.inAsyncFunction=!0;var d=this,y=!1,m={parseFunctionBody:function(e,t){try{var n=y;return y=!0,d.parseFunctionBody.apply(this,arguments)}finally{y=n}},raise:function(){try{return d.raise.apply(this,arguments)}catch(e){throw y?e:o}}};if("SequenceExpression"===(a=s(this,this.start,m,!0).parseExpression()).type&&(a=a.expressions[0]),"CallExpression"===a.type&&(a=a.callee),"FunctionExpression"===a.type||"FunctionDeclaration"===a.type||"ArrowFunctionExpression"===a.type)return"SequenceExpression"===(a=s(this,this.start,m).parseExpression()).type&&(a=a.expressions[0]),"CallExpression"===a.type&&(a=a.callee),a.async=!0,a.start=u,a.loc&&(a.loc.start=l),a.range&&(a.range[0]=u),this.pos=a.end,this.end=a.end,this.endLoc=a.endLoc,this.next(),n(a),a}catch(e){if(e!==o)throw e}finally{this.inAsyncFunction=f}}return p}}),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){t.key&&t.key.name;var i=e.apply(this,arguments);return"Identifier"!==i.type||"async"!==i.name||r(this,i.end)||this.input.slice(i.end).match(c)||(p.test(this.input.slice(i.end))?(i=e.apply(this,arguments),t.__asyncValue=!0):(n(t),"set"===t.kind&&this.raise(i.start,"'set <member>(value)' cannot be be async"),"Identifier"===(i=e.apply(this,arguments)).type&&"set"===i.name&&this.raise(i.start,"'set <member>(value)' cannot be be async"),t.__asyncValue=!0)),i}}),e.extend("parseClassMethod",function(e){return function(t,n,r){var i;n.__asyncValue&&("constructor"===n.kind&&this.raise(n.start,"class constructor() cannot be be async"),i=this.inAsyncFunction,this.inAsyncFunction=!0);var s=e.apply(this,arguments);return this.inAsyncFunction=i,s}}),e.extend("parseMethod",function(e){return function(t){var n;this.__currentProperty&&this.__currentProperty.__asyncValue&&(n=this.inAsyncFunction,this.inAsyncFunction=!0);var r=e.apply(this,arguments);return this.inAsyncFunction=n,r}}),e.extend("parsePropertyValue",function(e){return function(t,n,r,i,s,o){var a=this.__currentProperty;this.__currentProperty=t;var u;t.__asyncValue&&(u=this.inAsyncFunction,this.inAsyncFunction=!0);var c=e.apply(this,arguments);return this.inAsyncFunction=u,this.__currentProperty=a,c}})}},{}],3:[function(e,t,n){function r(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 s=e,o=r;return["inFunction","inAsync","inGenerator","inModule"].forEach(function(e){e in s&&(o[e]=s[e])}),r.nextToken(),r}var i=/^async[\t ]+(return|throw)/,s=/^\s*[):;]/,o=/([^\n])\/\*(\*(?!\/)|[^\n*])*\*\/([^\n])/g;t.exports=function(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 s=this.start,a=this.startLoc;if("name"===this.type.label&&t.asyncExits&&function(e,t,n){var r=t.input.slice(t.start);return n&&(r=r.replace(o,"$1 $3")),e.test(r)}(i,this)){this.next();var u=this.parseStatement(n,r);return u.async=!0,u.start=s,u.loc&&(u.loc.start=a),u.range&&(u.range[0]=s),u}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(i){var s,o=this.start,a=(this.startLoc,e.apply(this,arguments));if("Identifier"===a.type&&"await"===a.name&&!this.inAsync&&t.awaitAnywhere){var u=this.startNodeAt(a.start,a.loc&&a.loc.start);o=this.start;var c={raise:function(){try{return pp.raise.apply(this,arguments)}catch(e){throw n}}};try{if((s=r(this,o-4,c).parseExprSubscripts()).end<=o)return s=r(this,o,c).parseExprSubscripts(),u.argument=s,u=this.finishNodeAt(u,"AwaitExpression",s.end,s.loc&&s.loc.end),this.pos=s.end,this.end=s.end,this.endLoc=s.endLoc,this.next(),u}catch(e){if(e===n)return a;throw e}}return a}});var n={undefined:!0,get:!0,set:!0,static:!0,async:!0,constructor:!0};e.extend("parsePropertyName",function(e){return function(t){var r=t.key&&t.key.name,i=e.apply(this,arguments);return"get"===this.value&&(t.__maybeStaticAsyncGetter=!0),n[this.value]?i:("Identifier"!==i.type||"async"!==i.name&&"async"!==r||function(e,t){return e.lineStart>=t}(this,i.end)||this.input.slice(i.end).match(s)?delete t.__maybeStaticAsyncGetter:"set"===t.kind||"set"===i.name?this.raise(i.start,"'set <member>(value)' cannot be be async"):(this.__isAsyncProp=!0,"Identifier"===(i=e.apply(this,arguments)).type&&"set"===i.name&&this.raise(i.start,"'set <member>(value)' cannot be be async")),i)}}),e.extend("parseClassMethod",function(e){return function(t,n,r){var i=e.apply(this,arguments);return n.__maybeStaticAsyncGetter&&(delete n.__maybeStaticAsyncGetter,"get"!==n.key.name&&(n.kind="get")),i}}),e.extend("parseFunctionBody",function(e){return function(t,n){var r=this.inAsync;this.__isAsyncProp&&(t.async=!0,this.inAsync=!0,delete this.__isAsyncProp);var i=e.apply(this,arguments);return this.inAsync=r,i}})}},{}],4:[function(e,t,n){!function(e,r){"object"==typeof n&&void 0!==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])>e)return!1;if((n+=t[r+1])>=e)return!0}}function n(e,n){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&x.test(String.fromCharCode(e)):!1!==n&&t(e,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&&w.test(String.fromCharCode(e)):!1!==n&&(t(e,E)||t(e,S)))))}function i(e,t){return new k(e,{beforeExpr:!0,binop:t})}function s(e,t){return void 0===t&&(t={}),t.keyword=e,_[e]=new k(e,t)}function o(e){return 10===e||13===e||8232===e||8233===e}function a(e,t){return $.call(e,t)}function u(e,t){for(var n=1,r=0;;){T.lastIndex=r;var i=T.exec(e);if(!(i&&i.index<t))return new I(n,t-r);++n,r=i.index+i[0].length}}function c(e){var t={};for(var n in D)t[n]=e&&a(e,n)?e[n]:D[n];if(t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),R(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return R(t.onComment)&&(t.onComment=function(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 j(this,o,a)),e.ranges&&(u.range=[i,s]),t.push(u)}}(t,t.onComment)),t}function l(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}function p(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=-1}function h(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 f(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 d(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}var y={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",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},m="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",g={5:m,6:m+" const class extends export import super"},v="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",b="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",x=new RegExp("["+v+"]"),w=new RegExp("["+v+b+"]");v=b=null;var E=[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],S=[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],k=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},A={beforeExpr:!0},C={startsExpr:!0},_={},L={num:new k("num",C),regexp:new k("regexp",C),string:new k("string",C),name:new k("name",C),eof:new k("eof"),bracketL:new k("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new k("]"),braceL:new k("{",{beforeExpr:!0,startsExpr:!0}),braceR:new k("}"),parenL:new k("(",{beforeExpr:!0,startsExpr:!0}),parenR:new k(")"),comma:new k(",",A),semi:new k(";",A),colon:new k(":",A),dot:new k("."),question:new k("?",A),arrow:new k("=>",A),template:new k("template"),invalidTemplate:new k("invalidTemplate"),ellipsis:new k("...",A),backQuote:new k("`",C),dollarBraceL:new k("${",{beforeExpr:!0,startsExpr:!0}),eq:new k("=",{beforeExpr:!0,isAssign:!0}),assign:new k("_=",{beforeExpr:!0,isAssign:!0}),incDec:new k("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new k("!/~",{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 k("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:i("%",10),star:i("*",10),slash:i("/",10),starstar:new k("**",{beforeExpr:!0}),_break:s("break"),_case:s("case",A),_catch:s("catch"),_continue:s("continue"),_debugger:s("debugger"),_default:s("default",A),_do:s("do",{isLoop:!0,beforeExpr:!0}),_else:s("else",A),_finally:s("finally"),_for:s("for",{isLoop:!0}),_function:s("function",C),_if:s("if"),_return:s("return",A),_switch:s("switch"),_throw:s("throw",A),_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",C),_super:s("super",C),_class:s("class",C),_extends:s("extends",A),_export:s("export"),_import:s("import"),_null:s("null",C),_true:s("true",C),_false:s("false",C),_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})},O=/\r\n?|\n|\u2028|\u2029/,T=new RegExp(O.source,"g"),N=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,P=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,F=Object.prototype,$=F.hasOwnProperty,B=F.toString,R=Array.isArray||function(e){return"[object Array]"===B.call(e)},I=function(e,t){this.line=e,this.column=t};I.prototype.offset=function(e){return new I(this.line,this.column+e)};var j=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)},D={ecmaVersion:7,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:{}},M={},V=function(e,t,n){this.options=e=c(e),this.sourceFile=e.sourceFile,this.keywords=l(g[e.ecmaVersion>=6?6:5]);var r="";if(!e.allowReserved){for(var i=e.ecmaVersion;!(r=y[i]);i--);"module"==e.sourceType&&(r+=" await")}this.reservedWords=l(r);var s=(r?r+" ":"")+y.strict;this.reservedWordsStrict=l(s),this.reservedWordsStrictBind=l(s+" "+y.strictBind),this.input=String(t),this.containsEsc=!1,this.loadPlugins(e.plugins),n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(O).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=L.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.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.inFunction=this.inGenerator=this.inAsync=!1,this.yieldPos=this.awaitPos=0,this.labels=[],0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterFunctionScope()};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){for(var t in e){var n=M[t];if(!n)throw new Error("Plugin '"+t+"' not found");n(this,e[t])}},V.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)};var q=V.prototype,U=/^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)"|;)/;q.strictDirective=function(e){for(;;){P.lastIndex=e,e+=P.exec(this.input)[0].length;var t=U.exec(this.input.slice(e));if(!t)return!1;if("use strict"==(t[1]||t[2]))return!0;e+=t[0].length}},q.eat=function(e){return this.type===e&&(this.next(),!0)},q.isContextual=function(e){return this.type===L.name&&this.value===e},q.eatContextual=function(e){return this.value===e&&this.eat(L.name)},q.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},q.canInsertSemicolon=function(){return this.type===L.eof||this.type===L.braceR||O.test(this.input.slice(this.lastTokEnd,this.start))},q.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},q.semicolon=function(){this.eat(L.semi)||this.insertSemicolon()||this.unexpected()},q.afterTrailingComma=function(e,t){if(this.type==e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},q.expect=function(e){this.eat(e)||this.unexpected()},q.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")},q.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,"Parenthesized pattern")}},q.checkExpressionErrors=function(e,t){var n=e?e.shorthandAssign:-1;if(!t)return n>=0;n>-1&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns")},q.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},q.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var z=V.prototype;z.parseTopLevel=function(e){var t={};for(e.body||(e.body=[]);this.type!==L.eof;){var n=this.parseStatement(!0,!0,t);e.body.push(n)}return this.adaptDirectivePrologue(e.body),this.next(),this.options.ecmaVersion>=6&&(e.sourceType=this.options.sourceType),this.finishNode(e,"Program")};var W={kind:"loop"},G={kind:"switch"};z.isLet=function(){if(this.type!==L.name||this.options.ecmaVersion<6||"let"!=this.value)return!1;P.lastIndex=this.pos;var e=P.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},z.isAsyncFunction=function(){if(this.type!==L.name||this.options.ecmaVersion<8||"async"!=this.value)return!1;P.lastIndex=this.pos;var e=P.exec(this.input),t=this.pos+e[0].length;return!(O.test(this.input.slice(this.pos,t))||"function"!==this.input.slice(t,t+8)||t+8!=this.input.length&&r(this.input.charAt(t+8)))},z.parseStatement=function(e,t,n){var r,i=this.type,s=this.startNode();switch(this.isLet()&&(i=L._var,r="let"),i){case L._break:case L._continue:return this.parseBreakContinueStatement(s,i.keyword);case L._debugger:return this.parseDebuggerStatement(s);case L._do:return this.parseDoStatement(s);case L._for:return this.parseForStatement(s);case L._function:return!e&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1);case L._class:return e||this.unexpected(),this.parseClass(s,!0);case L._if:return this.parseIfStatement(s);case L._return:return this.parseReturnStatement(s);case L._switch:return this.parseSwitchStatement(s);case L._throw:return this.parseThrowStatement(s);case L._try:return this.parseTryStatement(s);case L._const:case L._var:return r=r||this.value,e||"var"==r||this.unexpected(),this.parseVarStatement(s,r);case L._while:return this.parseWhileStatement(s);case L._with:return this.parseWithStatement(s);case L.braceL:return this.parseBlock();case L.semi:return this.parseEmptyStatement(s);case L._export:case L._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'")),i===L._import?this.parseImport(s):this.parseExport(s,n);default:if(this.isAsyncFunction()&&e)return this.next(),this.parseFunctionStatement(s,!0);var o=this.value,a=this.parseExpression();return i===L.name&&"Identifier"===a.type&&this.eat(L.colon)?this.parseLabeledStatement(s,o,a):this.parseExpressionStatement(s,a)}},z.parseBreakContinueStatement=function(e,t){var n="break"==t;this.next(),this.eat(L.semi)||this.insertSemicolon()?e.label=null:this.type!==L.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(n||"loop"===i.kind))break;if(e.label&&n)break}}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,n?"BreakStatement":"ContinueStatement")},z.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},z.parseDoStatement=function(e){return this.next(),this.labels.push(W),e.body=this.parseStatement(!1),this.labels.pop(),this.expect(L._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(L.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},z.parseForStatement=function(e){if(this.next(),this.labels.push(W),this.enterLexicalScope(),this.expect(L.parenL),this.type===L.semi)return this.parseFor(e,null);var t=this.isLet();if(this.type===L._var||this.type===L._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===L._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 p,s=this.parseExpression(!0,i);return this.type===L._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.toAssignable(s),this.checkLVal(s),this.checkPatternErrors(i,!0),this.parseForIn(e,s)):(this.checkExpressionErrors(i,!0),this.parseFor(e,s))},z.parseFunctionStatement=function(e,t){return this.next(),this.parseFunction(e,!0,!1,t)},z.isFunction=function(){return this.type===L._function||this.isAsyncFunction()},z.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!this.strict&&this.isFunction()),e.alternate=this.eat(L._else)?this.parseStatement(!this.strict&&this.isFunction()):null,this.finishNode(e,"IfStatement")},z.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(L.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},z.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(L.braceL),this.labels.push(G),this.enterLexicalScope();for(var t,n=!1;this.type!=L.braceR;)if(this.type===L._case||this.type===L._default){var r=this.type===L._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(L.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(!0));return this.exitLexicalScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},z.parseThrowStatement=function(e){return this.next(),O.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 J=[];z.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===L._catch){var t=this.startNode();this.next(),this.expect(L.parenL),t.param=this.parseBindingAtom(),this.enterLexicalScope(),this.checkLVal(t.param,"let"),this.expect(L.parenR),t.body=this.parseBlock(!1),this.exitLexicalScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(L._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},z.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},z.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(W),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"WhileStatement")},z.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")},z.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},z.parseLabeledStatement=function(e,t,n){for(var r=0,i=this.labels;r<i.length;r+=1){i[r].name===t&&this.raise(n.start,"Label '"+t+"' is already declared")}for(var s=this.type.isLoop?"loop":this.type===L._switch?"switch":null,o=this.labels.length-1;o>=0;o--){var a=this.labels[o];if(a.statementStart!=e.start)break;a.statementStart=this.start,a.kind=s}return this.labels.push({name:t,kind:s,statementStart:this.start}),e.body=this.parseStatement(!0),("ClassDeclaration"==e.body.type||"VariableDeclaration"==e.body.type&&"var"!=e.body.kind||"FunctionDeclaration"==e.body.type&&(this.strict||e.body.generator))&&this.raiseRecoverable(e.body.start,"Invalid labeled declaration"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},z.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},z.parseBlock=function(e){void 0===e&&(e=!0);var t=this.startNode();for(t.body=[],this.expect(L.braceL),e&&this.enterLexicalScope();!this.eat(L.braceR);){var n=this.parseStatement(!0);t.body.push(n)}return e&&this.exitLexicalScope(),this.finishNode(t,"BlockStatement")},z.parseFor=function(e,t){return e.init=t,this.expect(L.semi),e.test=this.type===L.semi?null:this.parseExpression(),this.expect(L.semi),e.update=this.type===L.parenR?null:this.parseExpression(),this.expect(L.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"ForStatement")},z.parseForIn=function(e,t){var n=this.type===L._in?"ForInStatement":"ForOfStatement";return this.next(),e.left=t,e.right=this.parseExpression(),this.expect(L.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,n)},z.parseVar=function(e,t,n){for(e.declarations=[],e.kind=n;;){var r=this.startNode();if(this.parseVarId(r,n),this.eat(L.eq)?r.init=this.parseMaybeAssign(t):"const"!==n||this.type===L._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"==r.id.type||t&&(this.type===L._in||this.isContextual("of"))?r.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(L.comma))break}return e},z.parseVarId=function(e,t){e.id=this.parseBindingAtom(t),this.checkLVal(e.id,t,!1)},z.parseFunction=function(e,t,n,r){this.initFunction(e),this.options.ecmaVersion>=6&&!r&&(e.generator=this.eat(L.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&&(e.id="nullableID"===t&&this.type!=L.name?null:this.parseIdent(),e.id&&this.checkLVal(e.id,"var"));var i=this.inGenerator,s=this.inAsync,o=this.yieldPos,a=this.awaitPos,u=this.inFunction;return this.inGenerator=e.generator,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),t||(e.id=this.type==L.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n),this.inGenerator=i,this.inAsync=s,this.yieldPos=o,this.awaitPos=a,this.inFunction=u,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},z.parseFunctionParams=function(e){this.expect(L.parenL),e.params=this.parseBindingList(L.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},z.parseClass=function(e,t){this.next(),this.parseClassId(e,t),this.parseClassSuper(e);var n=this.startNode(),r=!1;for(n.body=[],this.expect(L.braceL);!this.eat(L.braceR);)if(!this.eat(L.semi)){var i=this.startNode(),s=this.eat(L.star),o=!1,a=this.type===L.name&&"static"===this.value;this.parsePropertyName(i),i.static=a&&this.type!==L.parenL,i.static&&(s&&this.unexpected(),s=this.eat(L.star),this.parsePropertyName(i)),this.options.ecmaVersion>=8&&!s&&!i.computed&&"Identifier"===i.key.type&&"async"===i.key.name&&this.type!==L.parenL&&!this.canInsertSemicolon()&&(o=!0,this.parsePropertyName(i)),i.kind="method";var u=!1;if(!i.computed){var c=i.key;s||o||"Identifier"!==c.type||this.type===L.parenL||"get"!==c.name&&"set"!==c.name||(u=!0,i.kind=c.name,c=this.parsePropertyName(i)),!i.static&&("Identifier"===c.type&&"constructor"===c.name||"Literal"===c.type&&"constructor"===c.value)&&(r&&this.raise(c.start,"Duplicate constructor in the same class"),u&&this.raise(c.start,"Constructor can't have get/set modifier"),s&&this.raise(c.start,"Constructor can't be a generator"),o&&this.raise(c.start,"Constructor can't be an async method"),i.kind="constructor",r=!0)}if(this.parseClassMethod(n,i,s,o),u){var l="get"===i.kind?0:1;if(i.value.params.length!==l){var p=i.value.start;"get"===i.kind?this.raiseRecoverable(p,"getter should have no params"):this.raiseRecoverable(p,"setter should have exactly one param")}else"set"===i.kind&&"RestElement"===i.value.params[0].type&&this.raiseRecoverable(i.value.params[0].start,"Setter cannot use rest params")}}return e.body=this.finishNode(n,"ClassBody"),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},z.parseClassMethod=function(e,t,n,r){t.value=this.parseMethod(n,r),e.body.push(this.finishNode(t,"MethodDefinition"))},z.parseClassId=function(e,t){e.id=this.type===L.name?this.parseIdent():!0===t?this.unexpected():null},z.parseClassSuper=function(e){e.superClass=this.eat(L._extends)?this.parseExprSubscripts():null},z.parseExport=function(e,t){if(this.next(),this.eat(L.star))return this.expectContextual("from"),e.source=this.type===L.string?this.parseExprAtom():this.unexpected(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(L._default)){this.checkExport(t,"default",this.lastTokStart);var n;if(this.type===L._function||(n=this.isAsyncFunction())){var r=this.startNode();this.next(),n&&this.next(),e.declaration=this.parseFunction(r,"nullableID",!1,n)}else if(this.type===L._class){var i=this.startNode();e.declaration=this.parseClass(i,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(!0),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))e.source=this.type===L.string?this.parseExprAtom():this.unexpected();else{for(var s=0,o=e.specifiers;s<o.length;s+=1){var a=o[s];this.checkUnreserved(a.local)}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},z.checkExport=function(e,t,n){e&&(a(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},z.checkPatternExport=function(e,t){var n=t.type;if("Identifier"==n)this.checkExport(e,t.name,t.start);else if("ObjectPattern"==n)for(var r=0,i=t.properties;r<i.length;r+=1){var s=i[r];this.checkPatternExport(e,s.value)}else if("ArrayPattern"==n)for(var o=0,a=t.elements;o<a.length;o+=1){var u=a[o];u&&this.checkPatternExport(e,u)}else"AssignmentPattern"==n?this.checkPatternExport(e,t.left):"ParenthesizedExpression"==n&&this.checkPatternExport(e,t.expression)},z.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}},z.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},z.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(L.braceL);!this.eat(L.braceR);){if(n)n=!1;else if(this.expect(L.comma),this.afterTrailingComma(L.braceR))break;var r=this.startNode();r.local=this.parseIdent(!0),r.exported=this.eatContextual("as")?this.parseIdent(!0):r.local,this.checkExport(e,r.exported.name,r.exported.start),t.push(this.finishNode(r,"ExportSpecifier"))}return t},z.parseImport=function(e){return this.next(),this.type===L.string?(e.specifiers=J,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===L.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},z.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===L.name){var n=this.startNode();if(n.local=this.parseIdent(),this.checkLVal(n.local,"let"),e.push(this.finishNode(n,"ImportDefaultSpecifier")),!this.eat(L.comma))return e}if(this.type===L.star){var r=this.startNode();return this.next(),this.expectContextual("as"),r.local=this.parseIdent(),this.checkLVal(r.local,"let"),e.push(this.finishNode(r,"ImportNamespaceSpecifier")),e}for(this.expect(L.braceL);!this.eat(L.braceR);){if(t)t=!1;else if(this.expect(L.comma),this.afterTrailingComma(L.braceR))break;var i=this.startNode();i.imported=this.parseIdent(!0),this.eatContextual("as")?i.local=this.parseIdent():(this.checkUnreserved(i.imported),i.local=i.imported),this.checkLVal(i.local,"let"),e.push(this.finishNode(i,"ImportSpecifier"))}return e},z.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},z.isDirectiveCandidate=function(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var H=V.prototype;H.toAssignable=function(e,t){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Can not use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var n=0,r=e.properties;n<r.length;n+=1){var i=r[n];"init"!==i.kind&&this.raise(i.key.start,"Object pattern can't contain getter or setter"),this.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,this.toAssignable(e.left,t);case"AssignmentPattern":break;case"ParenthesizedExpression":this.toAssignable(e.expression,t);break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}return e},H.toAssignableList=function(e,t){var n=e.length;if(n){var r=e[n-1];if(r&&"RestElement"==r.type)--n;else if(r&&"SpreadElement"==r.type){r.type="RestElement";var i=r.argument;this.toAssignable(i,t),--n}6===this.options.ecmaVersion&&t&&r&&"RestElement"===r.type&&"Identifier"!==r.argument.type&&this.unexpected(r.argument.start)}for(var s=0;s<n;s++){var o=e[s];o&&this.toAssignable(o,t)}return e},H.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},H.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==L.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},H.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case L.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(L.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case L.braceL:return this.parseObj(!0)}return this.parseIdent()},H.parseBindingList=function(e,t,n){for(var r=[],i=!0;!this.eat(e);)if(i?i=!1:this.expect(L.comma),t&&this.type===L.comma)r.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===L.ellipsis){var s=this.parseRestBinding();this.parseBindingListItem(s),r.push(s),this.type===L.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}var o=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(o),r.push(o)}return r},H.parseBindingListItem=function(e){return e},H.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(L.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},H.checkLVal=function(e,t,n){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&&(a(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),t&&"none"!==t&&(("var"===t&&!this.canDeclareVarName(e.name)||"var"!==t&&!this.canDeclareLexicalName(e.name))&&this.raiseRecoverable(e.start,"Identifier '"+e.name+"' has already been declared"),"var"===t?this.declareVarName(e.name):this.declareLexicalName(e.name));break;case"MemberExpression":t&&this.raiseRecoverable(e.start,(t?"Binding":"Assigning to")+" member expression");break;case"ObjectPattern":for(var r=0,i=e.properties;r<i.length;r+=1){var s=i[r];this.checkLVal(s.value,t,n)}break;case"ArrayPattern":for(var o=0,u=e.elements;o<u.length;o+=1){var c=u[o];c&&this.checkLVal(c,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 Y=V.prototype;Y.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)"__proto__"===n&&"init"===i&&(t.proto&&this.raiseRecoverable(r.start,"Redefinition of __proto__ property"),t.proto=!0);else{var s=t[n="$"+n];if(s){("init"===i?this.strict&&s.init||s.get||s.set:s.init||s[i])&&this.raiseRecoverable(r.start,"Redefinition of property")}else s=t[n]={init:!1,get:!1,set:!1};s[i]=!0}}},Y.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===L.comma){var s=this.startNodeAt(n,r);for(s.expressions=[i];this.eat(L.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(s,"SequenceExpression")}return i},Y.parseMaybeAssign=function(e,t,n){if(this.inGenerator&&this.isContextual("yield"))return this.parseYield();var r=!1,i=-1,s=-1;t?(i=t.parenthesizedAssign,s=t.trailingComma,t.parenthesizedAssign=t.trailingComma=-1):(t=new p,r=!0);var o=this.start,a=this.startLoc;this.type!=L.parenL&&this.type!=L.name||(this.potentialArrowAt=this.start);var u=this.parseMaybeConditional(e,t);if(n&&(u=n.call(this,u,o,a)),this.type.isAssign){this.checkPatternErrors(t,!0),r||p.call(t);var c=this.startNodeAt(o,a);return c.operator=this.value,c.left=this.type===L.eq?this.toAssignable(u):u,t.shorthandAssign=-1,this.checkLVal(u),this.next(),c.right=this.parseMaybeAssign(e),this.finishNode(c,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),s>-1&&(t.trailingComma=s),u},Y.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(L.question)){var s=this.startNodeAt(n,r);return s.test=i,s.consequent=this.parseMaybeAssign(),this.expect(L.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return i},Y.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)?i:i.start==n&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,n,r,-1,e)},Y.parseExprOp=function(e,t,n,r,i){var s=this.type.binop;if(null!=s&&(!i||this.type!==L._in)&&s>r){var o=this.type===L.logicalOR||this.type===L.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},Y.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")},Y.parseMaybeUnary=function(e,t){var n,r=this.start,i=this.startLoc;if(this.inAsync&&this.isContextual("await"))n=this.parseAwait(),t=!0;else if(this.type.prefix){var s=this.startNode(),o=this.type===L.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),o?this.checkLVal(s.argument):this.strict&&"delete"===s.operator&&"Identifier"===s.argument.type?this.raiseRecoverable(s.start,"Deleting local variable in strict mode"):t=!0,n=this.finishNode(s,o?"UpdateExpression":"UnaryExpression")}else{if(n=this.parseExprSubscripts(e),this.checkExpressionErrors(e))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var a=this.startNodeAt(r,i);a.operator=this.value,a.prefix=!1,a.argument=n,this.checkLVal(n),this.next(),n=this.finishNode(a,"UpdateExpression")}}return!t&&this.eat(L.starstar)?this.buildBinary(r,i,n,this.parseMaybeUnary(null,!1),"**",!1):n},Y.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);if(this.checkExpressionErrors(e)||i)return r;var s=this.parseSubscripts(r,t,n);return e&&"MemberExpression"===s.type&&(e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1)),s},Y.parseSubscripts=function(e,t,n,r){for(var i=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd==e.end&&!this.canInsertSemicolon(),s=void 0;;)if((s=this.eat(L.bracketL))||this.eat(L.dot)){var o=this.startNodeAt(t,n);o.object=e,o.property=s?this.parseExpression():this.parseIdent(!0),o.computed=!!s,s&&this.expect(L.bracketR),e=this.finishNode(o,"MemberExpression")}else if(!r&&this.eat(L.parenL)){var a=new p,u=this.yieldPos,c=this.awaitPos;this.yieldPos=0,this.awaitPos=0;var l=this.parseExprList(L.parenR,this.options.ecmaVersion>=8,!1,a);if(i&&!this.canInsertSemicolon()&&this.eat(L.arrow))return this.checkPatternErrors(a,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=u,this.awaitPos=c,this.parseArrowExpression(this.startNodeAt(t,n),l,!0);this.checkExpressionErrors(a,!0),this.yieldPos=u||this.yieldPos,this.awaitPos=c||this.awaitPos;var h=this.startNodeAt(t,n);h.callee=e,h.arguments=l,e=this.finishNode(h,"CallExpression")}else{if(this.type!==L.backQuote)return e;var f=this.startNodeAt(t,n);f.tag=e,f.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(f,"TaggedTemplateExpression")}},Y.parseExprAtom=function(e){var t,n=this.potentialArrowAt==this.start;switch(this.type){case L._super:return this.inFunction||this.raise(this.start,"'super' outside of function or class"),t=this.startNode(),this.next(),this.type!==L.dot&&this.type!==L.bracketL&&this.type!==L.parenL&&this.unexpected(),this.finishNode(t,"Super");case L._this:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case L.name:var r=this.start,i=this.startLoc,s=this.parseIdent(this.type!==L.name);if(this.options.ecmaVersion>=8&&"async"===s.name&&!this.canInsertSemicolon()&&this.eat(L._function))return this.parseFunction(this.startNodeAt(r,i),!1,!1,!0);if(n&&!this.canInsertSemicolon()){if(this.eat(L.arrow))return this.parseArrowExpression(this.startNodeAt(r,i),[s],!1);if(this.options.ecmaVersion>=8&&"async"===s.name&&this.type===L.name)return s=this.parseIdent(),!this.canInsertSemicolon()&&this.eat(L.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(r,i),[s],!0)}return s;case L.regexp:var o=this.value;return t=this.parseLiteral(o.value),t.regex={pattern:o.pattern,flags:o.flags},t;case L.num:case L.string:return this.parseLiteral(this.value);case L._null:case L._true:case L._false:return t=this.startNode(),t.value=this.type===L._null?null:this.type===L._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case L.parenL:var a=this.start,u=this.parseParenAndDistinguishExpression(n);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(e.parenthesizedAssign=a),e.parenthesizedBind<0&&(e.parenthesizedBind=a)),u;case L.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(L.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case L.braceL:return this.parseObj(!1,e);case L._function:return t=this.startNode(),this.next(),this.parseFunction(t,!1);case L._class:return this.parseClass(this.startNode(),!1);case L._new:return this.parseNew();case L.backQuote:return this.parseTemplate();default:this.unexpected()}},Y.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")},Y.parseParenExpression=function(){this.expect(L.parenL);var e=this.parseExpression();return this.expect(L.parenR),e},Y.parseParenAndDistinguishExpression=function(e){var t,n=this.start,r=this.startLoc,i=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var s,o,a=this.start,u=this.startLoc,c=[],l=!0,h=!1,f=new p,d=this.yieldPos,y=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==L.parenR;){if(l?l=!1:this.expect(L.comma),i&&this.afterTrailingComma(L.parenR,!0)){h=!0;break}if(this.type===L.ellipsis){s=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===L.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}this.type!==L.parenL||o||(o=this.start),c.push(this.parseMaybeAssign(!1,f,this.parseParenItem))}var m=this.start,g=this.startLoc;if(this.expect(L.parenR),e&&!this.canInsertSemicolon()&&this.eat(L.arrow))return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),o&&this.unexpected(o),this.yieldPos=d,this.awaitPos=y,this.parseParenArrowList(n,r,c);c.length&&!h||this.unexpected(this.lastTokStart),s&&this.unexpected(s),this.checkExpressionErrors(f,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=y||this.awaitPos,c.length>1?((t=this.startNodeAt(a,u)).expressions=c,this.finishNodeAt(t,"SequenceExpression",m,g)):t=c[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var v=this.startNodeAt(n,r);return v.expression=t,this.finishNode(v,"ParenthesizedExpression")}return t},Y.parseParenItem=function(e){return e},Y.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var Q=[];Y.parseNew=function(){var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(L.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(L.parenL)?e.arguments=this.parseExprList(L.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Q,this.finishNode(e,"NewExpression")},Y.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===L.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value,cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===L.backQuote,this.finishNode(n,"TemplateElement")},Y.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.expect(L.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(L.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},Y.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===L.name||this.type===L.num||this.type===L.string||this.type===L.bracketL||this.type.keyword)&&!O.test(this.input.slice(this.lastTokEnd,this.start))},Y.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(L.braceR);){if(r)r=!1;else if(this.expect(L.comma),this.afterTrailingComma(L.braceR))break;var s=this.parseProperty(e,t);this.checkPropClash(s,i),n.properties.push(s)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},Y.parseProperty=function(e,t){var n,r,i,s,o=this.startNode();return this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(e||t)&&(i=this.start,s=this.startLoc),e||(n=this.eat(L.star))),this.parsePropertyName(o),!e&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(o)?(r=!0,this.parsePropertyName(o,t)):r=!1,this.parsePropertyValue(o,e,n,r,i,s,t),this.finishNode(o,"Property")},Y.parsePropertyValue=function(e,t,n,r,i,s,o){if((n||r)&&this.type===L.colon&&this.unexpected(),this.eat(L.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===L.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,r);else if(t||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type==L.comma||this.type==L.braceR)this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?(this.checkUnreserved(e.key),e.kind="init",t?e.value=this.parseMaybeDefault(i,s,e.key):this.type===L.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,s,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected();else{(n||r)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var a="get"===e.kind?0:1;if(e.value.params.length!==a){var u=e.value.start;"get"===e.kind?this.raiseRecoverable(u,"getter should have no params"):this.raiseRecoverable(u,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}},Y.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(L.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(L.bracketR),e.key;e.computed=!1}return e.key=this.type===L.num||this.type===L.string?this.parseExprAtom():this.parseIdent(!0)},Y.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=!1,e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},Y.parseMethod=function(e,t){var n=this.startNode(),r=this.inGenerator,i=this.inAsync,s=this.yieldPos,o=this.awaitPos,a=this.inFunction;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.inGenerator=n.generator,this.inAsync=n.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),this.expect(L.parenL),n.params=this.parseBindingList(L.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1),this.inGenerator=r,this.inAsync=i,this.yieldPos=s,this.awaitPos=o,this.inFunction=a,this.finishNode(n,"FunctionExpression")},Y.parseArrowExpression=function(e,t,n){var r=this.inGenerator,i=this.inAsync,s=this.yieldPos,o=this.awaitPos,a=this.inFunction;return this.enterFunctionScope(),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.inGenerator=!1,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0),this.inGenerator=r,this.inAsync=i,this.yieldPos=s,this.awaitPos=o,this.inFunction=a,this.finishNode(e,"ArrowFunctionExpression")},Y.parseFunctionBody=function(e,t){var n=t&&this.type!==L.braceL,r=this.strict,i=!1;if(n)e.body=this.parseMaybeAssign(),e.expression=!0,this.checkParams(e,!1);else{var s=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);r&&!s||(i=this.strictDirective(this.end))&&s&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var o=this.labels;this.labels=[],i&&(this.strict=!0),this.checkParams(e,!r&&!i&&!t&&this.isSimpleParamList(e.params)),e.body=this.parseBlock(!1),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=o}this.exitFunctionScope(),this.strict&&e.id&&this.checkLVal(e.id,"none"),this.strict=r},Y.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1){if("Identifier"!==n[t].type)return!1}return!0},Y.checkParams=function(e,t){for(var n={},r=0,i=e.params;r<i.length;r+=1){var s=i[r];this.checkLVal(s,"var",t?null:n)}},Y.parseExprList=function(e,t,n,r){for(var i=[],s=!0;!this.eat(e);){if(s)s=!1;else if(this.expect(L.comma),t&&this.afterTrailingComma(e))break;var o=void 0;n&&this.type===L.comma?o=null:this.type===L.ellipsis?(o=this.parseSpread(r),r&&this.type===L.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(!1,r),i.push(o)}return i},Y.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;if(this.inGenerator&&"yield"===r&&this.raiseRecoverable(t,"Can not use 'yield' as identifier inside a generator"),this.inAsync&&"await"===r&&this.raiseRecoverable(t,"Can not use 'await' as identifier inside an async function"),this.isKeyword(r)&&this.raise(t,"Unexpected keyword '"+r+"'"),!(this.options.ecmaVersion<6&&-1!=this.input.slice(t,n).indexOf("\\"))){(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&this.raiseRecoverable(t,"The keyword '"+r+"' is reserved")}},Y.parseIdent=function(e,t){var n=this.startNode();return e&&"never"==this.options.allowReserved&&(e=!1),this.type===L.name?n.name=this.value:this.type.keyword?(n.name=this.type.keyword,"class"!==n.name&&"function"!==n.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop()):this.unexpected(),this.next(),this.finishNode(n,"Identifier"),e||this.checkUnreserved(n),n},Y.parseYield=function(){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type==L.semi||this.canInsertSemicolon()||this.type!=L.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(L.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")},Y.parseAwait=function(){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0),this.finishNode(e,"AwaitExpression")};var X=V.prototype;X.raise=function(e,t){var n=u(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 I(this.curLine,this.pos-this.lineStart)};var Z=V.prototype,K=Object.assign||function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];for(var r=0,i=t;r<i.length;r+=1){var s=i[r];for(var o in s)a(s,o)&&(e[o]=s[o])}return e};Z.enterFunctionScope=function(){this.scopeStack.push({var:{},lexical:{},childVar:{},parentLexical:{}})},Z.exitFunctionScope=function(){this.scopeStack.pop()},Z.enterLexicalScope=function(){var e=this.scopeStack[this.scopeStack.length-1],t={var:{},lexical:{},childVar:{},parentLexical:{}};this.scopeStack.push(t),K(t.parentLexical,e.lexical,e.parentLexical)},Z.exitLexicalScope=function(){var e=this.scopeStack.pop(),t=this.scopeStack[this.scopeStack.length-1];K(t.childVar,e.var,e.childVar)},Z.canDeclareVarName=function(e){var t=this.scopeStack[this.scopeStack.length-1];return!a(t.lexical,e)&&!a(t.parentLexical,e)},Z.canDeclareLexicalName=function(e){var t=this.scopeStack[this.scopeStack.length-1];return!a(t.lexical,e)&&!a(t.var,e)&&!a(t.childVar,e)},Z.declareVarName=function(e){this.scopeStack[this.scopeStack.length-1].var[e]=!0},Z.declareLexicalName=function(e){this.scopeStack[this.scopeStack.length-1].lexical[e]=!0};var ee=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new j(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},te=V.prototype;te.startNode=function(){return new ee(this,this.start,this.startLoc)},te.startNodeAt=function(e,t){return new ee(this,e,t)},te.finishNode=function(e,t){return h.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},te.finishNodeAt=function(e,t,n,r){return h.call(this,e,t,n,r)};var ne=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},re={b_stat:new ne("{",!1),b_expr:new ne("{",!0),b_tmpl:new ne("${",!1),p_stat:new ne("(",!1),p_expr:new ne("(",!0),q_tmpl:new ne("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new ne("function",!1),f_expr:new ne("function",!0),f_expr_gen:new ne("function",!0,!1,null,!0),f_gen:new ne("function",!1,!1,null,!0)},ie=V.prototype;ie.initialContext=function(){return[re.b_stat]},ie.braceIsBlock=function(e){var t=this.curContext();return t===re.f_expr||t===re.f_stat||(e!==L.colon||t!==re.b_stat&&t!==re.b_expr?e===L._return||e==L.name&&this.exprAllowed?O.test(this.input.slice(this.lastTokEnd,this.start)):e===L._else||e===L.semi||e===L.eof||e===L.parenR||e==L.arrow||(e==L.braceL?t===re.b_stat:e!=L._var&&e!=L.name&&!this.exprAllowed):!t.isExpr)},ie.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},ie.updateContext=function(e){var t,n=this.type;n.keyword&&e==L.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},L.parenR.updateContext=L.braceR.updateContext=function(){if(1!=this.context.length){var e=this.context.pop();e===re.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},L.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?re.b_stat:re.b_expr),this.exprAllowed=!0},L.dollarBraceL.updateContext=function(){this.context.push(re.b_tmpl),this.exprAllowed=!0},L.parenL.updateContext=function(e){var t=e===L._if||e===L._for||e===L._with||e===L._while;this.context.push(t?re.p_stat:re.p_expr),this.exprAllowed=!0},L.incDec.updateContext=function(){},L._function.updateContext=L._class.updateContext=function(e){e.beforeExpr&&e!==L.semi&&e!==L._else&&(e!==L.colon&&e!==L.braceL||this.curContext()!==re.b_stat)?this.context.push(re.f_expr):this.context.push(re.f_stat),this.exprAllowed=!1},L.backQuote.updateContext=function(){this.curContext()===re.q_tmpl?this.context.pop():this.context.push(re.q_tmpl),this.exprAllowed=!1},L.star.updateContext=function(e){if(e==L._function){var t=this.context.length-1;this.context[t]===re.f_expr?this.context[t]=re.f_expr_gen:this.context[t]=re.f_gen}this.exprAllowed=!0},L.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&("of"==this.value&&!this.exprAllowed||"yield"==this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var se=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new j(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},oe=V.prototype,ae="object"==typeof Packages&&"[object JavaPackage]"==Object.prototype.toString.call(Packages);oe.next=function(){this.options.onToken&&this.options.onToken(new se(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},oe.getToken=function(){return this.next(),new se(this)},"undefined"!=typeof Symbol&&(oe[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===L.eof,value:t}}}}),oe.curContext=function(){return this.context[this.context.length-1]},oe.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(L.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},oe.readToken=function(e){return n(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},oe.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=57344)return e;return(e<<10)+this.input.charCodeAt(this.pos+1)-56613888},oe.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(-1===n&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations){T.lastIndex=t;for(var r;(r=T.exec(this.input))&&r.index<this.pos;)++this.curLine,this.lineStart=r.index+r[0].length}this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())},oe.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!o(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},oe.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,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 e}break;default:if(!(e>8&&e<14||e>=5760&&N.test(String.fromCharCode(e))))break e;++this.pos}}},oe.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)},oe.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(L.ellipsis)):(++this.pos,this.finishToken(L.dot))},oe.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(L.assign,2):this.finishOp(L.slash,1)},oe.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?L.star:L.modulo;return this.options.ecmaVersion>=7&&42==e&&42===t&&(++n,r=L.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(L.assign,n+1):this.finishOp(r,n)},oe.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.finishOp(124===e?L.logicalOR:L.logicalAND,2):61===t?this.finishOp(L.assign,2):this.finishOp(124===e?L.bitwiseOR:L.bitwiseAND,1)},oe.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(L.assign,2):this.finishOp(L.bitwiseXOR,1)},oe.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!=t||this.inModule||62!=this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!O.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(L.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(L.assign,2):this.finishOp(L.plusMin,1)},oe.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(L.assign,n+1):this.finishOp(L.bitShift,n)):33!=t||60!=e||this.inModule||45!=this.input.charCodeAt(this.pos+2)||45!=this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(L.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},oe.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(L.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(L.arrow)):this.finishOp(61===e?L.eq:L.prefix,1)},oe.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(L.parenL);case 41:return++this.pos,this.finishToken(L.parenR);case 59:return++this.pos,this.finishToken(L.semi);case 44:return++this.pos,this.finishToken(L.comma);case 91:return++this.pos,this.finishToken(L.bracketL);case 93:return++this.pos,this.finishToken(L.bracketR);case 123:return++this.pos,this.finishToken(L.braceL);case 125:return++this.pos,this.finishToken(L.braceR);case 58:return++this.pos,this.finishToken(L.colon);case 63:return++this.pos,this.finishToken(L.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(L.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(L.prefix,1)}this.raise(this.pos,"Unexpected character '"+d(e)+"'")},oe.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};var ue=!!f("￿","u");oe.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(O.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&&(ue?u="u":(a=(a=a.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(e,t,i){return(t=Number("0x"+t))>1114111&&n.raise(r+i+3,"Code point out of bounds"),"x"})).replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"),u=u.replace("u","")))}var l=null;return ae||(f(a,u,r,this),l=f(s,o)),this.finishToken(L.regexp,{pattern:s,flags:o,value:l})},oe.readInt=function(e,t){for(var n=this.pos,r=0,i=0,s=null==t?1/0:t;i<s;++i){var o=this.input.charCodeAt(this.pos),a=void 0;if((a=o>=97?o-97+10:o>=65?o-65+10:o>=48&&o<=57?o-48:1/0)>=e)break;++this.pos,r=r*e+a}return this.pos===n||null!=t&&this.pos-n!==t?null:r},oe.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(L.num,t)},oe.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"),i&&this.pos==t+1&&(i=!1);var s=this.input.charCodeAt(this.pos);46!==s||i||(++this.pos,this.readInt(10),r=!0,s=this.input.charCodeAt(this.pos)),69!==s&&101!==s||i||(43!==(s=this.input.charCodeAt(++this.pos))&&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?this.strict?this.raise(t,"Invalid number"):o=/[89]/.test(a)?parseInt(a,10):parseInt(a,8):o=parseInt(a,10),this.finishToken(L.num,o)},oe.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},oe.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;92===r?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):(o(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(L.string,t)};var ce={};oe.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==ce)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},oe.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw ce;this.raise(e,t)},oe.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==L.template&&this.type!==L.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(L.template,e)):36===n?(this.pos+=2,this.finishToken(L.dollarBraceL)):(++this.pos,this.finishToken(L.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(o(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},oe.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(L.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},oe.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 d(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.invalidStringToken(this.pos-2,"Octal literal in strict mode"),this.pos+=n.length-1,String.fromCharCode(r)}return String.fromCharCode(t)}},oe.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},oe.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var o=this.fullCharCodeAtPos();if(r(o,s))this.pos+=o<=65535?1:2;else{if(92!==o)break;this.containsEsc=!0,e+=this.input.slice(i,this.pos);var a=this.pos;117!=this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var u=this.readCodePoint();(t?n:r)(u,s)||this.invalidStringToken(a,"Invalid Unicode escape"),e+=d(u),i=this.pos}t=!1}return e+this.input.slice(i,this.pos)},oe.readWord=function(){var e=this.readWord1(),t=L.name;return this.keywords.test(e)&&(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+e),t=_[e]),this.finishToken(t,e)};e.version="5.2.1",e.parse=function(e,t){return new V(t,e).parse()},e.parseExpressionAt=function(e,t,n){var r=new V(n,e,t);return r.nextToken(),r.parseExpression()},e.tokenizer=function(e,t){return new V(t,e)},e.addLooseExports=function(t,n,r){e.parse_dammit=t,e.LooseParser=n,e.pluginsLoose=r},e.Parser=V,e.plugins=M,e.defaultOptions=D,e.Position=I,e.SourceLocation=j,e.getLineInfo=u,e.Node=ee,e.TokenType=k,e.tokTypes=L,e.keywordTypes=_,e.TokContext=ne,e.tokContexts=re,e.isIdentifierChar=r,e.isIdentifierStart=n,e.Token=se,e.isNewLine=o,e.lineBreak=O,e.lineBreakG=T,e.nonASCIIwhitespace=N,Object.defineProperty(e,"__esModule",{value:!0})})},{}],5:[function(e,t,n){!function(e,r){"object"==typeof n&&void 0!==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(e){return"string"==typeof e?function(t){return t==e}:e||function(){return!0}}function n(e,t,n){n(e,t)}function r(e,t,n){}var i=function(e,t){this.node=e,this.state=t},s=Object.create||function(e){function t(){}return t.prototype=e,new t},o={};o.Program=o.BlockStatement=function(e,t,n){for(var r=0,i=e.body;r<i.length;r+=1){n(i[r],t,"Statement")}},o.Statement=n,o.EmptyStatement=r,o.ExpressionStatement=o.ParenthesizedExpression=function(e,t,n){return n(e.expression,t,"Expression")},o.IfStatement=function(e,t,n){n(e.test,t,"Expression"),n(e.consequent,t,"Statement"),e.alternate&&n(e.alternate,t,"Statement")},o.LabeledStatement=function(e,t,n){return n(e.body,t,"Statement")},o.BreakStatement=o.ContinueStatement=r,o.WithStatement=function(e,t,n){n(e.object,t,"Expression"),n(e.body,t,"Statement")},o.SwitchStatement=function(e,t,n){n(e.discriminant,t,"Expression");for(var r=0,i=e.cases;r<i.length;r+=1){var s=i[r];s.test&&n(s.test,t,"Expression");for(var o=0,a=s.consequent;o<a.length;o+=1){n(a[o],t,"Statement")}}},o.ReturnStatement=o.YieldExpression=o.AwaitExpression=function(e,t,n){e.argument&&n(e.argument,t,"Expression")},o.ThrowStatement=o.SpreadElement=function(e,t,n){return n(e.argument,t,"Expression")},o.TryStatement=function(e,t,n){n(e.block,t,"Statement"),e.handler&&n(e.handler,t),e.finalizer&&n(e.finalizer,t,"Statement")},o.CatchClause=function(e,t,n){n(e.param,t,"Pattern"),n(e.body,t,"ScopeBody")},o.WhileStatement=o.DoWhileStatement=function(e,t,n){n(e.test,t,"Expression"),n(e.body,t,"Statement")},o.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")},o.ForInStatement=o.ForOfStatement=function(e,t,n){n(e.left,t,"ForInit"),n(e.right,t,"Expression"),n(e.body,t,"Statement")},o.ForInit=function(e,t,n){"VariableDeclaration"==e.type?n(e,t):n(e,t,"Expression")},o.DebuggerStatement=r,o.FunctionDeclaration=function(e,t,n){return n(e,t,"Function")},o.VariableDeclaration=function(e,t,n){for(var r=0,i=e.declarations;r<i.length;r+=1){n(i[r],t)}},o.VariableDeclarator=function(e,t,n){n(e.id,t,"Pattern"),e.init&&n(e.init,t,"Expression")},o.Function=function(e,t,n){e.id&&n(e.id,t,"Pattern");for(var r=0,i=e.params;r<i.length;r+=1){n(i[r],t,"Pattern")}n(e.body,t,e.expression?"ScopeExpression":"ScopeBody")},o.ScopeBody=function(e,t,n){return n(e,t,"Statement")},o.ScopeExpression=function(e,t,n){return n(e,t,"Expression")},o.Pattern=function(e,t,n){"Identifier"==e.type?n(e,t,"VariablePattern"):"MemberExpression"==e.type?n(e,t,"MemberPattern"):n(e,t)},o.VariablePattern=r,o.MemberPattern=n,o.RestElement=function(e,t,n){return n(e.argument,t,"Pattern")},o.ArrayPattern=function(e,t,n){for(var r=0,i=e.elements;r<i.length;r+=1){var s=i[r];s&&n(s,t,"Pattern")}},o.ObjectPattern=function(e,t,n){for(var r=0,i=e.properties;r<i.length;r+=1){n(i[r].value,t,"Pattern")}},o.Expression=n,o.ThisExpression=o.Super=o.MetaProperty=r,o.ArrayExpression=function(e,t,n){for(var r=0,i=e.elements;r<i.length;r+=1){var s=i[r];s&&n(s,t,"Expression")}},o.ObjectExpression=function(e,t,n){for(var r=0,i=e.properties;r<i.length;r+=1){n(i[r],t)}},o.FunctionExpression=o.ArrowFunctionExpression=o.FunctionDeclaration,o.SequenceExpression=o.TemplateLiteral=function(e,t,n){for(var r=0,i=e.expressions;r<i.length;r+=1){n(i[r],t,"Expression")}},o.UnaryExpression=o.UpdateExpression=function(e,t,n){n(e.argument,t,"Expression")},o.BinaryExpression=o.LogicalExpression=function(e,t,n){n(e.left,t,"Expression"),n(e.right,t,"Expression")},o.AssignmentExpression=o.AssignmentPattern=function(e,t,n){n(e.left,t,"Pattern"),n(e.right,t,"Expression")},o.ConditionalExpression=function(e,t,n){n(e.test,t,"Expression"),n(e.consequent,t,"Expression"),n(e.alternate,t,"Expression")},o.NewExpression=o.CallExpression=function(e,t,n){if(n(e.callee,t,"Expression"),e.arguments)for(var r=0,i=e.arguments;r<i.length;r+=1){n(i[r],t,"Expression")}},o.MemberExpression=function(e,t,n){n(e.object,t,"Expression"),e.computed&&n(e.property,t,"Expression")},o.ExportNamedDeclaration=o.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")},o.ExportAllDeclaration=function(e,t,n){n(e.source,t,"Expression")},o.ImportDeclaration=function(e,t,n){for(var r=0,i=e.specifiers;r<i.length;r+=1){n(i[r],t)}n(e.source,t,"Expression")},o.ImportSpecifier=o.ImportDefaultSpecifier=o.ImportNamespaceSpecifier=o.Identifier=o.Literal=r,o.TaggedTemplateExpression=function(e,t,n){n(e.tag,t,"Expression"),n(e.quasi,t)},o.ClassDeclaration=o.ClassExpression=function(e,t,n){return n(e,t,"Class")},o.Class=function(e,t,n){e.id&&n(e.id,t,"Pattern"),e.superClass&&n(e.superClass,t,"Expression");for(var r=0,i=e.body.body;r<i.length;r+=1){n(i[r],t)}},o.MethodDefinition=o.Property=function(e,t,n){e.computed&&n(e.key,t,"Expression"),n(e.value,t,"Expression")},e.simple=function(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)},e.ancestor=function(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)},e.recursive=function(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)},e.full=function(t,n,r,i,s){r||(r=e.base),function e(t,i,s){var o=s||t.type;r[o](t,i,e),s||n(t,i,o)}(t,i,s)},e.fullAncestor=function(t,n,r,i){r||(r=e.base);var s=[];!function e(t,i,o){var a=o||t.type,u=t!=s[s.length-1];u&&s.push(t),r[a](t,i,e),o||n(t,i||s,s,a),u&&s.pop()}(t,i)},e.findNodeAt=function(n,r,s,o,a,u){o=t(o),a||(a=e.base);try{!function e(t,n,u){var c=u||t.type;if((null==r||t.start<=r)&&(null==s||t.end>=s)&&a[c](t,n,e),(null==r||t.start==r)&&(null==s||t.end==s)&&o(c,t))throw new i(t,n)}(n,u)}catch(e){if(e instanceof i)return e;throw e}},e.findNodeAround=function(n,r,s,o,a){s=t(s),o||(o=e.base);try{!function e(t,n,a){var u=a||t.type;if(!(t.start>r||t.end<r)&&(o[u](t,n,e),s(u,t)))throw new i(t,n)}(n,a)}catch(e){if(e instanceof i)return e;throw e}},e.findNodeAfter=function(n,r,s,o,a){s=t(s),o||(o=e.base);try{!function e(t,n,a){if(!(t.end<r)){var u=a||t.type;if(t.start>=r&&s(u,t))throw new i(t,n);o[u](t,n,e)}}(n,a)}catch(e){if(e instanceof i)return e;throw e}},e.findNodeBefore=function(n,r,s,o,a){s=t(s),o||(o=e.base);var u;return function e(t,n,a){if(!(t.start>r)){var c=a||t.type;t.end<=r&&(!u||u.node.end<t.end)&&s(c,t)&&(u=new i(t,n)),o[c](t,n,e)}}(n,a),u},e.make=function(t,n){n||(n=e.base);var r=s(n);for(var i in t)r[i]=t[i];return r},e.base=o,Object.defineProperty(e,"__esModule",{value:!0})})},{}],6:[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 o[e>>18&63]+o[e>>12&63]+o[e>>6&63]+o[63&e]}function s(e,t,n){for(var r,s=[],o=t;o<n;o+=3)r=(e[o]<<16)+(e[o+1]<<8)+e[o+2],s.push(i(r));return s.join("")}n.byteLength=function(e){return 3*e.length/4-r(e)},n.toByteArray=function(e){var t,n,i,s,o,c=e.length;s=r(e),o=new u(3*c/4-s),n=s>0?c-4:c;var l=0;for(t=0;t<n;t+=4)i=a[e.charCodeAt(t)]<<18|a[e.charCodeAt(t+1)]<<12|a[e.charCodeAt(t+2)]<<6|a[e.charCodeAt(t+3)],o[l++]=i>>16&255,o[l++]=i>>8&255,o[l++]=255&i;return 2===s?(i=a[e.charCodeAt(t)]<<2|a[e.charCodeAt(t+1)]>>4,o[l++]=255&i):1===s&&(i=a[e.charCodeAt(t)]<<10|a[e.charCodeAt(t+1)]<<4|a[e.charCodeAt(t+2)]>>2,o[l++]=i>>8&255,o[l++]=255&i),o},n.fromByteArray=function(e){for(var t,n=e.length,r=n%3,i="",a=[],u=0,c=n-r;u<c;u+=16383)a.push(s(e,u,u+16383>c?c:u+16383));return 1===r?(t=e[n-1],i+=o[t>>2],i+=o[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=o[t>>10],i+=o[t>>4&63],i+=o[t<<2&63],i+="="),a.push(i),a.join("")};for(var o=[],a=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,p=c.length;l<p;++l)o[l]=c[l],a[c.charCodeAt(l)]=l;a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},{}],7:[function(e,t,n){},{}],8:[function(e,t,n){"use strict";function r(e){if(e>B)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=i.prototype,t}function i(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 a(e)}return s(e,t,n)}function s(e,t,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return T(e)?function(e,t,n){if(t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(n||0))throw new RangeError("'length' is out of bounds");var r;r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n);return r.__proto__=i.prototype,r}(e,t,n):"string"==typeof e?function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!i.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var n=0|l(e,t),s=r(n),o=s.write(e,t);o!==n&&(s=s.slice(0,o));return s}(e,t):function(e){if(i.isBuffer(e)){var t=0|c(e.length),n=r(t);return 0===n.length?n:(e.copy(n,0,0,t),n)}if(e){if(N(e)||"length"in e)return"number"!=typeof e.length||P(e.length)?r(0):u(e);if("Buffer"===e.type&&Array.isArray(e.data))return u(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e)}function o(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 a(e){return o(e),r(e<0?0:0|c(e))}function u(e){for(var t=e.length<0?0:0|c(e.length),n=r(t),i=0;i<t;i+=1)n[i]=255&e[i];return n}function c(e){if(e>=B)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+B.toString(16)+" bytes");return 0|e}function l(e,t){if(i.isBuffer(e))return e.length;if(N(e)||T(e))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 _(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return L(e).length;default:if(r)return _(e).length;t=(""+t).toLowerCase(),r=!0}}function p(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 function(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+=function(e){return e<16?"0"+e.toString(16):e.toString(16)}(e[s]);return i}(this,t,n);case"utf8":case"utf-8":return w(this,t,n);case"ascii":return function(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}(this,t,n);case"latin1":case"binary":return function(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}(this,t,n);case"base64":return function(e,t,n){return 0===t&&n===e.length?F.fromByteArray(e):F.fromByteArray(e.slice(t,n))}(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(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}(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function h(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function f(e,t,n,r,s){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,P(n)&&(n=s?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(s)return-1;n=e.length-1}else if(n<0){if(!s)return-1;n=0}if("string"==typeof t&&(t=i.from(t,r)),i.isBuffer(t))return 0===t.length?-1:d(e,t,n,r,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):d(e,[t],n,r,s);throw new TypeError("val must be string, number or Buffer")}function d(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&&("ucs2"===(r=String(r).toLowerCase())||"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,-1===l?0:c-l)){if(-1===l&&(l=c),c-l+1===u)return l*o}else-1!==l&&(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 y(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(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(P(a))return o;e[n+o]=a}return o}function m(e,t,n,r){return O(_(t,e.length-n),e,n,r)}function g(e,t,n,r){return O(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function v(e,t,n,r){return g(e,t,n,r)}function b(e,t,n,r){return O(L(t),e,n,r)}function x(e,t,n,r){return O(function(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}(t,e.length-n),e,n,r)}function w(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:128==(192&(u=e[i+1]))&&(p=(31&s)<<6|63&u)>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)>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)>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 function(e){var t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=R));return n}(r)}function E(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 S(e,t,n,r,s,o){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function k(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 A(e,t,n,r,i){return t=+t,n>>>=0,i||k(e,0,n,4),$.write(e,t,n,r,23,4),n+4}function C(e,t,n,r,i){return t=+t,n>>>=0,i||k(e,0,n,8),$.write(e,t,n,r,52,8),n+8}function _(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))>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=65536+(i-55296<<10|n-56320)}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 L(e){return F.toByteArray(function(e){if((e=e.trim().replace(I,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function O(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 T(e){return e instanceof ArrayBuffer||null!=e&&null!=e.constructor&&"ArrayBuffer"===e.constructor.name&&"number"==typeof e.byteLength}function N(e){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(e)}function P(e){return e!=e}var F=e("base64-js"),$=e("ieee754");n.Buffer=i,n.SlowBuffer=function(e){return+e!=e&&(e=0),i.alloc(+e)},n.INSPECT_MAX_BYTES=50;var B=2147483647;n.kMaxLength=B,(i.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(e,t,n){return s(e,t,n)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(e,t,n){return function(e,t,n){return o(e),e<=0?r(e):void 0!==t?"string"==typeof n?r(e).fill(t,n):r(e).fill(t):r(e)}(e,t,n)},i.allocUnsafe=function(e){return a(e)},i.allocUnsafeSlow=function(e){return a(e)},i.isBuffer=function(e){return null!=e&&!0===e._isBuffer},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,s=0,o=Math.min(n,r);s<o;++s)if(e[s]!==t[s]){n=e[s],r=t[s];break}return n<r?-1:r<n?1:0},i.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}},i.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return i.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=i.allocUnsafe(t),s=0;for(n=0;n<e.length;++n){var o=e[n];if(!i.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,s),s+=o.length}return r},i.byteLength=l,i.prototype._isBuffer=!0,i.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)h(this,t,t+1);return this},i.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)h(this,t,t+3),h(this,t+1,t+2);return this},i.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)h(this,t,t+7),h(this,t+1,t+6),h(this,t+2,t+5),h(this,t+3,t+4);return this},i.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?w(this,0,e):p.apply(this,arguments)},i.prototype.equals=function(e){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===i.compare(this,e)},i.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+">"},i.prototype.compare=function(e,t,n,r,s){if(!i.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===s&&(s=this.length),t<0||n>e.length||r<0||s>this.length)throw new RangeError("out of range index");if(r>=s&&t>=n)return 0;if(r>=s)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,s>>>=0,this===e)return 0;for(var o=s-r,a=n-t,u=Math.min(o,a),c=this.slice(r,s),l=e.slice(t,n),p=0;p<u;++p)if(c[p]!==l[p]){o=c[p],a=l[p];break}return o<a?-1:a<o?1:0},i.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},i.prototype.indexOf=function(e,t,n){return f(this,e,t,n,!0)},i.prototype.lastIndexOf=function(e,t,n){return f(this,e,t,n,!1)},i.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,isFinite(n)?(n>>>=0,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 y(this,e,t,n);case"utf8":case"utf-8":return m(this,e,t,n);case"ascii":return g(this,e,t,n);case"latin1":case"binary":return v(this,e,t,n);case"base64":return b(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;i.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return r.__proto__=i.prototype,r},i.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||E(e,t,this.length);for(var r=this[e],i=1,s=0;++s<t&&(i*=256);)r+=this[e+s]*i;return r},i.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||E(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},i.prototype.readUInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||E(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},i.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||E(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},i.prototype.readInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||E(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt16BE=function(e,t){e>>>=0,t||E(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e>>>=0,t||E(e,4,this.length),$.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||E(e,4,this.length),$.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||E(e,8,this.length),$.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||E(e,8,this.length),$.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){S(this,e,t,n,Math.pow(2,8*n)-1,0)}var i=1,s=0;for(this[t]=255&e;++s<n&&(i*=256);)this[t+s]=e/i&255;return t+n},i.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){S(this,e,t,n,Math.pow(2,8*n)-1,0)}var i=n-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+n},i.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},i.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);S(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},i.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);S(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},i.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeFloatLE=function(e,t,n){return A(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){return A(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){return C(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){return C(this,e,t,!1,n)},i.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)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},i.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 s=e.charCodeAt(0);s<256&&(e=s)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!i.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);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 o;if("number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=i.isBuffer(e)?e:new i(e,r),u=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%u]}return this};var I=/[^+/0-9A-Za-z-_]/g},{"base64-js":6,ieee754:9}],9:[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:1/0*(f?-1:1);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))*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}},{}],10:[function(e,t,n){(function(n){function r(){}function i(e){this.covers={},this._ident=i.prototype.version+"_"+Math.random(),this.setOptions(e||{})}var s=e("./lib/parser"),o=e("./lib/arboriculture"),a=e("./lib/output");i.prototype.smCache={},i.prototype.setOptions=function(e){return this.log=!1===e.log?r:e.log||this.log,this.options=function(e){var t={};return e.forEach(function(e){if(e&&"object"==typeof e)for(var n in e)t[n]=e[n]}),t}([this.options,e]),delete this.options.log,this},i.prototype.version=e("./package.json").version,i.prototype.isThenable=function(e){return e&&e instanceof Object&&"function"==typeof e.then},i.prototype.compile=function(e,t,n,s){"object"==typeof n&&void 0===s&&(s=n),s=s||{};for(var o in i.initialCodeGenOpts)o in s||(s[o]=i.initialCodeGenOpts[o]);var a=this.parse(e,t,null,s);return this.asynchronize(a,null,s,this.log||r),this.prettyPrint(a,s),a},i.prototype.parse=function(e,t,n,r){"object"==typeof n&&void 0===r&&(r=n);var i={origCode:e.toString(),filename:t};try{return i.ast=s.parse(i.origCode,r&&r.parser),r.babelTree&&s.treeWalker(i.ast,function(e,t,n){"Literal"===e.type?n[0].replace(o.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 a=i.origCode.substr(e.pos-e.loc.column);a=a.split("\n")[0],e.message+=" "+t+" (nodent)\n"+a+"\n"+a.replace(/[\S ]/g,"-").substring(0,e.loc.column)+"^",e.stack=""}throw e}},i.prototype.asynchronize=o.asynchronize,i.prototype.printNode=o.printNode,i.prototype.prettyPrint=function(t,r){var i=t.filename?t.filename.split("/"):["anonymous"],s=i.pop(),o=a(t.ast,r&&r.sourcemap?{map:{startLine:r.mapStartLine||0,file:s+"(original)",sourceMapRoot:i.join("/"),sourceContent:t.origCode}}:null,t.origCode);if(r&&r.sourcemap)try{var u="",c=o.map.toJSON();if(c){var l=e("source-map").SourceMapConsumer;t.sourcemap=c,this.smCache[t.filename]={map:c,smc:new l(c)},u="\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,"+function(e){return(e instanceof n?e:new n(e.toString(),"binary")).toString("base64")}(JSON.stringify(c))+"\n"}t.code=o.code+u}catch(e){t.code=o}else t.code=o;return t},i.prototype.getDefaultCompileOptions=void 0,Object.defineProperty(i.prototype,"Promise",{get:function(){return initOpts.log("Warning: nodent.Promise is deprecated. Use nodent.Thenable instead"),Thenable},enumerable:!1,configurable:!1}),i.initialCodeGenOpts={noRuntime:!1,lazyThenables:!1,es6target:!1,noUseDirective:!1,wrapAwait:null,mapStartLine:0,sourcemap:!0,engine:!1,parser:{sourceType:"script"},$return:"$return",$error:"$error",$arguments:"$args",$asyncspawn:"$asyncspawn",$asyncbind:"$asyncbind",generatedSymbolPrefix:"$",$makeThenable:"$makeThenable"},t.exports=i}).call(this,e("buffer").Buffer)},{"./lib/arboriculture":11,"./lib/output":12,"./lib/parser":13,"./package.json":25,buffer:8,"source-map":24}],11:[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(){}function a(e){return e?(b.node=e,b):{}}function u(e,t,n){if(!e)return null;if(t&&"object"==typeof t){var r=Object.keys(t);return u(e,function(e){return r.every(function(n){return e[n]==t[n]})})}var i,s={};if(Array.isArray(e)){for(var o=0;o<e.length;o++)if(i=u(e[o],t))return i;return null}var c=n;"function"!=typeof n&&(c=n?function(e){return!0}:function(e){return!a(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 c(e){return u(e,function(e){return"AwaitExpression"===e.type&&!e.$hidden})}function l(e){return u(e,function(e){return"AwaitExpression"===e.type&&!e.$hidden},function(e){var t=a(e);return!t.isBlockStatement&&!t.isScope})}function p(e){if(null===e)return{type:"NullLiteral",value:null,raw:"null"};if(!0===e||!1===e)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(e,t){if(n.es6target&&!e.id&&!t&&0===e.type.indexOf("Function"))return e.type="ArrowFunctionExpression",e;if(n.noRuntime){if(t){if(a(t).isLiteral)throw new Error("Nodent: 'noRuntime' option only compatible with -promise and -engine modes");e.body.body=y.part("try {$:0} catch($2) {return $1($2)}",[i(e.body),t,h("$boundEx")]).body}else if(n.es6target&&!e.id&&0===e.type.indexOf("Function"))return e.type="ArrowFunctionExpression",e;return n.es6target&&!e.id?(e.type="ArrowFunctionExpression",e):y.part("$0.bind(this)",[e]).expr}return t?y.part("$0.$1(this,$2)",[e,pe.asyncbind,t]).expr:y.part("$0.$1(this)",[e,pe.asyncbind]).expr}function g(e,t,n,r){return y.part("var $0 = $1",[h(e),m({type:"FunctionExpression",id:null,generator:!1,expression:!1,params:n||[],body:Array.isArray(t)?{type:"BlockStatement",body:t}:t},r)]).body[0]}function v(t){return e.filename+(t&&t.loc&&t.loc.start?"("+t.loc.start.line+":"+t.loc.start.column+")\t":"\t")}function b(e){return n.babelTree?p(e):{type:"Literal",value:e,raw:JSON.stringify(e)}}function x(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))&&a(e.value).isFunction?e.value:null:e:null}function w(e,t){if(!a(e).isFunction)throw new Error("Can only replace 'arguments' in functions");return"$usesArguments"in e||(y.treeWalker(e,function(t,r,i){"Identifier"===t.type&&"arguments"===t.name?(i[0].parent.shorthand&&(i[0].parent.shorthand=!1,i[0].parent.key=h("arguments"),e.$usesArguments=!0),"key"!==i[0].field&&(t.name=n.$arguments,e.$usesArguments=!0)):t!==e&&a(t).isFunction?"ArrowFunctionExpression"===t.type&&(w(t),e.$usesArguments=e.$usesArguments||t.$usesArguments):r()}),e.$usesArguments=e.$usesArguments||!1),e.$usesArguments&&"ArrowFunctionExpression"!==e.type}function E(e){return"string"!=typeof e&&(e=e.type.replace(/Statement|Expression/g,"")),n.generatedSymbolPrefix+e+"_"+le++}function S(e,t){return e&&(e.$exit=f({$error:t.$error,$return:t.$return})),e}function k(e,t){var n=function(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}(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 A(e,t){var r=!(n.promises||n.generators||n.engine)&&n.lazyThenables;ie(e),ne(e),j(e),H(e),J(e),(r?function(e,t){return y.treeWalker(e,function(e,t,r){function o(e){return{type:"ReturnStatement",argument:{type:"UnaryExpression",operator:"void",prefix:!0,argument:L(e||S)}}}function l(e,t){if("BreakStatement"===e.type)s(e,i(A(e.label&&n.generatedSymbolPrefix+"Loop_"+e.label.name+"_exit")));else if("ContinueStatement"===e.type)s(e,i(o(e.label&&n.generatedSymbolPrefix+"Loop_"+e.label.name+"_next")));else if(a(e).isFunction)return!0;t()}"ForInStatement"===e.type&&c(e)?U(e,r):"ForOfStatement"===e.type&&c(e)&&z(e,r),t();var p;if(a(e).isLoop&&c(e)){var f=e.init,d=e.test||b(!0),g=e.update,v=e.body,x=function(e){return u(e,{type:"ThisExpression"})}(v);f&&(a(f).isStatement||(f={type:"ExpressionStatement",expression:f})),g=g&&{type:"ExpressionStatement",expression:g},v=a(v).isBlockStatement?i(v).body:[i(v)];var w=e.$label&&e.$label.name;w="Loop_"+(w||le++);var E=n.generatedSymbolPrefix+(w+"_exit"),S=n.generatedSymbolPrefix+(w+"_next"),k=h(n.generatedSymbolPrefix+w),A=function(e){return{type:"ReturnStatement",argument:{type:"UnaryExpression",operator:"void",prefix:!0,argument:{type:"CallExpression",callee:h(e||E),arguments:[]}}}},_=C(S,[{type:"ReturnStatement",argument:{type:"CallExpression",callee:x?m(k):k,arguments:[h(E),pe.error]}}]);g&&_.body.body.unshift(g);for(var O=0;O<v.length;O++)y.treeWalker(v[O],l);v.push(i(o()));var T={type:"FunctionExpression",id:k,params:[h(E),pe.error],body:{type:"BlockStatement",body:[_]}};if("DoWhileStatement"===e.type)_.body.body=[{type:"IfStatement",test:i(d),consequent:{type:"BlockStatement",body:i(_.body.body)},alternate:{type:"ReturnStatement",argument:{type:"CallExpression",callee:h(E),arguments:[]}}}],T.body.body=[_].concat(v);else{var N={type:"IfStatement",test:i(d),consequent:{type:"BlockStatement",body:v},alternate:i(A())};T.body.body.push(N)}var P={type:"ExpressionStatement",expression:{type:"AwaitExpression",argument:m(T,b(0))}};for(!f||"VariableDeclaration"!==f.type||"let"!==f.kind&&"const"!==f.kind||("const"===f.kind&&(f.kind="let"),P={type:"BlockStatement",body:[i(f),P]},f=null),p=0;p<r.length;p++){var F=r[p];if("index"in F)return f?F.parent[F.field].splice(F.index,1,i(f),P):F.parent[F.field][F.index]=P,!0}}return!0},t),e}:o)(e),F(e),P(e),V(e,[M,r?o:W,B,R,$]),q(e,t),se(e),ue(e)}function C(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&&(ce[e]={def:n}),n}function _(e){return{type:"AwaitExpression",argument:H({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=y.part("$0.call($1)",[e,[{type:"ThisExpression"}].concat(t||[])]).expr;return e.$thisCall=n,n.$thisCallName=e.name,n}function O(e,t){return{type:"ReturnStatement",argument:L(e,t)}}function T(e,t){return{type:"CallExpression",callee:h(e.$seh+"Finally"),arguments:t?[t]:[]}}function N(e,t){if(Array.isArray(e))return e.map(function(e){return N(e,t)});var r=0,i=0;return y.treeWalker(e,function(e,t,s){if("ReturnStatement"!==e.type||e.$mapped){if("ThrowStatement"===e.type){var o=a(e).isAsync;if(r>0){if(!o)return t(e);delete e.async}return void(!o&&i?t():(e.type="ReturnStatement",e.$mapped=!0,e.argument={type:"CallExpression",callee:k(s,[n]).$error,arguments:[e.argument]}))}return"TryStatement"===e.type?(i++,t(e),void i--):a(e).isFunction?(r++,t(e),void r--):void t(e)}if(r>0){if(!a(e).isAsync)return t(e);delete e.async}return e.$mapped=!0,void(a(e.argument).isUnaryExpression&&"void"===e.argument.operator?e.argument=e.argument.argument:e.argument={type:"CallExpression",callee:k(s,[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&&(c(e.alternate)||c(e.consequent))){h(E("condOp"));s(e,_(y.part("if ($0) return $1 ; return $2",[e.test,e.consequent,e.alternate]).body))}},t),e)}function F(e,t){return Array.isArray(e)?e.map(function(e){return F(e,t)}):(y.treeWalker(e,function(e,t,n){if(t(),"LogicalExpression"===e.type&&c(e.right)){var r,i=h(E("logical"+("&&"===e.operator?"And":"Or")));if("||"===e.operator)r="var $0; if (!($0 = $1)) {$0 = $2} return $0";else{if("&&"!==e.operator)throw new Error(v(e)+"Illegal logical operator: "+e.operator);r="var $0; if ($0 = $1) {$0 = $2} return $0"}s(e,_(y.part(r,[i,e.left,e.right]).body))}},t),e)}function $(e,t,n){if("SwitchCase"!==e.type&&a(e).isBlockStatement)for(var r=0;r<e.body.length;){var i=e.body[r];if("SwitchCase"!==i.type&&a(i).isBlockStatement){if(ae(i.body))if(l(i)){var s=E(i),o=e.body.splice(r+1,e.body.length-(r+1));if(o.length){var u=C(s,o);delete ce[s],i.body.push(O(s)),e.body.push(u),r++}else r++}else r++;else e.body.splice.apply(e.body,[r,1].concat(i.body))}else r++}}function B(e,t,n){if("IfStatement"===e.type&&c([e.consequent,e.alternate])){var r=E(e),o=t[0],u={type:"BlockStatement",body:[e]};if("index"in o){var l=o.index,p=o.parent[o.field].splice(l+1,o.parent[o.field].length-(l+1));if(o.replace(u),p.length){var h=O(r);u.body.push(n(C(r,p))),[e.consequent,e.alternate].forEach(function(e){if(e){var t;(t=a(e).isBlockStatement?e.body[e.body.length-1]:e)&&"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||u.body.push(i(h))}}else o.parent[o.field]=u}}function R(e,t,n){if(!e.$switched&&"SwitchStatement"===e.type&&c(e.cases)){e.$switched=!0;var r,s,o,a=t[0];if("index"in a){var u=a.index+1;(o=a.parent[a.field].splice(u,a.parent[a.field].length-u)).length&&"BreakStatement"===o[o.length-1].type&&a.parent[a.field].push(o.pop()),r=E(e),s=O(r),a.parent[a.field].unshift(C(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(c(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(v(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 I(e){return"ReturnStatement"===e.type||"ThrowStatement"===e.type}function j(t,r){return y.treeWalker(t,function(t,i,s){if("TryStatement"===t.type&&!t.$seh&&(a(s[0].parent).isBlockStatement||(s[0].parent[s[0].field]={type:"BlockStatement",body:[t]}),t.$seh=E("Try")+"_",t.$containedAwait=!!c(t),t.$finallyExit=t.finalizer&&function(e){for(var t=0;t<e.length;t++)if(a(e[t].self).isFunction)return e[t].self.async||e[t].self.$wasAsync;return!1}(s)&&!!u(t.finalizer.body,I),t.$containedAwait||t.$finallyExit)){t.$needsMapping=!r||!t.$finallyExit;var o=k(s,[n]);if(t.finalizer&&!t.handler){var l=h(E("exception"));t.handler={type:"CatchClause",param:l,body:{type:"BlockStatement",body:[{type:"ThrowStatement",argument:l}]}}}if(!t.handler&&!t.finalizer){var p=new SyntaxError(v(t.value)+"try requires catch and/or finally clause",e.filename,t.start);throw p.pos=t.start,p.loc=t.loc.start,p}t.finalizer?(S(t.block,{$error:t.$seh+"Catch",$return:T(t,o.$return)}),S(t.handler,{$error:T(t,o.$error),$return:T(t,o.$return)})):S(t.block,{$error:t.$seh+"Catch",$return:o.$return})}i()}),t}function D(e,t){for(var n=0;n<e.length;n++)if(!a(e[n]).isDirective)return void e.splice.apply(e,[n,0].concat(t));e.splice.apply(e,[e.length,0].concat(t))}function M(t,r,s){if(t.$needsMapping){var o,a,u,c=r[0];if(!("index"in c))throw new Error(e.filename+" - malformed try/catch blocks");var l=c.index+1,p=c.parent[c.field].splice(l,c.parent[c.field].length-l);if(p.length){var f=s(g(a=t.$seh+"Post",p,[],k(r,[n]).$error));c.parent[c.field].splice(c.index,0,f),o=y.part("return $0()",[t.finalizer?T(t,h(a)):h(a)]).body[0]}else t.finalizer&&(o=O(T(t)));t.$mapped=!0,o&&(t.block.body.push(i(o)),t.handler.body.body.push(i(o)));var d=k(r,[n]);if(t.handler){var v=h(t.$seh+"Catch");u=i(t.handler.body);var b=g(v.name,u,[i(t.handler.param)],t.finalizer?T(t,d.$error):d.$error);t.handler.body.body=[{type:"CallExpression",callee:v,arguments:[i(t.handler.param)]}],c.parent[c.field].splice(c.index,0,b)}if(t.finalizer){s(t.finalizer);var x={exit:h(t.$seh+"Exit"),value:h(t.$seh+"Value"),body:i(t.finalizer.body)},w=y.part("(function ($value) { $:body; return $exit && ($exit.call(this, $value)); })",x).expr,E={type:"VariableDeclaration",kind:"var",declarations:[{type:"VariableDeclarator",id:h(t.$seh+"Finally"),init:m({type:"FunctionExpression",params:[x.exit],id:null,body:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:m(w,d.$error)}]}})}]};D(c.parent[c.field],[E]);var S=y.part("return $0()",[t.finalizer?T(t,h(a)):h(a)]).body[0];u.body[u.length-1]=S,t.block.body[t.block.body.length-1]=S,delete t.finalizer}}}function V(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 q(e,t,o){return y.treeWalker(e,function(e,u,l){if("IfStatement"==e.type&&("BlockStatement"!=e.consequent.type&&c(e.consequent)&&(e.consequent={type:"BlockStatement",body:[e.consequent]}),e.alternate&&"BlockStatement"!=e.alternate.type&&c(e.alternate)&&(e.alternate={type:"BlockStatement",body:[e.alternate]})),u(),a(e).isAwait){var p=e.loc;if(!(t=t||l.some(function(e){return e.self&&e.self.$wasAsync}))||"warn"===t){var f=v(e)+"'await' used inside non-async function. ";n.promises?f+="'return' value Promise runtime-specific":f+="'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(v(e.argument)+"'"+r(y)+"' on right of "+y.operator+" will always evaluate '"+r(e.argument)+"'"),"ConditionalExpression"===y.type&&y.test!==e&&d(v(e.argument)+"'"+r(y)+"' will always evaluate '"+r(e.argument)+"'");var g=h(E("await")),b=i(e.argument);s(e,g);for(var x,w,S=1;S<l.length;S++)if(w=a(l[S].self).isBlockStatement){x=l[S-1];break}if(!x)throw new Error(v(e)+"Illegal await not contained in a statement");var A,C,_=k(l,[o,n]),L=x.index,O=w.splice(L,w.length-L).slice(1);"ReturnStatement"===x.self.type&&"CallExpression"===x.self.argument.type&&1===x.self.argument.arguments.length&&x.self.argument.arguments[0].name===g.name?C=A=x.self.argument.callee:"Identifier"===x.self.type||x.self.name===g.name||"ExpressionStatement"===x.self.type&&"Identifier"===x.self.expression.type&&x.self.expression.name===g.name?A=O.length?{type:"FunctionExpression",params:[i(g)],body:q({type:"BlockStatement",body:i(O)},t,_)}:{type:"FunctionExpression",params:[],body:{type:"BlockStatement",body:[]}}:(O.unshift(x.self),A={type:"FunctionExpression",params:[i(g)],body:q({type:"BlockStatement",body:i(O)},t,_)}),C||(C=A?m(A,_.$error):{type:"FunctionExpression",params:[],body:{type:"BlockStatement",body:[]}}),n.wrapAwait&&(b={type:"CallExpression",arguments:[b],callee:n.promises||n.generators?{type:"MemberExpression",object:h("Promise"),property:h("resolve")}:{type:"MemberExpression",object:h("Object"),property:h("$makeThenable")}});var T={type:"CallExpression",callee:{type:"MemberExpression",object:b,property:h("then",p),computed:!1},arguments:[C,_.$error]};w.push({loc:p,type:"ReturnStatement",argument:T})}return!0}),e}function U(e,t){var n=e.$label;delete e.$label;var r=h(E("idx")),i=h(E("in")),o=y.part("var $0,$1 = [];for ($0 in $2) $1.push($0)",[r,i,e.right]).body,u=y.part("for ($0; $1.length;){ $2 = $1.shift(); $:3 ; }",[e.left,i,"VariableDeclaration"===e.left.type?e.left.declarations[0].id:e.left,e.body]).body[0];u.$label=n;for(var c=0;c<t.length;c++)if(a(t[c].parent).isBlockStatement){t[c].parent[t[c].field].splice(t[c].index,0,o[0],o[1]);break}s(e,u)}function z(e,t){"BlockStatement"!==e.body.type&&(e.body={type:"BlockStatement",body:[e.body]});var n,r,i=y.part("[$0[Symbol.iterator]()]",[e.right]).expr;if("VariableDeclaration"===e.left.type){"const"===e.left.kind&&(e.left.kind="let"),n=e.left.declarations[0].id;var s=te(e.left.declarations[0].id);r=h(E("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{var o={type:"VariableDeclaration",kind:"var",declarations:[{type:"VariableDeclarator",id:r=h(E("iterator_"+(n=e.left).name)),init:i}]};e.init=o}e.type="ForStatement",e.test=y.part("!($0[1] = $0[0].next()).done && (($1 = $0[1].value) || true)",[r,n]).expr,delete e.left,delete e.right}function W(e,t,r){var i=e.$depth;"ForInStatement"===e.type&&c(e)?U(e,t):"ForOfStatement"===e.type&&c(e)&&z(e);var s=t.some(function(e){return"$label"in e.self&&"ForStatement"===e.self.type&&e.self.$mapped});if(!e.$mapped&&a(e).isLoop&&u(e,function(e){return"AwaitExpression"===e.type&&!e.$hidden||s&&("BreakStatement"===e.type||"ContinueStatement"===e.type)&&e.label})){t[0].self.$mapped=!0;var o=[],l=e.init,p=e.test||b(!0),f=e.update,d=e.body;f&&(f={type:"ExpressionStatement",expression:f}),l&&(a(l).isStatement||(l={type:"ExpressionStatement",expression:l}),o.push(l));var m,g;e.$label?(g=e.$label.name,m=t[1]):(g=le++,m=t[0]);var v,x,w=h((g=n.generatedSymbolPrefix+"Loop_"+g)+"_trampoline"),E=h(g),S=f?h(g+"_step"):E,A=h(g+"_exit");h("q"),h("$exception");if("index"in m){var _=m.index;x=m.parent[m.field].splice(_+1,m.parent[m.field].length-(_+1))}else x=[];v=C(A,x);var L={type:"ReturnStatement",argument:E},O={type:"ReturnStatement",argument:S},T={type:"ReturnStatement",argument:{type:"ArrayExpression",elements:[b(1)]}};y.treeWalker(d,function(e,t,n){if(a(e).isFunction||a(e).isLoop)return!0;if("BreakStatement"===e.type||"ContinueStatement"===e.type)if(e.label)for(var r=n.filter(function(e){return"$label"in e.self}).map(function(e,t){return e.self.$label&&e.self.$label.name}),i=[],s=0;s<r.length;s++){if(r[s]===e.label.name){"BreakStatement"===e.type&&i.push(b(1)),n[0].replace({type:"ReturnStatement",argument:{type:"ArrayExpression",elements:i.reverse()}});break}i.push(b(0))}else"BreakStatement"===e.type?n[0].replace(T):n[0].replace(O);else t()},t),d="BlockStatement"===d.type?d.body.slice(0):[d],d="DoWhileStatement"===e.type?d.concat({type:"IfStatement",test:{type:"UnaryExpression",argument:p,prefix:!0,operator:"!"},consequent:T,alternate:O}):[{type:"IfStatement",test:p,consequent:{type:"BlockStatement",body:d.concat(O)},alternate:T}],n.noRuntime&&o.push({type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:w}],kind:"var"});var N,P=k(t,[n]).$error;N=n.noRuntime?y.part(n.es6target?"($idTrampoline = ((q) => { $$setMapped: while (q) { if (q.then) "+(1===i?" return void q.then($idTrampoline, $exit); ":" return q.then($idTrampoline, $exit); ")+" try { if (q.pop) if (q.length) return q.pop() ? $idContinuation.call(this) : q; else q = $idStep; else q = q.call(this) } catch (_exception) { return $exit(_exception); } } }))($idIter)":"($idTrampoline = (function (q) { $$setMapped: while (q) { if (q.then) "+(1===i?" return void q.then($idTrampoline, $exit); ":" return q.then($idTrampoline, $exit); ")+" try { if (q.pop) if (q.length) return q.pop() ? $idContinuation.call(this) : q; else q = $idStep; else q = q.call(this) } catch (_exception) { return $exit(_exception); } } }).bind(this))($idIter)",{setMapped:function(e){return e.$mapped=!0,e},idTrampoline:w,exit:P,idIter:E,idContinuation:A,idStep:S}).expr:y.part("(Function.$0.trampoline(this,$1,$2,$3,$5)($4))",[pe.asyncbind,A,S,P,E,b(1===i)]).expr,o.push({type:"ReturnStatement",argument:N}),o.push({$label:e.$label,type:"FunctionDeclaration",id:E,params:[],body:{type:"BlockStatement",body:d}}),f&&o.push({type:"FunctionDeclaration",id:S,params:[],body:{type:"BlockStatement",body:[f,L]}}),!l||"VariableDeclaration"!==l.type||"let"!==l.kind&&"const"!==l.kind?(o.push(v),t[0].replace(o.map(r))):("const"===l.kind&&(l.kind="let"),t[0].replace([{type:"BlockStatement",body:o.map(r)},r(v)]))}}function G(e){if(!a(e).isFunction)throw new Error("Cannot examine non-Function node types for async exits");return u(e.body,function(e){return"Identifier"===e.type&&(e.name===n.$return||e.name===n.$error)||I(e)&&a(e).isAsync},function(e){return!(a(e).isFunction&&(e.$wasAsync||a(e).isAsync))})}function J(t){return y.treeWalker(t,function(t,r,i){var s=x(t);if(r(),s&&a(s).isAsync){if("set"==t.kind){var o=new SyntaxError(v(s)+"method 'async set' cannot be invoked",e.filename,t.start);throw o.pos=t.start,o.loc=t.loc.start,o}s.async=!1;var u=w(s);G(s)||0!==s.body.body.length&&"ReturnStatement"===s.body.body[s.body.body.length-1].type||s.body.body.push({type:"ReturnStatement"});var c=m(S({type:"FunctionExpression",params:[pe.return,pe.error],body:J(N(s.body,i)),$wasAsync:!0},n),n.promises||n.generators||n.engine?null:b(!n.lazyThenables||0));n.promises?s.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"NewExpression",callee:h("Promise"),arguments:[c]}}]}:s.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:c}]},u&&D(s.body.body,[he])}})}function H(e){return y.treeWalker(e,function(e,t,r){if(t(),a(e).isAsync&&a(e).isFunction){var i;(i=x(r[0].parent))&&a(i).isAsync&&"get"===r[0].parent.kind&&X(r[0].parent.key),delete e.async;var s=w(e),o=S({type:"FunctionExpression",params:[pe.return,pe.error],$wasAsync:!0},n),u=[{self:o}].concat(r);return a(e.body).isBlockStatement?(G(e)||0!==e.body.body.length&&"ReturnStatement"===e.body.body[e.body.body.length-1].type||e.body.body.push({type:"ReturnStatement"}),o.body={type:"BlockStatement",body:e.body.body.map(function(e){return N(e,u)})}):(o.body={type:"BlockStatement",body:[N({type:"ReturnStatement",argument:e.body},u)]},e.expression=!1),o=m(o,n.promises||n.generators||n.engine?null:b(!n.lazyThenables||0)),n.promises&&(o={type:"NewExpression",callee:h("Promise"),arguments:[o]}),o={type:"BlockStatement",body:[{type:"ReturnStatement",loc:e.loc,argument:o}]},s&&D(o.body,[he]),void(e.body=o)}}),e}function Y(e){if(Array.isArray(e))return e.map(Y);var t=0;return y.treeWalker(e,function(e,n,r){if("ThrowStatement"!==e.type&&"ReturnStatement"!==e.type||e.$mapped){if(a(e).isFunction)return t++,n(e),void t--}else if(t>0&&a(e).isAsync)return delete e.async,e.argument={type:"CallExpression",callee:"ThrowStatement"===e.type?pe.error:pe.return,arguments:e.argument?[e.argument]:[]},void(e.type="ReturnStatement");n(e)})}function Q(e,t){if(n.noRuntime)throw new Error("Nodent: 'noRuntime' option only compatible with -promise and -engine modes");return y.part("{ return (function*($return,$error){ $:body }).$asyncspawn(Promise,this) }",{return:pe.return,error:pe.error,asyncspawn:pe.asyncspawn,body:Y(e).concat(t?[{type:"ReturnStatement",argument:pe.return}]:[])}).body[0]}function X(e){e.$asyncgetwarninig||(e.$asyncgetwarninig=!0,d(v(e)+"'async get "+r(e)+"(){...}' is non-standard. See https://github.com/MatAtBread/nodent#differences-from-the-es7-specification"))}function Z(e,t){function r(e,t){y.treeWalker(e,function(n,r,i){n!==e&&a(n).isFunction||(a(n).isAwait?t?(n.$hidden=!0,r()):(delete n.operator,n.delegate=!1,n.type="YieldExpression",r()):r())})}function o(e){var t=n.promises;n.promises=!0,A(e,!0),n.promises=t}function u(e){return"BlockStatement"!==e.body.type&&(e.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:e.body}]}),e}function c(e,n){n.$asyncexitwarninig||(n.$asyncexitwarninig=!0,d(v(e)+"'async "+{ReturnStatement:"return",ThrowStatement:"throw"}[e.type]+"' not possible in "+(t?"engine":"generator")+" mode. Using Promises for function at "+v(n)))}y.treeWalker(e,function(e,n,i){n();var l,p,h;if(a(e).isAsync&&a(e).isFunction){var f;(f=x(i[0].parent))&&a(f).isAsync&&"get"===i[0].parent.kind&&X(i[0].parent.key),(p=G(e))?(c(p,e.body),o(e)):t?"get"!==i[0].parent.kind&&r(e,!0):(delete(l=e).async,h=w(l),r(l,!1),(l=u(l)).body=Q(l.body.body,p),h&&D(l.body.body,[he]),l.id&&"ExpressionStatement"===i[0].parent.type?(l.type="FunctionDeclaration",i[1].replace(l)):i[0].replace(l))}else(l=x(e))&&a(l).isAsync&&((p=G(l))?(c(p,l),o(e)):t&&"get"!==e.kind||(t?o(e):(e.async=!1,h=w(l),r(l,!1),s(l,u(l)),l.body=Q(l.body.body,p)),h&&D(l.body.body,[he])))});var l=i(n);return n.engine=!1,n.generators=!1,ie(e),ne(e),j(e,l.engine),F(e),P(e),V(e,[M,W,B,R,$]),q(e,"warn"),n.engine=l.engine,n.generators=l.generators,e}function K(e,t,n){var r=[];return y.treeWalker(e,function(i,s,o){if(i===e)return s();t(i,o)?r.push([].concat(o)):n||a(i).isScope||s()}),r}function ee(e,t){var n=[],r={};if((e=e.filter(function(e){return"ExportNamedDeclaration"!==e[0].parent.type})).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(te(c.id).forEach(t),c.init){var l={type:"AssignmentExpression",left:i(c.id),operator:"=",right:i(c.init)};a.push(l)}}if(0==a.length)n.remove();else{var p=a.length>1?{type:"SequenceExpression",expressions:a}:a[0];"For"!==n.parent.type.slice(0,3)&&(p={type:"ExpressionStatement",expression:p}),n.replace(p)}});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 te(e){if(!e)return[];if(Array.isArray(e))return e.reduce(function(e,t){return e.concat(te(t.id))},[]);switch(e.type){case"Identifier":return[e.name];case"AssignmentPattern":return te(e.left);case"ArrayPattern":return e.elements.reduce(function(e,t){return e.concat(te(t))},[]);case"ObjectPattern":return e.properties.reduce(function(e,t){return e.concat(te(t))},[]);case"ObjectProperty":case"Property":return te(e.value);case"RestElement":case"RestProperty":return te(e.argument)}}function ne(e){function t(e){return u(e,function(e){return"AssignmentExpression"===e.type})}function n(e){return function(t,n){if("VariableDeclaration"===t.type&&(t.kind=t.kind||"var")&&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 o(e,t){return!("FunctionDeclaration"!==e.type||!e.id)&&(a(e).isAsync||!e.$continuation)}var l={TemplateLiteral:function(e){return e.expressions},NewExpression:function(e){return e.arguments},CallExpression:function(e){return e.arguments},SequenceExpression:function(e){return e.expressions},ArrayExpression:function(e){return e.elements},ObjectExpression:function(e){return e.properties.map(function(e){return e.value})}};y.treeWalker(e,function(e,n,r){function o(e){h.length&&(e.argument={type:"SequenceExpression",expressions:h.map(function(e){var t=i(e);return s(e,e.left),t}).concat(e.argument)},h=[])}var u;if(n(),e.type in l&&!e.$hoisted){var p=l[e.type](e),h=[];for(u=0;u<p.length;u++)if(!a(p[u]).isScope){if((r=c(p[u]))&&o(r[0].self),!c(p.slice(u+1)))break;(r=t(p[u]))&&h.push(r[0].self)}}else if("VariableDeclaration"===e.type)for(u=e.declarations.length-1;u>0;u--)if(e.declarations[u]&&e.declarations[u].init&&c(e.declarations[u].init)){var f={type:"VariableDeclaration",kind:e.kind,declarations:e.declarations.splice(u)},d=r[0];if(!("index"in d))throw new Error("VariableDeclaration not in a block");d.parent[d.field].splice(d.index+1,0,f)}}),function(e){function t(e){d(v(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=a(e).isBlockStatement;if(s){i=Object.create(i);for(var o=0;o<s.length;o++)if("VariableDeclaration"===s[o].type)for(var u=0;u<s[o].declarations.length;u++)te(s[o].declarations[u].id).forEach(function(e){i[e]=s[o].kind})}t(),"AssignmentExpression"===e.type?n(e.left):"UpdateExpression"===e.type&&n(e.argument),s&&(i=Object.getPrototypeOf(i))})}(e);var p=!1;return y.treeWalker(e,function(e,t,i){var s=p;if(p=p||oe(e),a(e).isBlockStatement){if(c(e)){var l,f,y,m,g;if(!i[0].parent||a(i[0].parent).isScope){var x={},w={};(f=K(e,n(["const"]),!1)).forEach(function(e){e[0].self.declarations.forEach(function(e){te(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&&!a(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=te(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})).length?e[0].self.declarations=i.map(function(e){return{type:"VariableDeclarator",id:h(e)}}):n.remove()}),y=K(e,n(["var"]),!1),m=[]}else m=K(e,n(["const"]),!0);m=m.concat(K(e,n(["let"]),!0)),l=K(e,function(e){return a(e).isDirective},!0),g=K(e,o,p),y=y?ee(y,"var"):{duplicates:{},decls:[]},m=m?ee(m,"let"):{duplicates:{},decls:[]},Object.keys(y.duplicates).forEach(function(e){d(v(y.duplicates[e])+"Duplicate declaration '"+r(y.duplicates[e])+"'")}),Object.keys(m.duplicates).forEach(function(e){d(v(m.duplicates[e])+"Duplicate declaration '"+r(m.duplicates[e])+"'")}),g=g.map(function(e){var t,n=e[0];if(a(n.self).isAsync)return t=n.self.id.name,a(n.parent).isBlockStatement?(n.self.type="FunctionDeclaration",n.remove(),n.self):n.replace(h(t));t=n.self.id.name;return"FunctionDeclaration"===n.self.type?n.remove():n.replace(h(t))}),((l=l.map(function(e){return e[0].remove()})).length||y.decls.length||m.decls.length||g.length)&&(e.body=l.concat(y.decls).concat(m.decls).concat(g).concat(e.body))}p=s}if("LabeledStatement"===e.type&&"BlockStatement"===e.body.type&&c(e.body)&&u(e.body,function(e){return"BreakStatement"===e.type&&e.label})&&(e.body.body.push({type:"BreakStatement"}),e.body={type:"DoWhileStatement",test:b(0),body:e.body}),t(),"ForOfStatement"===e.type||"ForInStatement"===e.type||a(e).isLoop){for(var E=0,S=0;S<i.length;S++)if("ForOfStatement"===i[S].self.type||"ForInStatement"===i[S].self.type||a(i[S].self).isLoop)E+=1;else if(a(i[S].self).isFunction)break;e.$depth=E,"LabeledStatement"===i[0].parent.type?e.$label=i[0].parent.label:e.$label=null}return!0}),e}function re(e,t){return y.treeWalker(e,function(e,r,i){if(r(),("ClassDeclaration"===e.type||"ClassExpression"===e.type)&&(e.body.body.forEach(function(e,t){function n(){return e.$superID=e.$superID||h("$super$"+le++)}return function(e){(e=x(e))&&a(e).isAsync&&(!t||"get"===e.kind||u(e,function(e){return a(e).isFunction&&u(e,function(e){return"Super"===e.type})&&u(e,function(e){return e.async&&("ReturnStatement"===e.type||"ThrowStatement"===e.type)})},!0))&&y.treeWalker(e.body,function(e,t,r){var i;a(e).isClass||(t(),"Super"===e.type&&("MemberExpression"===r[0].parent.type?"CallExpression"===r[1].parent.type&&"callee"===r[1].field?(i=y.part("this.$super($field).call(this,$args)",{super:n(),field:r[0].parent.computed?r[0].parent.property:b(r[0].parent.property.name),args:r[1].parent.arguments}).expr,r[2].replace(i)):(i=y.part("this.$super($field)",{super:n(),field:r[0].parent.computed?r[0].parent.property:b(r[0].parent.property.name)}).expr,r[1].replace(i)):d(v(e)+"'super' in async methods must be deferenced. 'async constructor()'/'await super()' not valid.")))})}}(e,t)),e.$superID)){var s=y.part("(function($field) { return super[$field] })",{field:h("$field")}).expr;n.babelTree?(s.type="ClassMethod",s.key=e.$superID,s.kind="method",e.body.body.push(s)):e.body.body.push({type:"MethodDefinition",key:e.$superID,kind:"method",value:s})}})}function ie(e){return y.treeWalker(e,function(e,t,n){return c(e)&&"ArrowFunctionExpression"===e.type&&"BlockStatement"!==e.body.type&&(e.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:e.body}]}),t(),!0}),e}function se(e){return y.treeWalker(e,function(e,t,r){t(),"Identifier"===e.type&&"__nodent"===e.name&&s(e,b(n))}),e}function oe(e){if("Program"===e.type&&"module"===e.sourceType)return!0;var t;if("Program"===e.type)t=e.body;else{if(!a(e).isFunction)return!1;t=e.body.body}if(t)for(var n=0;n<t.length;n++)if(a(t[n]).isDirective&&t[n].expression.value.match(/^\s*use\s+strict\s*$/))return!0;return!1}function ae(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 ue(e){y.treeWalker(e,function(e,t,n){if(t(),"ArrowFunctionExpression"===e.type&&"BlockStatement"===e.body.type&&1===e.body.body.length&&"ReturnStatement"===e.body.body[0].type)e.body=e.body.body[0].argument;else{var r,i;if(r=a(e).isBlockStatement)for(var s=0;s<r.length;s++)(i=a(r[s]).isBlockStatement)&&!ae(i)&&(ae(r[s])||[].splice.apply(r,[s,1].concat(i)))}}),y.treeWalker(e,function(e,t,n){if(t(),a(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||a(s[i]).isFunction&&s[i].id?i+=1:s.splice(i,1)}}),y.treeWalker(e,function(e,t,n){t(),e.$thisCall&&ce[e.name]&&(ce[e.name].ref?delete ce[e.name]:ce[e.name].ref=e.$thisCall)});var t=Object.keys(ce).map(function(e){return ce[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,o=i(ce[s].def.body.body);ce[s].$inlined=!0,a(r[1].self).isJump||o.push({type:"ReturnStatement"}),r[1].replace(o)}});var n=Object.keys(ce).map(function(e){return ce[e].$inlined&&ce[e].def});y.treeWalker(e,function(e,t,r){t(),n.indexOf(e)>=0&&r[0].remove()})}if(!("Program"===e.type&&"module"===e.sourceType||u(e,function(e){return a(e).isES6},!0))){var r=oe(e);!function(e){y.treeWalker(e,function(e,t,n){if("Program"===e.type||"FunctionDeclaration"===e.type||"FunctionExpression"===e.type){var i=r;if(r=r||oe(e)){t();var s="Program"===e.type?e:e.body,o=K(s,function(e,t){if("FunctionDeclaration"===e.type)return t[0].parent!==s});o=o.map(function(e){return e[0].remove()}),[].push.apply(s.body,o)}else t();r=i}else t()})}(e)}return y.treeWalker(e,function(e,t,n){t(),Object.keys(e).filter(function(e){return"$"===e[0]}).forEach(function(t){delete e[t]})}),e}var ce={},le=1,pe={};Object.keys(n).filter(function(e){return"$"===e[0]}).forEach(function(e){pe[e.slice(1)]=h(n[e])});var he=y.part("var $0 = arguments",[pe.arguments]).body[0];return n.engine?(e.ast=re(e.ast,!0),e.ast=Z(e.ast,n.engine),e.ast=se(e.ast),ue(e.ast)):n.generators?(e.ast=re(e.ast),e.ast=Z(e.ast),e.ast=se(e.ast),ue(e.ast)):(e.ast=re(e.ast),A(e.ast)),n.babelTree&&y.treeWalker(e.ast,function(e,t,n){t(),"Literal"===e.type&&s(e,b(e.value))}),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={printNode:r,babelLiteralNode:p,asynchronize:function(e,t,n,r){try{return d(e,0,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":12,"./parser":13}],12:[function(e,t,n){"use strict";function r(e){if("NewExpression"===e.type&&e.arguments&&e.arguments.length)return 19;var t=h[e.type]||h[e.type+e.operator]||h[e.type+e.operator+(e.prefix?"prefix":"")];return void 0!==t?t:20}var i,s,o,a,u,c,l=e("source-map").SourceMapGenerator;if("".repeat)c=function(e,t){return t&&e?e.repeat(t):""};else{var p={};c=function(e,t){if(!t||!e)return"";var n=""+e+t;if(!p[n]){for(var r=[];t--;)r.push(e);p[n]=r.join("")}return p[n]}}var h={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},f={type:"comma-separated-list"},d={out:function(e,t,n){var r=this[n||e.type];r?r.call(this,e,t):t.write(e,"/*"+e.type+"?*/ "+t.sourceAt(e.start,e.end))},expr:function(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)},argumentList:function(e,t){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,f,n[i]);t.write(null,")")},formatParameters:function(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,") ")},Program:function(e,t){for(var n,r,i=c(t.indent,t.indentLevel),s=t.lineEnd,o=0,a=(n=e.body).length;o<a;o++)r=n[o],t.write(null,i),this.out(r,t,r.type),t.write(null,s)},BlockStatement:u=function(e,t){var n,r,i=c(t.indent,t.indentLevel++),s=t.lineEnd,o=i+t.indent;if(t.write(e,"{"),null!=(n=e.body)&&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:u,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,c(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,c(t.indent,t.indentLevel)),t.write(null," else "),"BlockStatement"!==e.alternate.type&&"IfStatement"!==e.alternate.type&&t.write(null,t.lineEnd,c(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=c(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 l=e.cases,p=0;p<l.length;p++){(n=l[p]).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 h=0;h<r.length;h++)i=r[h],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){t.write(e,"try "),this.out(e.block,t,e.block.type),e.handler&&this.out(e.handler,t,e.handler.type),e.finalizer&&(t.write(e.finalizer," finally "),this.out(e.finalizer,t,e.finalizer.type))},CatchClause:function(e,t){t.write(e," catch ("),this.out(e.param,t,e.param.type),t.write(null,") "),this.out(e.body,t,e.body.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,c(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,c(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,c(t.indent,t.indentLevel+1)),this.out(e.body,t,e.body.type)},ForInStatement:i=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,c(t.indent,t.indentLevel+1)),this.out(e.body,t,e.body.type)},ForOfStatement:i,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,c(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,f,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){t.write(e,"import ");var n=e.specifiers,r=n.length,i=!0;if(r>0){for(var s=0;s<r;s++)"ImportSpecifier"===n[s].type&&i&&(i=!1,t.write(null,"{")),this.out(n[s],t,n[s].type),s<r-1&&t.write(null,", ");"ImportSpecifier"===n[r-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 "),1===e.params.length&&"Identifier"===e.params[0].type?(this.out(e.params[0],t,e.params[0].type),t.write(e," => ")):(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:s=function(e,t){t.write(e,"..."),this.out(e.argument,t,e.argument.type)},SpreadElement:s,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:a=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,f,s),((i+=1)<r||null===s)&&t.write(null,","),i>=r)break;t.lineLength()>t.wrapColumn&&t.write(null,t.lineEnd,c(t.indent,t.indentLevel+1))}t.write(null,"]")},ArrayPattern:a,ObjectExpression:function(e,t){var n,r=c(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,c(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,f,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,f,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:o=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:o,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.expr(t,e,e.callee,"CallExpression"===e.callee.type||"ObjectExpression"===e.callee.type?2:0),this.argumentList(e,t)},CallExpression:function(e,t){this.expr(t,e,e.callee,"ObjectExpression"===e.callee.type?2:0),this.argumentList(e,t)},MemberExpression:function(e,t){!("ObjectExpression"===e.object.type||e.object.type.match(/Literal$/)&&e.object.raw&&e.object.raw.match(/^[0-9]/))&&("ArrayExpression"===e.object.type||"CallExpression"===e.object.type||"NewExpression"===e.object.type||r(e)<=r(e.object))?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){var r="",i=[],s=(t=t||{}).map&&new l(t.map);s&&t.map.sourceContent&&s.setSourceContent(t.map.file,t.map.sourceContent);var o="",a=[],u=[],p={inForInit:0,lineLength:function(){return r.length},sourceAt:function(e,t){return n?n.substring(e,t):"/* Omitted Non-standard node */"},write:function(e){o=arguments[arguments.length-1];for(var n=1;n<arguments.length;n++)if(s&&e&&e.loc&&e.loc.start&&s.addMapping({source:t.map.file,original:{line:e.loc.start.line,column:e.loc.start.column},generated:{line:t.map.startLine+i.length+1,column:r.length}}),arguments[n]===p.lineEnd){if(u.length&&(u.forEach(function(e){"Line"===e.type?r+=" // "+e.value:((" /*"+e.value+"*/").split("\n").forEach(function(e){r+=e,i.push(r),r=""}),r=i.pop())}),u=[]),i.push(r),r="",a.length){var l=i.pop();a.forEach(function(e){var t=c(p.indent,e.indent);"Line"===e.type?i.push(t+"//"+e.value):(t+"/*"+e.value+"*/").split("\n").forEach(function(e){i.push(e)})}),i.push(l),a=[]}}else r+=arguments[n],e&&e.$comments&&(e.$comments.forEach(function(t){var n=e.loc.start.column<t.loc.start.column;t.indent=p.indentLevel,n?u.push(t):a.push(t)}),e.$comments=null)},back:function(){r=r.substring(0,r.length-o.length)},indent:" ",lineEnd:"\n",indentLevel:0,wrapColumn:80};d.out(e,p),u=e.$comments||[],p.write(e,p.lineEnd);var h=i.join(p.lineEnd);return t&&t.map?{code:h,map:s}:h}},{"source-map":24}],13:[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=u.replace,e.append=u.append,e.index?(Object.defineProperties(e,{index:{enumerable:!0,get:u.index}}),e.remove=u.removeElement):e.remove=u.removeNode,n.unshift(e),i(e.self,t,n),n.shift()}return n||((n=[{self:e}]).replace=function(e,t){n[e].replace(t)}),t(e,function(){e.type in a&&a[e.type](e,n,function t(i,s,o){if(i===e)return a[o||e.type](e,n,t);for(var u=Object.keys(e),c=0;c<u.length;c++){var l=e[u[c]];Array.isArray(l)?l.indexOf(i)>=0&&r({self:i,parent:e,field:u[c],index:!0}):l instanceof Object&&i===l&&r({self:i,parent:e,field:u[c]})}})},n),e}function s(t,n){var r=[],s={ecmaVersion:8,allowHashBang:!0,allowReturnOutsideFunction:!0,allowImportExportEverywhere:!0,locations:!0,onComment:r};if((!n||!n.noNodentExtensions||parseInt(o.version)<4)&&(c||(parseInt(o.version)<4&&console.warn("Nodent: Warning - noNodentExtensions option requires acorn >=v4.x. Extensions installed."),e("acorn-es7-plugin")(o),c=!0),s.plugins=s.plugins||{},s.plugins.asyncawait={asyncExits:!0,awaitAnywhere:!0}),n)for(var a in n)"noNodentExtensions"!==a&&(s[a]=n[a]);var u=o.parse(t,s);return i(u,function(e,t,n){for(t();r.length&&e.loc&&e.loc.start.line>=r[0].loc.start.line&&e.loc.end.line>=r[0].loc.end.line;)e.$comments=e.$comments||[],e.$comments.push(r.shift())}),u}var o=e("acorn"),a=e("acorn/dist/walk").make({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)},ObjectPattern:function(e,t,n){for(var r=0,i=e.properties;r<i.length;r+=1)n(i[r],t,"Property")},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")}}),u={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}},c=!1,l={};t.exports={part:function(e,t){function n(e,r){if(Array.isArray(r)&&!Array.isArray(e))throw new Error("Can't substitute an array for a node");return r=r||{},Object.keys(e).forEach(function(i){if(!(e[i]instanceof Object))return r[i]=e[i];if(Array.isArray(e[i]))return r[i]=n(e[i],[]);var s;if(s=Array.isArray(r)?function(e){return"function"==typeof e&&(e=e()),r=r.concat(e)}:function(e){return"function"==typeof e&&(e=e()),r[i]=e,r},"Identifier"===e[i].type&&"$"===e[i].name[0])return s(t[e[i].name.slice(1)]);if("LabeledStatement"===e[i].type&&"$"===e[i].label.name){var o=e[i].body.expression;return s(t[o.name||o.value])}return"LabeledStatement"===e[i].type&&"$$"===e[i].label.name.slice(0,2)?s(t[e[i].label.name.slice(2)](n(e[i]).body)):s(n(e[i]))}),r}l[e]||(l[e]=s(e,{noNodentExtensions:!0,locations:!1,ranges:!1,onComment:null}));var r=n(l[e]);return{body:r.body,expr:"ExpressionStatement"===r.body[0].type?r.body[0].expression:null}},parse:s,treeWalker:i}},{acorn:4,"acorn-es7-plugin":1,"acorn/dist/walk":5}],14:[function(e,t,n){function r(){this._array=[],this._set=o?new Map:Object.create(null)}var i=e("./util"),s=Object.prototype.hasOwnProperty,o="undefined"!=typeof Map;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 o?this._set.size:Object.getOwnPropertyNames(this._set).length},r.prototype.add=function(e,t){var n=o?e:i.toSetString(e),r=o?this.has(e):s.call(this._set,n),a=this._array.length;r&&!t||this._array.push(e),r||(o?this._set.set(e,a):this._set[n]=a)},r.prototype.has=function(e){if(o)return this._set.has(e);var t=i.toSetString(e);return s.call(this._set,t)},r.prototype.indexOf=function(e){if(o){var t=this._set.get(e);if(t>=0)return t}else{var n=i.toSetString(e);if(s.call(this._set,n))return this._set[n]}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":23}],15:[function(e,t,n){var r=e("./base64");n.encode=function(e){var t,n="",i=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&i,(i>>>=5)>0&&(t|=32),n+=r.encode(t)}while(i>0);return n},n.decode=function(e,t,n){var i,s,o=e.length,a=0,u=0;do{if(t>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(s=r.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));i=!!(32&s),a+=(s&=31)<<u,u+=5}while(i);n.value=function(e){var t=e>>1;return 1==(1&e)?-t:t}(a),n.rest=t}},{"./base64":16}],16:[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){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}},{}],17:[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}},{}],18:[function(e,t,n){function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=e("./util");r.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},r.prototype.add=function(e){!function(e,t){var n=e.generatedLine,r=t.generatedLine,s=e.generatedColumn,o=t.generatedColumn;return r>n||r==n&&o>=s||i.compareByGeneratedPositionsInflated(e,t)<=0}(this._last,e)?(this._sorted=!1,this._array.push(e)):(this._last=e,this._array.push(e))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=r},{"./util":23}],19:[function(e,t,n){function r(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function i(e,t,n,s){if(n<s){var o=n-1;r(e,function(e,t){return Math.round(e+Math.random()*(t-e))}(n,s),s);for(var a=e[s],u=n;u<s;u++)t(e[u],a)<=0&&r(e,o+=1,u);r(e,o+1,u);var c=o+1;i(e,t,n,c-1),i(e,t,c+1,s)}}n.quickSort=function(e,t){i(e,t,0,e.length-1)}},{}],20:[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(String).map(a.normalize).map(function(e){return s&&a.isAbsolute(s)&&a.isAbsolute(e)?a.relative(s,e):e}),this._names=c.fromArray(i.map(String),!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;switch(n||r.GENERATED_ORDER){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 o=this.sourceRoot;i.map(function(e){var t=null===e.source?null:this._sources.at(e.source);return null!=t&&null!=o&&(t=a.join(o,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)).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).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};var n={source:t=this._sources.indexOf(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)).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||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].consumer.sourceContentFor(e,!0);if(r)return r}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(-1!==n.consumer.sources.indexOf(a.getArg(e,"source"))){var r=n.consumer.generatedPositionFor(e);if(r){return{line:r.line+(n.generatedOffset.generatedLine-1),column:r.column+(n.generatedOffset.generatedLine===r.line?n.generatedOffset.generatedColumn-1:0)}}}}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":14,"./base64-vlq":15,"./binary-search":17,"./quick-sort":19,"./util":23}],21:[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&&(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=s.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),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(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||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,a=1,u=0,c=0,l=0,p=0,h="",f=this._mappings.toArray(),d=0,y=f.length;d<y;d++){if(t=f[d],e="",t.generatedLine!==a)for(o=0;t.generatedLine!==a;)e+=";",a++;else if(d>0){if(!s.compareByGeneratedPositionsInflated(t,f[d-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-c),c=t.originalLine-1,e+=i.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=i.encode(n-l),l=n)),h+=e}return h},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":14,"./base64-vlq":15,"./mapping-list":18,"./util":23}],22:[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[a]=!0,null!=r&&this.add(r)}var i=e("./source-map-generator").SourceMapGenerator,s=e("./util"),o=/(\r?\n)/,a="$$$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=0,l=function(){function e(){return c<u.length?u[c++]:void 0}return e()+(e()||"")},p=1,h=0,f=null;return t.eachMapping(function(e){if(null!==f){if(!(p<e.generatedLine)){var t=(n=u[c]).substr(0,e.generatedColumn-h);return u[c]=n.substr(e.generatedColumn-h),h=e.generatedColumn,i(f,t),void(f=e)}i(f,l()),p++,h=0}for(;p<e.generatedLine;)a.add(l()),p++;if(h<e.generatedColumn){var n=u[c];a.add(n.substr(0,e.generatedColumn)),u[c]=n.substr(e.generatedColumn),h=e.generatedColumn}f=e},this),c<u.length&&(f&&i(f,l()),a.add(u.splice(c).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[a]&&"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[a]&&"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])[a]?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[a]?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][a]&&this.children[t].walkSourceContents(e);var r=Object.keys(this.sourceContents);for(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,a=null,u=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&&a===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}),s=i.source,o=i.line,a=i.column,u=i.name,r=!0):r&&(n.addMapping({generated:{line:t.line,column:t.column}}),s=null,r=!1);for(var c=0,l=e.length;c<l;c++)10===e.charCodeAt(c)?(t.line++,t.column=0,c+1===l?(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":21,"./util":23}],23:[function(e,t,n){function r(e){var t=e.match(c);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function i(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 s(e){var t=e,s=r(e);if(s){if(!s.path)return e;t=s.path}for(var o,a=n.isAbsolute(t),u=t.split(/\/+/),c=0,l=u.length-1;l>=0;l--)"."===(o=u[l])?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=a?"/":"."),s?(s.path=t,i(s)):t}function o(e){return e}function a(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 u(e,t){return e===t?0:e>t?1:-1}n.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var c=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,l=/^data:.+\,.+$/;n.urlParse=r,n.urlGenerate=i,n.normalize=s,n.join=function(e,t){""===e&&(e="."),""===t&&(t=".");var n=r(t),o=r(e);if(o&&(e=o.path||"/"),n&&!n.scheme)return o&&(n.scheme=o.scheme),i(n);if(n||t.match(l))return t;if(o&&!o.host&&!o.path)return o.host=t,i(o);var a="/"===t.charAt(0)?t:s(e.replace(/\/+$/,"")+"/"+t);return o?(o.path=a,i(o)):a},n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(c)},n.relative=function(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)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var p=!("__proto__"in Object.create(null));n.toSetString=p?o:function(e){return a(e)?"$"+e:e},n.fromSetString=p?o:function(e){return a(e)?e.slice(1):e},n.compareByOriginalPositions=function(e,t,n){var r=e.source-t.source;return 0!==r?r:0!=(r=e.originalLine-t.originalLine)?r:0!=(r=e.originalColumn-t.originalColumn)||n?r:0!=(r=e.generatedColumn-t.generatedColumn)?r:0!=(r=e.generatedLine-t.generatedLine)?r:e.name-t.name},n.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!=(r=e.generatedColumn-t.generatedColumn)||n?r:0!=(r=e.source-t.source)?r:0!=(r=e.originalLine-t.originalLine)?r:0!=(r=e.originalColumn-t.originalColumn)?r:e.name-t.name},n.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!=(n=e.generatedColumn-t.generatedColumn)?n:0!==(n=u(e.source,t.source))?n:0!=(n=e.originalLine-t.originalLine)?n:0!=(n=e.originalColumn-t.originalColumn)?n:u(e.name,t.name)}},{}],24:[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":20,"./lib/source-map-generator":21,"./lib/source-node":22}],25:[function(e,t,n){t.exports={_args:[[{raw:"nodent-compiler@>=3.1.5",scope:null,escapedName:"nodent-compiler",name:"nodent-compiler",rawSpec:">=3.1.5",spec:">=3.1.5",type:"range"},"/Users/evgenypoberezkin/Documents/JSON/ajv/node_modules/nodent"]],_from:"nodent-compiler@>=3.1.5",_id:"nodent-compiler@3.1.5",_inCache:!0,_location:"/nodent-compiler",_nodeVersion:"8.9.1",_npmOperationalInternal:{host:"s3://npm-registry-packages",tmp:"tmp/nodent-compiler-3.1.5.tgz_1511792299537_0.15715787676163018"},_npmUser:{name:"matatbread",email:"npm@mailed.me.uk"},_npmVersion:"5.5.1",_phantomChildren:{},_requested:{raw:"nodent-compiler@>=3.1.5",scope:null,escapedName:"nodent-compiler",name:"nodent-compiler",rawSpec:">=3.1.5",spec:">=3.1.5",type:"range"},_requiredBy:["/nodent"],_resolved:"https://registry.npmjs.org/nodent-compiler/-/nodent-compiler-3.1.5.tgz",_shasum:"8c09289eacf7256bda89c2b88941681d5cccf80c",_shrinkwrap:null,_spec:"nodent-compiler@>=3.1.5",_where:"/Users/evgenypoberezkin/Documents/JSON/ajv/node_modules/nodent",author:{name:"Mat At Bread",email:"nodent@mailed.me.uk"},bugs:{url:"https://github.com/MatAtBread/nodent/issues"},dependencies:{acorn:">=2.5.2","acorn-es7-plugin":">=1.1.6","source-map":"^0.5.6"},description:"NoDent - Asynchronous Javascript language extensions",devDependencies:{},directories:{},dist:{integrity:"sha512-Istg796un2lALiy/eFNnLbAEMovQqrtpVqXVY8PKs6ycsyBbK480D55misJBQ1QxvstcJ7Hk9xbSVkV8lIi+tg==",shasum:"8c09289eacf7256bda89c2b88941681d5cccf80c",tarball:"https://registry.npmjs.org/nodent-compiler/-/nodent-compiler-3.1.5.tgz"},engines:"node >= 0.10.0",gitHead:"93054f019902e2b107e7be681836273f35a02614",homepage:"https://github.com/MatAtBread/nodent-compiler#readme",keywords:["Javascript","ES7","async","await","language","extensions","Node","callback","generator","Promise","asynchronous"],license:"BSD-2-Clause",main:"compiler.js",maintainers:[{name:"matatbread",email:"npm@mailed.me.uk"}],name:"nodent-compiler",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+https://github.com/MatAtBread/nodent-compiler.git"},scripts:{test:"node tests/basic.js # Please install 'nodent' and test the compiler fully from there."},version:"3.1.5"}},{}],26:[function(e,t,n){"use strict";function r(e,t){if(Function.prototype.$asyncspawn||Object.defineProperty(Function.prototype,"$asyncspawn",{value:r,enumerable:!1,configurable:!0,writable:!0}),this instanceof Function){var n=this;return new e(function(e,r){function i(t,n){var o;try{if((o=t.call(s,n)).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=function(e,t){for(var n=t.toString(),r="return "+n,i=n.match(/.*\(([^)]*)\)/)[1],s=/['"]!!!([^'"]*)['"]/g,o=[];;){var a=s.exec(r);if(!a)break;o.push(a)}return o.reverse().forEach(function(t){r=r.slice(0,t.index)+e[t[1]]+r.substr(t.index+t[0].length)}),r=r.replace(/\/\*[^*]*\*\//g," ").replace(/\s+/g," "),new Function(i,r)()}({zousan:e("./zousan").toString(),thenable:e("./thenableFactory").toString()},function e(t,n){function r(){return i.apply(t,arguments)}Function.prototype.$asyncbind||Object.defineProperty(Function.prototype,"$asyncbind",{value:e,enumerable:!1,configurable:!0,writable:!0}),e.trampoline||(e.trampoline=function(e,t,n,r,i){return function s(o){for(;o;){if(o.then)return o=o.then(s,r),i?void 0:o;try{if(o.pop){if(o.length)return o.pop()?t.call(e):o;o=n}else o=o.call(e)}catch(e){return r(e)}}}}),e.LazyThenable||(e.LazyThenable="!!!thenable"(),e.EagerThenable=e.Thenable=(e.EagerThenableFactory="!!!zousan")());var i=this;switch(n){case!0:return new e.Thenable(r);case 0:return new e.LazyThenable(r);case void 0:return r.then=r,r;default:return function(){try{return i.apply(t,arguments)}catch(e){return n(e)}}}});i(),r(),t.exports={$asyncbind:i,$asyncspawn:r}},{"./thenableFactory":27,"./zousan":28}],27:[function(e,t,n){t.exports=function(){function e(e){return e&&e instanceof Object&&"function"==typeof e.then}function t(n,r,i){try{var s=i?i(r):r;if(n===s)return n.reject(new TypeError("Promise resolution loop"));e(s)?s.then(function(e){t(n,e)},function(e){n.reject(e)}):n.resolve(s)}catch(e){n.reject(e)}}function n(){}function r(e){}function i(r,i){var s=new n;try{this._resolver(function(n){return e(n)?n.then(r,i):t(s,n,r)},function(e){t(s,e,i)})}catch(e){t(s,e,i)}return s}function s(e){this._resolver=e,this.then=i}return n.prototype={resolve:r,reject:r,then:function(e,t){this.resolve=e,this.reject=t}},s.resolve=function(e){return s.isThenable(e)?e:{then:function(t){return t(e)}}},s.isThenable=e,s}},{}],28:[function(e,t,n){(function(e){"use strict";t.exports=function(t){function n(e){if(e){var t=this;e(function(e){t.resolve(e)},function(e){t.reject(e)})}}function r(e,t){if("function"==typeof e.y)try{var n=e.y.call(void 0,t);e.p.resolve(n)}catch(t){e.p.reject(t)}else e.p.resolve(t)}function i(e,t){if("function"==typeof e.n)try{var n=e.n.call(void 0,t);e.p.resolve(n)}catch(t){e.p.reject(t)}else e.p.reject(t)}t=t||"object"==typeof e&&e.nextTick||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,0)};var s=function(){function e(){for(;n.length-r;){try{n[r]()}catch(e){}n[r++]=void 0,r===i&&(n.splice(0,i),r=0)}}var n=[],r=0,i=1024;return function(i){n.push(i),n.length-r==1&&t(e)}}();return n.prototype={resolve:function(e){if(void 0===this.state){if(e===this)return this.reject(new TypeError("Attempt to resolve promise with self"));var t=this;if(e&&("function"==typeof e||"object"==typeof e))try{var n=0,i=e.then;if("function"==typeof i)return void i.call(e,function(e){n++||t.resolve(e)},function(e){n++||t.reject(e)})}catch(e){return void(n||this.reject(e))}this.state=r,this.v=e,t.c&&s(function(){for(var n=0,i=t.c.length;n<i;n++)r(t.c[n],e)})}},reject:function(e){if(void 0===this.state){this.state=i,this.v=e;var t=this.c;t&&s(function(){for(var n=0,r=t.length;n<r;n++)i(t[n],e)})}},then:function(e,t){var r=new n,i={y:e,n:t,p:r};if(void 0===this.state)this.c?this.c.push(i):this.c=[i];else{var o=this.state,a=this.v;s(function(){o(i,a)})}return r}},n.resolve=function(e){if(e&&e instanceof n)return e;var t=new n;return t.resolve(e),t},n.reject=function(e){if(e&&e instanceof n)return e;var t=new n;return t.reject(e),t},n.version="2.3.3-nodent",n}}).call(this,e("_process"))},{_process:32}],29:[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]=[],i[o=0].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")}},{}],30:[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("/"))||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}var c=[];for(u=a;u<i.length;u++)c.push("..");return(c=c.concat(s.slice(a))).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:32}],31:[function(e,t,n){(function(e){"use strict";var n="win32"===e.platform,r=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,i=/^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/,s={};s.parse=function(e){if("string"!=typeof e)throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=function(e){var t=r.exec(e),n=(t[1]||"")+(t[2]||""),s=t[3]||"",o=i.exec(s);return[n,o[1],o[2],o[3]]}(e);if(!t||4!==t.length)throw new TypeError("Invalid path '"+e+"'");return{root:t[0],dir:t[0]+t[1].slice(0,-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}};var o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a={};a.parse=function(e){if("string"!=typeof e)throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=function(e){return o.exec(e).slice(1)}(e);if(!t||4!==t.length)throw new TypeError("Invalid path '"+e+"'");return t[1]=t[1]||"",t[2]=t[2]||"",t[3]=t[3]||"",{root:t[0],dir:t[0]+t[1].slice(0,-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}},t.exports=n?s.parse:a.parse,t.exports.posix=a.parse,t.exports.win32=s.parse}).call(this,e("_process"))},{_process:32}],32:[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(l===setTimeout)return setTimeout(e,0);if((l===r||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function o(){y&&f&&(y=!1,f.length?d=f.concat(d):m=-1,d.length&&a())}function a(){if(!y){var e=s(o);y=!0;for(var t=d.length;t;){for(f=d,d=[];++m<t;)f&&f[m].run();m=-1,t=d.length}f=null,y=!1,function(e){if(p===clearTimeout)return clearTimeout(e);if((p===i||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var l,p,h=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:r}catch(e){l=r}try{p="function"==typeof clearTimeout?clearTimeout:i}catch(e){p=i}}();var f,d=[],y=!1,m=-1;h.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];d.push(new u(e,t)),1!==d.length||y||s(a)},u.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.prependListener=c,h.prependOnceListener=c,h.listeners=function(e){return[]},h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},{}],33:[function(e,t,n){var r=e("./lib/core"),i=e("./lib/async");i.core=r,i.isCore=function(e){return r[e]},i.sync=e("./lib/sync"),t.exports=i},{"./lib/async":34,"./lib/core":37,"./lib/sync":39}],34:[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");t.exports=function(e,t,u){function c(t,n,r){t?d(t):n?d(null,n,r):h(w,function(t,n,r){if(t)d(t);else if(n)d(null,n,r);else{var i=new Error("Cannot find module '"+e+"' from '"+x+"'");i.code="MODULE_NOT_FOUND",d(i)}})}function l(e,t,n){function r(e,t,n){function i(n,i,l){if(c=i,n)return o(n);if(l&&c&&y.pathFilter){var p=s.relative(l,u),h=p.slice(0,p.length-e[0].length),f=y.pathFilter(c,t,h);if(f)return r([""].concat(b.slice()),s.resolve(l,f),c)}g(u,a)}function a(n,i){return n?o(n):i?o(null,u,c):void r(e.slice(1),t,c)}if(0===e.length)return o(null,void 0,n);var u=t+e[0],c=n;c?i(null,c):p(s.dirname(u),i)}var i=t,o=n;"function"==typeof i&&(o=i,i=void 0);r([""].concat(b),e,i)}function p(e,t){if(""===e||"/"===e)return t(null);if("win32"===n.platform&&/^\w:[/\\]*$/.test(e))return t(null);if(/[/\\]node_modules[/\\]*$/.test(e))return t(null);var r=s.join(e,"package.json");g(r,function(n,i){if(!i)return p(s.dirname(e),t);v(r,function(n,i){n&&t(n);try{var s=JSON.parse(i)}catch(e){}s&&y.packageFilter&&(s=y.packageFilter(s,r)),t(null,s,e)})})}function h(e,t,n){var r=n,i=t;"function"==typeof i&&(r=i,i=y.package);var o=s.join(e,"package.json");g(o,function(t,n){return t?r(t):n?void v(o,function(t,n){if(t)return r(t);try{var i=JSON.parse(n)}catch(e){}if(y.packageFilter&&(i=y.packageFilter(i,o)),i.main)return"."!==i.main&&"./"!==i.main||(i.main="index"),void l(s.resolve(e,i.main),i,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);h(s.resolve(e,i.main),i,function(t,n,i){return t?r(t):n?r(null,n,i):void l(s.join(e,"index"),i,r)})});l(s.join(e,"/index"),i,r)}):l(s.join(e,"index"),i,r)})}function f(t,n){function r(e,r,i){return e?t(e):r?t(null,r,i):void f(t,n.slice(1))}if(0===n.length)return t(null,void 0);var i=n[0];l(s.join(i,e),void 0,function(n,o,a){return n?t(n):o?t(null,o,a):void h(s.join(i,e),void 0,r)})}var d=u,y=t||{};if("function"==typeof y&&(d=y,y={}),"string"!=typeof e){var m=new TypeError("Path must be a string.");return n.nextTick(function(){d(m)})}var g=y.isFile||function(e,t){i.stat(e,function(e,n){return e?"ENOENT"===e.code||"ENOTDIR"===e.code?t(null,!1):t(e):t(null,n.isFile()||n.isFIFO())})},v=y.readFile||i.readFile,b=y.extensions||[".js"],x=y.basedir||s.dirname(o());if(y.paths=y.paths||[],/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(e)){var w=s.resolve(x,e);".."!==e&&"/"!==e.slice(-1)||(w+="/"),/\/$/.test(e)&&w===x?h(w,y.package,c):l(w,y.package,c)}else!function(e,t,n){f(n,a(t,y))}(0,x,function(t,n,i){if(t)d(t);else if(n)d(null,n,i);else{if(r[e])return d(null,e);var s=new Error("Cannot find module '"+e+"' from '"+x+"'");s.code="MODULE_NOT_FOUND",d(s)}})}}).call(this,e("_process"))},{"./caller.js":35,"./core":37,"./node-modules-paths.js":38,_process:32,fs:7,path:30}],35:[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()}},{}],36:[function(e,t,n){t.exports={assert:!0,buffer_ieee754:"< 0.9.7",buffer:!0,child_process:!0,cluster:!0,console:!0,constants:!0,crypto:!0,_debugger:"< 8",dgram:!0,dns:!0,domain:!0,events:!0,freelist:"< 6",fs:!0,http:!0,http2:">= 8.8",https:!0,_http_server:">= 0.11",_linklist:"< 8",module:!0,net:!0,os:!0,path:!0,perf_hooks:">= 8.5",process:">= 1",punycode:!0,querystring:!0,readline:!0,repl:!0,stream:!0,string_decoder:!0,sys:!0,timers:!0,tls:!0,tty:!0,url:!0,util:!0,v8:">= 1",vm:!0,zlib:!0}},{}],37:[function(e,t,n){(function(n){function r(e){if(!0===e)return!0;for(var t=e.split(" "),n=t[0],r=t[1].split("."),s=0;s<3;++s){var o=Number(i[s]||0),a=Number(r[s]||0);if(o!==a)return"<"===n?o<a:">="===n&&o>=a}return!1}var i=n.versions&&n.versions.node&&n.versions.node.split(".")||[],s=e("./core.json"),o={};for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(o[a]=r(s[a]));t.exports=o}).call(this,e("_process"))},{"./core.json":36,_process:32}],38:[function(e,t,n){var r=e("path"),i=e("fs"),s=r.parse||e("path-parse");t.exports=function(e,t){var n=t&&t.moduleDirectory?[].concat(t.moduleDirectory):["node_modules"],o=r.resolve(e);if(t&&!1===t.preserveSymlinks)try{o=i.realpathSync(o)}catch(e){if("ENOENT"!==e.code)throw e}var a="/";/^([A-Za-z]:)/.test(o)?a="":/^\\\\/.test(o)&&(a="\\\\");for(var u=[o],c=s(o);c.dir!==u[u.length-1];)u.push(c.dir),c=s(c.dir);var l=u.reduce(function(e,t){return e.concat(n.map(function(e){return r.join(a,t,e)}))},[]);return t&&t.paths?l.concat(t.paths):l}},{fs:7,path:30,"path-parse":31}],39:[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 t=s.join(e,"/package.json");if(l(t))try{var r=p(t,"UTF8"),i=JSON.parse(r);if(c.packageFilter&&(i=c.packageFilter(i,e)),i.main){"."!==i.main&&"./"!==i.main||(i.main="index");var o=n(s.resolve(e,i.main));if(o)return o;var a=u(s.resolve(e,i.main));if(a)return a}}catch(e){}return n(s.join(e,"/index"))}if("string"!=typeof e)throw new TypeError("Path must be a string.");var c=t||{},l=c.isFile||function(e){try{var t=i.statSync(e)}catch(e){if(e&&("ENOENT"===e.code||"ENOTDIR"===e.code))return!1;throw e}return t.isFile()||t.isFIFO()},p=c.readFileSync||i.readFileSync,h=c.extensions||[".js"],f=c.basedir||s.dirname(o());if(c.paths=c.paths||[],/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(e)){var d=s.resolve(f,e);".."!==e&&"/"!==e.slice(-1)||(d+="/");var y=n(d)||u(d);if(y)return y}else{var m=function(e,t){for(var r=a(t,c),i=0;i<r.length;i++){var o=r[i],l=n(s.join(o,"/",e));if(l)return l;var p=u(s.join(o,"/",e));if(p)return p}}(e,f);if(m)return m}if(r[e])return e;var g=new Error("Cannot find module '"+e+"' from '"+f+"'");throw g.code="MODULE_NOT_FOUND",g}},{"./caller.js":35,"./core":37,"./node-modules-paths.js":38,fs:7,path:30}],nodent:[function(require,module,exports){(function(process,global,__dirname){"use strict";function copyObj(e){var t={};return e.forEach(function(e){if(e&&"object"==typeof e)for(var n in e)t[n]=e[n]}),t}function globalErrorHandler(e){throw e}function isDirective(e){return"ExpressionStatement"===e.type&&("StringLiteral"===e.expression.type||"Literal"===e.expression.type&&"string"==typeof e.expression.value)}function parseCompilerOptions(code,log,filename){log||(log=console.warn.bind(console));var regex,set,parseOpts={};if("string"==typeof code)(regex=code.match(useDirective))&&(set=regex[1]||"default");else for(var i=0;i<code.body.length&&isDirective(code.body[i].type);i++){var test="'"+code.body[i].value+"'";if(regex=test.match(useDirective)){set=regex[1]||"default";break}}if(!regex){if(!defaultCodeGenOpts.noUseDirective)return null;set="default",regex=[null,null,"{}"]}if(set)try{filename?require("fs").lstatSync(filename).isDirectory()||(filename=require("path").dirname(filename)):filename=require("path").resolve(".");var packagePath=require("resolve").sync("package.json",{moduleDirectory:[""],extensions:[""],basedir:filename}),packageOptions=JSON.parse(fs.readFileSync(packagePath)).nodent.directive[set]}catch(e){}try{parseOpts=copyObj([optionSets[set],packageOptions,regex[2]&&JSON.parse(regex[2])])}catch(e){log("Invalid literal compiler option: "+(regex&&regex[0]||"<no options found>"))}return Object.keys(hostOptions).forEach(function(k){"host"===parseOpts[k]&&(parseOpts[k]=function(){try{return eval(hostOptions[k]),!0}catch(e){return!1}}())}),parseOpts.promises||parseOpts.es7||parseOpts.generators||parseOpts.engine?((parseOpts.promises||parseOpts.es7)&&parseOpts.generators&&(log("No valid 'use nodent' directive, assumed -es7 mode"),parseOpts=optionSets.es7),(parseOpts.generators||parseOpts.engine)&&(parseOpts.promises=!0),parseOpts.promises&&(parseOpts.es7=!0),parseOpts):null}function stripBOM(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),"#!"===e.substring(0,2)&&(e="//"+e),e}function compileNodentedFile(e,t){return t=t||e.log,function(n,r,i){var s=stripBOM(fs.readFileSync(r,"utf8")),o=e.parse(s,r,i);i=i||parseCompilerOptions(o.ast,t,r),e.asynchronize(o,void 0,i,t),e.prettyPrint(o,i),n._compile(o.code,o.filename)}}function asyncify(e){return e=e||Thenable,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);return new e(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)})},s[i+r].isAsync=!0)}catch(e){}}();return s.super=t,s}}function generateRequestHandler(e,t,n){var r={},i=this;t||(t=/\.njs$/),n?n.compiler||(n.compiler={}):n={compiler:{}};var s=copyObj([NodentCompiler.initialCodeGenOpts,n.compiler]);return function(o,a,u){function c(e){a.statusCode=500,a.write(e.toString()),a.end()}if(r[o.url])return a.setHeader("Content-Type",r[o.url].contentType),n.setHeaders&&n.setHeaders(a),a.write(r[o.url].output),void a.end();if(!(o.url.match(t)||n.htmlScriptRegex&&o.url.match(n.htmlScriptRegex)))return u&&u();var l=e+o.url;if(n.extensions&&!fs.existsSync(l))for(var p=0;p<n.extensions.length;p++)if(fs.existsSync(l+"."+n.extensions[p])){l=l+"."+n.extensions[p];break}fs.readFile(l,function(e,t){if(e)return c(e);try{var u,l;n.htmlScriptRegex&&o.url.match(n.htmlScriptRegex)?(u=require("./htmlScriptParser")(i,t.toString(),o.url,n),l="text/html"):(n.runtime?(u="Function.prototype."+s.$asyncbind+" = "+$asyncbind.toString()+";",s.generators&&(u+="Function.prototype."+s.$asyncspawn+" = "+$asyncspawn.toString()+";"),s.wrapAwait&&!s.promises&&(u+="Object."+s.$makeThenable+" = "+Thenable.resolve.toString()+";"),s.mapStartLine=u.split("\n").length,u+="\n"):u="",u+=i.compile(t.toString(),o.url,null,s).code,l="application/javascript"),a.setHeader("Content-Type",l),n.enableCache&&(r[o.url]={output:u,contentType:l}),n.setHeaders&&n.setHeaders(a),a.write(u),a.end()}catch(e){return c(e)}})}}function requireCover(e,t){t=t||{};var n=e+"|"+Object.keys(t).sort().reduce(function(e,n){return e+n+JSON.stringify(t[n])},"");return this.covers[n]||(e.indexOf("/")>=0?this.covers[n]=require(e):this.covers[n]=require(__dirname+"/covers/"+e)),this.covers[n](this,t)}function prepareMappedStackTrace(e,t){return e+t.map(function(e){var t=e.getFileName();if(t&&NodentCompiler.prototype.smCache[t]){var n=NodentCompiler.prototype.smCache[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}).join("")}function setGlobalEnvironment(e){var t={};t[defaultCodeGenOpts.$asyncbind]={value:$asyncbind,writable:!0,enumerable:!1,configurable:!0},t[defaultCodeGenOpts.$asyncspawn]={value:$asyncspawn,writable:!0,enumerable:!1,configurable:!0};try{Object.defineProperties(Function.prototype,t)}catch(t){e.log("Function prototypes already assigned: ",t.messsage)}defaultCodeGenOpts[defaultCodeGenOpts.$error]in global||(global[defaultCodeGenOpts[defaultCodeGenOpts.$error]]=globalErrorHandler),e.augmentObject&&Object.defineProperties(Object.prototype,{asyncify:{value:function(e,t,n){return asyncify(e)(this,t,n)},writable:!0,configurable:!0},isThenable:{value:function(){return Thenable.isThenable(this)},writable:!0,configurable:!0}}),Object[defaultCodeGenOpts.$makeThenable]=Thenable.resolve}function initialize(e){function t(n,r){if(!r.match(/nodent\/nodent\.js$/)){if(r.match(/node_modules\/nodent\/.*\.js$/))return stdJSLoader(n,r);for(var o=0;o<i.length;o++)if(r.slice(0,i[o].path.length)==i[o].path){if(i[o].jsCompiler){if(i[o].jsCompiler===t)break;return i[o].jsCompiler.apply(this,arguments)}return stdJSLoader(n,r)}var a=parseCompilerOptions(stripBOM(fs.readFileSync(r,"utf8")),e.log,r);return a?s(n,r,a):stdJSLoader(n,r)}var u={path:r.replace(/\/node_modules\/nodent\/nodent\.js$/,"")};u.path&&(u.version=JSON.parse(fs.readFileSync(r.replace(/nodent\.js$/,"package.json"))).version,stdJSLoader(n,r),function(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}(u.version,NodentCompiler.prototype.version)<0&&(u.originalNodentLoader=n.exports,n.exports=function(){var t=require.extensions[".js"],n=u.originalNodentLoader.apply(this,arguments);return u.jsCompiler=require.extensions[".js"],require.extensions[".js"]=t,setGlobalEnvironment(e),n},Object.keys(u.originalNodentLoader).forEach(function(e){n.exports[e]=u.originalNodentLoader[e]}),i.push(u),i=i.sort(function(e,t){return t.path.length-e.path.length})))}function n(t){if(Array.isArray(t))return t.forEach(n);if(require.extensions[t]){Object.keys(e).filter(function(t){return compiler[t]!=e[t]}).length&&e.log("File extension "+t+" already configured for async/await compilation.")}require.extensions[t]=compileNodentedFile(compiler,e.log)}if(e){for(var r in e)if("use"!==r&&!config.hasOwnProperty(r))throw new Error("NoDent: unknown option: "+r+"="+JSON.stringify(e[r]))}else e={};compiler?compiler.setOptions(e):(Object.keys(config).forEach(function(t){t in e||(e[t]=config[t])}),compiler=new NodentCompiler(e)),e.dontMapStackTraces||(Error.prepareStackTrace=prepareMappedStackTrace),setGlobalEnvironment(e);var i=[];if(!e.dontInstallRequireHook){if(!stdJSLoader){stdJSLoader=require.extensions[".js"];var s=compileNodentedFile(compiler,e.log);require.extensions[".js"]=t}e.extension&&n(e.extension)}return e.use&&(Array.isArray(e.use)?(e.log("Warning: nodent({use:[...]}) is deprecated. Use nodent.require(module,options)\n"+(new Error).stack.split("\n")[2]),e.use.length&&e.use.forEach(function(e){compiler[e]=compiler.require(e)})):(e.log("Warning: nodent({use:{...}}) is deprecated. Use nodent.require(module,options)\n"+(new Error).stack.split("\n")[2]),Object.keys(e.use).forEach(function(t){compiler[t]=compiler.require(t,e.use[t])}))),compiler}function runFromCLI(){function e(e,n){try{var s,o;if(r.fromast){if(e=JSON.parse(e),s={origCode:"",filename:t,ast:e},!(o=parseCompilerOptions(e,i.log))){var a=r.use?'"use nodent-'+r.use+'";':'"use nodent";';o=parseCompilerOptions(a,i.log),console.warn("/* "+t+": No 'use nodent*' directive, assumed "+a+" */")}}else(o=parseCompilerOptions(r.use?'"use nodent-'+r.use+'";':e,i.log))||(o=parseCompilerOptions('"use nodent";',i.log),r.dest||console.warn("/* "+t+": 'use nodent*' directive missing/ignored, assumed 'use nodent;' */")),s=i.parse(e,t,o);if(r.parseast||r.pretty||i.asynchronize(s,void 0,o,i.log),i.prettyPrint(s,o),r.out||r.pretty||r.dest){if(r.dest&&!n)throw new Error("Can't write unknown file to "+r.dest);var u="";r.runtime&&(u+="Function.prototype.$asyncbind = "+Function.prototype.$asyncbind.toString()+";\n",u+="global.$error = global.$error || "+global.$error.toString()+";\n"),u+=s.code,n&&r.dest?(fs.writeFileSync(r.dest+n,u),console.log("Compiled",r.dest+n)):console.log(u)}(r.minast||r.parseast)&&console.log(JSON.stringify(s.ast,function(e,t){return"$"===e[0]||e.match(/^(start|end|loc)$/)?void 0:t},2,null)),r.ast&&console.log(JSON.stringify(s.ast,function(e,t){return"$"===e[0]?void 0:t},0)),r.exec&&new Function(s.code)()}catch(e){console.error(e)}}var t,n=require("path"),r=(process.env.NODENT_OPTS&&JSON.parse(process.env.NODENT_OPTS),function(e){for(var t=[],n=e||2;n<process.argv.length;n++)if("--"===process.argv[n].slice(0,2)){var r=process.argv[n].slice(2).split("=");t[r[0]]=r[1]||!0}else t.push(process.argv[n]);return t}());initialize.setDefaultCompileOptions({sourcemap:r.sourcemap,wrapAwait:r.wrapAwait,lazyThenables:r.lazyThenables,noRuntime:r.noruntime,es6target:r.es6target,parser:r.noextensions?{noNodentExtensions:!0}:void 0});var i=initialize({augmentObject:!0});if(!(r.fromast||r.parseast||r.pretty||r.out||r.dest||r.ast||r.minast||r.exec))try{var s=n.resolve(r[0]);return require(s)}catch(e){throw e&&(e.message=r[0]+": "+e.message),e}if(0==r.length||"-"===r[0])return t="(stdin)",function(e){return new Thenable(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))}(process.stdin).then(e,globalErrorHandler);for(var o=0;o<r.length;o++)t=n.resolve(r[o]),e(stripBOM(fs.readFileSync(t,"utf8")),r[o])}var stdJSLoader,fs=require("fs"),NodentCompiler=require("nodent-compiler"),config={log:function(e){console.warn("Nodent: "+e)},augmentObject:!1,extension:".njs",dontMapStackTraces:!1,asyncStackTrace:!1,babelTree:!1,dontInstallRequireHook:!1},defaultCodeGenOpts=Object.create(NodentCompiler.initialCodeGenOpts,{es7:{value:!0,writable:!0,enumerable:!0}}),optionSets={default:defaultCodeGenOpts,es7:Object.create(defaultCodeGenOpts),promise:Object.create(defaultCodeGenOpts,{promises:{value:!0,writable:!0,enumerable:!0}}),generator:Object.create(defaultCodeGenOpts,{generators:{value:!0,writable:!0,enumerable:!0},es7:{value:!1,writable:!0,enumerable:!0}}),engine:Object.create(defaultCodeGenOpts,{engine:{value:!0,writable:!0,enumerable:!0},promises:{value:!0,writable:!0,enumerable:!0}}),host:Object.create(defaultCodeGenOpts,{promises:{value:"host",writable:!0,enumerable:!0},es6target:{value:"host",writable:!0,enumerable:!0},engine:{value:"host",writable:!0,enumerable:!0}})};optionSets.promises=optionSets.promise,optionSets.generators=optionSets.generator;var useDirective=/^\s*['"]use\s+nodent-?([a-zA-Z0-9]*)?(\s*.*)?['"]\s*;/,runtimes=require("nodent-runtime"),$asyncbind=runtimes.$asyncbind,$asyncspawn=runtimes.$asyncspawn,Thenable=$asyncbind.Thenable,hostOptions={promises:"Promise",es6target:"()=>0",engine:"(async ()=>0)",noRuntime:"Promise"};NodentCompiler.prototype.Thenable=Thenable,NodentCompiler.prototype.EagerThenable=$asyncbind.EagerThenableFactory,NodentCompiler.prototype.asyncify=asyncify,NodentCompiler.prototype.require=requireCover,NodentCompiler.prototype.generateRequestHandler=generateRequestHandler,NodentCompiler.prototype.$asyncspawn=$asyncspawn,NodentCompiler.prototype.$asyncbind=$asyncbind,NodentCompiler.prototype.parseCompilerOptions=parseCompilerOptions,$asyncbind.call($asyncbind);var compiler;initialize.setDefaultCompileOptions=function(e,t){return e&&Object.keys(e).forEach(function(t){if(!(t in defaultCodeGenOpts))throw new Error("NoDent: unknown compiler option: "+t);defaultCodeGenOpts[t]=e[t]}),t&&Object.keys(t).forEach(function(e){if(!(e in t))throw new Error("NoDent: unknown configuration option: "+e);config[e]=t[e]}),initialize},initialize.setCompileOptions=function(e,t){return optionSet[e]=optionSet[e]||copyObj([defaultCodeGenOpts]),t&&Object.keys(t).forEach(function(n){if(!(n in defaultCodeGenOpts))throw new Error("NoDent: unknown compiler option: "+n);optionSet[e][n]=t[n]}),initialize},initialize.asyncify=asyncify,initialize.Thenable=$asyncbind.Thenable,initialize.EagerThenable=$asyncbind.EagerThenableFactory,module.exports=initialize,require.main===module&&process.argv.length>=3&&runFromCLI()}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},"/node_modules/nodent")},{"./htmlScriptParser":29,_process:32,fs:7,"nodent-compiler":10,"nodent-runtime":26,path:30,resolve:33}]},{},[]); \ No newline at end of file
diff --git a/deps/npm/node_modules/ajv/dist/regenerator.min.js b/deps/npm/node_modules/ajv/dist/regenerator.min.js
deleted file mode 100644
index ef3b8bed54..0000000000
--- a/deps/npm/node_modules/ajv/dist/regenerator.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/* regenerator 0.12.2: Source transformer enabling ECMAScript 6 generator functions (yield) in JavaScript-of-today (ES5) */
-require=function e(t,r,n){function i(a,o){if(!r[a]){if(!t[a]){var u="function"==typeof require&&require;if(!o&&u)return u(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[a]={exports:{}};t[a][0].call(c.exports,function(e){var r=t[a][1][e];return i(r||e)},c,c.exports,e,t,r,n)}return r[a].exports}for(var s="function"==typeof require&&require,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(e,t,r){(function(r){"use strict";function n(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}function i(e){return r.Buffer&&"function"==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}function s(e){return Object.prototype.toString.call(e)}function a(e){return!i(e)&&("function"==typeof r.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}function o(e){if(g.isFunction(e)){if(x)return e.name;var t=e.toString().match(A);return t&&t[1]}}function u(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function l(e){if(x||!g.isFunction(e))return g.inspect(e);var t=o(e);return"[Function"+(t?": "+t:"")+"]"}function c(e,t,r,n,i){throw new E.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:i})}function p(e,t){e||c(e,!0,t,"==",E.ok)}function h(e,t,r,o){if(e===t)return!0;if(i(e)&&i(t))return 0===n(e,t);if(g.isDate(e)&&g.isDate(t))return e.getTime()===t.getTime();if(g.isRegExp(e)&&g.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(a(e)&&a(t)&&s(e)===s(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===n(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(i(e)!==i(t))return!1;var u=(o=o||{actual:[],expected:[]}).actual.indexOf(e);return-1!==u&&u===o.expected.indexOf(t)||(o.actual.push(e),o.expected.push(t),function(e,t,r,n){if(null===e||void 0===e||null===t||void 0===t)return!1;if(g.isPrimitive(e)||g.isPrimitive(t))return e===t;if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=f(e),s=f(t);if(i&&!s||!i&&s)return!1;if(i)return e=v.call(e),t=v.call(t),h(e,t,r);var a,o,u=D(e),l=D(t);if(u.length!==l.length)return!1;for(u.sort(),l.sort(),o=u.length-1;o>=0;o--)if(u[o]!==l[o])return!1;for(o=u.length-1;o>=0;o--)if(a=u[o],!h(e[a],t[a],r,n))return!1;return!0}(e,t,r,o))}return r?e===t:e==t}function f(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function d(e,t,r){h(e,t,!0)&&c(e,t,r,"notDeepStrictEqual",d)}function m(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function y(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&c(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!e&&g.isError(i),o=!e&&i&&!r;if((a&&s&&m(i,r)||o)&&c(i,r,"Got unwanted exception"+n),e&&i&&r&&!m(i,r)||!e&&i)throw i}var g=e("util/"),b=Object.prototype.hasOwnProperty,v=Array.prototype.slice,x="foo"===function(){}.name,E=t.exports=p,A=/\s*function\s+([^\(\s]*)\s*/;E.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=function(e){return u(l(e.actual),128)+" "+e.operator+" "+u(l(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||c;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=o(t),s=n.indexOf("\n"+i);if(s>=0){var a=n.indexOf("\n",s+1);n=n.substring(a+1)}this.stack=n}}},g.inherits(E.AssertionError,Error),E.fail=c,E.ok=p,E.equal=function(e,t,r){e!=t&&c(e,t,r,"==",E.equal)},E.notEqual=function(e,t,r){e==t&&c(e,t,r,"!=",E.notEqual)},E.deepEqual=function(e,t,r){h(e,t,!1)||c(e,t,r,"deepEqual",E.deepEqual)},E.deepStrictEqual=function(e,t,r){h(e,t,!0)||c(e,t,r,"deepStrictEqual",E.deepStrictEqual)},E.notDeepEqual=function(e,t,r){h(e,t,!1)&&c(e,t,r,"notDeepEqual",E.notDeepEqual)},E.notDeepStrictEqual=d,E.strictEqual=function(e,t,r){e!==t&&c(e,t,r,"===",E.strictEqual)},E.notStrictEqual=function(e,t,r){e===t&&c(e,t,r,"!==",E.notStrictEqual)},E.throws=function(e,t,r){y(!0,e,t,r)},E.doesNotThrow=function(e,t,r){y(!1,e,t,r)},E.ifError=function(e){if(e)throw e};var D=Object.keys||function(e){var t=[];for(var r in e)b.call(e,r)&&t.push(r);return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":613}],2:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=t.use(e("../lib/shared")).defaults,i=r.Type.def,s=r.Type.or;i("Noop").bases("Node").build(),i("DoExpression").bases("Expression").build("body").field("body",[i("Statement")]),i("Super").bases("Expression").build(),i("BindExpression").bases("Expression").build("object","callee").field("object",s(i("Expression"),null)).field("callee",i("Expression")),i("Decorator").bases("Node").build("expression").field("expression",i("Expression")),i("Property").field("decorators",s([i("Decorator")],null),n.null),i("MethodDefinition").field("decorators",s([i("Decorator")],null),n.null),i("MetaProperty").bases("Expression").build("meta","property").field("meta",i("Identifier")).field("property",i("Identifier")),i("ParenthesizedExpression").bases("Expression").build("expression").field("expression",i("Expression")),i("ImportSpecifier").bases("ModuleSpecifier").build("imported","local").field("imported",i("Identifier")),i("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local"),i("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local"),i("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",s(i("Declaration"),i("Expression"))),i("ExportNamedDeclaration").bases("Declaration").build("declaration","specifiers","source").field("declaration",s(i("Declaration"),null)).field("specifiers",[i("ExportSpecifier")],n.emptyArray).field("source",s(i("Literal"),null),n.null),i("ExportSpecifier").bases("ModuleSpecifier").build("local","exported").field("exported",i("Identifier")),i("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported",i("Identifier")),i("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported",i("Identifier")),i("ExportAllDeclaration").bases("Declaration").build("exported","source").field("exported",s(i("Identifier"),null)).field("source",i("Literal")),i("CommentBlock").bases("Comment").build("value","leading","trailing"),i("CommentLine").bases("Comment").build("value","leading","trailing")}},{"../lib/shared":18,"../lib/types":19,"./es7":7}],3:[function(e,t,r){t.exports=function(t){t.use(e("./babel")),t.use(e("./flow"));var r=t.use(e("../lib/types")),n=t.use(e("../lib/shared")).defaults,i=r.Type.def,s=r.Type.or;i("Directive").bases("Node").build("value").field("value",i("DirectiveLiteral")),i("DirectiveLiteral").bases("Node","Expression").build("value").field("value",String,n["use strict"]),i("BlockStatement").bases("Statement").build("body").field("body",[i("Statement")]).field("directives",[i("Directive")],n.emptyArray),i("Program").bases("Node").build("body").field("body",[i("Statement")]).field("directives",[i("Directive")],n.emptyArray),i("StringLiteral").bases("Literal").build("value").field("value",String),i("NumericLiteral").bases("Literal").build("value").field("value",Number),i("NullLiteral").bases("Literal").build(),i("BooleanLiteral").bases("Literal").build("value").field("value",Boolean),i("RegExpLiteral").bases("Literal").build("pattern","flags").field("pattern",String).field("flags",String);var a=s(i("Property"),i("ObjectMethod"),i("ObjectProperty"),i("SpreadProperty"));i("ObjectExpression").bases("Expression").build("properties").field("properties",[a]),i("ObjectMethod").bases("Node","Function").build("kind","key","params","body","computed").field("kind",s("method","get","set")).field("key",s(i("Literal"),i("Identifier"),i("Expression"))).field("params",[i("Pattern")]).field("body",i("BlockStatement")).field("computed",Boolean,n.false).field("generator",Boolean,n.false).field("async",Boolean,n.false).field("decorators",s([i("Decorator")],null),n.null),i("ObjectProperty").bases("Node").build("key","value").field("key",s(i("Literal"),i("Identifier"),i("Expression"))).field("value",s(i("Expression"),i("Pattern"))).field("computed",Boolean,n.false);var o=s(i("MethodDefinition"),i("VariableDeclarator"),i("ClassPropertyDefinition"),i("ClassProperty"),i("ClassMethod"));i("ClassBody").bases("Declaration").build("body").field("body",[o]),i("ClassMethod").bases("Declaration","Function").build("kind","key","params","body","computed","static").field("kind",s("get","set","method","constructor")).field("key",s(i("Literal"),i("Identifier"),i("Expression"))).field("params",[i("Pattern")]).field("body",i("BlockStatement")).field("computed",Boolean,n.false).field("static",Boolean,n.false).field("generator",Boolean,n.false).field("async",Boolean,n.false).field("decorators",s([i("Decorator")],null),n.null);var u=s(i("Property"),i("PropertyPattern"),i("SpreadPropertyPattern"),i("SpreadProperty"),i("ObjectProperty"),i("RestProperty"));i("ObjectPattern").bases("Pattern").build("properties").field("properties",[u]).field("decorators",s([i("Decorator")],null),n.null),i("SpreadProperty").bases("Node").build("argument").field("argument",i("Expression")),i("RestProperty").bases("Node").build("argument").field("argument",i("Expression")),i("ForAwaitStatement").bases("Statement").build("left","right","body").field("left",s(i("VariableDeclaration"),i("Expression"))).field("right",i("Expression")).field("body",i("Statement")),i("Import").bases("Expression").build()}},{"../lib/shared":18,"../lib/types":19,"./babel":2,"./flow":9}],4:[function(e,t,r){t.exports=function(t){var r=t.use(e("../lib/types")).Type,n=r.def,i=r.or,s=t.use(e("../lib/shared")),a=s.defaults,o=s.geq;n("Printable").field("loc",i(n("SourceLocation"),null),a.null,!0),n("Node").bases("Printable").field("type",String).field("comments",i([n("Comment")],null),a.null,!0),n("SourceLocation").build("start","end","source").field("start",n("Position")).field("end",n("Position")).field("source",i(String,null),a.null),n("Position").build("line","column").field("line",o(1)).field("column",o(0)),n("File").bases("Node").build("program","name").field("program",n("Program")).field("name",i(String,null),a.null),n("Program").bases("Node").build("body").field("body",[n("Statement")]),n("Function").bases("Node").field("id",i(n("Identifier"),null),a.null).field("params",[n("Pattern")]).field("body",n("BlockStatement")),n("Statement").bases("Node"),n("EmptyStatement").bases("Statement").build(),n("BlockStatement").bases("Statement").build("body").field("body",[n("Statement")]),n("ExpressionStatement").bases("Statement").build("expression").field("expression",n("Expression")),n("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",n("Expression")).field("consequent",n("Statement")).field("alternate",i(n("Statement"),null),a.null),n("LabeledStatement").bases("Statement").build("label","body").field("label",n("Identifier")).field("body",n("Statement")),n("BreakStatement").bases("Statement").build("label").field("label",i(n("Identifier"),null),a.null),n("ContinueStatement").bases("Statement").build("label").field("label",i(n("Identifier"),null),a.null),n("WithStatement").bases("Statement").build("object","body").field("object",n("Expression")).field("body",n("Statement")),n("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",n("Expression")).field("cases",[n("SwitchCase")]).field("lexical",Boolean,a.false),n("ReturnStatement").bases("Statement").build("argument").field("argument",i(n("Expression"),null)),n("ThrowStatement").bases("Statement").build("argument").field("argument",n("Expression")),n("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",n("BlockStatement")).field("handler",i(n("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[n("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[n("CatchClause")],a.emptyArray).field("finalizer",i(n("BlockStatement"),null),a.null),n("CatchClause").bases("Node").build("param","guard","body").field("param",n("Pattern")).field("guard",i(n("Expression"),null),a.null).field("body",n("BlockStatement")),n("WhileStatement").bases("Statement").build("test","body").field("test",n("Expression")).field("body",n("Statement")),n("DoWhileStatement").bases("Statement").build("body","test").field("body",n("Statement")).field("test",n("Expression")),n("ForStatement").bases("Statement").build("init","test","update","body").field("init",i(n("VariableDeclaration"),n("Expression"),null)).field("test",i(n("Expression"),null)).field("update",i(n("Expression"),null)).field("body",n("Statement")),n("ForInStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("DebuggerStatement").bases("Statement").build(),n("Declaration").bases("Statement"),n("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",n("Identifier")),n("FunctionExpression").bases("Function","Expression").build("id","params","body"),n("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",i("var","let","const")).field("declarations",[n("VariableDeclarator")]),n("VariableDeclarator").bases("Node").build("id","init").field("id",n("Pattern")).field("init",i(n("Expression"),null)),n("Expression").bases("Node","Pattern"),n("ThisExpression").bases("Expression").build(),n("ArrayExpression").bases("Expression").build("elements").field("elements",[i(n("Expression"),null)]),n("ObjectExpression").bases("Expression").build("properties").field("properties",[n("Property")]),n("Property").bases("Node").build("kind","key","value").field("kind",i("init","get","set")).field("key",i(n("Literal"),n("Identifier"))).field("value",n("Expression")),n("SequenceExpression").bases("Expression").build("expressions").field("expressions",[n("Expression")]);var u=i("-","+","!","~","typeof","void","delete");n("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",u).field("argument",n("Expression")).field("prefix",Boolean,a.true);var l=i("==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof","..");n("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",l).field("left",n("Expression")).field("right",n("Expression"));var c=i("=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=");n("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",c).field("left",n("Pattern")).field("right",n("Expression"));var p=i("++","--");n("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",p).field("argument",n("Expression")).field("prefix",Boolean);var h=i("||","&&");n("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",h).field("left",n("Expression")).field("right",n("Expression")),n("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",n("Expression")).field("consequent",n("Expression")).field("alternate",n("Expression")),n("NewExpression").bases("Expression").build("callee","arguments").field("callee",n("Expression")).field("arguments",[n("Expression")]),n("CallExpression").bases("Expression").build("callee","arguments").field("callee",n("Expression")).field("arguments",[n("Expression")]),n("MemberExpression").bases("Expression").build("object","property","computed").field("object",n("Expression")).field("property",i(n("Identifier"),n("Expression"))).field("computed",Boolean,function(){var e=this.property.type;return"Literal"===e||"MemberExpression"===e||"BinaryExpression"===e}),n("Pattern").bases("Node"),n("SwitchCase").bases("Node").build("test","consequent").field("test",i(n("Expression"),null)).field("consequent",[n("Statement")]),n("Identifier").bases("Node","Expression","Pattern").build("name").field("name",String),n("Literal").bases("Node","Expression").build("value").field("value",i(String,Boolean,null,Number,RegExp)).field("regex",i({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}),n("Comment").bases("Printable").field("value",String).field("leading",Boolean,a.true).field("trailing",Boolean,a.false)}},{"../lib/shared":18,"../lib/types":19}],5:[function(e,t,r){t.exports=function(t){t.use(e("./core"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or;n("XMLDefaultDeclaration").bases("Declaration").field("namespace",n("Expression")),n("XMLAnyName").bases("Expression"),n("XMLQualifiedIdentifier").bases("Expression").field("left",i(n("Identifier"),n("XMLAnyName"))).field("right",i(n("Identifier"),n("Expression"))).field("computed",Boolean),n("XMLFunctionQualifiedIdentifier").bases("Expression").field("right",i(n("Identifier"),n("Expression"))).field("computed",Boolean),n("XMLAttributeSelector").bases("Expression").field("attribute",n("Expression")),n("XMLFilterExpression").bases("Expression").field("left",n("Expression")).field("right",n("Expression")),n("XMLElement").bases("XML","Expression").field("contents",[n("XML")]),n("XMLList").bases("XML","Expression").field("contents",[n("XML")]),n("XML").bases("Node"),n("XMLEscape").bases("XML").field("expression",n("Expression")),n("XMLText").bases("XML").field("text",String),n("XMLStartTag").bases("XML").field("contents",[n("XML")]),n("XMLEndTag").bases("XML").field("contents",[n("XML")]),n("XMLPointTag").bases("XML").field("contents",[n("XML")]),n("XMLName").bases("XML").field("contents",i(String,[n("XML")])),n("XMLAttribute").bases("XML").field("value",String),n("XMLCdata").bases("XML").field("contents",String),n("XMLComment").bases("XML").field("contents",String),n("XMLProcessingInstruction").bases("XML").field("target",String).field("contents",i(String,null))}},{"../lib/types":19,"./core":4}],6:[function(e,t,r){t.exports=function(t){t.use(e("./core"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")).defaults;n("Function").field("generator",Boolean,s.false).field("expression",Boolean,s.false).field("defaults",[i(n("Expression"),null)],s.emptyArray).field("rest",i(n("Identifier"),null),s.null),n("RestElement").bases("Pattern").build("argument").field("argument",n("Pattern")),n("SpreadElementPattern").bases("Pattern").build("argument").field("argument",n("Pattern")),n("FunctionDeclaration").build("id","params","body","generator","expression"),n("FunctionExpression").build("id","params","body","generator","expression"),n("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,s.null).field("body",i(n("BlockStatement"),n("Expression"))).field("generator",!1,s.false),n("YieldExpression").bases("Expression").build("argument","delegate").field("argument",i(n("Expression"),null)).field("delegate",Boolean,s.false),n("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",n("Expression")).field("blocks",[n("ComprehensionBlock")]).field("filter",i(n("Expression"),null)),n("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",n("Expression")).field("blocks",[n("ComprehensionBlock")]).field("filter",i(n("Expression"),null)),n("ComprehensionBlock").bases("Node").build("left","right","each").field("left",n("Pattern")).field("right",n("Expression")).field("each",Boolean),n("Property").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("value",i(n("Expression"),n("Pattern"))).field("method",Boolean,s.false).field("shorthand",Boolean,s.false).field("computed",Boolean,s.false),n("PropertyPattern").bases("Pattern").build("key","pattern").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("pattern",n("Pattern")).field("computed",Boolean,s.false),n("ObjectPattern").bases("Pattern").build("properties").field("properties",[i(n("PropertyPattern"),n("Property"))]),n("ArrayPattern").bases("Pattern").build("elements").field("elements",[i(n("Pattern"),null)]),n("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",i("constructor","method","get","set")).field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("value",n("Function")).field("computed",Boolean,s.false).field("static",Boolean,s.false),n("SpreadElement").bases("Node").build("argument").field("argument",n("Expression")),n("ArrayExpression").field("elements",[i(n("Expression"),n("SpreadElement"),n("RestElement"),null)]),n("NewExpression").field("arguments",[i(n("Expression"),n("SpreadElement"))]),n("CallExpression").field("arguments",[i(n("Expression"),n("SpreadElement"))]),n("AssignmentPattern").bases("Pattern").build("left","right").field("left",n("Pattern")).field("right",n("Expression"));var a=i(n("MethodDefinition"),n("VariableDeclarator"),n("ClassPropertyDefinition"),n("ClassProperty"));n("ClassProperty").bases("Declaration").build("key").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("computed",Boolean,s.false),n("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",a),n("ClassBody").bases("Declaration").build("body").field("body",[a]),n("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",i(n("Identifier"),null)).field("body",n("ClassBody")).field("superClass",i(n("Expression"),null),s.null),n("ClassExpression").bases("Expression").build("id","body","superClass").field("id",i(n("Identifier"),null),s.null).field("body",n("ClassBody")).field("superClass",i(n("Expression"),null),s.null).field("implements",[n("ClassImplements")],s.emptyArray),n("ClassImplements").bases("Node").build("id").field("id",n("Identifier")).field("superClass",i(n("Expression"),null),s.null),n("Specifier").bases("Node"),n("ModuleSpecifier").bases("Specifier").field("local",i(n("Identifier"),null),s.null).field("id",i(n("Identifier"),null),s.null).field("name",i(n("Identifier"),null),s.null),n("TaggedTemplateExpression").bases("Expression").build("tag","quasi").field("tag",n("Expression")).field("quasi",n("TemplateLiteral")),n("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[n("TemplateElement")]).field("expressions",[n("Expression")]),n("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:String,raw:String}).field("tail",Boolean)}},{"../lib/shared":18,"../lib/types":19,"./core":4}],7:[function(e,t,r){t.exports=function(t){t.use(e("./es6"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=(r.builtInTypes,t.use(e("../lib/shared")).defaults);n("Function").field("async",Boolean,s.false),n("SpreadProperty").bases("Node").build("argument").field("argument",n("Expression")),n("ObjectExpression").field("properties",[i(n("Property"),n("SpreadProperty"))]),n("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",n("Pattern")),n("ObjectPattern").field("properties",[i(n("Property"),n("PropertyPattern"),n("SpreadPropertyPattern"))]),n("AwaitExpression").bases("Expression").build("argument","all").field("argument",i(n("Expression"),null)).field("all",Boolean,s.false)}},{"../lib/shared":18,"../lib/types":19,"./es6":6}],8:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=t.use(e("../lib/shared")).defaults,i=r.Type.def,s=r.Type.or;i("VariableDeclaration").field("declarations",[s(i("VariableDeclarator"),i("Identifier"))]),i("Property").field("value",s(i("Expression"),i("Pattern"))),i("ArrayPattern").field("elements",[s(i("Pattern"),i("SpreadElement"),null)]),i("ObjectPattern").field("properties",[s(i("Property"),i("PropertyPattern"),i("SpreadPropertyPattern"),i("SpreadProperty"))]),i("ExportSpecifier").bases("ModuleSpecifier").build("id","name"),i("ExportBatchSpecifier").bases("Specifier").build(),i("ImportSpecifier").bases("ModuleSpecifier").build("id","name"),i("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("id"),i("ImportDefaultSpecifier").bases("ModuleSpecifier").build("id"),i("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",s(i("Declaration"),i("Expression"),null)).field("specifiers",[s(i("ExportSpecifier"),i("ExportBatchSpecifier"))],n.emptyArray).field("source",s(i("Literal"),null),n.null),i("ImportDeclaration").bases("Declaration").build("specifiers","source","importKind").field("specifiers",[s(i("ImportSpecifier"),i("ImportNamespaceSpecifier"),i("ImportDefaultSpecifier"))],n.emptyArray).field("source",i("Literal")).field("importKind",s("value","type"),function(){return"value"}),i("Block").bases("Comment").build("value","leading","trailing"),i("Line").bases("Comment").build("value","leading","trailing")}},{"../lib/shared":18,"../lib/types":19,"./es7":7}],9:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")).defaults;n("Type").bases("Node"),n("AnyTypeAnnotation").bases("Type").build(),n("EmptyTypeAnnotation").bases("Type").build(),n("MixedTypeAnnotation").bases("Type").build(),n("VoidTypeAnnotation").bases("Type").build(),n("NumberTypeAnnotation").bases("Type").build(),n("NumberLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Number).field("raw",String),n("NumericLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Number).field("raw",String),n("StringTypeAnnotation").bases("Type").build(),n("StringLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",String).field("raw",String),n("BooleanTypeAnnotation").bases("Type").build(),n("BooleanLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Boolean).field("raw",String),n("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",n("Type")),n("NullableTypeAnnotation").bases("Type").build("typeAnnotation").field("typeAnnotation",n("Type")),n("NullLiteralTypeAnnotation").bases("Type").build(),n("NullTypeAnnotation").bases("Type").build(),n("ThisTypeAnnotation").bases("Type").build(),n("ExistsTypeAnnotation").bases("Type").build(),n("ExistentialTypeParam").bases("Type").build(),n("FunctionTypeAnnotation").bases("Type").build("params","returnType","rest","typeParameters").field("params",[n("FunctionTypeParam")]).field("returnType",n("Type")).field("rest",i(n("FunctionTypeParam"),null)).field("typeParameters",i(n("TypeParameterDeclaration"),null)),n("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",n("Identifier")).field("typeAnnotation",n("Type")).field("optional",Boolean),n("ArrayTypeAnnotation").bases("Type").build("elementType").field("elementType",n("Type")),n("ObjectTypeAnnotation").bases("Type").build("properties","indexers","callProperties").field("properties",[n("ObjectTypeProperty")]).field("indexers",[n("ObjectTypeIndexer")],s.emptyArray).field("callProperties",[n("ObjectTypeCallProperty")],s.emptyArray).field("exact",Boolean,s.false),n("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",i(n("Literal"),n("Identifier"))).field("value",n("Type")).field("optional",Boolean).field("variance",i("plus","minus",null),s.null),n("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",n("Identifier")).field("key",n("Type")).field("value",n("Type")).field("variance",i("plus","minus",null),s.null),n("ObjectTypeCallProperty").bases("Node").build("value").field("value",n("FunctionTypeAnnotation")).field("static",Boolean,s.false),n("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",i(n("Identifier"),n("QualifiedTypeIdentifier"))).field("id",n("Identifier")),n("GenericTypeAnnotation").bases("Type").build("id","typeParameters").field("id",i(n("Identifier"),n("QualifiedTypeIdentifier"))).field("typeParameters",i(n("TypeParameterInstantiation"),null)),n("MemberTypeAnnotation").bases("Type").build("object","property").field("object",n("Identifier")).field("property",i(n("MemberTypeAnnotation"),n("GenericTypeAnnotation"))),n("UnionTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("IntersectionTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("TypeofTypeAnnotation").bases("Type").build("argument").field("argument",n("Type")),n("Identifier").field("typeAnnotation",i(n("TypeAnnotation"),null),s.null),n("TypeParameterDeclaration").bases("Node").build("params").field("params",[n("TypeParameter")]),n("TypeParameterInstantiation").bases("Node").build("params").field("params",[n("Type")]),n("TypeParameter").bases("Type").build("name","variance","bound").field("name",String).field("variance",i("plus","minus",null),s.null).field("bound",i(n("TypeAnnotation"),null),s.null),n("Function").field("returnType",i(n("TypeAnnotation"),null),s.null).field("typeParameters",i(n("TypeParameterDeclaration"),null),s.null),n("ClassProperty").build("key","value","typeAnnotation","static").field("value",i(n("Expression"),null)).field("typeAnnotation",i(n("TypeAnnotation"),null)).field("static",Boolean,s.false).field("variance",i("plus","minus",null),s.null),n("ClassImplements").field("typeParameters",i(n("TypeParameterInstantiation"),null),s.null),n("InterfaceDeclaration").bases("Declaration").build("id","body","extends").field("id",n("Identifier")).field("typeParameters",i(n("TypeParameterDeclaration"),null),s.null).field("body",n("ObjectTypeAnnotation")).field("extends",[n("InterfaceExtends")]),n("DeclareInterface").bases("InterfaceDeclaration").build("id","body","extends"),n("InterfaceExtends").bases("Node").build("id").field("id",n("Identifier")).field("typeParameters",i(n("TypeParameterInstantiation"),null)),n("TypeAlias").bases("Declaration").build("id","typeParameters","right").field("id",n("Identifier")).field("typeParameters",i(n("TypeParameterDeclaration"),null)).field("right",n("Type")),n("DeclareTypeAlias").bases("TypeAlias").build("id","typeParameters","right"),n("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TypeAnnotation")),n("TupleTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("DeclareVariable").bases("Statement").build("id").field("id",n("Identifier")),n("DeclareFunction").bases("Statement").build("id").field("id",n("Identifier")),n("DeclareClass").bases("InterfaceDeclaration").build("id"),n("DeclareModule").bases("Statement").build("id","body").field("id",i(n("Identifier"),n("Literal"))).field("body",n("BlockStatement")),n("DeclareModuleExports").bases("Statement").build("typeAnnotation").field("typeAnnotation",n("Type")),n("DeclareExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",i(n("DeclareVariable"),n("DeclareFunction"),n("DeclareClass"),n("Type"),null)).field("specifiers",[i(n("ExportSpecifier"),n("ExportBatchSpecifier"))],s.emptyArray).field("source",i(n("Literal"),null),s.null),n("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source",i(n("Literal"),null),s.null)}},{"../lib/shared":18,"../lib/types":19,"./es7":7}],10:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")).defaults;n("JSXAttribute").bases("Node").build("name","value").field("name",i(n("JSXIdentifier"),n("JSXNamespacedName"))).field("value",i(n("Literal"),n("JSXExpressionContainer"),null),s.null),n("JSXIdentifier").bases("Identifier").build("name").field("name",String),n("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",n("JSXIdentifier")).field("name",n("JSXIdentifier")),n("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",i(n("JSXIdentifier"),n("JSXMemberExpression"))).field("property",n("JSXIdentifier")).field("computed",Boolean,s.false);var a=i(n("JSXIdentifier"),n("JSXNamespacedName"),n("JSXMemberExpression"));n("JSXSpreadAttribute").bases("Node").build("argument").field("argument",n("Expression"));var o=[i(n("JSXAttribute"),n("JSXSpreadAttribute"))];n("JSXExpressionContainer").bases("Expression").build("expression").field("expression",n("Expression")),n("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",n("JSXOpeningElement")).field("closingElement",i(n("JSXClosingElement"),null),s.null).field("children",[i(n("JSXElement"),n("JSXExpressionContainer"),n("JSXText"),n("Literal"))],s.emptyArray).field("name",a,function(){return this.openingElement.name},!0).field("selfClosing",Boolean,function(){return this.openingElement.selfClosing},!0).field("attributes",o,function(){return this.openingElement.attributes},!0),n("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",a).field("attributes",o,s.emptyArray).field("selfClosing",Boolean,s.false),n("JSXClosingElement").bases("Node").build("name").field("name",a),n("JSXText").bases("Literal").build("value").field("value",String),n("JSXEmptyExpression").bases("Expression").build()}},{"../lib/shared":18,"../lib/types":19,"./es7":7}],11:[function(e,t,r){t.exports=function(t){t.use(e("./core"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")),a=s.geq,o=s.defaults;n("Function").field("body",i(n("BlockStatement"),n("Expression"))),n("ForInStatement").build("left","right","body","each").field("each",Boolean,o.false),n("ForOfStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("LetStatement").bases("Statement").build("head","body").field("head",[n("VariableDeclarator")]).field("body",n("Statement")),n("LetExpression").bases("Expression").build("head","body").field("head",[n("VariableDeclarator")]).field("body",n("Expression")),n("GraphExpression").bases("Expression").build("index","expression").field("index",a(0)).field("expression",n("Literal")),n("GraphIndexExpression").bases("Expression").build("index").field("index",a(0))}},{"../lib/shared":18,"../lib/types":19,"./core":4}],12:[function(e,t,r){t.exports=function(t){function r(e){var t=n.indexOf(e);return-1===t&&(t=n.length,n.push(e),i[t]=e(s)),i[t]}var n=[],i=[],s={};s.use=r;var a=r(e("./lib/types"));t.forEach(r),a.finalize();var o={Type:a.Type,builtInTypes:a.builtInTypes,namedTypes:a.namedTypes,builders:a.builders,defineMethod:a.defineMethod,getFieldNames:a.getFieldNames,getFieldValue:a.getFieldValue,eachField:a.eachField,someField:a.someField,getSupertypeNames:a.getSupertypeNames,astNodesAreEquivalent:r(e("./lib/equiv")),finalize:a.finalize,Path:r(e("./lib/path")),NodePath:r(e("./lib/node-path")),PathVisitor:r(e("./lib/path-visitor")),use:r};return o.visit=o.PathVisitor.visit,o}},{"./lib/equiv":13,"./lib/node-path":14,"./lib/path":16,"./lib/path-visitor":15,"./lib/types":19}],13:[function(e,t,r){t.exports=function(t){function r(e,t,r){return u.check(r)?r.length=0:r=null,i(e,t,r)}function n(e){return/[_$a-z][_$a-z0-9]*/i.test(e)?"."+e:"["+JSON.stringify(e)+"]"}function i(e,t,r){return e===t||(u.check(e)?function(e,t,r){u.assert(e);var n=e.length;if(!u.check(t)||t.length!==n)return r&&r.push("length"),!1;for(var s=0;s<n;++s){if(r&&r.push(s),s in e!=s in t)return!1;if(!i(e[s],t[s],r))return!1;if(r){var a=r.pop();if(a!==s)throw new Error(""+a)}}return!0}(e,t,r):l.check(e)?function(e,t,r){if(l.assert(e),!l.check(t))return!1;if(e.type!==t.type)return r&&r.push("type"),!1;var n=a(e),s=n.length,u=a(t),c=u.length;if(s===c){for(var p=0;p<s;++p){var f=n[p],d=o(e,f),m=o(t,f);if(r&&r.push(f),!i(d,m,r))return!1;if(r){var y=r.pop();if(y!==f)throw new Error(""+y)}}return!0}if(!r)return!1;var g=Object.create(null);for(p=0;p<s;++p)g[n[p]]=!0;for(p=0;p<c;++p){if(f=u[p],!h.call(g,f))return r.push(f),!1;delete g[f]}for(f in g){r.push(f);break}return!1}(e,t,r):c.check(e)?c.check(t)&&+e==+t:p.check(e)?p.check(t)&&e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.ignoreCase===t.ignoreCase:e==t)}var s=t.use(e("../lib/types")),a=s.getFieldNames,o=s.getFieldValue,u=s.builtInTypes.array,l=s.builtInTypes.object,c=s.builtInTypes.Date,p=s.builtInTypes.RegExp,h=Object.prototype.hasOwnProperty;return r.assert=function(e,t){var i=[];if(!r(e,t,i)){if(0!==i.length)throw new Error("Nodes differ in the following path: "+i.map(n).join(""));if(e!==t)throw new Error("Nodes must be equal")}},r}},{"../lib/types":19}],14:[function(e,t,r){t.exports=function(t){function r(e,t,n){if(!(this instanceof r))throw new Error("NodePath constructor cannot be invoked without 'new'");p.call(this,e,t,n)}function n(e){return o.BinaryExpression.check(e)||o.LogicalExpression.check(e)}function i(e){return!!o.CallExpression.check(e)||(c.check(e)?e.some(i):!!o.Node.check(e)&&a.someField(e,function(e,t){return i(t)}))}function s(e){if(o.VariableDeclaration.check(e.node)){var t=e.get("declarations").value;if(!t||0===t.length)return e.prune()}else if(o.ExpressionStatement.check(e.node)){if(!e.get("expression").value)return e.prune()}else o.IfStatement.check(e.node)&&function(e){var t=e.get("test").value,r=e.get("alternate").value,n=e.get("consequent").value;if(n||r){if(!n&&r){var i=u.unaryExpression("!",t,!0);o.UnaryExpression.check(t)&&"!"===t.operator&&(i=t.argument),e.get("test").replace(i),e.get("consequent").replace(r),e.get("alternate").replace()}}else{var s=u.expressionStatement(t);e.replace(s)}}(e);return e}var a=t.use(e("./types")),o=a.namedTypes,u=a.builders,l=a.builtInTypes.number,c=a.builtInTypes.array,p=t.use(e("./path")),h=t.use(e("./scope")),f=r.prototype=Object.create(p.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}});Object.defineProperties(f,{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}}}),f.replace=function(){return delete this.node,delete this.parent,delete this.scope,p.prototype.replace.apply(this,arguments)},f.prune=function(){var e=this.parent;return this.replace(),s(e)},f._computeNode=function(){var e=this.value;if(o.Node.check(e))return e;var t=this.parentPath;return t&&t.node||null},f._computeParent=function(){var e=this.value,t=this.parentPath;if(!o.Node.check(e)){for(;t&&!o.Node.check(t.value);)t=t.parentPath;t&&(t=t.parentPath)}for(;t&&!o.Node.check(t.value);)t=t.parentPath;return t||null},f._computeScope=function(){var e=this.value,t=this.parentPath,r=t&&t.scope;return o.Node.check(e)&&h.isEstablishedBy(e)&&(r=new h(this,r)),r||null},f.getValueProperty=function(e){return a.getFieldValue(this.value,e)},f.needsParens=function(e){if(!(s=this.parentPath))return!1;var t=this.value;if(!o.Expression.check(t))return!1;if("Identifier"===t.type)return!1;for(;!o.Node.check(s.value);)if(!(s=s.parentPath))return!1;var r=s.value;switch(t.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return"MemberExpression"===r.type&&"object"===this.name&&r.object===t;case"BinaryExpression":case"LogicalExpression":switch(r.type){case"CallExpression":return"callee"===this.name&&r.callee===t;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return"object"===this.name&&r.object===t;case"BinaryExpression":case"LogicalExpression":var n=r.operator,s=d[n],a=t.operator,u=d[a];if(s>u)return!0;if(s===u&&"right"===this.name){if(r.right!==t)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&&l.check(t.value)&&"object"===this.name&&r.object===t;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===t;case"ConditionalExpression":return"test"===this.name&&r.test===t;case"MemberExpression":return"object"===this.name&&r.object===t;default:return!1}default:if("NewExpression"===r.type&&"callee"===this.name&&r.callee===t)return i(t)}return!(!0===e||this.canBeFirstInStatement()||!this.firstInStatement())};var d={};return[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(e,t){e.forEach(function(e){d[e]=t})}),f.canBeFirstInStatement=function(){var e=this.node;return!o.FunctionExpression.check(e)&&!o.ObjectExpression.check(e)},f.firstInStatement=function(){return function(e){for(var t,r;e.parent;e=e.parent){if(t=e.node,r=e.parent.node,o.BlockStatement.check(r)&&"body"===e.parent.name&&0===e.name){if(r.body[0]!==t)throw new Error("Nodes must be equal");return!0}if(o.ExpressionStatement.check(r)&&"expression"===e.name){if(r.expression!==t)throw new Error("Nodes must be equal");return!0}if(o.SequenceExpression.check(r)&&"expressions"===e.parent.name&&0===e.name){if(r.expressions[0]!==t)throw new Error("Nodes must be equal")}else if(o.CallExpression.check(r)&&"callee"===e.name){if(r.callee!==t)throw new Error("Nodes must be equal")}else if(o.MemberExpression.check(r)&&"object"===e.name){if(r.object!==t)throw new Error("Nodes must be equal")}else if(o.ConditionalExpression.check(r)&&"test"===e.name){if(r.test!==t)throw new Error("Nodes must be equal")}else if(n(r)&&"left"===e.name){if(r.left!==t)throw new Error("Nodes must be equal")}else{if(!o.UnaryExpression.check(r)||r.prefix||"argument"!==e.name)return!1;if(r.argument!==t)throw new Error("Nodes must be equal")}}return!0}(this)},r}},{"./path":16,"./scope":17,"./types":19}],15:[function(e,t,r){var n=Object.prototype.hasOwnProperty;t.exports=function(t){function r(){if(!(this instanceof r))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=function(e){var t=Object.create(null);for(var r in e)/^visit[A-Z]/.test(r)&&(t[r.slice("visit".length)]=!0);for(var n=a.computeSupertypeLookupTable(t),i=Object.create(null),s=(t=Object.keys(n)).length,o=0;o<s;++o){var u=t[o];r="visit"+n[u],c.check(e[r])&&(i[u]=r)}return i}(this),this._shouldVisitComments=n.call(this._methodNameTable,"Block")||n.call(this._methodNameTable,"Line"),this.Context=function(e){function t(n){if(!(this instanceof t))throw new Error("");if(!(this instanceof r))throw new Error("");if(!(n instanceof o))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,i(n,h),t}(this),this._visiting=!1,this._changeReported=!1}function i(e,t){for(var r in t)n.call(t,r)&&(e[r]=t[r]);return e}function s(e,t){if(!(e instanceof o))throw new Error("");if(!(t instanceof r))throw new Error("");var i=e.value;if(u.check(i))e.each(t.visitWithoutReset,t);else if(l.check(i)){var s=a.getFieldNames(i);t._shouldVisitComments&&i.comments&&s.indexOf("comments")<0&&s.push("comments");for(var c=s.length,p=[],h=0;h<c;++h){var f=s[h];n.call(i,f)||(i[f]=a.getFieldValue(i,f)),p.push(e.get(f))}for(h=0;h<c;++h)t.visitWithoutReset(p[h])}else;return e.value}var a=t.use(e("./types")),o=t.use(e("./node-path")),u=(a.namedTypes.Printable,a.builtInTypes.array),l=a.builtInTypes.object,c=a.builtInTypes.function;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(!l.check(e))return new r;var n=t.prototype=Object.create(p);return n.constructor=t,i(n,e),i(t,r),c.assert(t.fromMethodsObject),c.assert(t.visit),new t},r.visit=function(e,t){return r.fromMethodsObject(t).visit(e)};var p=r.prototype;p.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),r=0;r<e;++r)t[r]=arguments[r];t[0]instanceof o||(t[0]=new o({root:t[0]}).get("root")),this.reset.apply(this,t);try{var n=this.visitWithoutReset(t[0]),i=!0}finally{if(this._visiting=!1,!i&&this._abortRequested)return t[0].value}return n},p.AbortRequest=function(){},p.abort=function(){var e=this;e._abortRequested=!0;var t=new e.AbortRequest;throw t.cancel=function(){e._abortRequested=!1},t},p.reset=function(e){},p.visitWithoutReset=function(e){if(this instanceof this.Context)return this.visitor.visitWithoutReset(e);if(!(e instanceof o))throw new Error("");var t=e.value,r=t&&"object"==typeof t&&"string"==typeof t.type&&this._methodNameTable[t.type];if(!r)return s(e,this);var n=this.acquireContext(e);try{return n.invokeVisitorMethod(r)}finally{this.releaseContext(n)}},p.acquireContext=function(e){return 0===this._reusableContextStack.length?new this.Context(e):this._reusableContextStack.pop().reset(e)},p.releaseContext=function(e){if(!(e instanceof this.Context))throw new Error("");this._reusableContextStack.push(e),e.currentPath=null},p.reportChanged=function(){this._changeReported=!0},p.wasChangeReported=function(){return this._changeReported};var h=Object.create(null);return h.reset=function(e){if(!(this instanceof this.Context))throw new Error("");if(!(e instanceof o))throw new Error("");return this.currentPath=e,this.needToCallTraverse=!0,this},h.invokeVisitorMethod=function(e){if(!(this instanceof this.Context))throw new Error("");if(!(this.currentPath instanceof o))throw new Error("");var t=this.visitor[e].call(this,this.currentPath);if(!1===t?this.needToCallTraverse=!1:void 0!==t&&(this.currentPath=this.currentPath.replace(t)[0],this.needToCallTraverse&&this.traverse(this.currentPath)),!1!==this.needToCallTraverse)throw new Error("Must either call this.traverse or return false in "+e);var r=this.currentPath;return r&&r.value},h.traverse=function(e,t){if(!(this instanceof this.Context))throw new Error("");if(!(e instanceof o))throw new Error("");if(!(this.currentPath instanceof o))throw new Error("");return this.needToCallTraverse=!1,s(e,r.fromMethodsObject(t||this.visitor))},h.visit=function(e,t){if(!(this instanceof this.Context))throw new Error("");if(!(e instanceof o))throw new Error("");if(!(this.currentPath instanceof o))throw new Error("");return this.needToCallTraverse=!1,r.fromMethodsObject(t||this.visitor).visitWithoutReset(e)},h.reportChanged=function(){this.visitor.reportChanged()},h.abort=function(){this.needToCallTraverse=!1,this.visitor.abort()},r}},{"./node-path":14,"./types":19}],16:[function(e,t,r){var n=Array.prototype,i=(n.slice,n.map,Object.prototype.hasOwnProperty);t.exports=function(t){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 n(e){return e.__childCache||(e.__childCache=Object.create(null))}function s(e,t){var r=n(e),s=e.getValueProperty(t),a=r[t];return i.call(r,t)&&a.value===s||(a=r[t]=new e.constructor(s,e,t)),a}function a(){}function o(e,t,r,s){if(l.assert(e.value),0===t)return a;var o=e.value.length;if(o<1)return a;var u=arguments.length;2===u?(r=0,s=o):3===u?(r=Math.max(r,0),s=o):(r=Math.max(r,0),s=Math.min(s,o)),c.assert(r),c.assert(s);for(var p=Object.create(null),h=n(e),f=r;f<s;++f)if(i.call(e.value,f)){var d=e.get(f);if(d.name!==f)throw new Error("");var m=f+t;d.name=m,p[m]=d,delete h[f]}return delete h.length,function(){for(var t in p){var r=p[t];if(r.name!==+t)throw new Error("");h[t]=r,e.value[t]=r.value}}}var u=t.use(e("./types")),l=u.builtInTypes.array,c=u.builtInTypes.number,p=r.prototype;return p.getValueProperty=function(e){return this.value[e]},p.get=function(e){for(var t=this,r=arguments,n=r.length,i=0;i<n;++i)t=s(t,r[i]);return t},p.each=function(e,t){var r=[],n=this.value.length,s=0;for(s=0;s<n;++s)i.call(this.value,s)&&(r[s]=this.get(s));for(t=t||this,s=0;s<n;++s)i.call(r,s)&&e.call(t,r[s])},p.map=function(e,t){var r=[];return this.each(function(t){r.push(e.call(this,t))},t),r},p.filter=function(e,t){var r=[];return this.each(function(t){e.call(this,t)&&r.push(t)},t),r},p.shift=function(){var e=o(this,-1),t=this.value.shift();return e(),t},p.unshift=function(e){var t=o(this,arguments.length),r=this.value.unshift.apply(this.value,arguments);return t(),r},p.push=function(e){return l.assert(this.value),delete n(this).length,this.value.push.apply(this.value,arguments)},p.pop=function(){l.assert(this.value);var e=n(this);return delete e[this.value.length-1],delete e.length,this.value.pop()},p.insertAt=function(e,t){var r=arguments.length,n=o(this,r-1,e);if(n===a)return this;e=Math.max(e,0);for(var i=1;i<r;++i)this.value[e+i-1]=arguments[i];return n(),this},p.insertBefore=function(e){for(var t=this.parentPath,r=arguments.length,n=[this.name],i=0;i<r;++i)n.push(arguments[i]);return t.insertAt.apply(t,n)},p.insertAfter=function(e){for(var t=this.parentPath,r=arguments.length,n=[this.name+1],i=0;i<r;++i)n.push(arguments[i]);return t.insertAt.apply(t,n)},p.replace=function(e){var t=[],i=this.parentPath.value,s=n(this.parentPath),a=arguments.length;if(function(e){if(!(e instanceof r))throw new Error("");var t=e.parentPath;if(!t)return e;var i=t.value,s=n(t);if(i[e.name]===e.value)s[e.name]=e;else if(l.check(i)){var a=i.indexOf(e.value);a>=0&&(s[e.name=a]=e)}else i[e.name]=e.value,s[e.name]=e;if(i[e.name]!==e.value)throw new Error("");if(e.parentPath.get(e.name)!==e)throw new Error("")}(this),l.check(i)){for(var u=i.length,c=o(this.parentPath,a-1,this.name+1),p=[this.name,1],h=0;h<a;++h)p.push(arguments[h]);if(i.splice.apply(i,p)[0]!==this.value)throw new Error("");if(i.length!==u-1+a)throw new Error("");if(c(),0===a)delete this.value,delete s[this.name],this.__childCache=null;else{if(i[this.name]!==e)throw new Error("");for(this.value!==e&&(this.value=e,this.__childCache=null),h=0;h<a;++h)t.push(this.parentPath.get(this.name+h));if(t[0]!==this)throw new Error("")}}else if(1===a)this.value!==e&&(this.__childCache=null),this.value=i[this.name]=e,t.push(this);else{if(0!==a)throw new Error("Could not replace path");delete i[this.name],delete this.value,this.__childCache=null}return t},r}},{"./types":19}],17:[function(e,t,r){var n=Object.prototype.hasOwnProperty;t.exports=function(t){function r(n,i){if(!(this instanceof r))throw new Error("Scope constructor cannot be invoked without 'new'");if(!(n instanceof t.use(e("./node-path"))))throw new Error("");m.assert(n.value);var s;if(i){if(!(i instanceof r))throw new Error("");s=i.depth+1}else i=null,s=0;Object.defineProperties(this,{path:{value:n},node:{value:n.value},isGlobal:{value:!i,enumerable:!0},depth:{value:s},parent:{value:i},bindings:{value:{}},types:{value:{}}})}function i(e,t,r){var i=e.value;e.parent&&l.FunctionExpression.check(e.parent.node)&&e.parent.node.id&&a(e.parent.get("id"),t),i&&(h.check(i)?e.each(function(e){s(e,t,r)}):l.Function.check(i)?(e.get("params").each(function(e){a(e,t)}),s(e.get("body"),t,r)):l.TypeAlias&&l.TypeAlias.check(i)?function(e,t){var r=e.value;l.Pattern.assert(r),l.Identifier.check(r)&&(n.call(t,r.name)?t[r.name].push(e):t[r.name]=[e])}(e.get("id"),r):l.VariableDeclarator.check(i)?(a(e.get("id"),t),s(e.get("init"),t,r)):"ImportSpecifier"===i.type||"ImportNamespaceSpecifier"===i.type||"ImportDefaultSpecifier"===i.type?a(e.get(i.local?"local":i.name?"name":"id"),t):c.check(i)&&!p.check(i)&&o.eachField(i,function(n,i){var a=e.get(n);if(!function(e,t){if(e.value===t)return!0;if(Array.isArray(e.value)&&0===e.value.length&&Array.isArray(t)&&0===t.length)return!0;return!1}(a,i))throw new Error("");s(a,t,r)}))}function s(e,t,r){var s=e.value;if(!s||p.check(s));else if(l.FunctionDeclaration.check(s)&&null!==s.id)a(e.get("id"),t);else if(l.ClassDeclaration&&l.ClassDeclaration.check(s))a(e.get("id"),t);else if(m.check(s)){if(l.CatchClause.check(s)){var o=s.param.name,u=n.call(t,o);i(e.get("body"),t,r),u||delete t[o]}}else i(e,t,r)}function a(e,t){var r=e.value;l.Pattern.assert(r),l.Identifier.check(r)?n.call(t,r.name)?t[r.name].push(e):t[r.name]=[e]:l.ObjectPattern&&l.ObjectPattern.check(r)?e.get("properties").each(function(e){var r=e.value;l.Pattern.check(r)?a(e,t):l.Property.check(r)?a(e.get("value"),t):l.SpreadProperty&&l.SpreadProperty.check(r)&&a(e.get("argument"),t)}):l.ArrayPattern&&l.ArrayPattern.check(r)?e.get("elements").each(function(e){var r=e.value;l.Pattern.check(r)?a(e,t):l.SpreadElement&&l.SpreadElement.check(r)&&a(e.get("argument"),t)}):l.PropertyPattern&&l.PropertyPattern.check(r)?a(e.get("pattern"),t):(l.SpreadElementPattern&&l.SpreadElementPattern.check(r)||l.SpreadPropertyPattern&&l.SpreadPropertyPattern.check(r))&&a(e.get("argument"),t)}var o=t.use(e("./types")),u=o.Type,l=o.namedTypes,c=l.Node,p=l.Expression,h=o.builtInTypes.array,f=o.builders,d=[l.Program,l.Function,l.CatchClause],m=u.or.apply(u,d);r.isEstablishedBy=function(e){return m.check(e)};var y=r.prototype;return y.didScan=!1,y.declares=function(e){return this.scan(),n.call(this.bindings,e)},y.declaresType=function(e){return this.scan(),n.call(this.types,e)},y.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 r=e+t;return this.bindings[r]=o.builders.identifier(r)},y.injectTemporary=function(e,t){e||(e=this.declareTemporary());var r=this.path.get("body");return l.BlockStatement.check(r.value)&&(r=r.get("body")),r.unshift(f.variableDeclaration("var",[f.variableDeclarator(e,t||null)])),e},y.scan=function(e){if(e||!this.didScan){for(var t in this.bindings)delete this.bindings[t];!function(e,t,r){var n=e.value;m.assert(n),l.CatchClause.check(n)?a(e.get("param"),t):i(e,t,r)}(this.path,this.bindings,this.types),this.didScan=!0}},y.getBindings=function(){return this.scan(),this.bindings},y.getTypes=function(){return this.scan(),this.types},y.lookup=function(e){for(var t=this;t&&!t.declares(e);t=t.parent);return t},y.lookupType=function(e){for(var t=this;t&&!t.declaresType(e);t=t.parent);return t},y.getGlobalScope=function(){for(var e=this;!e.isGlobal;)e=e.parent;return e},r}},{"./node-path":14,"./types":19}],18:[function(e,t,r){t.exports=function(t){var r={},n=t.use(e("../lib/types")),i=n.Type,s=n.builtInTypes,a=s.number;r.geq=function(e){return new i(function(t){return a.check(t)&&t>=e},a+" >= "+e)},r.defaults={null:function(){return null},emptyArray:function(){return[]},false:function(){return!1},true:function(){return!0},undefined:function(){}};var o=i.or(s.string,s.number,s.boolean,s.null,s.undefined);return r.isPrimitive=new i(function(e){if(null===e)return!0;var t=typeof e;return!("object"===t||"function"===t)},o.toString()),r}},{"../lib/types":19}],19:[function(e,t,r){var n=Array.prototype,i=n.slice,s=(n.map,n.forEach,Object.prototype),a=s.toString,o=a.call(function(){}),u=a.call(""),l=s.hasOwnProperty;t.exports=function(){function e(t,r){var n=this;if(!(n instanceof e))throw new Error("Type constructor cannot be invoked without 'new'");if(a.call(t)!==o)throw new Error(t+" is not a function");var i=a.call(r);if(i!==o&&i!==u)throw new Error(r+" is neither a function nor a string");Object.defineProperties(n,{name:{value:r},check:{value:function(e,r){var i=t.call(n,e,r);return!i&&r&&a.call(r)===o&&r(n,e),i}}})}function t(e){return S.check(e)?"{"+Object.keys(e).map(function(t){return t+": "+e[t]}).join(", ")+"}":D.check(e)?"["+e.map(t).join(", ")+"]":JSON.stringify(e)}function r(t,r){var n=a.call(t),i=new e(function(e){return a.call(e)===n},r);return x[r]=i,t&&"function"==typeof t.constructor&&(b.push(t.constructor),v.push(i)),i}function n(t,r){if(t instanceof e)return t;if(t instanceof c)return t.type;if(D.check(t))return e.fromArray(t);if(S.check(t))return e.fromObject(t);if(A.check(t)){var n=b.indexOf(t);return n>=0?v[n]:new e(t,r)}return new e(function(e){return e===t},_.check(r)?function(){return t+""}:r)}function s(e,t,r,i){if(!(this instanceof s))throw new Error("Field constructor cannot be invoked without 'new'");E.assert(e);var a={name:{value:e},type:{value:t=n(t)},hidden:{value:!!i}};A.check(r)&&(a.defaultFn={value:r}),Object.defineProperties(this,a)}function c(t){var r=this;if(!(r instanceof c))throw new Error("Def constructor cannot be invoked without 'new'");Object.defineProperties(r,{typeName:{value:t},baseNames:{value:[]},ownFields:{value:Object.create(null)},allSupertypes:{value:Object.create(null)},supertypeList:{value:[]},allFields:{value:Object.create(null)},fieldNames:{value:[]},type:{value:new e(function(e,t){return r.check(e,t)},t)}})}function p(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 h(e){return(e=p(e)).replace(/(Expression)?$/,"Statement")}function f(e){var t=c.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 d(e,t){var r=c.fromValue(e);if(r){var n=r.allFields[t];if(n)return n.getValue(e)}return e&&e[t]}function m(e,t){return Object.keys(t).forEach(function(r){e[r]=t[r]}),e}var y={},g=e.prototype;y.Type=e,g.assert=function(e,r){if(!this.check(e,r)){var n=t(e);throw new Error(n+" does not match type "+this)}return!0},g.toString=function(){var e=this.name;return E.check(e)?e:A.check(e)?e.call(this)+"":e+" type"};var b=[],v=[],x={};y.builtInTypes=x;var E=r("truthy","string"),A=r(function(){},"function"),D=r([],"array"),S=r({},"object"),C=(r(/./,"RegExp"),r(new Date,"Date"),r(3,"number")),_=(r(!0,"boolean"),r(null,"null"),r(void 0,"undefined"));e.or=function(){for(var t=[],r=arguments.length,i=0;i<r;++i)t.push(n(arguments[i]));return new e(function(e,n){for(var i=0;i<r;++i)if(t[i].check(e,n))return!0;return!1},function(){return t.join(" | ")})},e.fromArray=function(e){if(!D.check(e))throw new Error("");if(1!==e.length)throw new Error("only one element type is permitted for typed arrays");return n(e[0]).arrayOf()},g.arrayOf=function(){var t=this;return new e(function(e,r){return D.check(e)&&e.every(function(e){return t.check(e,r)})},function(){return"["+t+"]"})},e.fromObject=function(t){var r=Object.keys(t).map(function(e){return new s(e,t[e])});return new e(function(e,t){return S.check(e)&&r.every(function(r){return r.type.check(e[r.name],t)})},function(){return"{ "+r.join(", ")+" }"})};var w=s.prototype;w.toString=function(){return JSON.stringify(this.name)+": "+this.type},w.getValue=function(e){var t=e[this.name];return _.check(t)?(this.defaultFn&&(t=this.defaultFn.call(e)),t):t},e.def=function(e){return E.assert(e),l.call(k,e)?k[e]:k[e]=new c(e)};var k=Object.create(null);c.fromValue=function(e){if(e&&"object"==typeof e){var t=e.type;if("string"==typeof t&&l.call(k,t)){var r=k[t];if(r.finalized)return r}}return null};var F=c.prototype;F.isSupertypeOf=function(e){if(e instanceof c){if(!0!==this.finalized||!0!==e.finalized)throw new Error("");return l.call(e.allSupertypes,this.typeName)}throw new Error(e+" is not a Def")},y.getSupertypeNames=function(e){if(!l.call(k,e))throw new Error("");var t=k[e];if(!0!==t.finalized)throw new Error("");return t.supertypeList.slice(1)},y.computeSupertypeLookupTable=function(e){for(var t={},r=Object.keys(k),n=r.length,i=0;i<n;++i){var s=r[i],a=k[s];if(!0!==a.finalized)throw new Error(""+s);for(var o=0;o<a.supertypeList.length;++o){var u=a.supertypeList[o];if(l.call(e,u)){t[s]=u;break}}}return t},F.checkAllFields=function(e,t){var r=this.allFields;if(!0!==this.finalized)throw new Error(""+this.typeName);return S.check(e)&&Object.keys(r).every(function(n){var i=r[n],s=i.type,a=i.getValue(e);return s.check(a,t)})},F.check=function(e,t){if(!0!==this.finalized)throw new Error("prematurely checking unfinalized type "+this.typeName);if(!S.check(e))return!1;var r=c.fromValue(e);return r?t&&r===this?this.checkAllFields(e,t):!!this.isSupertypeOf(r)&&(!t||r.checkAllFields(e,t)&&this.checkAllFields(e,!1)):("SourceLocation"===this.typeName||"Position"===this.typeName)&&this.checkAllFields(e,t)},F.bases=function(){var e=i.call(arguments),t=this.baseNames;if(this.finalized){if(e.length!==t.length)throw new Error("");for(var r=0;r<e.length;r++)if(e[r]!==t[r])throw new Error("");return this}return e.forEach(function(e){E.assert(e),t.indexOf(e)<0&&t.push(e)}),this},Object.defineProperty(F,"buildable",{value:!1});var T={};y.builders=T;var P={};y.defineMethod=function(e,t){var r=P[e];return _.check(t)?delete P[e]:(A.assert(t),Object.defineProperty(P,e,{enumerable:!0,configurable:!0,value:t})),r};var B=E.arrayOf();F.build=function(){var e=this,r=i.call(arguments);return B.assert(r),Object.defineProperty(e,"buildParams",{value:r,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(T,p(e.typeName),{enumerable:!0,value:function(){function r(r,a){if(!l.call(s,r)){var o=e.allFields;if(!l.call(o,r))throw new Error(""+r);var u,c=o[r],p=c.type;if(C.check(a)&&a<i)u=n[a];else{if(!c.defaultFn){var h="no value or default function given for field "+JSON.stringify(r)+" of "+e.typeName+"("+e.buildParams.map(function(e){return o[e]}).join(", ")+")";throw new Error(h)}u=c.defaultFn.call(s)}if(!p.check(u))throw new Error(t(u)+" does not match field "+c+" of type "+e.typeName);s[r]=u}}var n=arguments,i=n.length,s=Object.create(P);if(!e.finalized)throw new Error("attempting to instantiate unfinalized type "+e.typeName);if(e.buildParams.forEach(function(e,t){r(e,t)}),Object.keys(e.allFields).forEach(function(e){r(e)}),s.type!==e.typeName)throw new Error("");return s}}),e)},y.getBuilderName=p,y.getStatementBuilderName=h,F.field=function(e,t,r,n){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,r,n),this)};var O={};return y.namedTypes=O,y.getFieldNames=f,y.getFieldValue=d,y.eachField=function(e,t,r){f(e).forEach(function(r){t.call(this,r,d(e,r))},r)},y.someField=function(e,t,r){return f(e).some(function(r){return t.call(this,r,d(e,r))},r)},Object.defineProperty(F,"finalized",{value:!1}),F.finalize=function(){var e=this;if(!e.finalized){var t=e.allFields,r=e.allSupertypes;e.baseNames.forEach(function(n){var i=k[n];if(!(i instanceof c)){var s="unknown supertype name "+JSON.stringify(n)+" for subtype "+JSON.stringify(e.typeName);throw new Error(s)}i.finalize(),m(t,i.allFields),m(r,i.allSupertypes)}),m(t,e.ownFields),r[e.typeName]=e,e.fieldNames.length=0;for(var n in t)l.call(t,n)&&!t[n].hidden&&e.fieldNames.push(n);Object.defineProperty(O,e.typeName,{enumerable:!0,value:e.type}),Object.defineProperty(e,"finalized",{value:!0}),function(e,t){t.length=0,t.push(e);for(var r=Object.create(null),n=0;n<t.length;++n){e=t[n];var i=k[e];if(!0!==i.finalized)throw new Error("");l.call(r,e)&&delete t[r[e]],r[e]=n,t.push.apply(t,i.baseNames)}for(var s=0,a=s,o=t.length;a<o;++a)l.call(t,a)&&(t[s++]=t[a]);t.length=s}(e.typeName,e.supertypeList),e.buildable&&e.supertypeList.lastIndexOf("Expression")>=0&&function(e){var t=h(e);if(!T[t]){var r=T[p(e)];r&&(T[t]=function(){return T.expressionStatement(r.apply(T,arguments))})}}(e.typeName)}},y.finalize=function(){Object.keys(k).forEach(function(e){k[e].finalize()})},y}},{}],20:[function(e,t,r){t.exports=e("./fork")([e("./def/core"),e("./def/es6"),e("./def/es7"),e("./def/mozilla"),e("./def/e4x"),e("./def/jsx"),e("./def/flow"),e("./def/esprima"),e("./def/babel"),e("./def/babel6")])},{"./def/babel":2,"./def/babel6":3,"./def/core":4,"./def/e4x":5,"./def/es6":6,"./def/es7":7,"./def/esprima":8,"./def/flow":9,"./def/jsx":10,"./def/mozilla":11,"./fork":12}],21:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return t.replace(a.default,function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=function(e){var t=e.slice(-2),r=t[0],n=t[1],i=(0,s.matchToToken)(e);if("name"===i.type){if(o.default.keyword.isReservedWordES6(i.value))return"keyword";if(c.test(i.value)&&("<"===n[r-1]||"</"==n.substr(r-2,2)))return"jsx_tag";if(i.value[0]!==i.value[0].toLowerCase())return"capitalized"}return"punctuator"===i.type&&p.test(i.value)?"bracket":i.type}(r),a=e[i];return a?r[0].split(l).map(function(e){return a(e)}).join("\n"):r[0]})}r.__esModule=!0,r.default=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};r=Math.max(r,0);var s=n.highlightCode&&u.default.supportsColor||n.forceColor,a=u.default;n.forceColor&&(a=new u.default.constructor({enabled:!0}));var o=function(e,t){return s?e(t):t},c=function(e){return{keyword:e.cyan,capitalized:e.yellow,jsx_tag:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.grey,invalid:e.white.bgRed.bold,gutter:e.grey,marker:e.red.bold}}(a);s&&(e=i(c,e));var p=n.linesAbove||2,h=n.linesBelow||3,f=e.split(l),d=Math.max(t-(p+1),0),m=Math.min(f.length,t+h);t||r||(d=0,m=f.length);var y=String(m).length,g=f.slice(d,m).map(function(e,n){var i=d+1+n,s=" "+(" "+i).slice(-y)+" | ";if(i===t){var a="";if(r){var u=e.slice(0,r-1).replace(/[^\t]/g," ");a=["\n ",o(c.gutter,s.replace(/\d/g," ")),u,o(c.marker,"^")].join("")}return[o(c.marker,">"),o(c.gutter,s),e,a].join("")}return" "+o(c.gutter,s)+e}).join("\n");return s?a.reset(g):g};var s=e("js-tokens"),a=n(s),o=n(e("esutils")),u=n(e("chalk")),l=/\r\n|[\n\r\u2028\u2029]/,c=/^[a-z][\w-]*$/i,p=/^[()\[\]{}]$/;t.exports=r.default},{chalk:24,esutils:28,"js-tokens":322}],22:[function(e,t,r){"use strict";t.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g}},{}],23:[function(e,t,r){"use strict";Object.defineProperty(t,"exports",{enumerable:!0,get:function(){var e={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};return e.colors.grey=e.colors.gray,Object.keys(e).forEach(function(t){var r=e[t];Object.keys(r).forEach(function(t){var n=r[t];e[t]=r[t]={open:"["+n[0]+"m",close:"["+n[1]+"m"}}),Object.defineProperty(e,t,{value:r,enumerable:!1})}),e}})},{}],24:[function(e,t,r){(function(r){"use strict";function n(e){this.enabled=e&&void 0!==e.enabled?e.enabled:l}function i(e){var t=function(){return function(){var e=arguments,t=e.length,r=0!==t&&String(arguments[0]);if(t>1)for(var n=1;n<t;n++)r+=" "+e[n];if(!this.enabled||!r)return r;var i=this._styles,s=i.length,o=a.dim.open;!p||-1===i.indexOf("gray")&&-1===i.indexOf("grey")||(a.dim.open="");for(;s--;){var u=a[i[s]];r=u.open+r.replace(u.closeRe,u.open)+u.close}return a.dim.open=o,r}.apply(t,arguments)};return t._styles=e,t.enabled=this.enabled,t.__proto__=f,t}var s=e("escape-string-regexp"),a=e("ansi-styles"),o=e("strip-ansi"),u=e("has-ansi"),l=e("supports-color"),c=Object.defineProperties,p="win32"===r.platform&&!/^xterm/i.test(r.env.TERM);p&&(a.blue.open="");var h=function(){var e={};return Object.keys(a).forEach(function(t){a[t].closeRe=new RegExp(s(a[t].close),"g"),e[t]={get:function(){return i.call(this,this._styles.concat(t))}}}),e}(),f=c(function(){},h);c(n.prototype,function(){var e={};return Object.keys(h).forEach(function(t){e[t]={get:function(){return i.call(this,[t])}}}),e}()),t.exports=new n,t.exports.styles=a,t.exports.hasColor=u,t.exports.stripColor=o,t.exports.supportsColor=l}).call(this,e("_process"))},{_process:550,"ansi-styles":23,"escape-string-regexp":312,"has-ansi":314,"strip-ansi":29,"supports-color":30}],25:[function(e,t,r){!function(){"use strict";function e(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function r(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}t.exports={isExpression:function(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1},isStatement:e,isIterationStatement:function(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1},isSourceElement:function(t){return e(t)||null!=t&&"FunctionDeclaration"===t.type},isProblematicIfStatement:function(e){var t;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;t=e.consequent;do{if("IfStatement"===t.type&&null==t.alternate)return!0;t=r(t)}while(t);return!1},trailingStatement:r}}()},{}],26:[function(e,t,r){!function(){"use strict";function e(e){if(e<=65535)return String.fromCharCode(e);return String.fromCharCode(Math.floor((e-65536)/1024)+55296)+String.fromCharCode((e-65536)%1024+56320)}var r,n,i,s,a,o;for(n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\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\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\u0C59\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\u0D60\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-\u13F4\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\u19C1-\u19C7\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\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\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\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\u0C59\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\u0D60\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-\u13F4\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\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},i=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],s=new Array(128),o=0;o<128;++o)s[o]=o>=97&&o<=122||o>=65&&o<=90||36===o||95===o;for(a=new Array(128),o=0;o<128;++o)a[o]=o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||36===o||95===o;t.exports={isDecimalDigit:function(e){return 48<=e&&e<=57},isHexDigit:function(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70},isOctalDigit:function(e){return e>=48&&e<=55},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&i.indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStartES5:function(t){return t<128?s[t]:n.NonAsciiIdentifierStart.test(e(t))},isIdentifierPartES5:function(t){return t<128?a[t]:n.NonAsciiIdentifierPart.test(e(t))},isIdentifierStartES6:function(t){return t<128?s[t]:r.NonAsciiIdentifierStart.test(e(t))},isIdentifierPartES6:function(t){return t<128?a[t]:r.NonAsciiIdentifierPart.test(e(t))}}}()},{}],27:[function(e,t,r){!function(){"use strict";function r(e,t){return!(!t&&"yield"===e)&&n(e,t)}function n(e,t){if(t&&function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}(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;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||"yield"===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 i(e,t){return"null"===e||"true"===e||"false"===e||r(e,t)}function s(e,t){return"null"===e||"true"===e||"false"===e||n(e,t)}function a(e){var t,r,n;if(0===e.length)return!1;if(n=e.charCodeAt(0),!l.isIdentifierStartES5(n))return!1;for(t=1,r=e.length;t<r;++t)if(n=e.charCodeAt(t),!l.isIdentifierPartES5(n))return!1;return!0}function o(e,t){return 1024*(e-55296)+(t-56320)+65536}function u(e){var t,r,n,i,s;if(0===e.length)return!1;for(s=l.isIdentifierStartES6,t=0,r=e.length;t<r;++t){if(55296<=(n=e.charCodeAt(t))&&n<=56319){if(++t>=r)return!1;if(!(56320<=(i=e.charCodeAt(t))&&i<=57343))return!1;n=o(n,i)}if(!s(n))return!1;s=l.isIdentifierPartES6}return!0}var l=e("./code");t.exports={isKeywordES5:r,isKeywordES6:n,isReservedWordES5:i,isReservedWordES6:s,isRestrictedWord:function(e){return"eval"===e||"arguments"===e},isIdentifierNameES5:a,isIdentifierNameES6:u,isIdentifierES5:function(e,t){return a(e)&&!i(e,t)},isIdentifierES6:function(e,t){return u(e)&&!s(e,t)}}}()},{"./code":26}],28:[function(e,t,r){!function(){"use strict";r.ast=e("./ast"),r.code=e("./code"),r.keyword=e("./keyword")}()},{"./ast":25,"./code":26,"./keyword":27}],29:[function(e,t,r){"use strict";var n=e("ansi-regex")();t.exports=function(e){return"string"==typeof e?e.replace(n,""):e}},{"ansi-regex":22}],30:[function(e,t,r){(function(e){"use strict";var r=e.argv,n=r.indexOf("--"),i=function(e){e="--"+e;var t=r.indexOf(e);return-1!==t&&(-1===n||t<n)};t.exports="FORCE_COLOR"in e.env||!(i("no-color")||i("no-colors")||i("color=false"))&&(!!(i("color")||i("colors")||i("color=true")||i("color=always"))||!(e.stdout&&!e.stdout.isTTY)&&("win32"===e.platform||("COLORTERM"in e.env||"dumb"!==e.env.TERM&&!!/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(e.env.TERM))))}).call(this,e("_process"))},{_process:550}],31:[function(e,t,r){t.exports=e("./lib/api/node.js")},{"./lib/api/node.js":32}],32:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0,r.transformFromAst=r.transform=r.analyse=r.Pipeline=r.OptionManager=r.traverse=r.types=r.messages=r.util=r.version=r.resolvePreset=r.resolvePlugin=r.template=r.buildExternalHelpers=r.options=r.File=void 0;var s=e("../transformation/file");Object.defineProperty(r,"File",{enumerable:!0,get:function(){return i(s).default}});var a=e("../transformation/file/options/config");Object.defineProperty(r,"options",{enumerable:!0,get:function(){return i(a).default}});var o=e("../tools/build-external-helpers");Object.defineProperty(r,"buildExternalHelpers",{enumerable:!0,get:function(){return i(o).default}});var u=e("babel-template");Object.defineProperty(r,"template",{enumerable:!0,get:function(){return i(u).default}});var l=e("../helpers/resolve-plugin");Object.defineProperty(r,"resolvePlugin",{enumerable:!0,get:function(){return i(l).default}});var c=e("../helpers/resolve-preset");Object.defineProperty(r,"resolvePreset",{enumerable:!0,get:function(){return i(c).default}});var p=e("../../package");Object.defineProperty(r,"version",{enumerable:!0,get:function(){return p.version}}),r.Plugin=function(e){throw new Error("The ("+e+") Babel 5 plugin is being run with Babel 6.")},r.transformFile=function(e,t,r){"function"==typeof t&&(r=t,t={}),t.filename=e,h.default.readFile(e,function(e,n){var i=void 0;if(!e)try{i=x(n,t)}catch(t){e=t}e?r(e):r(null,i)})},r.transformFileSync=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.filename=e,x(h.default.readFileSync(e,"utf8"),t)};var h=i(e("fs")),f=n(e("../util")),d=n(e("babel-messages")),m=n(e("babel-types")),y=i(e("babel-traverse")),g=i(e("../transformation/file/options/option-manager")),b=i(e("../transformation/pipeline"));r.util=f,r.messages=d,r.types=m,r.traverse=y.default,r.OptionManager=g.default,r.Pipeline=b.default;var v=new b.default,x=(r.analyse=v.analyse.bind(v),r.transform=v.transform.bind(v));r.transformFromAst=v.transformFromAst.bind(v)},{"../../package":73,"../helpers/resolve-plugin":38,"../helpers/resolve-preset":39,"../tools/build-external-helpers":42,"../transformation/file":43,"../transformation/file/options/config":47,"../transformation/file/options/option-manager":49,"../transformation/pipeline":54,"../util":57,"babel-messages":110,"babel-template":139,"babel-traverse":143,"babel-types":180,fs:193}],33:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){return["babel-plugin-"+e,e]},t.exports=r.default},{}],34:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){var t=["babel-preset-"+e,e],r=e.match(/^(@[^/]+)\/(.+)$/);if(r){var n=r[1],i=r[2];t.push(n+"/babel-preset-"+i)}return t},t.exports=r.default},{}],35:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator"));r.default=function(e,t){if(e&&t)return(0,s.default)(e,t,function(e,t){if(t&&Array.isArray(e)){var r=t.slice(0),n=e,s=Array.isArray(n),a=0;for(n=s?n:(0,i.default)(n);;){var o;if(s){if(a>=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}var u=o;r.indexOf(u)<0&&r.push(u)}return r}})};var s=n(e("lodash/mergeWith"));t.exports=r.default},{"babel-runtime/core-js/get-iterator":120,"lodash/mergeWith":527}],36:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t,r){if(e){if("Program"===e.type)return n.file(e,t||[],r||[]);if("File"===e.type)return e}throw new Error("Not a valid ast?")};var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));t.exports=r.default},{"babel-types":180}],37:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){return e.reduce(function(e,r){return e||(0,n.default)(r,t)},null)};var n=function(e){return e&&e.__esModule?e:{default:e}}(e("./resolve"));t.exports=r.default},{"./resolve":40}],38:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0,r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();return(0,s.default)((0,a.default)(e),t)};var s=i(e("./resolve-from-possible-names")),a=i(e("./get-possible-plugin-names"));t.exports=r.default}).call(this,e("_process"))},{"./get-possible-plugin-names":33,"./resolve-from-possible-names":37,_process:550}],39:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0,r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();return(0,s.default)((0,a.default)(e),t)};var s=i(e("./resolve-from-possible-names")),a=i(e("./get-possible-preset-names"));t.exports=r.default}).call(this,e("_process"))},{"./get-possible-preset-names":34,"./resolve-from-possible-names":37,_process:550}],40:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=i(e("babel-runtime/helpers/typeof"));r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();if("object"===(void 0===a.default?"undefined":(0,s.default)(a.default)))return null;var r=u[t];if(!r){r=new a.default;var i=o.default.join(t,".babelrc");r.id=i,r.filename=i,r.paths=a.default._nodeModulePaths(t),u[t]=r}try{return a.default._resolveFilename(e,r)}catch(e){return null}};var a=i(e("module")),o=i(e("path")),u={};t.exports=r.default}).call(this,e("_process"))},{_process:550,"babel-runtime/helpers/typeof":138,module:193,path:546}],41:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/map")),s=n(e("babel-runtime/helpers/classCallCheck")),a=n(e("babel-runtime/helpers/possibleConstructorReturn")),o=n(e("babel-runtime/helpers/inherits")),u=function(e){function t(){(0,s.default)(this,t);var r=(0,a.default)(this,e.call(this));return r.dynamicData={},r}return(0,o.default)(t,e),t.prototype.setDynamic=function(e,t){this.dynamicData[e]=t},t.prototype.get=function(t){if(this.has(t))return e.prototype.get.call(this,t);if(Object.prototype.hasOwnProperty.call(this.dynamicData,t)){var r=this.dynamicData[t]();return this.set(t,r),r}},t}(i.default);r.default=u,t.exports=r.default},{"babel-runtime/core-js/map":122,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/inherits":135,"babel-runtime/helpers/possibleConstructorReturn":137}],42:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e,t){var r=[],n=h.functionExpression(null,[h.identifier("global")],h.blockStatement(r)),i=h.program([h.expressionStatement(h.callExpression(n,[u.get("selfGlobal")]))]);return r.push(h.variableDeclaration("var",[h.variableDeclarator(e,h.assignmentExpression("=",h.memberExpression(h.identifier("global"),e),h.objectExpression([])))])),t(r),i}function a(e,t){var r=[];return r.push(h.variableDeclaration("var",[h.variableDeclarator(e,h.identifier("global"))])),t(r),h.program([f({FACTORY_PARAMETERS:h.identifier("global"),BROWSER_ARGUMENTS:h.assignmentExpression("=",h.memberExpression(h.identifier("root"),e),h.objectExpression([])),COMMON_ARGUMENTS:h.identifier("exports"),AMD_ARGUMENTS:h.arrayExpression([h.stringLiteral("exports")]),FACTORY_BODY:r,UMD_ROOT:h.identifier("this")})])}function o(e,t){var r=[];return r.push(h.variableDeclaration("var",[h.variableDeclarator(e,h.objectExpression([]))])),t(r),r.push(h.expressionStatement(e)),h.program(r)}r.__esModule=!0,r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global",r=h.identifier("babelHelpers"),n=void 0,i={global:s,umd:a,var:o}[t];if(!i)throw new Error(c.get("unsupportedOutputType",t));return n=i(r,function(t){return function(e,t,r){u.list.forEach(function(n){if(!(r&&r.indexOf(n)<0)){var i=h.identifier(n);e.push(h.expressionStatement(h.assignmentExpression("=",h.memberExpression(t,i),u.get(n))))}})}(t,r,e)}),(0,l.default)(n).code};var u=i(e("babel-helpers")),l=n(e("babel-generator")),c=i(e("babel-messages")),p=n(e("babel-template")),h=i(e("babel-types")),f=(0,p.default)('\n (function (root, factory) {\n if (typeof define === "function" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === "object") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n');t.exports=r.default},{"babel-generator":85,"babel-helpers":109,"babel-messages":110,"babel-template":139,"babel-types":180}],43:[function(e,t,r){(function(t){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0,r.File=void 0;var s=i(e("babel-runtime/core-js/get-iterator")),a=i(e("babel-runtime/core-js/object/create")),o=i(e("babel-runtime/core-js/object/assign")),u=i(e("babel-runtime/helpers/classCallCheck")),l=i(e("babel-runtime/helpers/possibleConstructorReturn")),c=i(e("babel-runtime/helpers/inherits")),p=i(e("babel-helpers")),h=n(e("./metadata")),f=i(e("convert-source-map")),d=i(e("./options/option-manager")),m=i(e("../plugin-pass")),y=e("babel-traverse"),g=i(y),b=i(e("source-map")),v=i(e("babel-generator")),x=i(e("babel-code-frame")),E=i(e("lodash/defaults")),A=i(e("./logger")),D=i(e("../../store")),S=e("babylon"),C=n(e("../../util")),_=i(e("path")),w=n(e("babel-types")),k=i(e("../../helpers/resolve")),F=i(e("../internal-plugins/block-hoist")),T=i(e("../internal-plugins/shadow-functions")),P=/^#!.*/,B=[[F.default],[T.default]],O={enter:function(e,t){var r=e.node.loc;r&&(t.loc=r,e.stop())}},N=function(r){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];(0,u.default)(this,n);var i=(0,l.default)(this,r.call(this));return i.pipeline=t,i.log=new A.default(i,e.filename||"unknown"),i.opts=i.initOptions(e),i.parserOpts={sourceType:i.opts.sourceType,sourceFileName:i.opts.filename,plugins:[]},i.pluginVisitors=[],i.pluginPasses=[],i.buildPluginsForOptions(i.opts),i.opts.passPerPreset&&(i.perPresetOpts=[],i.opts.presets.forEach(function(e){var t=(0,o.default)((0,a.default)(i.opts),e);i.perPresetOpts.push(t),i.buildPluginsForOptions(t)})),i.metadata={usedHelpers:[],marked:[],modules:{imports:[],exports:{exported:[],specifiers:[]}}},i.dynamicImportTypes={},i.dynamicImportIds={},i.dynamicImports=[],i.declarations={},i.usedHelpers={},i.path=null,i.ast={},i.code="",i.shebang="",i.hub=new y.Hub(i),i}return(0,c.default)(n,r),n.prototype.getMetadata=function(){var e=!1,t=this.ast.program.body,r=Array.isArray(t),n=0;for(t=r?t:(0,s.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var a=i;if(w.isModuleDeclaration(a)){e=!0;break}}e&&this.path.traverse(h,this)},n.prototype.initOptions=function(e){(e=new d.default(this.log,this.pipeline).init(e)).inputSourceMap&&(e.sourceMaps=!0),e.moduleId&&(e.moduleIds=!0),e.basename=_.default.basename(e.filename,_.default.extname(e.filename)),e.ignore=C.arrayify(e.ignore,C.regexify),e.only&&(e.only=C.arrayify(e.only,C.regexify)),(0,E.default)(e,{moduleRoot:e.sourceRoot}),(0,E.default)(e,{sourceRoot:e.moduleRoot}),(0,E.default)(e,{filenameRelative:e.filename});var t=_.default.basename(e.filenameRelative);return(0,E.default)(e,{sourceFileName:t,sourceMapTarget:t}),e},n.prototype.buildPluginsForOptions=function(e){if(Array.isArray(e.plugins)){var t=[],r=[],n=e.plugins.concat(B),i=Array.isArray(n),a=0;for(n=i?n:(0,s.default)(n);;){var o;if(i){if(a>=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}var u=o,l=u[0],c=u[1];t.push(l.visitor),r.push(new m.default(this,l,c)),l.manipulateOptions&&l.manipulateOptions(e,this.parserOpts,this)}this.pluginVisitors.push(t),this.pluginPasses.push(r)}},n.prototype.getModuleName=function(){var e=this.opts;if(!e.moduleIds)return null;if(null!=e.moduleId&&!e.getModuleId)return e.moduleId;var t=e.filenameRelative,r="";if(null!=e.moduleRoot&&(r=e.moduleRoot+"/"),!e.filenameRelative)return r+e.filename.replace(/^\//,"");if(null!=e.sourceRoot){var n=new RegExp("^"+e.sourceRoot+"/?");t=t.replace(n,"")}return t=t.replace(/\.(\w*?)$/,""),r+=t,r=r.replace(/\\/g,"/"),e.getModuleId?e.getModuleId(r)||r:r},n.prototype.resolveModuleSource=function(e){var t=this.opts.resolveModuleSource;return t&&(e=t(e,this.opts.filename)),e},n.prototype.addImport=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,n=e+":"+t,i=this.dynamicImportIds[n];if(!i){e=this.resolveModuleSource(e),i=this.dynamicImportIds[n]=this.scope.generateUidIdentifier(r);var s=[];"*"===t?s.push(w.importNamespaceSpecifier(i)):"default"===t?s.push(w.importDefaultSpecifier(i)):s.push(w.importSpecifier(i,w.identifier(t)));var a=w.importDeclaration(s,w.stringLiteral(e));a._blockHoist=3,this.path.unshiftContainer("body",a)}return i},n.prototype.addHelper=function(e){var t=this.declarations[e];if(t)return t;this.usedHelpers[e]||(this.metadata.usedHelpers.push(e),this.usedHelpers[e]=!0);var r=this.get("helperGenerator"),n=this.get("helpersNamespace");if(r){var i=r(e);if(i)return i}else if(n)return w.memberExpression(n,w.identifier(e));var s=(0,p.default)(e),a=this.declarations[e]=this.scope.generateUidIdentifier(e);return w.isFunctionExpression(s)&&!s.id?(s.body._compact=!0,s._generated=!0,s.id=a,s.type="FunctionDeclaration",this.path.unshiftContainer("body",s)):(s._compact=!0,this.scope.push({id:a,init:s,unique:!0})),a},n.prototype.addTemplateObject=function(e,t,r){var n=r.elements.map(function(e){return e.value}),i=e+"_"+r.elements.length+"_"+n.join(","),s=this.declarations[i];if(s)return s;var a=this.declarations[i]=this.scope.generateUidIdentifier("templateObject"),o=this.addHelper(e),u=w.callExpression(o,[t,r]);return u._compact=!0,this.scope.push({id:a,init:u,_blockHoist:1.9}),a},n.prototype.buildCodeFrameError=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:SyntaxError,n=e&&(e.loc||e._loc),i=new r(t);return n?i.loc=n.start:((0,g.default)(e,O,this.scope,i),i.message+=" (This is an error on an internal node. Probably an internal error",i.loc&&(i.message+=". Location has been estimated."),i.message+=")"),i},n.prototype.mergeSourceMap=function(e){var t=this.opts.inputSourceMap;if(t){var r=new b.default.SourceMapConsumer(t),n=new b.default.SourceMapConsumer(e),i=new b.default.SourceMapGenerator({file:r.file,sourceRoot:r.sourceRoot}),s=n.sources[0];r.eachMapping(function(e){var t=n.generatedPositionFor({line:e.generatedLine,column:e.generatedColumn,source:s});null!=t.column&&i.addMapping({source:e.source,original:null==e.source?null:{line:e.originalLine,column:e.originalColumn},generated:t})});var a=i.toJSON();return t.mappings=a.mappings,t}return e},n.prototype.parse=function(r){var n=S.parse,i=this.opts.parserOpts;if(i&&(i=(0,o.default)({},this.parserOpts,i)).parser){if("string"==typeof i.parser){var s=_.default.dirname(this.opts.filename)||t.cwd(),a=(0,k.default)(i.parser,s);if(!a)throw new Error("Couldn't find parser "+i.parser+' with "parse" method relative to directory '+s);n=e(a).parse}else n=i.parser;i.parser={parse:function(e){return(0,S.parse)(e,i)}}}this.log.debug("Parse start");var u=n(r,i||this.parserOpts);return this.log.debug("Parse stop"),u},n.prototype._addAst=function(e){this.path=y.NodePath.get({hub:this.hub,parentPath:null,parent:e,container:e,key:"program"}).setContext(),this.scope=this.path.scope,this.ast=e,this.getMetadata()},n.prototype.addAst=function(e){this.log.debug("Start set AST"),this._addAst(e),this.log.debug("End set AST")},n.prototype.transform=function(){for(var e=0;e<this.pluginPasses.length;e++){var t=this.pluginPasses[e];this.call("pre",t),this.log.debug("Start transform traverse");var r=g.default.visitors.merge(this.pluginVisitors[e],t,this.opts.wrapPluginVisitorMethod);(0,g.default)(this.ast,r,this.scope),this.log.debug("End transform traverse"),this.call("post",t)}return this.generate()},n.prototype.wrap=function(e,r){e+="";try{return this.shouldIgnore()?this.makeResult({code:e,ignored:!0}):r()}catch(r){if(r._babel)throw r;r._babel=!0;var n=r.message=this.opts.filename+": "+r.message,i=r.loc;if(i&&(r.codeFrame=(0,x.default)(e,i.line,i.column+1,this.opts),n+="\n"+r.codeFrame),t.browser&&(r.message=n),r.stack){var s=r.stack.replace(r.message,n);r.stack=s}throw r}},n.prototype.addCode=function(e){e=(e||"")+"",e=this.parseInputSourceMap(e),this.code=e},n.prototype.parseCode=function(){this.parseShebang();var e=this.parse(this.code);this.addAst(e)},n.prototype.shouldIgnore=function(){var e=this.opts;return C.shouldIgnore(e.filename,e.ignore,e.only)},n.prototype.call=function(e,t){var r=t,n=Array.isArray(r),i=0;for(r=n?r:(0,s.default)(r);;){var a;if(n){if(i>=r.length)break;a=r[i++]}else{if((i=r.next()).done)break;a=i.value}var o=a,u=o.plugin[e];u&&u.call(o,this)}},n.prototype.parseInputSourceMap=function(e){var t=this.opts;if(!1!==t.inputSourceMap){var r=f.default.fromSource(e);r&&(t.inputSourceMap=r.toObject(),e=f.default.removeComments(e))}return e},n.prototype.parseShebang=function(){var e=P.exec(this.code);e&&(this.shebang=e[0],this.code=this.code.replace(P,""))},n.prototype.makeResult=function(e){var t=e.code,r=e.map,n=e.ast,i=e.ignored,s={metadata:null,options:this.opts,ignored:!!i,code:null,ast:null,map:r||null};return this.opts.code&&(s.code=t),this.opts.ast&&(s.ast=n),this.opts.metadata&&(s.metadata=this.metadata),s},n.prototype.generate=function(){var r=this.opts,n=this.ast,i={ast:n};if(!r.code)return this.makeResult(i);var s=v.default;if(r.generatorOpts.generator&&"string"==typeof(s=r.generatorOpts.generator)){var a=_.default.dirname(this.opts.filename)||t.cwd(),u=(0,k.default)(s,a);if(!u)throw new Error("Couldn't find generator "+s+' with "print" method relative to directory '+a);s=e(u).print}this.log.debug("Generation start");var l=s(n,r.generatorOpts?(0,o.default)(r,r.generatorOpts):r,this.code);return i.code=l.code,i.map=l.map,this.log.debug("Generation end"),this.shebang&&(i.code=this.shebang+"\n"+i.code),i.map&&(i.map=this.mergeSourceMap(i.map)),"inline"!==r.sourceMaps&&"both"!==r.sourceMaps||(i.code+="\n"+f.default.fromObject(i.map).toComment()),"inline"===r.sourceMaps&&(i.map=null),this.makeResult(i)},n}(D.default);r.default=N,r.File=N}).call(this,e("_process"))},{"../../helpers/resolve":40,"../../store":41,"../../util":57,"../internal-plugins/block-hoist":52,"../internal-plugins/shadow-functions":53,"../plugin-pass":55,"./logger":44,"./metadata":45,"./options/option-manager":49,_process:550,"babel-code-frame":21,"babel-generator":85,"babel-helpers":109,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/object/assign":124,"babel-runtime/core-js/object/create":125,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/inherits":135,"babel-runtime/helpers/possibleConstructorReturn":137,"babel-traverse":143,"babel-types":180,babylon:188,"convert-source-map":58,"lodash/defaults":495,path:546,"source-map":72}],44:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=n(e("debug/node")),a=(0,s.default)("babel:verbose"),o=(0,s.default)("babel"),u=[],l=function(){function e(t,r){(0,i.default)(this,e),this.filename=r,this.file=t}return e.prototype._buildMessage=function(e){var t="[BABEL] "+this.filename;return e&&(t+=": "+e),t},e.prototype.warn=function(e){console.warn(this._buildMessage(e))},e.prototype.error=function(e){throw new(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Error)(this._buildMessage(e))},e.prototype.deprecate=function(e){this.file.opts&&this.file.opts.suppressDeprecationMessages||(e=this._buildMessage(e),u.indexOf(e)>=0||(u.push(e),console.error(e)))},e.prototype.verbose=function(e){a.enabled&&a(this._buildMessage(e))},e.prototype.debug=function(e){o.enabled&&o(this._buildMessage(e))},e.prototype.deopt=function(e,t){this.debug(t)},e}();r.default=l,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":134,"debug/node":59}],45:[function(e,t,r){"use strict";r.__esModule=!0,r.ImportDeclaration=r.ModuleDeclaration=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.ExportDeclaration=function(e,t){var r=e.node,s=r.source?r.source.value:null,a=t.metadata.modules.exports,o=e.get("declaration");if(o.isStatement()){var u=o.getBindingIdentifiers();for(var l in u)a.exported.push(l),a.specifiers.push({kind:"local",local:l,exported:e.isExportDefaultDeclaration()?"default":l})}if(e.isExportNamedDeclaration()&&r.specifiers){var c=r.specifiers,p=Array.isArray(c),h=0;for(c=p?c:(0,n.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if((h=c.next()).done)break;f=h.value}var d=f,m=d.exported.name;a.exported.push(m),i.isExportDefaultSpecifier(d)&&a.specifiers.push({kind:"external",local:m,exported:m,source:s}),i.isExportNamespaceSpecifier(d)&&a.specifiers.push({kind:"external-namespace",exported:m,source:s});var y=d.local;y&&(s&&a.specifiers.push({kind:"external",local:y.name,exported:m,source:s}),s||a.specifiers.push({kind:"local",local:y.name,exported:m}))}}e.isExportAllDeclaration()&&a.specifiers.push({kind:"external-all",source:s})},r.Scope=function(e){e.skip()};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.ModuleDeclaration={enter:function(e,t){var r=e.node;r.source&&(r.source.value=t.resolveModuleSource(r.source.value))}},r.ImportDeclaration={exit:function(e,t){var r=e.node,i=[],s=[];t.metadata.modules.imports.push({source:r.source.value,imported:s,specifiers:i});var a=e.get("specifiers"),o=Array.isArray(a),u=0;for(a=o?a:(0,n.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var c=l,p=c.node.local.name;if(c.isImportDefaultSpecifier()&&(s.push("default"),i.push({kind:"named",imported:"default",local:p})),c.isImportSpecifier()){var h=c.node.imported.name;s.push(h),i.push({kind:"named",imported:h,local:p})}c.isImportNamespaceSpecifier()&&(s.push("*"),i.push({kind:"namespace",local:p}))}}}},{"babel-runtime/core-js/get-iterator":120,"babel-types":180}],46:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=f[e];return null==t?f[e]=h.default.existsSync(e):t}r.__esModule=!0;var a=i(e("babel-runtime/core-js/object/assign")),o=i(e("babel-runtime/helpers/classCallCheck"));r.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],r=e.filename,n=new m(t);return!1!==e.babelrc&&n.findConfigs(r),n.mergeConfig({options:e,alias:"base",dirname:r&&p.default.dirname(r)}),n.configs};var u=i(e("../../../helpers/resolve")),l=i(e("json5")),c=i(e("path-is-absolute")),p=i(e("path")),h=i(e("fs")),f={},d={},m=function(){function e(t){(0,o.default)(this,e),this.resolvedConfigs=[],this.configs=[],this.log=t}return e.prototype.findConfigs=function(e){if(e){(0,c.default)(e)||(e=p.default.join(n.cwd(),e));for(var t=!1,r=!1;e!==(e=p.default.dirname(e));){if(!t){var i=p.default.join(e,".babelrc");s(i)&&(this.addConfig(i),t=!0);var a=p.default.join(e,"package.json");!t&&s(a)&&(t=this.addConfig(a,"babel",JSON))}if(!r){var o=p.default.join(e,".babelignore");s(o)&&(this.addIgnoreConfig(o),r=!0)}if(r&&t)return}}},e.prototype.addIgnoreConfig=function(e){var t=h.default.readFileSync(e,"utf8").split("\n");(t=t.map(function(e){return e.replace(/#(.*?)$/,"").trim()}).filter(function(e){return!!e})).length&&this.mergeConfig({options:{ignore:t},alias:e,dirname:p.default.dirname(e)})},e.prototype.addConfig=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default;if(this.resolvedConfigs.indexOf(e)>=0)return!1;this.resolvedConfigs.push(e);var n=h.default.readFileSync(e,"utf8"),i=void 0;try{i=d[n]=d[n]||r.parse(n),t&&(i=i[t])}catch(t){throw t.message=e+": Error while parsing JSON - "+t.message,t}return this.mergeConfig({options:i,alias:e,dirname:p.default.dirname(e)}),!!i},e.prototype.mergeConfig=function(e){var t=e.options,r=e.alias,i=e.loc,s=e.dirname;if(!t)return!1;if(t=(0,a.default)({},t),s=s||n.cwd(),i=i||r,t.extends){var o=(0,u.default)(t.extends,s);o?this.addConfig(o):this.log&&this.log.error("Couldn't resolve extends clause of "+t.extends+" in "+r),delete t.extends}this.configs.push({options:t,alias:r,loc:i,dirname:s});var l=void 0,c=n.env.BABEL_ENV||n.env.NODE_ENV||"development";t.env&&(l=t.env[c],delete t.env),this.mergeConfig({options:l,alias:r+".env."+c,dirname:s})},e}();t.exports=r.default}).call(this,e("_process"))},{"../../../helpers/resolve":40,_process:550,"babel-runtime/core-js/object/assign":124,"babel-runtime/helpers/classCallCheck":134,fs:193,json5:324,path:546,"path-is-absolute":547}],47:[function(e,t,r){"use strict";t.exports={filename:{type:"filename",description:"filename to use when reading from stdin - this will be used in source-maps, errors etc",default:"unknown",shorthand:"f"},filenameRelative:{hidden:!0,type:"string"},inputSourceMap:{hidden:!0},env:{hidden:!0,default:{}},mode:{description:"",hidden:!0},retainLines:{type:"boolean",default:!1,description:"retain line numbers - will result in really ugly code"},highlightCode:{description:"enable/disable ANSI syntax highlighting of code frames (on by default)",type:"boolean",default:!0},suppressDeprecationMessages:{type:"boolean",default:!1,hidden:!0},presets:{type:"list",description:"",default:[]},plugins:{type:"list",default:[],description:""},ignore:{type:"list",description:"list of glob paths to **not** compile",default:[]},only:{type:"list",description:"list of glob paths to **only** compile"},code:{hidden:!0,default:!0,type:"boolean"},metadata:{hidden:!0,default:!0,type:"boolean"},ast:{hidden:!0,default:!0,type:"boolean"},extends:{type:"string",hidden:!0},comments:{type:"boolean",default:!0,description:"write comments to generated output (true by default)"},shouldPrintComment:{hidden:!0,description:"optional callback to control whether a comment should be inserted, when this is used the comments option is ignored"},wrapPluginVisitorMethod:{hidden:!0,description:"optional callback to wrap all visitor methods"},compact:{type:"booleanString",default:"auto",description:"do not include superfluous whitespace characters and line terminators [true|false|auto]"},minified:{type:"boolean",default:!1,description:"save as much bytes when printing [true|false]"},sourceMap:{alias:"sourceMaps",hidden:!0},sourceMaps:{type:"booleanString",description:"[true|false|inline]",default:!1,shorthand:"s"},sourceMapTarget:{type:"string",description:"set `file` on returned source map"},sourceFileName:{type:"string",description:"set `sources[0]` on returned source map"},sourceRoot:{type:"filename",description:"the root from which all sources are relative"},babelrc:{description:"Whether or not to look up .babelrc and .babelignore files",type:"boolean",default:!0},sourceType:{description:"",default:"module"},auxiliaryCommentBefore:{type:"string",description:"print a comment before any injected non-user code"},auxiliaryCommentAfter:{type:"string",description:"print a comment after any injected non-user code"},resolveModuleSource:{hidden:!0},getModuleId:{hidden:!0},moduleRoot:{type:"filename",description:"optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"},moduleIds:{type:"boolean",default:!1,shorthand:"M",description:"insert an explicit id for modules"},moduleId:{description:"specify a custom name for module ids",type:"string"},passPerPreset:{description:"Whether to spawn a traversal pass per a preset. By default all presets are merged.",type:"boolean",default:!1,hidden:!0},parserOpts:{description:"Options to pass into the parser, or to change parsers (parserOpts.parser)",default:!1},generatorOpts:{description:"Options to pass into the generator, or to change generators (generatorOpts.generator)",default:!1}}},{}],48:[function(e,t,r){"use strict";r.__esModule=!0,r.config=void 0,r.normaliseOptions=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e){var r=e[t];if(null!=r){var s=i.default[t];if(s&&s.alias&&(s=i.default[s.alias]),s){var a=n[s.type];a&&(r=a(r)),e[t]=r}}}return e};var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./parsers")),i=function(e){return e&&e.__esModule?e:{default:e}}(e("./config"));r.config=i.default},{"./config":47,"./parsers":50}],49:[function(e,t,r){(function(n){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var a=s(e("babel-runtime/helpers/objectWithoutProperties")),o=s(e("babel-runtime/core-js/json/stringify")),u=s(e("babel-runtime/core-js/object/assign")),l=s(e("babel-runtime/core-js/get-iterator")),c=s(e("babel-runtime/helpers/typeof")),p=s(e("babel-runtime/helpers/classCallCheck")),h=i(e("../../../api/node")),f=s(e("../../plugin")),d=i(e("babel-messages")),m=e("./index"),y=s(e("../../../helpers/resolve-plugin")),g=s(e("../../../helpers/resolve-preset")),b=s(e("lodash/cloneDeepWith")),v=s(e("lodash/clone")),x=s(e("../../../helpers/merge")),E=s(e("./config")),A=s(e("./removed")),D=s(e("./build-config-chain")),S=s(e("path")),C=function(){function t(e){(0,p.default)(this,t),this.resolvedConfigs=[],this.options=t.createBareOptions(),this.log=e}return t.memoisePluginContainer=function(e,r,n,i){var s=t.memoisedPlugins,a=Array.isArray(s),o=0;for(s=a?s:(0,l.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var p=u;if(p.container===e)return p.plugin}var m=void 0;if("object"===(void 0===(m="function"==typeof e?e(h):e)?"undefined":(0,c.default)(m))){var y=new f.default(m,i);return t.memoisedPlugins.push({container:e,plugin:y}),y}throw new TypeError(d.get("pluginNotObject",r,n,void 0===m?"undefined":(0,c.default)(m))+r+n)},t.createBareOptions=function(){var e={};for(var t in E.default){var r=E.default[t];e[t]=(0,v.default)(r.default)}return e},t.normalisePlugin=function(e,r,n,i){if(!((e=e.__esModule?e.default:e)instanceof f.default)){if("function"!=typeof e&&"object"!==(void 0===e?"undefined":(0,c.default)(e)))throw new TypeError(d.get("pluginNotFunction",r,n,void 0===e?"undefined":(0,c.default)(e)));e=t.memoisePluginContainer(e,r,n,i)}return e.init(r,n),e},t.normalisePlugins=function(r,n,i){return i.map(function(i,s){var a=void 0,o=void 0;if(!i)throw new TypeError("Falsy value found in plugins");Array.isArray(i)?(a=i[0],o=i[1]):a=i;var u="string"==typeof a?a:r+"$"+s;if("string"==typeof a){var l=(0,y.default)(a,n);if(!l)throw new ReferenceError(d.get("pluginUnknown",a,r,s,n));a=e(l)}return a=t.normalisePlugin(a,r,s,u),[a,o]})},t.prototype.mergeOptions=function(e){var r=this,i=e.options,s=e.extending,a=e.alias,o=e.loc,l=e.dirname;if(a=a||"foreign",i){("object"!==(void 0===i?"undefined":(0,c.default)(i))||Array.isArray(i))&&this.log.error("Invalid options type for "+a,TypeError);var p=(0,b.default)(i,function(e){if(e instanceof f.default)return e});l=l||n.cwd(),o=o||a;for(var h in p){if(!E.default[h]&&this.log)if(A.default[h])this.log.error("Using removed Babel 5 option: "+a+"."+h+" - "+A.default[h].message,ReferenceError);else{var d="Unknown option: "+a+"."+h+". Check out http://babeljs.io/docs/usage/options/ for more information about options.";this.log.error(d+"\n\nA common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:\n\nInvalid:\n `{ presets: [{option: value}] }`\nValid:\n `{ presets: [['presetName', {option: value}]] }`\n\nFor more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets-options.",ReferenceError)}}(0,m.normaliseOptions)(p),p.plugins&&(p.plugins=t.normalisePlugins(o,l,p.plugins)),p.presets&&(p.passPerPreset?p.presets=this.resolvePresets(p.presets,l,function(e,t){r.mergeOptions({options:e,extending:e,alias:t,loc:t,dirname:l})}):(this.mergePresets(p.presets,l),delete p.presets)),i===s?(0,u.default)(s,p):(0,x.default)(s||this.options,p)}},t.prototype.mergePresets=function(e,t){var r=this;this.resolvePresets(e,t,function(e,t){r.mergeOptions({options:e,alias:t,loc:t,dirname:S.default.dirname(t||"")})})},t.prototype.resolvePresets=function(t,r,n){return t.map(function(t){var i=void 0;if(Array.isArray(t)){if(t.length>2)throw new Error("Unexpected extra options "+(0,o.default)(t.slice(2))+" passed to preset.");var s=t;t=s[0],i=s[1]}var u=void 0;try{if("string"==typeof t){if(!(u=(0,g.default)(t,r)))throw new Error("Couldn't find preset "+(0,o.default)(t)+" relative to directory "+(0,o.default)(r));t=e(u)}if("object"===(void 0===t?"undefined":(0,c.default)(t))&&t.__esModule)if(t.default)t=t.default;else{var l=t;l.__esModule;t=(0,a.default)(l,["__esModule"])}if("object"===(void 0===t?"undefined":(0,c.default)(t))&&t.buildPreset&&(t=t.buildPreset),"function"!=typeof t&&void 0!==i)throw new Error("Options "+(0,o.default)(i)+" passed to "+(u||"a preset")+" which does not accept options.");if("function"==typeof t&&(t=t(h,i,{dirname:r})),"object"!==(void 0===t?"undefined":(0,c.default)(t)))throw new Error("Unsupported preset format: "+t+".");n&&n(t,u)}catch(e){throw u&&(e.message+=" (While processing preset: "+(0,o.default)(u)+")"),e}return t})},t.prototype.normaliseOptions=function(){var e=this.options;for(var t in E.default){var r=E.default[t],n=e[t];!n&&r.optional||(r.alias?e[r.alias]=e[r.alias]||n:e[t]=n)}},t.prototype.init=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,D.default)(e,this.log),r=Array.isArray(t),n=0;for(t=r?t:(0,l.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;this.mergeOptions(s)}return this.normaliseOptions(e),this.options},t}();r.default=C,C.memoisedPlugins=[],t.exports=r.default}).call(this,e("_process"))},{"../../../api/node":32,"../../../helpers/merge":35,"../../../helpers/resolve-plugin":38,"../../../helpers/resolve-preset":39,"../../plugin":56,"./build-config-chain":46,"./config":47,"./index":48,"./removed":51,_process:550,"babel-messages":110,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/json/stringify":121,"babel-runtime/core-js/object/assign":124,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/objectWithoutProperties":136,"babel-runtime/helpers/typeof":138,"lodash/clone":491,"lodash/cloneDeepWith":493,path:546}],50:[function(e,t,r){"use strict";r.__esModule=!0,r.filename=void 0,r.boolean=function(e){return!!e},r.booleanString=function(e){return i.booleanify(e)},r.list=function(e){return i.list(e)};var n=function(e){return e&&e.__esModule?e:{default:e}}(e("slash")),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("../../../util"));r.filename=n.default},{"../../../util":57,slash:603}],51:[function(e,t,r){"use strict";t.exports={auxiliaryComment:{message:"Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"},blacklist:{message:"Put the specific transforms you want in the `plugins` option"},breakConfig:{message:"This is not a necessary option in Babel 6"},experimental:{message:"Put the specific transforms you want in the `plugins` option"},externalHelpers:{message:"Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/"},extra:{message:""},jsxPragma:{message:"use the `pragma` option in the `react-jsx` plugin . Check out http://babeljs.io/docs/plugins/transform-react-jsx/"},loose:{message:"Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option."},metadataUsedHelpers:{message:"Not required anymore as this is enabled by default"},modules:{message:"Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules"},nonStandard:{message:"Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. Also check out the react preset http://babeljs.io/docs/plugins/preset-react/"},optional:{message:"Put the specific transforms you want in the `plugins` option"},sourceMapName:{message:"Use the `sourceMapTarget` option"},stage:{message:"Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"},whitelist:{message:"Put the specific transforms you want in the `plugins` option"}}},{}],52:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("../plugin")),s=n(e("lodash/sortBy"));r.default=new i.default({name:"internal.blockHoist",visitor:{Block:{exit:function(e){for(var t=e.node,r=!1,n=0;n<t.body.length;n++){var i=t.body[n];if(i&&null!=i._blockHoist){r=!0;break}}r&&(t.body=(0,s.default)(t.body,function(e){var t=e&&e._blockHoist;return null==t&&(t=1),!0===t&&(t=2),-1*t}))}}}}),t.exports=r.default},{"../plugin":56,"lodash/sortBy":531}],53:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=e.inShadow(t);if(function(e,t){return!!e.is("_forceShadow")||t}(e,r)){var n=e.node._shadowedFunctionLiteral,i=void 0,s=!1,a=e.find(function(t){if(t.parentPath&&t.parentPath.isClassProperty()&&"value"===t.key)return!0;if(e===t)return!1;if((t.isProgram()||t.isFunction())&&(i=i||t),t.isProgram())return s=!0,!0;if(t.isFunction()&&!t.isArrowFunctionExpression()){if(n){if(t===n||t.node===n.node)return!0}else if(!t.is("shadow"))return!0;return s=!0,!1}return!1});if(n&&a.isProgram()&&!n.isProgram()&&(a=e.findParent(function(e){return e.isProgram()||e.isFunction()})),a!==i&&s){var u=a.getData(t);if(u)return e.replaceWith(u);var c=e.scope.generateUidIdentifier(t);a.setData(t,c);var p=a.findParent(function(e){return e.isClass()}),h=!!(p&&p.node&&p.node.superClass);if("this"===t&&a.isMethod({kind:"constructor"})&&h)a.scope.push({id:c}),a.traverse(l,{id:c});else{var f="this"===t?o.thisExpression():o.identifier(t);n&&(f._shadowedFunctionLiteral=n),a.scope.push({id:c,init:f})}return e.replaceWith(c)}}}r.__esModule=!0;var s=n(e("babel-runtime/core-js/symbol")),a=n(e("../plugin")),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),u=(0,s.default)("super this bound"),l={CallExpression:function(e){if(e.get("callee").isSuper()){var t=e.node;t[u]||(t[u]=!0,e.replaceWith(o.assignmentExpression("=",this.id,t)))}}};r.default=new a.default({name:"internal.shadowFunctions",visitor:{ThisExpression:function(e){i(e,"this")},ReferencedIdentifier:function(e){"arguments"===e.node.name&&i(e,"arguments")}}}),t.exports=r.default},{"../plugin":56,"babel-runtime/core-js/symbol":129,"babel-types":180}],54:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=n(e("../helpers/normalize-ast")),a=n(e("./plugin")),o=n(e("./file")),u=function(){function e(){(0,i.default)(this,e)}return e.prototype.lint=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.code=!1,t.mode="lint",this.transform(e,t)},e.prototype.pretransform=function(e,t){var r=new o.default(t,this);return r.wrap(e,function(){return r.addCode(e),r.parseCode(e),r})},e.prototype.transform=function(e,t){var r=new o.default(t,this);return r.wrap(e,function(){return r.addCode(e),r.parseCode(e),r.transform()})},e.prototype.analyse=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments[2];return t.code=!1,r&&(t.plugins=t.plugins||[],t.plugins.push(new a.default({visitor:r}))),this.transform(e,t).metadata},e.prototype.transformFromAst=function(e,t,r){e=(0,s.default)(e);var n=new o.default(r,this);return n.wrap(t,function(){return n.addCode(t),n.addAst(e),n.transform()})},e}();r.default=u,t.exports=r.default},{"../helpers/normalize-ast":36,"./file":43,"./plugin":56,"babel-runtime/helpers/classCallCheck":134}],55:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=n(e("babel-runtime/helpers/possibleConstructorReturn")),a=n(e("babel-runtime/helpers/inherits")),o=n(e("../store")),u=(n(e("./file")),function(e){function t(r,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,i.default)(this,t);var o=(0,s.default)(this,e.call(this));return o.plugin=n,o.key=n.key,o.file=r,o.opts=a,o}return(0,a.default)(t,e),t.prototype.addHelper=function(){var e;return(e=this.file).addHelper.apply(e,arguments)},t.prototype.addImport=function(){var e;return(e=this.file).addImport.apply(e,arguments)},t.prototype.getModuleName=function(){var e;return(e=this.file).getModuleName.apply(e,arguments)},t.prototype.buildCodeFrameError=function(){var e;return(e=this.file).buildCodeFrameError.apply(e,arguments)},t}(o.default));r.default=u,t.exports=r.default},{"../store":41,"./file":43,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/inherits":135,"babel-runtime/helpers/possibleConstructorReturn":137}],56:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator")),s=n(e("babel-runtime/helpers/classCallCheck")),a=n(e("babel-runtime/helpers/possibleConstructorReturn")),o=n(e("babel-runtime/helpers/inherits")),u=n(e("./file/options/option-manager")),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-messages")),c=n(e("../store")),p=n(e("babel-traverse")),h=n(e("lodash/assign")),f=n(e("lodash/clone")),d=["enter","exit"],m=function(e){function t(r,n){(0,s.default)(this,t);var i=(0,a.default)(this,e.call(this));return i.initialized=!1,i.raw=(0,h.default)({},r),i.key=i.take("name")||n,i.manipulateOptions=i.take("manipulateOptions"),i.post=i.take("post"),i.pre=i.take("pre"),i.visitor=i.normaliseVisitor((0,f.default)(i.take("visitor"))||{}),i}return(0,o.default)(t,e),t.prototype.take=function(e){var t=this.raw[e];return delete this.raw[e],t},t.prototype.chain=function(e,t){if(!e[t])return this[t];if(!this[t])return e[t];var r=[e[t],this[t]];return function(){for(var e=void 0,t=arguments.length,n=Array(t),s=0;s<t;s++)n[s]=arguments[s];var a=r,o=Array.isArray(a),u=0;for(a=o?a:(0,i.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}if(l){var c=l.apply(this,n);null!=c&&(e=c)}}return e}},t.prototype.maybeInherit=function(e){var t=this.take("inherits");t&&(t=u.default.normalisePlugin(t,e,"inherits"),this.manipulateOptions=this.chain(t,"manipulateOptions"),this.post=this.chain(t,"post"),this.pre=this.chain(t,"pre"),this.visitor=p.default.visitors.merge([t.visitor,this.visitor]))},t.prototype.init=function(e,t){if(!this.initialized){this.initialized=!0,this.maybeInherit(e);for(var r in this.raw)throw new Error(l.get("pluginInvalidProperty",e,t,r))}},t.prototype.normaliseVisitor=function(e){var t=d,r=Array.isArray(t),n=0;for(t=r?t:(0,i.default)(t);;){var s;if(r){if(n>=t.length)break;s=t[n++]}else{if((n=t.next()).done)break;s=n.value}if(e[s])throw new Error("Plugins aren't allowed to specify catch-all enter/exit handlers. Please target individual nodes.")}return p.default.explode(e),e},t}(c.default);r.default=m,t.exports=r.default},{"../store":41,"./file/options/option-manager":49,"babel-messages":110,"babel-runtime/core-js/get-iterator":120,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/inherits":135,"babel-runtime/helpers/possibleConstructorReturn":137,"babel-traverse":143,"lodash/assign":488,"lodash/clone":491}],57:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=t||i.EXTENSIONS,n=m.default.extname(e);return(0,f.default)(r,n)}function s(e){return e?Array.isArray(e)?e:"string"==typeof e?e.split(","):[e]:[]}function a(e,t){return e?"boolean"==typeof e?a([e],t):"string"==typeof e?a(s(e),t):Array.isArray(e)?(t&&(e=e.map(t)),e):[e]:[]}function o(e,t){return"function"==typeof e?e(t):e.test(t)}r.__esModule=!0,r.inspect=r.inherits=void 0;var u=n(e("babel-runtime/core-js/get-iterator")),l=e("util");Object.defineProperty(r,"inherits",{enumerable:!0,get:function(){return l.inherits}}),Object.defineProperty(r,"inspect",{enumerable:!0,get:function(){return l.inspect}}),r.canCompile=i,r.list=s,r.regexify=function(e){if(!e)return new RegExp(/.^/);if(Array.isArray(e)&&(e=new RegExp(e.map(c.default).join("|"),"i")),"string"==typeof e){e=(0,y.default)(e),((0,p.default)(e,"./")||(0,p.default)(e,"*/"))&&(e=e.slice(2)),(0,p.default)(e,"**/")&&(e=e.slice(3));var t=h.default.makeRe(e,{nocase:!0});return new RegExp(t.source.slice(1,-1),"i")}if((0,d.default)(e))return e;throw new TypeError("illegal type for regexify")},r.arrayify=a,r.booleanify=function(e){return"true"===e||1==e||!("false"===e||0==e||!e)&&e},r.shouldIgnore=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2];if(e=e.replace(/\\/g,"/"),r){var n=r,i=Array.isArray(n),s=0;for(n=i?n:(0,u.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}if(o(a,e))return!1}return!0}if(t.length){var l=t,c=Array.isArray(l),p=0;for(l=c?l:(0,u.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if((p=l.next()).done)break;h=p.value}if(o(h,e))return!0}}return!1};var c=n(e("lodash/escapeRegExp")),p=n(e("lodash/startsWith")),h=n(e("minimatch")),f=n(e("lodash/includes")),d=n(e("lodash/isRegExp")),m=n(e("path")),y=n(e("slash"));i.EXTENSIONS=[".js",".jsx",".es6",".es"]},{"babel-runtime/core-js/get-iterator":120,"lodash/escapeRegExp":497,"lodash/includes":507,"lodash/isRegExp":519,"lodash/startsWith":532,minimatch:542,path:546,slash:603,util:613}],58:[function(e,t,r){(function(t){"use strict";function n(e,n){(n=n||{}).isFileComment&&(e=function(e,t){var n=r.mapFileCommentRegex.exec(e),a=n[1]||n[2],o=s.resolve(t,a);try{return i.readFileSync(o,"utf8")}catch(e){throw new Error("An error occurred while trying to read the map file at "+o+"\n"+e)}}(e,n.commentFileDir)),n.hasComment&&(e=function(e){return e.split(",").pop()}(e)),n.isEncoded&&(e=function(e){return new t(e,"base64").toString()}(e)),(n.isJSON||n.isEncoded)&&(e=JSON.parse(e)),this.sourcemap=e}var i=e("fs"),s=e("path");Object.defineProperty(r,"commentRegex",{get:function(){return/^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/gm}}),Object.defineProperty(r,"mapFileCommentRegex",{get:function(){return/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"`]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/gm}}),n.prototype.toJSON=function(e){return JSON.stringify(this.sourcemap,null,e)},n.prototype.toBase64=function(){var e=this.toJSON();return new t(e).toString("base64")},n.prototype.toComment=function(e){var t="sourceMappingURL=data:application/json;charset=utf-8;base64,"+this.toBase64();return e&&e.multiline?"/*# "+t+" */":"//# "+t},n.prototype.toObject=function(){return JSON.parse(this.toJSON())},n.prototype.addProperty=function(e,t){if(this.sourcemap.hasOwnProperty(e))throw new Error('property "'+e+'" already exists on the sourcemap, use set property instead');return this.setProperty(e,t)},n.prototype.setProperty=function(e,t){return this.sourcemap[e]=t,this},n.prototype.getProperty=function(e){return this.sourcemap[e]},r.fromObject=function(e){return new n(e)},r.fromJSON=function(e){return new n(e,{isJSON:!0})},r.fromBase64=function(e){return new n(e,{isEncoded:!0})},r.fromComment=function(e){return e=e.replace(/^\/\*/g,"//").replace(/\*\/$/g,""),new n(e,{isEncoded:!0,hasComment:!0})},r.fromMapFileComment=function(e,t){return new n(e,{commentFileDir:t,isFileComment:!0,isJSON:!0})},r.fromSource=function(e){var t=e.match(r.commentRegex);return t?r.fromComment(t.pop()):null},r.fromMapFileSource=function(e,t){var n=e.match(r.mapFileCommentRegex);return n?r.fromMapFileComment(n.pop(),t):null},r.removeComments=function(e){return e.replace(r.commentRegex,"")},r.removeMapFileComments=function(e){return e.replace(r.mapFileCommentRegex,"")},r.generateMapFileComment=function(e,t){var r="sourceMappingURL="+e;return t&&t.multiline?"/*# "+r+" */":"//# "+r}}).call(this,e("buffer").Buffer)},{buffer:194,fs:193,path:546}],59:[function(e,t,r){t.exports=e("./src/node")},{"./src/node":61}],60:[function(e,t,r){function n(e){function t(){if(t.enabled){var e=t,n=+new Date,s=n-(i||n);e.diff=s,e.prev=i,e.curr=n,i=n;for(var a=new Array(arguments.length),o=0;o<a.length;o++)a[o]=arguments[o];a[0]=r.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var u=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(t,n){if("%%"===t)return t;u++;var i=r.formatters[n];if("function"==typeof i){var s=a[u];t=i.call(e,s),a.splice(u,1),u--}return t}),r.formatArgs.call(e,a);(t.log||r.log||console.log.bind(console)).apply(e,a)}}return t.namespace=e,t.enabled=r.enabled(e),t.useColors=r.useColors(),t.color=function(e){var t,n=0;for(t in e)n=(n<<5)-n+e.charCodeAt(t),n|=0;return r.colors[Math.abs(n)%r.colors.length]}(e),"function"==typeof r.init&&r.init(t),t}(r=t.exports=n.debug=n.default=n).coerce=function(e){return e instanceof Error?e.stack||e.message:e},r.disable=function(){r.enable("")},r.enable=function(e){r.save(e),r.names=[],r.skips=[];for(var t=("string"==typeof e?e:"").split(/[\s,]+/),n=t.length,i=0;i<n;i++)t[i]&&("-"===(e=t[i].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")))},r.enabled=function(e){var t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1},r.humanize=e("ms"),r.names=[],r.skips=[],r.formatters={};var i},{ms:543}],61:[function(e,t,r){(function(n){function i(){return n.env.DEBUG}var s=e("tty"),a=e("util");(r=t.exports=e("./debug")).init=function(e){e.inspectOpts={};for(var t=Object.keys(r.inspectOpts),n=0;n<t.length;n++)e.inspectOpts[t[n]]=r.inspectOpts[t[n]]},r.log=function(){return u.write(a.format.apply(a,arguments)+"\n")},r.formatArgs=function(e){var t=this.namespace;if(this.useColors){var n=this.color,i=" [3"+n+";1m"+t+" ";e[0]=i+e[0].split("\n").join("\n"+i),e.push("[3"+n+"m+"+r.humanize(this.diff)+"")}else e[0]=(new Date).toUTCString()+" "+t+" "+e[0]},r.save=function(e){null==e?delete n.env.DEBUG:n.env.DEBUG=e},r.load=i,r.useColors=function(){return"colors"in r.inspectOpts?Boolean(r.inspectOpts.colors):s.isatty(o)},r.colors=[6,2,3,4,5,1],r.inspectOpts=Object.keys(n.env).filter(function(e){return/^debug_/i.test(e)}).reduce(function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,function(e,t){return t.toUpperCase()}),i=n.env[t];return i=!!/^(yes|on|true|enabled)$/i.test(i)||!/^(no|off|false|disabled)$/i.test(i)&&("null"===i?null:Number(i)),e[r]=i,e},{});var o=parseInt(n.env.DEBUG_FD,10)||2;1!==o&&2!==o&&a.deprecate(function(){},"except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)")();var u=1===o?n.stdout:2===o?n.stderr:function(t){var r;switch(n.binding("tty_wrap").guessHandleType(t)){case"TTY":(r=new s.WriteStream(t))._type="tty",r._handle&&r._handle.unref&&r._handle.unref();break;case"FILE":(r=new(e("fs").SyncWriteStream)(t,{autoClose:!1}))._type="fs";break;case"PIPE":case"TCP":(r=new(e("net").Socket)({fd:t,readable:!1,writable:!0})).readable=!1,r.read=null,r._type="pipe",r._handle&&r._handle.unref&&r._handle.unref();break;default:throw new Error("Implement me. Unknown stream file type!")}return r.fd=t,r._isStdio=!0,r}(o);r.formatters.o=function(e){return this.inspectOpts.colors=this.useColors,a.inspect(e,this.inspectOpts).split("\n").map(function(e){return e.trim()}).join(" ")},r.formatters.O=function(e){return this.inspectOpts.colors=this.useColors,a.inspect(e,this.inspectOpts)},r.enable(i())}).call(this,e("_process"))},{"./debug":60,_process:550,fs:193,net:193,tty:609,util:613}],62:[function(e,t,r){function n(){this._array=[],this._set=a?new Map:Object.create(null)}var i=e("./util"),s=Object.prototype.hasOwnProperty,a="undefined"!=typeof Map;n.fromArray=function(e,t){for(var r=new n,i=0,s=e.length;i<s;i++)r.add(e[i],t);return r},n.prototype.size=function(){return a?this._set.size:Object.getOwnPropertyNames(this._set).length},n.prototype.add=function(e,t){var r=a?e:i.toSetString(e),n=a?this.has(e):s.call(this._set,r),o=this._array.length;n&&!t||this._array.push(e),n||(a?this._set.set(e,o):this._set[r]=o)},n.prototype.has=function(e){if(a)return this._set.has(e);var t=i.toSetString(e);return s.call(this._set,t)},n.prototype.indexOf=function(e){if(a){var t=this._set.get(e);if(t>=0)return t}else{var r=i.toSetString(e);if(s.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},n.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},n.prototype.toArray=function(){return this._array.slice()},r.ArraySet=n},{"./util":71}],63:[function(e,t,r){var n=e("./base64");r.encode=function(e){var t,r="",i=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&i,(i>>>=5)>0&&(t|=32),r+=n.encode(t)}while(i>0);return r},r.decode=function(e,t,r){var i,s,a=e.length,o=0,u=0;do{if(t>=a)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(s=n.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));i=!!(32&s),o+=(s&=31)<<u,u+=5}while(i);r.value=function(e){var t=e>>1;return 1==(1&e)?-t:t}(o),r.rest=t}},{"./base64":64}],64:[function(e,t,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");r.encode=function(e){if(0<=e&&e<n.length)return n[e];throw new TypeError("Must be between 0 and 63: "+e)},r.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}},{}],65:[function(e,t,r){function n(e,t,i,s,a,o){var u=Math.floor((t-e)/2)+e,l=a(i,s[u],!0);return 0===l?u:l>0?t-u>1?n(u,t,i,s,a,o):o==r.LEAST_UPPER_BOUND?t<s.length?t:-1:u:u-e>1?n(e,u,i,s,a,o):o==r.LEAST_UPPER_BOUND?u:e<0?-1:e}r.GREATEST_LOWER_BOUND=1,r.LEAST_UPPER_BOUND=2,r.search=function(e,t,i,s){if(0===t.length)return-1;var a=n(-1,t.length,e,t,i,s||r.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===i(t[a],t[a-1],!0);)--a;return a}},{}],66:[function(e,t,r){function n(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=e("./util");n.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},n.prototype.add=function(e){!function(e,t){var r=e.generatedLine,n=t.generatedLine,s=e.generatedColumn,a=t.generatedColumn;return n>r||n==r&&a>=s||i.compareByGeneratedPositionsInflated(e,t)<=0}(this._last,e)?(this._sorted=!1,this._array.push(e)):(this._last=e,this._array.push(e))},n.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},r.MappingList=n},{"./util":71}],67:[function(e,t,r){function n(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function i(e,t,r,s){if(r<s){var a=r-1;n(e,function(e,t){return Math.round(e+Math.random()*(t-e))}(r,s),s);for(var o=e[s],u=r;u<s;u++)t(e[u],o)<=0&&n(e,a+=1,u);n(e,a+1,u);var l=a+1;i(e,t,r,l-1),i(e,t,l+1,s)}}r.quickSort=function(e,t){i(e,t,0,e.length-1)}},{}],68:[function(e,t,r){function n(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new a(t):new i(t)}function i(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=o.getArg(t,"version"),n=o.getArg(t,"sources"),i=o.getArg(t,"names",[]),s=o.getArg(t,"sourceRoot",null),a=o.getArg(t,"sourcesContent",null),u=o.getArg(t,"mappings"),c=o.getArg(t,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);n=n.map(String).map(o.normalize).map(function(e){return s&&o.isAbsolute(s)&&o.isAbsolute(e)?o.relative(s,e):e}),this._names=l.fromArray(i.map(String),!0),this._sources=l.fromArray(n,!0),this.sourceRoot=s,this.sourcesContent=a,this._mappings=u,this.file=c}function s(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function a(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=o.getArg(t,"version"),i=o.getArg(t,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new l,this._names=new l;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=o.getArg(e,"offset"),r=o.getArg(t,"line"),i=o.getArg(t,"column");if(r<s.line||r===s.line&&i<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=t,{generatedOffset:{generatedLine:r+1,generatedColumn:i+1},consumer:new n(o.getArg(e,"map"))}})}var o=e("./util"),u=e("./binary-search"),l=e("./array-set").ArraySet,c=e("./base64-vlq"),p=e("./quick-sort").quickSort;n.fromSourceMap=function(e){return i.fromSourceMap(e)},n.prototype._version=3,n.prototype.__generatedMappings=null,Object.defineProperty(n.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),n.prototype.__originalMappings=null,Object.defineProperty(n.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),n.prototype._charIsMappingSeparator=function(e,t){var r=e.charAt(t);return";"===r||","===r},n.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},n.GENERATED_ORDER=1,n.ORIGINAL_ORDER=2,n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.prototype.eachMapping=function(e,t,r){var i,s=t||null;switch(r||n.GENERATED_ORDER){case n.GENERATED_ORDER:i=this._generatedMappings;break;case n.ORIGINAL_ORDER:i=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;i.map(function(e){var t=null===e.source?null:this._sources.at(e.source);return null!=t&&null!=a&&(t=o.join(a,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)},n.prototype.allGeneratedPositionsFor=function(e){var t=o.getArg(e,"line"),r={source:o.getArg(e,"source"),originalLine:t,originalColumn:o.getArg(e,"column",0)};if(null!=this.sourceRoot&&(r.source=o.relative(this.sourceRoot,r.source)),!this._sources.has(r.source))return[];r.source=this._sources.indexOf(r.source);var n=[],i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,u.LEAST_UPPER_BOUND);if(i>=0){var s=this._originalMappings[i];if(void 0===e.column)for(var a=s.originalLine;s&&s.originalLine===a;)n.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var l=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==l;)n.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return n},r.SourceMapConsumer=n,(i.prototype=Object.create(n.prototype)).consumer=n,i.fromSourceMap=function(e){var t=Object.create(i.prototype),r=t._names=l.fromArray(e._names.toArray(),!0),n=t._sources=l.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var a=e._mappings.toArray().slice(),u=t.__generatedMappings=[],c=t.__originalMappings=[],h=0,f=a.length;h<f;h++){var d=a[h],m=new s;m.generatedLine=d.generatedLine,m.generatedColumn=d.generatedColumn,d.source&&(m.source=n.indexOf(d.source),m.originalLine=d.originalLine,m.originalColumn=d.originalColumn,d.name&&(m.name=r.indexOf(d.name)),c.push(m)),u.push(m)}return p(t.__originalMappings,o.compareByOriginalPositions),t},i.prototype._version=3,Object.defineProperty(i.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return null!=this.sourceRoot?o.join(this.sourceRoot,e):e},this)}}),i.prototype._parseMappings=function(e,t){for(var r,n,i,a,u,l=1,h=0,f=0,d=0,m=0,y=0,g=e.length,b=0,v={},x={},E=[],A=[];b<g;)if(";"===e.charAt(b))l++,b++,h=0;else if(","===e.charAt(b))b++;else{for((r=new s).generatedLine=l,a=b;a<g&&!this._charIsMappingSeparator(e,a);a++);if(n=e.slice(b,a),i=v[n])b+=n.length;else{for(i=[];b<a;)c.decode(e,b,x),u=x.value,b=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");v[n]=i}r.generatedColumn=h+i[0],h=r.generatedColumn,i.length>1&&(r.source=m+i[1],m+=i[1],r.originalLine=f+i[2],f=r.originalLine,r.originalLine+=1,r.originalColumn=d+i[3],d=r.originalColumn,i.length>4&&(r.name=y+i[4],y+=i[4])),A.push(r),"number"==typeof r.originalLine&&E.push(r)}p(A,o.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,p(E,o.compareByOriginalPositions),this.__originalMappings=E},i.prototype._findMapping=function(e,t,r,n,i,s){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);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 r=this._generatedMappings[e+1];if(t.generatedLine===r.generatedLine){t.lastGeneratedColumn=r.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},i.prototype.originalPositionFor=function(e){var t={generatedLine:o.getArg(e,"line"),generatedColumn:o.getArg(e,"column")},r=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",o.compareByGeneratedPositionsDeflated,o.getArg(e,"bias",n.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===t.generatedLine){var s=o.getArg(i,"source",null);null!==s&&(s=this._sources.at(s),null!=this.sourceRoot&&(s=o.join(this.sourceRoot,s)));var a=o.getArg(i,"name",null);return null!==a&&(a=this._names.at(a)),{source:s,line:o.getArg(i,"originalLine",null),column:o.getArg(i,"originalColumn",null),name:a}}}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=o.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=o.urlParse(this.sourceRoot))){var n=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(n))return this.sourcesContent[this._sources.indexOf(n)];if((!r.path||"/"==r.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=o.getArg(e,"source");if(null!=this.sourceRoot&&(t=o.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};var r={source:t=this._sources.indexOf(t),originalLine:o.getArg(e,"line"),originalColumn:o.getArg(e,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,o.getArg(e,"bias",n.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===r.source)return{line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},r.BasicSourceMapConsumer=i,(a.prototype=Object.create(n.prototype)).constructor=n,a.prototype._version=3,Object.defineProperty(a.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}}),a.prototype.originalPositionFor=function(e){var t={generatedLine:o.getArg(e,"line"),generatedColumn:o.getArg(e,"column")},r=u.search(t,this._sections,function(e,t){var r=e.generatedLine-t.generatedOffset.generatedLine;return r||e.generatedColumn-t.generatedOffset.generatedColumn}),n=this._sections[r];return n?n.consumer.originalPositionFor({line:t.generatedLine-(n.generatedOffset.generatedLine-1),column:t.generatedColumn-(n.generatedOffset.generatedLine===t.generatedLine?n.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},a.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},a.prototype.sourceContentFor=function(e,t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r].consumer.sourceContentFor(e,!0);if(n)return n}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},a.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var r=this._sections[t];if(-1!==r.consumer.sources.indexOf(o.getArg(e,"source"))){var n=r.consumer.generatedPositionFor(e);if(n){return{line:n.line+(r.generatedOffset.generatedLine-1),column:n.column+(r.generatedOffset.generatedLine===n.line?r.generatedOffset.generatedColumn-1:0)}}}}return{line:null,column:null}},a.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var n=this._sections[r],i=n.consumer._generatedMappings,s=0;s<i.length;s++){var a=i[s],u=n.consumer._sources.at(a.source);null!==n.consumer.sourceRoot&&(u=o.join(n.consumer.sourceRoot,u)),this._sources.add(u),u=this._sources.indexOf(u);var l=n.consumer._names.at(a.name);this._names.add(l),l=this._names.indexOf(l);var c={source:u,generatedLine:a.generatedLine+(n.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(n.generatedOffset.generatedLine===a.generatedLine?n.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:l};this.__generatedMappings.push(c),"number"==typeof c.originalLine&&this.__originalMappings.push(c)}p(this.__generatedMappings,o.compareByGeneratedPositionsDeflated),p(this.__originalMappings,o.compareByOriginalPositions)},r.IndexedSourceMapConsumer=a},{"./array-set":62,"./base64-vlq":63,"./binary-search":65,"./quick-sort":67,"./util":71}],69:[function(e,t,r){function n(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 a,this._names=new a,this._mappings=new o,this._sourcesContents=null}var i=e("./base64-vlq"),s=e("./util"),a=e("./array-set").ArraySet,o=e("./mapping-list").MappingList;n.prototype._version=3,n.fromSourceMap=function(e){var t=e.sourceRoot,r=new n({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var n={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(n.source=e.source,null!=t&&(n.source=s.relative(t,n.source)),n.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(n.name=e.name)),r.addMapping(n)}),e.sources.forEach(function(t){var n=e.sourceContentFor(t);null!=n&&r.setSourceContent(t,n)}),r},n.prototype.addMapping=function(e){var t=s.getArg(e,"generated"),r=s.getArg(e,"original",null),n=s.getArg(e,"source",null),i=s.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,n,i),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:n,name:i})},n.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=s.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[s.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[s.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},n.prototype.applySourceMap=function(e,t,r){var n=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.');n=e.file}var i=this._sourceRoot;null!=i&&(n=s.relative(i,n));var o=new a,u=new a;this._mappings.unsortedForEach(function(t){if(t.source===n&&null!=t.originalLine){var a=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=a.source&&(t.source=a.source,null!=r&&(t.source=s.join(r,t.source)),null!=i&&(t.source=s.relative(i,t.source)),t.originalLine=a.line,t.originalColumn=a.column,null!=a.name&&(t.name=a.name))}var l=t.source;null==l||o.has(l)||o.add(l);var c=t.name;null==c||u.has(c)||u.add(c)},this),this._sources=o,this._names=u,e.sources.forEach(function(t){var n=e.sourceContentFor(t);null!=n&&(null!=r&&(t=s.join(r,t)),null!=i&&(t=s.relative(i,t)),this.setSourceContent(t,n))},this)},n.prototype._validateMapping=function(e,t,r,n){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||r||n)&&!(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&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))},n.prototype._serializeMappings=function(){for(var e,t,r,n,a=0,o=1,u=0,l=0,c=0,p=0,h="",f=this._mappings.toArray(),d=0,m=f.length;d<m;d++){if(t=f[d],e="",t.generatedLine!==o)for(a=0;t.generatedLine!==o;)e+=";",o++;else if(d>0){if(!s.compareByGeneratedPositionsInflated(t,f[d-1]))continue;e+=","}e+=i.encode(t.generatedColumn-a),a=t.generatedColumn,null!=t.source&&(n=this._sources.indexOf(t.source),e+=i.encode(n-p),p=n,e+=i.encode(t.originalLine-1-l),l=t.originalLine-1,e+=i.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),e+=i.encode(r-c),c=r)),h+=e}return h},n.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=s.relative(t,e));var r=s.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},n.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},n.prototype.toString=function(){return JSON.stringify(this.toJSON())},r.SourceMapGenerator=n},{"./array-set":62,"./base64-vlq":63,"./mapping-list":66,"./util":71}],70:[function(e,t,r){function n(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==r?null:r,this.name=null==i?null:i,this[o]=!0,null!=n&&this.add(n)}var i=e("./source-map-generator").SourceMapGenerator,s=e("./util"),a=/(\r?\n)/,o="$$$isSourceNode$$$";n.fromStringWithSourceMap=function(e,t,r){function i(e,t){if(null===e||void 0===e.source)o.add(t);else{var i=r?s.join(r,e.source):e.source;o.add(new n(e.originalLine,e.originalColumn,i,t,e.name))}}var o=new n,u=e.split(a),l=0,c=function(){function e(){return l<u.length?u[l++]:void 0}return e()+(e()||"")},p=1,h=0,f=null;return t.eachMapping(function(e){if(null!==f){if(!(p<e.generatedLine)){var t=(r=u[l]).substr(0,e.generatedColumn-h);return u[l]=r.substr(e.generatedColumn-h),h=e.generatedColumn,i(f,t),void(f=e)}i(f,c()),p++,h=0}for(;p<e.generatedLine;)o.add(c()),p++;if(h<e.generatedColumn){var r=u[l];o.add(r.substr(0,e.generatedColumn)),u[l]=r.substr(e.generatedColumn),h=e.generatedColumn}f=e},this),l<u.length&&(f&&i(f,c()),o.add(u.splice(l).join(""))),t.sources.forEach(function(e){var n=t.sourceContentFor(e);null!=n&&(null!=r&&(e=s.join(r,e)),o.setSourceContent(e,n))}),o},n.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[o]&&"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},n.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[o]&&"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},n.prototype.walk=function(e){for(var t,r=0,n=this.children.length;r<n;r++)(t=this.children[r])[o]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},n.prototype.join=function(e){var t,r,n=this.children.length;if(n>0){for(t=[],r=0;r<n-1;r++)t.push(this.children[r]),t.push(e);t.push(this.children[r]),this.children=t}return this},n.prototype.replaceRight=function(e,t){var r=this.children[this.children.length-1];return r[o]?r.replaceRight(e,t):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,t):this.children.push("".replace(e,t)),this},n.prototype.setSourceContent=function(e,t){this.sourceContents[s.toSetString(e)]=t},n.prototype.walkSourceContents=function(e){for(var t=0,r=this.children.length;t<r;t++)this.children[t][o]&&this.children[t].walkSourceContents(e);var n=Object.keys(this.sourceContents);for(t=0,r=n.length;t<r;t++)e(s.fromSetString(n[t]),this.sourceContents[n[t]])},n.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e},n.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},r=new i(e),n=!1,s=null,a=null,o=null,u=null;return this.walk(function(e,i){t.code+=e,null!==i.source&&null!==i.line&&null!==i.column?(s===i.source&&a===i.line&&o===i.column&&u===i.name||r.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:t.line,column:t.column},name:i.name}),s=i.source,a=i.line,o=i.column,u=i.name,n=!0):n&&(r.addMapping({generated:{line:t.line,column:t.column}}),s=null,n=!1);for(var l=0,c=e.length;l<c;l++)10===e.charCodeAt(l)?(t.line++,t.column=0,l+1===c?(s=null,n=!1):n&&r.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){r.setSourceContent(e,t)}),{code:t.code,map:r}},r.SourceNode=n},{"./source-map-generator":69,"./util":71}],71:[function(e,t,r){function n(e){var t=e.match(l);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function i(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 s(e){var t=e,s=n(e);if(s){if(!s.path)return e;t=s.path}for(var a,o=r.isAbsolute(t),u=t.split(/\/+/),l=0,c=u.length-1;c>=0;c--)"."===(a=u[c])?u.splice(c,1):".."===a?l++:l>0&&(""===a?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return""===(t=u.join("/"))&&(t=o?"/":"."),s?(s.path=t,i(s)):t}function a(e){return e}function o(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 r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function u(e,t){return e===t?0:e>t?1:-1}r.getArg=function(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')};var l=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,c=/^data:.+\,.+$/;r.urlParse=n,r.urlGenerate=i,r.normalize=s,r.join=function(e,t){""===e&&(e="."),""===t&&(t=".");var r=n(t),a=n(e);if(a&&(e=a.path||"/"),r&&!r.scheme)return a&&(r.scheme=a.scheme),i(r);if(r||t.match(c))return t;if(a&&!a.host&&!a.path)return a.host=t,i(a);var o="/"===t.charAt(0)?t:s(e.replace(/\/+$/,"")+"/"+t);return a?(a.path=o,i(a)):o},r.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(l)},r.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if((e=e.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)};var p=!("__proto__"in Object.create(null));r.toSetString=p?a:function(e){return o(e)?"$"+e:e},r.fromSetString=p?a:function(e){return o(e)?e.slice(1):e},r.compareByOriginalPositions=function(e,t,r){var n=e.source-t.source;return 0!==n?n:0!=(n=e.originalLine-t.originalLine)?n:0!=(n=e.originalColumn-t.originalColumn)||r?n:0!=(n=e.generatedColumn-t.generatedColumn)?n:0!=(n=e.generatedLine-t.generatedLine)?n:e.name-t.name},r.compareByGeneratedPositionsDeflated=function(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!=(n=e.generatedColumn-t.generatedColumn)||r?n:0!=(n=e.source-t.source)?n:0!=(n=e.originalLine-t.originalLine)?n:0!=(n=e.originalColumn-t.originalColumn)?n:e.name-t.name},r.compareByGeneratedPositionsInflated=function(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!=(r=e.generatedColumn-t.generatedColumn)?r:0!==(r=u(e.source,t.source))?r:0!=(r=e.originalLine-t.originalLine)?r:0!=(r=e.originalColumn-t.originalColumn)?r:u(e.name,t.name)}},{}],72:[function(e,t,r){r.SourceMapGenerator=e("./lib/source-map-generator").SourceMapGenerator,r.SourceMapConsumer=e("./lib/source-map-consumer").SourceMapConsumer,r.SourceNode=e("./lib/source-node").SourceNode},{"./lib/source-map-consumer":68,"./lib/source-map-generator":69,"./lib/source-node":70}],73:[function(e,t,r){t.exports={_args:[[{raw:"babel-core@^6.18.2",scope:null,escapedName:"babel-core",name:"babel-core",rawSpec:"^6.18.2",spec:">=6.18.2 <7.0.0",type:"range"},"/Users/evgenypoberezkin/Documents/JSON/ajv/node_modules/regenerator"]],_from:"babel-core@>=6.18.2 <7.0.0",_id:"babel-core@6.26.0",_inCache:!0,_location:"/babel-core",_nodeVersion:"6.9.0",_npmOperationalInternal:{host:"s3://npm-registry-packages",tmp:"tmp/babel-core-6.26.0.tgz_1502898861183_0.43529116874560714"},_npmUser:{name:"hzoo",email:"hi@henryzoo.com"},_npmVersion:"4.6.1",_phantomChildren:{ms:"2.0.0"},_requested:{raw:"babel-core@^6.18.2",scope:null,escapedName:"babel-core",name:"babel-core",rawSpec:"^6.18.2",spec:">=6.18.2 <7.0.0",type:"range"},_requiredBy:["/babel-register","/regenerator"],_resolved:"https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz",_shasum:"af32f78b31a6fcef119c87b0fd8d9753f03a0bb8",_shrinkwrap:null,_spec:"babel-core@^6.18.2",_where:"/Users/evgenypoberezkin/Documents/JSON/ajv/node_modules/regenerator",author:{name:"Sebastian McKenzie",email:"sebmck@gmail.com"},dependencies:{"babel-code-frame":"^6.26.0","babel-generator":"^6.26.0","babel-helpers":"^6.24.1","babel-messages":"^6.23.0","babel-register":"^6.26.0","babel-runtime":"^6.26.0","babel-template":"^6.26.0","babel-traverse":"^6.26.0","babel-types":"^6.26.0",babylon:"^6.18.0","convert-source-map":"^1.5.0",debug:"^2.6.8",json5:"^0.5.1",lodash:"^4.17.4",minimatch:"^3.0.4","path-is-absolute":"^1.0.1",private:"^0.1.7",slash:"^1.0.0","source-map":"^0.5.6"},description:"Babel compiler core.",devDependencies:{"babel-helper-fixtures":"^6.26.0","babel-helper-transform-fixture-test-runner":"^6.26.0","babel-polyfill":"^6.26.0"},directories:{},dist:{shasum:"af32f78b31a6fcef119c87b0fd8d9753f03a0bb8",tarball:"https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz"},homepage:"https://babeljs.io/",keywords:["6to5","babel","classes","const","es6","harmony","let","modules","transpile","transpiler","var","babel-core","compiler"],license:"MIT",maintainers:[{name:"thejameskyle",email:"me@thejameskyle.com"},{name:"sebmck",email:"sebmck@gmail.com"},{name:"danez",email:"daniel@tschinder.de"},{name:"hzoo",email:"hi@henryzoo.com"},{name:"loganfsmyth",email:"loganfsmyth@gmail.com"}],name:"babel-core",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"https://github.com/babel/babel/tree/master/packages/babel-core"},scripts:{bench:"make bench",test:"make test"},version:"6.26.0"}},{}],74:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=n(e("trim-right")),a=/^[ \t]+$/,o=function(){function e(t){(0,i.default)(this,e),this._map=null,this._buf=[],this._last="",this._queue=[],this._position={line:1,column:0},this._sourcePosition={identifierName:null,line:null,column:null,filename:null},this._map=t}return e.prototype.get=function(){this._flush();var e=this._map,t={code:(0,s.default)(this._buf.join("")),map:null,rawMappings:e&&e.getRawMappings()};return e&&Object.defineProperty(t,"map",{configurable:!0,enumerable:!0,get:function(){return this.map=e.get()},set:function(e){Object.defineProperty(this,"map",{value:e,writable:!0})}}),t},e.prototype.append=function(e){this._flush();var t=this._sourcePosition,r=t.line,n=t.column,i=t.filename,s=t.identifierName;this._append(e,r,n,s,i)},e.prototype.queue=function(e){if("\n"===e)for(;this._queue.length>0&&a.test(this._queue[0][0]);)this._queue.shift();var t=this._sourcePosition,r=t.line,n=t.column,i=t.filename,s=t.identifierName;this._queue.unshift([e,r,n,s,i])},e.prototype._flush=function(){for(var e=void 0;e=this._queue.pop();)this._append.apply(this,e)},e.prototype._append=function(e,t,r,n,i){this._map&&"\n"!==e[0]&&this._map.mark(this._position.line,this._position.column,t,r,n,i),this._buf.push(e),this._last=e[e.length-1];for(var s=0;s<e.length;s++)"\n"===e[s]?(this._position.line++,this._position.column=0):this._position.column++},e.prototype.removeTrailingNewline=function(){this._queue.length>0&&"\n"===this._queue[0][0]&&this._queue.shift()},e.prototype.removeLastSemicolon=function(){this._queue.length>0&&";"===this._queue[0][0]&&this._queue.shift()},e.prototype.endsWith=function(e){if(1===e.length){var t=void 0;if(this._queue.length>0){var r=this._queue[0][0];t=r[r.length-1]}else t=this._last;return t===e}var n=this._last+this._queue.reduce(function(e,t){return t[0]+e},"");return e.length<=n.length&&n.slice(-e.length)===e},e.prototype.hasContent=function(){return this._queue.length>0||!!this._last},e.prototype.source=function(e,t){if(!e||t){var r=t?t[e]:null;this._sourcePosition.identifierName=t&&t.identifierName||null,this._sourcePosition.line=r?r.line:null,this._sourcePosition.column=r?r.column:null,this._sourcePosition.filename=t&&t.filename||null}},e.prototype.withSource=function(e,t,r){if(!this._map)return r();var n=this._sourcePosition.line,i=this._sourcePosition.column,s=this._sourcePosition.filename,a=this._sourcePosition.identifierName;this.source(e,t),r(),this._sourcePosition.line=n,this._sourcePosition.column=i,this._sourcePosition.filename=s,this._sourcePosition.identifierName=a},e.prototype.getCurrentColumn=function(){var e=this._queue.reduce(function(e,t){return t[0]+e},""),t=e.lastIndexOf("\n");return-1===t?this._position.column+e.length:e.length-1-t},e.prototype.getCurrentLine=function(){for(var e=this._queue.reduce(function(e,t){return t[0]+e},""),t=0,r=0;r<e.length;r++)"\n"===e[r]&&t++;return this._position.line+t},e}();r.default=o,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":134,"trim-right":608}],75:[function(e,t,r){"use strict";r.__esModule=!0,r.File=function(e){this.print(e.program,e)},r.Program=function(e){this.printInnerComments(e,!1),this.printSequence(e.directives,e),e.directives&&e.directives.length&&this.newline(),this.printSequence(e.body,e)},r.BlockStatement=function(e){this.token("{"),this.printInnerComments(e);var t=e.directives&&e.directives.length;e.body.length||t?(this.newline(),this.printSequence(e.directives,e,{indent:!0}),t&&this.newline(),this.printSequence(e.body,e,{indent:!0}),this.removeTrailingNewline(),this.source("end",e.loc),this.endsWith("\n")||this.newline(),this.rightBrace()):(this.source("end",e.loc),this.token("}"))},r.Noop=function(){},r.Directive=function(e){this.print(e.value,e),this.semicolon()};var n=e("./types");Object.defineProperty(r,"DirectiveLiteral",{enumerable:!0,get:function(){return n.StringLiteral}})},{"./types":84}],76:[function(e,t,r){"use strict";function n(e){this.printJoin(e.decorators,e),this.word("class"),e.id&&(this.space(),this.print(e.id,e)),this.print(e.typeParameters,e),e.superClass&&(this.space(),this.word("extends"),this.space(),this.print(e.superClass,e),this.print(e.superTypeParameters,e)),e.implements&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements,e)),this.space(),this.print(e.body,e)}r.__esModule=!0,r.ClassDeclaration=n,r.ClassBody=function(e){this.token("{"),this.printInnerComments(e),0===e.body.length?this.token("}"):(this.newline(),this.indent(),this.printSequence(e.body,e),this.dedent(),this.endsWith("\n")||this.newline(),this.rightBrace())},r.ClassProperty=function(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space()),e.computed?(this.token("["),this.print(e.key,e),this.token("]")):(this._variance(e),this.print(e.key,e)),this.print(e.typeAnnotation,e),e.value&&(this.space(),this.token("="),this.space(),this.print(e.value,e)),this.semicolon()},r.ClassMethod=function(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space()),"constructorCall"===e.kind&&(this.word("call"),this.space()),this._method(e)},r.ClassExpression=n},{}],77:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(){this.token(","),this.newline(),this.endsWith("\n")||this.space()}function s(e){return function(t){if(this.word(e),t.delegate&&this.token("*"),t.argument){this.space();var r=this.startTerminatorless();this.print(t.argument,t),this.endTerminatorless(r)}}}function a(e,t){var r=this.inForStatementInitCounter&&"in"===e.operator&&!u.needsParens(e,t);r&&this.token("("),this.print(e.left,e),this.space(),"in"===e.operator||"instanceof"===e.operator?this.word(e.operator):this.token(e.operator),this.space(),this.print(e.right,e),r&&this.token(")")}r.__esModule=!0,r.LogicalExpression=r.BinaryExpression=r.AwaitExpression=r.YieldExpression=void 0,r.UnaryExpression=function(e){"void"===e.operator||"delete"===e.operator||"typeof"===e.operator?(this.word(e.operator),this.space()):this.token(e.operator),this.print(e.argument,e)},r.DoExpression=function(e){this.word("do"),this.space(),this.print(e.body,e)},r.ParenthesizedExpression=function(e){this.token("("),this.print(e.expression,e),this.token(")")},r.UpdateExpression=function(e){e.prefix?(this.token(e.operator),this.print(e.argument,e)):(this.print(e.argument,e),this.token(e.operator))},r.ConditionalExpression=function(e){this.print(e.test,e),this.space(),this.token("?"),this.space(),this.print(e.consequent,e),this.space(),this.token(":"),this.space(),this.print(e.alternate,e)},r.NewExpression=function(e,t){this.word("new"),this.space(),this.print(e.callee,e),(0!==e.arguments.length||!this.format.minified||o.isCallExpression(t,{callee:e})||o.isMemberExpression(t)||o.isNewExpression(t))&&(this.token("("),this.printList(e.arguments,e),this.token(")"))},r.SequenceExpression=function(e){this.printList(e.expressions,e)},r.ThisExpression=function(){this.word("this")},r.Super=function(){this.word("super")},r.Decorator=function(e){this.token("@"),this.print(e.expression,e),this.newline()},r.CallExpression=function(e){this.print(e.callee,e),this.token("(");var t=e._prettyCall,r=void 0;t&&(r=i,this.newline(),this.indent()),this.printList(e.arguments,e,{separator:r}),t&&(this.newline(),this.dedent()),this.token(")")},r.Import=function(){this.word("import")},r.EmptyStatement=function(){this.semicolon(!0)},r.ExpressionStatement=function(e){this.print(e.expression,e),this.semicolon()},r.AssignmentPattern=function(e){this.print(e.left,e),e.left.optional&&this.token("?"),this.print(e.left.typeAnnotation,e),this.space(),this.token("="),this.space(),this.print(e.right,e)},r.AssignmentExpression=a,r.BindExpression=function(e){this.print(e.object,e),this.token("::"),this.print(e.callee,e)},r.MemberExpression=function(e){if(this.print(e.object,e),!e.computed&&o.isMemberExpression(e.property))throw new TypeError("Got a MemberExpression for MemberExpression property");var t=e.computed;o.isLiteral(e.property)&&"number"==typeof e.property.value&&(t=!0),t?(this.token("["),this.print(e.property,e),this.token("]")):(this.token("."),this.print(e.property,e))},r.MetaProperty=function(e){this.print(e.meta,e),this.token("."),this.print(e.property,e)};var o=n(e("babel-types")),u=n(e("../node"));r.YieldExpression=s("yield"),r.AwaitExpression=s("await");r.BinaryExpression=a,r.LogicalExpression=a},{"../node":86,"babel-types":180}],78:[function(e,t,r){"use strict";function n(e){this.print(e.id,e),this.print(e.typeParameters,e)}function i(){this.space(),this.token("&"),this.space()}function s(e){this.token("<"),this.printList(e.params,e,{}),this.token(">")}function a(){this.space(),this.token("|"),this.space()}r.__esModule=!0,r.TypeParameterDeclaration=r.StringLiteralTypeAnnotation=r.NumericLiteralTypeAnnotation=r.GenericTypeAnnotation=r.ClassImplements=void 0,r.AnyTypeAnnotation=function(){this.word("any")},r.ArrayTypeAnnotation=function(e){this.print(e.elementType,e),this.token("["),this.token("]")},r.BooleanTypeAnnotation=function(){this.word("boolean")},r.BooleanLiteralTypeAnnotation=function(e){this.word(e.value?"true":"false")},r.NullLiteralTypeAnnotation=function(){this.word("null")},r.DeclareClass=function(e,t){u.isDeclareExportDeclaration(t)||(this.word("declare"),this.space()),this.word("class"),this.space(),this._interfaceish(e)},r.DeclareFunction=function(e,t){u.isDeclareExportDeclaration(t)||(this.word("declare"),this.space()),this.word("function"),this.space(),this.print(e.id,e),this.print(e.id.typeAnnotation.typeAnnotation,e),this.semicolon()},r.DeclareInterface=function(e){this.word("declare"),this.space(),this.InterfaceDeclaration(e)},r.DeclareModule=function(e){this.word("declare"),this.space(),this.word("module"),this.space(),this.print(e.id,e),this.space(),this.print(e.body,e)},r.DeclareModuleExports=function(e){this.word("declare"),this.space(),this.word("module"),this.token("."),this.word("exports"),this.print(e.typeAnnotation,e)},r.DeclareTypeAlias=function(e){this.word("declare"),this.space(),this.TypeAlias(e)},r.DeclareOpaqueType=function(e,t){u.isDeclareExportDeclaration(t)||(this.word("declare"),this.space()),this.OpaqueType(e)},r.DeclareVariable=function(e,t){u.isDeclareExportDeclaration(t)||(this.word("declare"),this.space()),this.word("var"),this.space(),this.print(e.id,e),this.print(e.id.typeAnnotation,e),this.semicolon()},r.DeclareExportDeclaration=function(e){this.word("declare"),this.space(),this.word("export"),this.space(),e.default&&(this.word("default"),this.space()),function(e){if(e.declaration){var t=e.declaration;this.print(t,e),u.isStatement(t)||this.semicolon()}else this.token("{"),e.specifiers.length&&(this.space(),this.printList(e.specifiers,e),this.space()),this.token("}"),e.source&&(this.space(),this.word("from"),this.space(),this.print(e.source,e)),this.semicolon()}.apply(this,arguments)},r.ExistentialTypeParam=function(){this.token("*")},r.FunctionTypeAnnotation=function(e,t){this.print(e.typeParameters,e),this.token("("),this.printList(e.params,e),e.rest&&(e.params.length&&(this.token(","),this.space()),this.token("..."),this.print(e.rest,e)),this.token(")"),"ObjectTypeCallProperty"===t.type||"DeclareFunction"===t.type?this.token(":"):(this.space(),this.token("=>")),this.space(),this.print(e.returnType,e)},r.FunctionTypeParam=function(e){this.print(e.name,e),e.optional&&this.token("?"),this.token(":"),this.space(),this.print(e.typeAnnotation,e)},r.InterfaceExtends=n,r._interfaceish=function(e){this.print(e.id,e),this.print(e.typeParameters,e),e.extends.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends,e)),e.mixins&&e.mixins.length&&(this.space(),this.word("mixins"),this.space(),this.printList(e.mixins,e)),this.space(),this.print(e.body,e)},r._variance=function(e){"plus"===e.variance?this.token("+"):"minus"===e.variance&&this.token("-")},r.InterfaceDeclaration=function(e){this.word("interface"),this.space(),this._interfaceish(e)},r.IntersectionTypeAnnotation=function(e){this.printJoin(e.types,e,{separator:i})},r.MixedTypeAnnotation=function(){this.word("mixed")},r.EmptyTypeAnnotation=function(){this.word("empty")},r.NullableTypeAnnotation=function(e){this.token("?"),this.print(e.typeAnnotation,e)};var o=e("./types");Object.defineProperty(r,"NumericLiteralTypeAnnotation",{enumerable:!0,get:function(){return o.NumericLiteral}}),Object.defineProperty(r,"StringLiteralTypeAnnotation",{enumerable:!0,get:function(){return o.StringLiteral}}),r.NumberTypeAnnotation=function(){this.word("number")},r.StringTypeAnnotation=function(){this.word("string")},r.ThisTypeAnnotation=function(){this.word("this")},r.TupleTypeAnnotation=function(e){this.token("["),this.printList(e.types,e),this.token("]")},r.TypeofTypeAnnotation=function(e){this.word("typeof"),this.space(),this.print(e.argument,e)},r.TypeAlias=function(e){this.word("type"),this.space(),this.print(e.id,e),this.print(e.typeParameters,e),this.space(),this.token("="),this.space(),this.print(e.right,e),this.semicolon()},r.OpaqueType=function(e){this.word("opaque"),this.space(),this.word("type"),this.space(),this.print(e.id,e),this.print(e.typeParameters,e),e.supertype&&(this.token(":"),this.space(),this.print(e.supertype,e)),e.impltype&&(this.space(),this.token("="),this.space(),this.print(e.impltype,e)),this.semicolon()},r.TypeAnnotation=function(e){this.token(":"),this.space(),e.optional&&this.token("?"),this.print(e.typeAnnotation,e)},r.TypeParameter=function(e){this._variance(e),this.word(e.name),e.bound&&this.print(e.bound,e),e.default&&(this.space(),this.token("="),this.space(),this.print(e.default,e))},r.TypeParameterInstantiation=s,r.ObjectTypeAnnotation=function(e){var t=this;e.exact?this.token("{|"):this.token("{");var r=e.properties.concat(e.callProperties,e.indexers);r.length&&(this.space(),this.printJoin(r,e,{addNewlines:function(e){if(e&&!r[0])return 1},indent:!0,statement:!0,iterator:function(){1!==r.length&&(t.format.flowCommaSeparator?t.token(","):t.semicolon(),t.space())}}),this.space()),e.exact?this.token("|}"):this.token("}")},r.ObjectTypeCallProperty=function(e){e.static&&(this.word("static"),this.space()),this.print(e.value,e)},r.ObjectTypeIndexer=function(e){e.static&&(this.word("static"),this.space()),this._variance(e),this.token("["),this.print(e.id,e),this.token(":"),this.space(),this.print(e.key,e),this.token("]"),this.token(":"),this.space(),this.print(e.value,e)},r.ObjectTypeProperty=function(e){e.static&&(this.word("static"),this.space()),this._variance(e),this.print(e.key,e),e.optional&&this.token("?"),this.token(":"),this.space(),this.print(e.value,e)},r.ObjectTypeSpreadProperty=function(e){this.token("..."),this.print(e.argument,e)},r.QualifiedTypeIdentifier=function(e){this.print(e.qualification,e),this.token("."),this.print(e.id,e)},r.UnionTypeAnnotation=function(e){this.printJoin(e.types,e,{separator:a})},r.TypeCastExpression=function(e){this.token("("),this.print(e.expression,e),this.print(e.typeAnnotation,e),this.token(")")},r.VoidTypeAnnotation=function(){this.word("void")};var u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.ClassImplements=n,r.GenericTypeAnnotation=n,r.TypeParameterDeclaration=s},{"./types":84,"babel-types":180}],79:[function(e,t,r){"use strict";function n(){this.space()}r.__esModule=!0;var i=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.JSXAttribute=function(e){this.print(e.name,e),e.value&&(this.token("="),this.print(e.value,e))},r.JSXIdentifier=function(e){this.word(e.name)},r.JSXNamespacedName=function(e){this.print(e.namespace,e),this.token(":"),this.print(e.name,e)},r.JSXMemberExpression=function(e){this.print(e.object,e),this.token("."),this.print(e.property,e)},r.JSXSpreadAttribute=function(e){this.token("{"),this.token("..."),this.print(e.argument,e),this.token("}")},r.JSXExpressionContainer=function(e){this.token("{"),this.print(e.expression,e),this.token("}")},r.JSXSpreadChild=function(e){this.token("{"),this.token("..."),this.print(e.expression,e),this.token("}")},r.JSXText=function(e){this.token(e.value)},r.JSXElement=function(e){var t=e.openingElement;if(this.print(t,e),!t.selfClosing){this.indent();var r=e.children,n=Array.isArray(r),s=0;for(r=n?r:(0,i.default)(r);;){var a;if(n){if(s>=r.length)break;a=r[s++]}else{if((s=r.next()).done)break;a=s.value}var o=a;this.print(o,e)}this.dedent(),this.print(e.closingElement,e)}},r.JSXOpeningElement=function(e){this.token("<"),this.print(e.name,e),e.attributes.length>0&&(this.space(),this.printJoin(e.attributes,e,{separator:n})),e.selfClosing?(this.space(),this.token("/>")):this.token(">")},r.JSXClosingElement=function(e){this.token("</"),this.print(e.name,e),this.token(">")},r.JSXEmptyExpression=function(){}},{"babel-runtime/core-js/get-iterator":120}],80:[function(e,t,r){"use strict";function n(e){e.async&&(this.word("async"),this.space()),this.word("function"),e.generator&&this.token("*"),e.id?(this.space(),this.print(e.id,e)):this.space(),this._params(e),this.space(),this.print(e.body,e)}r.__esModule=!0,r.FunctionDeclaration=void 0,r._params=function(e){var t=this;this.print(e.typeParameters,e),this.token("("),this.printList(e.params,e,{iterator:function(e){e.optional&&t.token("?"),t.print(e.typeAnnotation,e)}}),this.token(")"),e.returnType&&this.print(e.returnType,e)},r._method=function(e){var t=e.kind,r=e.key;"method"!==t&&"init"!==t||e.generator&&this.token("*"),"get"!==t&&"set"!==t||(this.word(t),this.space()),e.async&&(this.word("async"),this.space()),e.computed?(this.token("["),this.print(r,e),this.token("]")):this.print(r,e),this._params(e),this.space(),this.print(e.body,e)},r.FunctionExpression=n,r.ArrowFunctionExpression=function(e){e.async&&(this.word("async"),this.space());var t=e.params[0];1===e.params.length&&i.isIdentifier(t)&&!function(e,t){return e.typeParameters||e.returnType||t.typeAnnotation||t.optional||t.trailingComments}(e,t)?this.print(t,e):this._params(e),this.space(),this.token("=>"),this.space(),this.print(e.body,e)};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.FunctionDeclaration=n},{"babel-types":180}],81:[function(e,t,r){"use strict";function n(e){if(e.declaration){var t=e.declaration;this.print(t,e),i.isStatement(t)||this.semicolon()}else{"type"===e.exportKind&&(this.word("type"),this.space());for(var r=e.specifiers.slice(0),n=!1;;){var s=r[0];if(!i.isExportDefaultSpecifier(s)&&!i.isExportNamespaceSpecifier(s))break;n=!0,this.print(r.shift(),e),r.length&&(this.token(","),this.space())}(r.length||!r.length&&!n)&&(this.token("{"),r.length&&(this.space(),this.printList(r,e),this.space()),this.token("}")),e.source&&(this.space(),this.word("from"),this.space(),this.print(e.source,e)),this.semicolon()}}r.__esModule=!0,r.ImportSpecifier=function(e){"type"!==e.importKind&&"typeof"!==e.importKind||(this.word(e.importKind),this.space()),this.print(e.imported,e),e.local&&e.local.name!==e.imported.name&&(this.space(),this.word("as"),this.space(),this.print(e.local,e))},r.ImportDefaultSpecifier=function(e){this.print(e.local,e)},r.ExportDefaultSpecifier=function(e){this.print(e.exported,e)},r.ExportSpecifier=function(e){this.print(e.local,e),e.exported&&e.local.name!==e.exported.name&&(this.space(),this.word("as"),this.space(),this.print(e.exported,e))},r.ExportNamespaceSpecifier=function(e){this.token("*"),this.space(),this.word("as"),this.space(),this.print(e.exported,e)},r.ExportAllDeclaration=function(e){this.word("export"),this.space(),this.token("*"),this.space(),this.word("from"),this.space(),this.print(e.source,e),this.semicolon()},r.ExportNamedDeclaration=function(){this.word("export"),this.space(),n.apply(this,arguments)},r.ExportDefaultDeclaration=function(){this.word("export"),this.space(),this.word("default"),this.space(),n.apply(this,arguments)},r.ImportDeclaration=function(e){this.word("import"),this.space(),"type"!==e.importKind&&"typeof"!==e.importKind||(this.word(e.importKind),this.space());var t=e.specifiers.slice(0);if(t&&t.length){for(;;){var r=t[0];if(!i.isImportDefaultSpecifier(r)&&!i.isImportNamespaceSpecifier(r))break;this.print(t.shift(),e),t.length&&(this.token(","),this.space())}t.length&&(this.token("{"),this.space(),this.printList(t,e),this.space(),this.token("}")),this.space(),this.word("from"),this.space()}this.print(e.source,e),this.semicolon()},r.ImportNamespaceSpecifier=function(e){this.token("*"),this.space(),this.word("as"),this.space(),this.print(e.local,e)};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))},{"babel-types":180}],82:[function(e,t,r){"use strict";function n(e){return u.isStatement(e.body)?n(e.body):e}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"label";return function(r){this.word(e);var n=r[t];if(n){this.space();var i=this.startTerminatorless();this.print(n,r),this.endTerminatorless(i)}this.semicolon()}}function s(){if(this.token(","),this.newline(),this.endsWith("\n"))for(var e=0;e<4;e++)this.space(!0)}function a(){if(this.token(","),this.newline(),this.endsWith("\n"))for(var e=0;e<6;e++)this.space(!0)}r.__esModule=!0,r.ThrowStatement=r.BreakStatement=r.ReturnStatement=r.ContinueStatement=r.ForAwaitStatement=r.ForOfStatement=r.ForInStatement=void 0;var o=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.WithStatement=function(e){this.word("with"),this.space(),this.token("("),this.print(e.object,e),this.token(")"),this.printBlock(e)},r.IfStatement=function(e){this.word("if"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.space();var t=e.alternate&&u.isIfStatement(n(e.consequent));t&&(this.token("{"),this.newline(),this.indent()),this.printAndIndentOnComments(e.consequent,e),t&&(this.dedent(),this.newline(),this.token("}")),e.alternate&&(this.endsWith("}")&&this.space(),this.word("else"),this.space(),this.printAndIndentOnComments(e.alternate,e))},r.ForStatement=function(e){this.word("for"),this.space(),this.token("("),this.inForStatementInitCounter++,this.print(e.init,e),this.inForStatementInitCounter--,this.token(";"),e.test&&(this.space(),this.print(e.test,e)),this.token(";"),e.update&&(this.space(),this.print(e.update,e)),this.token(")"),this.printBlock(e)},r.WhileStatement=function(e){this.word("while"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.printBlock(e)},r.DoWhileStatement=function(e){this.word("do"),this.space(),this.print(e.body,e),this.space(),this.word("while"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.semicolon()},r.LabeledStatement=function(e){this.print(e.label,e),this.token(":"),this.space(),this.print(e.body,e)},r.TryStatement=function(e){this.word("try"),this.space(),this.print(e.block,e),this.space(),e.handlers?this.print(e.handlers[0],e):this.print(e.handler,e),e.finalizer&&(this.space(),this.word("finally"),this.space(),this.print(e.finalizer,e))},r.CatchClause=function(e){this.word("catch"),this.space(),this.token("("),this.print(e.param,e),this.token(")"),this.space(),this.print(e.body,e)},r.SwitchStatement=function(e){this.word("switch"),this.space(),this.token("("),this.print(e.discriminant,e),this.token(")"),this.space(),this.token("{"),this.printSequence(e.cases,e,{indent:!0,addNewlines:function(t,r){if(!t&&e.cases[e.cases.length-1]===r)return-1}}),this.token("}")},r.SwitchCase=function(e){e.test?(this.word("case"),this.space(),this.print(e.test,e),this.token(":")):(this.word("default"),this.token(":")),e.consequent.length&&(this.newline(),this.printSequence(e.consequent,e,{indent:!0}))},r.DebuggerStatement=function(){this.word("debugger"),this.semicolon()},r.VariableDeclaration=function(e,t){this.word(e.kind),this.space();var r=!1;if(!u.isFor(t)){var n=e.declarations,i=Array.isArray(n),l=0;for(n=i?n:(0,o.default)(n);;){var c;if(i){if(l>=n.length)break;c=n[l++]}else{if((l=n.next()).done)break;c=l.value}c.init&&(r=!0)}}var p=void 0;r&&(p="const"===e.kind?a:s),this.printList(e.declarations,e,{separator:p}),(!u.isFor(t)||t.left!==e&&t.init!==e)&&this.semicolon()},r.VariableDeclarator=function(e){this.print(e.id,e),this.print(e.id.typeAnnotation,e),e.init&&(this.space(),this.token("="),this.space(),this.print(e.init,e))};var u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),l=function(e){return function(t){this.word("for"),this.space(),"await"===e&&(this.word("await"),this.space()),this.token("("),this.print(t.left,t),this.space(),this.word("await"===e?"of":e),this.space(),this.print(t.right,t),this.token(")"),this.printBlock(t)}};r.ForInStatement=l("in"),r.ForOfStatement=l("of"),r.ForAwaitStatement=l("await"),r.ContinueStatement=i("continue"),r.ReturnStatement=i("return","argument"),r.BreakStatement=i("break"),r.ThrowStatement=i("throw","argument")},{"babel-runtime/core-js/get-iterator":120,"babel-types":180}],83:[function(e,t,r){"use strict";r.__esModule=!0,r.TaggedTemplateExpression=function(e){this.print(e.tag,e),this.print(e.quasi,e)},r.TemplateElement=function(e,t){var r=t.quasis[0]===e,n=t.quasis[t.quasis.length-1]===e,i=(r?"`":"}")+e.value.raw+(n?"`":"${");this.token(i)},r.TemplateLiteral=function(e){for(var t=e.quasis,r=0;r<t.length;r++)this.print(t[r],e),r+1<t.length&&this.print(e.expressions[r],e)}},{}],84:[function(e,t,r){"use strict";function n(e){this.token("..."),this.print(e.argument,e)}function i(e){var t=e.properties;this.token("{"),this.printInnerComments(e),t.length&&(this.space(),this.printList(t,e,{indent:!0,statement:!0}),this.space()),this.token("}")}function s(e){var t=e.elements,r=t.length;this.token("["),this.printInnerComments(e);for(var n=0;n<t.length;n++){var i=t[n];i?(n>0&&this.space(),this.print(i,e),n<r-1&&this.token(",")):this.token(",")}this.token("]")}r.__esModule=!0,r.ArrayPattern=r.ObjectPattern=r.RestProperty=r.SpreadProperty=r.SpreadElement=void 0,r.Identifier=function(e){e.variance&&("plus"===e.variance?this.token("+"):"minus"===e.variance&&this.token("-")),this.word(e.name)},r.RestElement=n,r.ObjectExpression=i,r.ObjectMethod=function(e){this.printJoin(e.decorators,e),this._method(e)},r.ObjectProperty=function(e){if(this.printJoin(e.decorators,e),e.computed)this.token("["),this.print(e.key,e),this.token("]");else{if(a.isAssignmentPattern(e.value)&&a.isIdentifier(e.key)&&e.key.name===e.value.left.name)return void this.print(e.value,e);if(this.print(e.key,e),e.shorthand&&a.isIdentifier(e.key)&&a.isIdentifier(e.value)&&e.key.name===e.value.name)return}this.token(":"),this.space(),this.print(e.value,e)},r.ArrayExpression=s,r.RegExpLiteral=function(e){this.word("/"+e.pattern+"/"+e.flags)},r.BooleanLiteral=function(e){this.word(e.value?"true":"false")},r.NullLiteral=function(){this.word("null")},r.NumericLiteral=function(e){var t=this.getPossibleRaw(e),r=e.value+"";null==t?this.number(r):this.format.minified?this.number(t.length<r.length?t:r):this.number(t)},r.StringLiteral=function(e,t){var r=this.getPossibleRaw(e);if(this.format.minified||null==r){var n={quotes:a.isJSX(t)?"double":this.format.quotes,wrap:!0};this.format.jsonCompatibleStrings&&(n.json=!0);var i=(0,o.default)(e.value,n);return this.token(i)}this.token(r)};var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),o=function(e){return e&&e.__esModule?e:{default:e}}(e("jsesc"));r.SpreadElement=n,r.SpreadProperty=n,r.RestProperty=n,r.ObjectPattern=i,r.ArrayPattern=s},{"babel-types":180,jsesc:323}],85:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0,r.CodeGenerator=void 0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=n(e("babel-runtime/helpers/possibleConstructorReturn")),a=n(e("babel-runtime/helpers/inherits"));r.default=function(e,t,r){return new c(e,t,r).generate()};var o=n(e("detect-indent")),u=n(e("./source-map")),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-messages")),c=function(e){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments[2];(0,i.default)(this,t);var c=r.tokens||[],p=function(e,t,r){var n=" ";if(e&&"string"==typeof e){var i=(0,o.default)(e).indent;i&&" "!==i&&(n=i)}var s={auxiliaryCommentBefore:t.auxiliaryCommentBefore,auxiliaryCommentAfter:t.auxiliaryCommentAfter,shouldPrintComment:t.shouldPrintComment,retainLines:t.retainLines,retainFunctionParens:t.retainFunctionParens,comments:null==t.comments||t.comments,compact:t.compact,minified:t.minified,concise:t.concise,quotes:t.quotes||function(e,t){if(!e)return"double";for(var r={single:0,double:0},n=0,i=0;i<t.length;i++){var s=t[i];if("string"===s.type.label){var a=e.slice(s.start,s.end);if("'"===a[0]?r.single++:r.double++,++n>=3)break}}return r.single>r.double?"single":"double"}(e,r),jsonCompatibleStrings:t.jsonCompatibleStrings,indent:{adjustMultilineComment:!0,style:n,base:0},flowCommaSeparator:t.flowCommaSeparator};return s.minified?(s.compact=!0,s.shouldPrintComment=s.shouldPrintComment||function(){return s.comments}):s.shouldPrintComment=s.shouldPrintComment||function(e){return s.comments||e.indexOf("@license")>=0||e.indexOf("@preserve")>=0},"auto"===s.compact&&(s.compact=e.length>5e5,s.compact&&console.error("[BABEL] "+l.get("codeGeneratorDeopt",t.filename,"500KB"))),s.compact&&(s.indent.adjustMultilineComment=!1),s}(a,n,c),h=n.sourceMaps?new u.default(n,a):null,f=(0,s.default)(this,e.call(this,p,h,c));return f.ast=r,f}return(0,a.default)(t,e),t.prototype.generate=function(){return e.prototype.generate.call(this,this.ast)},t}(n(e("./printer")).default);r.CodeGenerator=function(){function e(t,r,n){(0,i.default)(this,e),this._generator=new c(t,r,n)}return e.prototype.generate=function(){return this._generator.generate()},e}()},{"./printer":89,"./source-map":90,"babel-messages":110,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/inherits":135,"babel-runtime/helpers/possibleConstructorReturn":137,"detect-indent":311}],86:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){function t(e,t){var n=r[e];r[e]=n?function(e,r,i){var s=n(e,r,i);return null==s?t(e,r,i):s}:t}var r={},n=(0,c.default)(e),i=Array.isArray(n),s=0;for(n=i?n:(0,l.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a,u=f.FLIPPED_ALIAS_KEYS[o];if(u){var p=u,h=Array.isArray(p),d=0;for(p=h?p:(0,l.default)(p);;){var m;if(h){if(d>=p.length)break;m=p[d++]}else{if((d=p.next()).done)break;m=d.value}t(m,e[o])}}else t(o,e[o])}return r}function a(e,t,r,n){var i=e[t.type];return i?i(t,r,n):null}function o(e){return!!f.isCallExpression(e)||!!f.isMemberExpression(e)&&(o(e.object)||!e.computed&&o(e.property))}function u(e,t,r){if(!e)return 0;f.isExpressionStatement(e)&&(e=e.expression);var n=a(m,e,t);if(!n){var i=a(y,e,t);if(i)for(var s=0;s<i.length&&!(n=u(i[s],e,r));s++);}return n&&n[r]||0}r.__esModule=!0;var l=i(e("babel-runtime/core-js/get-iterator")),c=i(e("babel-runtime/core-js/object/keys"));r.needsWhitespace=u,r.needsWhitespaceBefore=function(e,t){return u(e,t,"before")},r.needsWhitespaceAfter=function(e,t){return u(e,t,"after")},r.needsParens=function(e,t,r){return!!t&&(!(!f.isNewExpression(t)||t.callee!==e||!o(e))||a(d,e,t,r))};var p=i(e("./whitespace")),h=n(e("./parentheses")),f=n(e("babel-types")),d=s(h),m=s(p.default.nodes),y=s(p.default.list)},{"./parentheses":87,"./whitespace":88,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/object/keys":127,"babel-types":180}],87:[function(e,t,r){"use strict";function n(e,t){return u.isArrayTypeAnnotation(t)}function i(e,t){return u.isBinary(t)||u.isUnaryLike(t)||u.isCallExpression(t)||u.isMemberExpression(t)||u.isNewExpression(t)||u.isConditionalExpression(t)&&e===t.test}function s(e,t){return u.isMemberExpression(t,{object:e})||u.isCallExpression(t,{callee:e})||u.isNewExpression(t,{callee:e})}function a(e,t){return!!(u.isUnaryLike(t)||u.isBinary(t)||u.isConditionalExpression(t,{test:e})||u.isAwaitExpression(t))||s(e,t)}function o(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.considerArrow,n=void 0!==r&&r,i=t.considerDefaultExports,s=void 0!==i&&i,a=e.length-1,o=e[a],l=e[--a];a>0;){if(u.isExpressionStatement(l,{expression:o})||u.isTaggedTemplateExpression(l)||s&&u.isExportDefaultDeclaration(l,{declaration:o})||n&&u.isArrowFunctionExpression(l,{body:o}))return!0;if(!(u.isCallExpression(l,{callee:o})||u.isSequenceExpression(l)&&l.expressions[0]===o||u.isMemberExpression(l,{object:o})||u.isConditional(l,{test:o})||u.isBinary(l,{left:o})||u.isAssignmentExpression(l,{left:o})))return!1;o=l,l=e[--a]}return!1}r.__esModule=!0,r.AwaitExpression=r.FunctionTypeAnnotation=void 0,r.NullableTypeAnnotation=n,r.UpdateExpression=function(e,t){return u.isMemberExpression(t)&&t.object===e},r.ObjectExpression=function(e,t,r){return o(r,{considerArrow:!0})},r.DoExpression=function(e,t,r){return o(r)},r.Binary=function(e,t){if((u.isCallExpression(t)||u.isNewExpression(t))&&t.callee===e||u.isUnaryLike(t)||u.isMemberExpression(t)&&t.object===e||u.isAwaitExpression(t))return!0;if(u.isBinary(t)){var r=t.operator,n=l[r],i=e.operator,s=l[i];if(n===s&&t.right===e&&!u.isLogicalExpression(t)||n>s)return!0}return!1},r.BinaryExpression=function(e,t){return"in"===e.operator&&(u.isVariableDeclarator(t)||u.isFor(t))},r.SequenceExpression=function(e,t){return!(u.isForStatement(t)||u.isThrowStatement(t)||u.isReturnStatement(t)||u.isIfStatement(t)&&t.test===e||u.isWhileStatement(t)&&t.test===e||u.isForInStatement(t)&&t.right===e||u.isSwitchStatement(t)&&t.discriminant===e||u.isExpressionStatement(t)&&t.expression===e)},r.YieldExpression=i,r.ClassExpression=function(e,t,r){return o(r,{considerDefaultExports:!0})},r.UnaryLike=s,r.FunctionExpression=function(e,t,r){return o(r,{considerDefaultExports:!0})},r.ArrowFunctionExpression=function(e,t){return!!(u.isExportDeclaration(t)||u.isBinaryExpression(t)||u.isLogicalExpression(t)||u.isUnaryExpression(t)||u.isTaggedTemplateExpression(t))||s(e,t)},r.ConditionalExpression=a,r.AssignmentExpression=function(e){return!!u.isObjectPattern(e.left)||a.apply(void 0,arguments)};var u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),l={"||":0,"&&":1,"|":2,"^":3,"&":4,"==":5,"===":5,"!=":5,"!==":5,"<":6,">":6,"<=":6,">=":6,in:6,instanceof:6,">>":7,"<<":7,">>>":7,"+":8,"-":8,"*":9,"/":9,"%":9,"**":10};r.FunctionTypeAnnotation=n,r.AwaitExpression=i},{"babel-types":180}],88:[function(e,t,r){"use strict";function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.isMemberExpression(e)?(n(e.object,t),e.computed&&n(e.property,t)):o.isBinary(e)||o.isAssignmentExpression(e)?(n(e.left,t),n(e.right,t)):o.isCallExpression(e)?(t.hasCall=!0,n(e.callee,t)):o.isFunction(e)?t.hasFunction=!0:o.isIdentifier(e)&&(t.hasHelper=t.hasHelper||i(e.callee)),t}function i(e){return o.isMemberExpression(e)?i(e.object)||i(e.property):o.isIdentifier(e)?"require"===e.name||"_"===e.name[0]:o.isCallExpression(e)?i(e.callee):!(!o.isBinary(e)&&!o.isAssignmentExpression(e))&&(o.isIdentifier(e.left)&&i(e.left)||i(e.right))}function s(e){return o.isLiteral(e)||o.isObjectExpression(e)||o.isArrayExpression(e)||o.isIdentifier(e)||o.isMemberExpression(e)}var a=function(e){return e&&e.__esModule?e:{default:e}}(e("lodash/map")),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.nodes={AssignmentExpression:function(e){var t=n(e.right);if(t.hasCall&&t.hasHelper||t.hasFunction)return{before:t.hasFunction,after:!0}},SwitchCase:function(e,t){return{before:e.consequent.length||t.cases[0]===e}},LogicalExpression:function(e){if(o.isFunction(e.left)||o.isFunction(e.right))return{after:!0}},Literal:function(e){if("use strict"===e.value)return{after:!0}},CallExpression:function(e){if(o.isFunction(e.callee)||i(e))return{before:!0,after:!0}},VariableDeclaration:function(e){for(var t=0;t<e.declarations.length;t++){var r=e.declarations[t],a=i(r.id)&&!s(r.init);if(!a){var o=n(r.init);a=i(r.init)&&o.hasCall||o.hasFunction}if(a)return{before:!0,after:!0}}},IfStatement:function(e){if(o.isBlockStatement(e.consequent))return{before:!0,after:!0}}},r.nodes.ObjectProperty=r.nodes.ObjectTypeProperty=r.nodes.ObjectMethod=r.nodes.SpreadProperty=function(e,t){if(t.properties[0]===e)return{before:!0}},r.list={VariableDeclaration:function(e){return(0,a.default)(e.declarations,"init")},ArrayExpression:function(e){return e.elements},ObjectExpression:function(e){return e.properties}},[["Function",!0],["Class",!0],["Loop",!0],["LabeledStatement",!0],["SwitchStatement",!0],["TryStatement",!0]].forEach(function(e){var t=e[0],n=e[1];"boolean"==typeof n&&(n={after:n,before:n}),[t].concat(o.FLIPPED_ALIAS_KEYS[t]||[]).forEach(function(e){r.nodes[e]=function(){return n}})})},{"babel-types":180,"lodash/map":525}],89:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(){this.token(","),this.space()}r.__esModule=!0;var a=i(e("babel-runtime/core-js/object/assign")),o=i(e("babel-runtime/core-js/get-iterator")),u=i(e("babel-runtime/core-js/json/stringify")),l=i(e("babel-runtime/core-js/weak-set")),c=i(e("babel-runtime/helpers/classCallCheck")),p=i(e("lodash/find")),h=i(e("lodash/findLast")),f=i(e("lodash/isInteger")),d=i(e("lodash/repeat")),m=i(e("./buffer")),y=n(e("./node")),g=i(e("./whitespace")),b=n(e("babel-types")),v=/e/i,x=/\.0+$/,E=/^0[box]/,A=function(){function e(t,r,n){(0,c.default)(this,e),this.inForStatementInitCounter=0,this._printStack=[],this._indent=0,this._insideAux=!1,this._printedCommentStarts={},this._parenPushNewlineState=null,this._printAuxAfterOnNextUserNode=!1,this._printedComments=new l.default,this._endsWithInteger=!1,this._endsWithWord=!1,this.format=t||{},this._buf=new m.default(r),this._whitespace=n.length>0?new g.default(n):null}return e.prototype.generate=function(e){return this.print(e),this._maybeAddAuxComment(),this._buf.get()},e.prototype.indent=function(){this.format.compact||this.format.concise||this._indent++},e.prototype.dedent=function(){this.format.compact||this.format.concise||this._indent--},e.prototype.semicolon=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._maybeAddAuxComment(),this._append(";",!e)},e.prototype.rightBrace=function(){this.format.minified&&this._buf.removeLastSemicolon(),this.token("}")},e.prototype.space=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.format.compact||(this._buf.hasContent()&&!this.endsWith(" ")&&!this.endsWith("\n")||e)&&this._space()},e.prototype.word=function(e){this._endsWithWord&&this._space(),this._maybeAddAuxComment(),this._append(e),this._endsWithWord=!0},e.prototype.number=function(e){this.word(e),this._endsWithInteger=(0,f.default)(+e)&&!E.test(e)&&!v.test(e)&&!x.test(e)&&"."!==e[e.length-1]},e.prototype.token=function(e){("--"===e&&this.endsWith("!")||"+"===e[0]&&this.endsWith("+")||"-"===e[0]&&this.endsWith("-")||"."===e[0]&&this._endsWithInteger)&&this._space(),this._maybeAddAuxComment(),this._append(e)},e.prototype.newline=function(e){if(!this.format.retainLines&&!this.format.compact)if(this.format.concise)this.space();else if(!(this.endsWith("\n\n")||("number"!=typeof e&&(e=1),e=Math.min(2,e),(this.endsWith("{\n")||this.endsWith(":\n"))&&e--,e<=0)))for(var t=0;t<e;t++)this._newline()},e.prototype.endsWith=function(e){return this._buf.endsWith(e)},e.prototype.removeTrailingNewline=function(){this._buf.removeTrailingNewline()},e.prototype.source=function(e,t){this._catchUp(e,t),this._buf.source(e,t)},e.prototype.withSource=function(e,t,r){this._catchUp(e,t),this._buf.withSource(e,t,r)},e.prototype._space=function(){this._append(" ",!0)},e.prototype._newline=function(){this._append("\n",!0)},e.prototype._append=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._maybeAddParen(e),this._maybeIndent(e),t?this._buf.queue(e):this._buf.append(e),this._endsWithWord=!1,this._endsWithInteger=!1},e.prototype._maybeIndent=function(e){this._indent&&this.endsWith("\n")&&"\n"!==e[0]&&this._buf.queue(this._getIndent())},e.prototype._maybeAddParen=function(e){var t=this._parenPushNewlineState;if(t){this._parenPushNewlineState=null;var r=void 0;for(r=0;r<e.length&&" "===e[r];r++);if(r!==e.length){var n=e[r];"\n"!==n&&"/"!==n||(this.token("("),this.indent(),t.printed=!0)}}},e.prototype._catchUp=function(e,t){if(this.format.retainLines){var r=t?t[e]:null;if(r&&null!==r.line)for(var n=r.line-this._buf.getCurrentLine(),i=0;i<n;i++)this._newline()}},e.prototype._getIndent=function(){return(0,d.default)(this.format.indent.style,this._indent)},e.prototype.startTerminatorless=function(){return this._parenPushNewlineState={printed:!1}},e.prototype.endTerminatorless=function(e){e.printed&&(this.dedent(),this.newline(),this.token(")"))},e.prototype.print=function(e,t){var r=this;if(e){var n=this.format.concise;e._compact&&(this.format.concise=!0);if(!this[e.type])throw new ReferenceError("unknown node of type "+(0,u.default)(e.type)+" with constructor "+(0,u.default)(e&&e.constructor.name));this._printStack.push(e);var i=this._insideAux;this._insideAux=!e.loc,this._maybeAddAuxComment(this._insideAux&&!i);var s=y.needsParens(e,t,this._printStack);this.format.retainFunctionParens&&"FunctionExpression"===e.type&&e.extra&&e.extra.parenthesized&&(s=!0),s&&this.token("("),this._printLeadingComments(e,t);var a=b.isProgram(e)||b.isFile(e)?null:e.loc;this.withSource("start",a,function(){r[e.type](e,t)}),this._printTrailingComments(e,t),s&&this.token(")"),this._printStack.pop(),this.format.concise=n,this._insideAux=i}},e.prototype._maybeAddAuxComment=function(e){e&&this._printAuxBeforeComment(),this._insideAux||this._printAuxAfterComment()},e.prototype._printAuxBeforeComment=function(){if(!this._printAuxAfterOnNextUserNode){this._printAuxAfterOnNextUserNode=!0;var e=this.format.auxiliaryCommentBefore;e&&this._printComment({type:"CommentBlock",value:e})}},e.prototype._printAuxAfterComment=function(){if(this._printAuxAfterOnNextUserNode){this._printAuxAfterOnNextUserNode=!1;var e=this.format.auxiliaryCommentAfter;e&&this._printComment({type:"CommentBlock",value:e})}},e.prototype.getPossibleRaw=function(e){var t=e.extra;if(t&&null!=t.raw&&null!=t.rawValue&&e.value===t.rawValue)return t.raw},e.prototype.printJoin=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e&&e.length){r.indent&&this.indent();for(var n={addNewlines:r.addNewlines},i=0;i<e.length;i++){var s=e[i];s&&(r.statement&&this._printNewline(!0,s,t,n),this.print(s,t),r.iterator&&r.iterator(s,i),r.separator&&i<e.length-1&&r.separator.call(this),r.statement&&this._printNewline(!1,s,t,n))}r.indent&&this.dedent()}},e.prototype.printAndIndentOnComments=function(e,t){var r=!!e.leadingComments;r&&this.indent(),this.print(e,t),r&&this.dedent()},e.prototype.printBlock=function(e){var t=e.body;b.isEmptyStatement(t)||this.space(),this.print(t,e)},e.prototype._printTrailingComments=function(e,t){this._printComments(this._getComments(!1,e,t))},e.prototype._printLeadingComments=function(e,t){this._printComments(this._getComments(!0,e,t))},e.prototype.printInnerComments=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.innerComments&&(t&&this.indent(),this._printComments(e.innerComments),t&&this.dedent())},e.prototype.printSequence=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.statement=!0,this.printJoin(e,t,r)},e.prototype.printList=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return null==r.separator&&(r.separator=s),this.printJoin(e,t,r)},e.prototype._printNewline=function(e,t,r,n){var i=this;if(!this.format.retainLines&&!this.format.compact)if(this.format.concise)this.space();else{var s=0;if(null!=t.start&&!t._ignoreUserWhitespace&&this._whitespace)if(e){var a=t.leadingComments,o=a&&(0,p.default)(a,function(e){return!!e.loc&&i.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesBefore(o||t)}else{var u=t.trailingComments,l=u&&(0,h.default)(u,function(e){return!!e.loc&&i.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesAfter(l||t)}else{e||s++,n.addNewlines&&(s+=n.addNewlines(e,t)||0);var c=y.needsWhitespaceAfter;e&&(c=y.needsWhitespaceBefore),c(t,r)&&s++,this._buf.hasContent()||(s=0)}this.newline(s)}},e.prototype._getComments=function(e,t){return t&&(e?t.leadingComments:t.trailingComments)||[]},e.prototype._printComment=function(e){var t=this;if(this.format.shouldPrintComment(e.value)&&!e.ignore&&!this._printedComments.has(e)){if(this._printedComments.add(e),null!=e.start){if(this._printedCommentStarts[e.start])return;this._printedCommentStarts[e.start]=!0}this.newline(this._whitespace?this._whitespace.getNewlinesBefore(e):0),this.endsWith("[")||this.endsWith("{")||this.space();var r="CommentLine"===e.type?"//"+e.value+"\n":"/*"+e.value+"*/";if("CommentBlock"===e.type&&this.format.indent.adjustMultilineComment){var n=e.loc&&e.loc.start.column;if(n){var i=new RegExp("\\n\\s{1,"+n+"}","g");r=r.replace(i,"\n")}var s=Math.max(this._getIndent().length,this._buf.getCurrentColumn());r=r.replace(/\n(?!$)/g,"\n"+(0,d.default)(" ",s))}this.withSource("start",e.loc,function(){t._append(r)}),this.newline((this._whitespace?this._whitespace.getNewlinesAfter(e):0)+("CommentLine"===e.type?-1:0))}},e.prototype._printComments=function(e){if(e&&e.length){var t=e,r=Array.isArray(t),n=0;for(t=r?t:(0,o.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;this._printComment(s)}}},e}();r.default=A;for(var D=[e("./generators/template-literals"),e("./generators/expressions"),e("./generators/statements"),e("./generators/classes"),e("./generators/methods"),e("./generators/modules"),e("./generators/types"),e("./generators/flow"),e("./generators/base"),e("./generators/jsx")],S=0;S<D.length;S++){var C=D[S];(0,a.default)(A.prototype,C)}t.exports=r.default},{"./buffer":74,"./generators/base":75,"./generators/classes":76,"./generators/expressions":77,"./generators/flow":78,"./generators/jsx":79,"./generators/methods":80,"./generators/modules":81,"./generators/statements":82,"./generators/template-literals":83,"./generators/types":84,"./node":86,"./whitespace":91,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/json/stringify":121,"babel-runtime/core-js/object/assign":124,"babel-runtime/core-js/weak-set":133,"babel-runtime/helpers/classCallCheck":134,"babel-types":180,"lodash/find":499,"lodash/findLast":501,"lodash/isInteger":514,"lodash/repeat":530}],90:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/object/keys")),s=n(e("babel-runtime/helpers/typeof")),a=n(e("babel-runtime/helpers/classCallCheck")),o=n(e("source-map")),u=function(){function e(t,r){(0,a.default)(this,e),this._cachedMap=null,this._code=r,this._opts=t,this._rawMappings=[]}return e.prototype.get=function(){if(!this._cachedMap){var e=this._cachedMap=new o.default.SourceMapGenerator({file:this._opts.sourceMapTarget,sourceRoot:this._opts.sourceRoot}),t=this._code;"string"==typeof t?e.setSourceContent(this._opts.sourceFileName,t):"object"===(void 0===t?"undefined":(0,s.default)(t))&&(0,i.default)(t).forEach(function(r){e.setSourceContent(r,t[r])}),this._rawMappings.forEach(e.addMapping,e)}return this._cachedMap.toJSON()},e.prototype.getRawMappings=function(){return this._rawMappings.slice()},e.prototype.mark=function(e,t,r,n,i,s){this._lastGenLine!==e&&null===r||this._lastGenLine===e&&this._lastSourceLine===r&&this._lastSourceColumn===n||(this._cachedMap=null,this._lastGenLine=e,this._lastSourceLine=r,this._lastSourceColumn=n,this._rawMappings.push({name:i||void 0,generated:{line:e,column:t},source:null==r?void 0:s||this._opts.sourceFileName,original:null==r?void 0:{line:r,column:n}}))},e}();r.default=u,t.exports=r.default},{"babel-runtime/core-js/object/keys":127,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/typeof":138,"source-map":102}],91:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/helpers/classCallCheck")),i=function(){function e(t){(0,n.default)(this,e),this.tokens=t,this.used={}}return e.prototype.getNewlinesBefore=function(e){var t=void 0,r=void 0,n=this.tokens,i=this._findToken(function(t){return t.start-e.start},0,n.length);if(i>=0){for(;i&&e.start===n[i-1].start;)--i;t=n[i-1],r=n[i]}return this._getNewlinesBetween(t,r)},e.prototype.getNewlinesAfter=function(e){var t=void 0,r=void 0,n=this.tokens,i=this._findToken(function(t){return t.end-e.end},0,n.length);if(i>=0){for(;i&&e.end===n[i-1].end;)--i;t=n[i],","===(r=n[i+1]).type.label&&(r=n[i+2])}return r&&"eof"===r.type.label?1:this._getNewlinesBetween(t,r)},e.prototype._getNewlinesBetween=function(e,t){if(!t||!t.loc)return 0;for(var r=e?e.loc.end.line:1,n=t.loc.start.line,i=0,s=r;s<n;s++)void 0===this.used[s]&&(this.used[s]=!0,i++);return i},e.prototype._findToken=function(e,t,r){if(t>=r)return-1;var n=t+r>>>1,i=e(this.tokens[n]);return i<0?this._findToken(e,n+1,r):i>0?this._findToken(e,t,n):0===i?n:-1},e}();r.default=i,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":134}],92:[function(e,t,r){arguments[4][62][0].apply(r,arguments)},{"./util":101,dup:62}],93:[function(e,t,r){arguments[4][63][0].apply(r,arguments)},{"./base64":94,dup:63}],94:[function(e,t,r){arguments[4][64][0].apply(r,arguments)},{dup:64}],95:[function(e,t,r){arguments[4][65][0].apply(r,arguments)},{dup:65}],96:[function(e,t,r){arguments[4][66][0].apply(r,arguments)},{"./util":101,dup:66}],97:[function(e,t,r){arguments[4][67][0].apply(r,arguments)},{dup:67}],98:[function(e,t,r){arguments[4][68][0].apply(r,arguments)},{"./array-set":92,"./base64-vlq":93,"./binary-search":95,"./quick-sort":97,"./util":101,dup:68}],99:[function(e,t,r){arguments[4][69][0].apply(r,arguments)},{"./array-set":92,"./base64-vlq":93,"./mapping-list":96,"./util":101,dup:69}],100:[function(e,t,r){arguments[4][70][0].apply(r,arguments)},{"./source-map-generator":99,"./util":101,dup:70}],101:[function(e,t,r){arguments[4][71][0].apply(r,arguments)},{dup:71}],102:[function(e,t,r){arguments[4][72][0].apply(r,arguments)},{"./lib/source-map-consumer":98,"./lib/source-map-generator":99,"./lib/source-node":100,dup:72}],103:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=u.objectExpression([]);return(0,s.default)(e).forEach(function(r){var n=e[r],i=u.objectExpression([]),a=u.objectProperty(n._key,i,n._computed);(0,s.default)(n).forEach(function(e){var t=n[e];if("_"!==e[0]){var r=t;(u.isClassMethod(t)||u.isClassProperty(t))&&(t=t.value);var s=u.objectProperty(u.identifier(e),t);u.inheritsComments(s,r),u.removeComments(r),i.properties.push(s)}}),t.properties.push(a)}),t}r.__esModule=!0;var s=n(e("babel-runtime/core-js/object/keys"));r.push=function(e,t,r,n,i){var s=u.toKeyAlias(t),l={};if((0,o.default)(e,s)&&(l=e[s]),e[s]=l,l._inherits=l._inherits||[],l._inherits.push(t),l._key=t.key,t.computed&&(l._computed=!0),t.decorators){var c=l.decorators=l.decorators||u.arrayExpression([]);c.elements=c.elements.concat(t.decorators.map(function(e){return e.expression}).reverse())}if(l.value||l.initializer)throw n.buildCodeFrameError(t,"Key conflict with sibling node");var p=void 0,h=void 0;(u.isObjectProperty(t)||u.isObjectMethod(t)||u.isClassMethod(t))&&(p=u.toComputedKey(t,t.key)),u.isObjectProperty(t)||u.isClassProperty(t)?h=t.value:(u.isObjectMethod(t)||u.isClassMethod(t))&&((h=u.functionExpression(null,t.params,t.body,t.generator,t.async)).returnType=t.returnType);var f=function(e){return!u.isClassMethod(e)&&!u.isObjectMethod(e)||"get"!==e.kind&&"set"!==e.kind?"value":e.kind}(t);return r&&"value"===f||(r=f),i&&u.isStringLiteral(p)&&("value"===r||"initializer"===r)&&u.isFunctionExpression(h)&&(h=(0,a.default)({id:p,node:h,scope:i})),h&&(u.inheritsComments(h,t),l[r]=h),l},r.hasComputed=function(e){for(var t in e)if(e[t]._computed)return!0;return!1},r.toComputedObjectFromClass=function(e){for(var t=u.arrayExpression([]),r=0;r<e.properties.length;r++){var n=e.properties[r],i=n.value;i.properties.unshift(u.objectProperty(u.identifier("key"),u.toComputedKey(n))),t.elements.push(i)}return t},r.toClassObject=i,r.toDefineObject=function(e){return(0,s.default)(e).forEach(function(t){var r=e[t];r.value&&(r.writable=u.booleanLiteral(!0)),r.configurable=u.booleanLiteral(!0),r.enumerable=u.booleanLiteral(!0)}),i(e)};var a=n(e("babel-helper-function-name")),o=n(e("lodash/has")),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))},{"babel-helper-function-name":104,"babel-runtime/core-js/object/keys":127,"babel-types":180,"lodash/has":504}],104:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0,r.default=function(e){var t=e.node,r=e.parent,n=e.scope,s=e.id;if(!t.id){if(!a.isObjectProperty(r)&&!a.isObjectMethod(r,{kind:"method"})||r.computed&&!a.isLiteral(r.key)){if(a.isVariableDeclarator(r)){if(s=r.id,a.isIdentifier(s)){var c=n.parent.getBinding(s.name);if(c&&c.constant&&n.getBinding(s.name)===c)return t.id=s,void(t.id[a.NOT_LOCAL_BINDING]=!0)}}else if(a.isAssignmentExpression(r))s=r.left;else if(!s)return}else s=r.key;var p=void 0;if(s&&a.isLiteral(s))p=s.value;else{if(!s||!a.isIdentifier(s))return;p=s.name}p=a.toBindingIdentifierName(p),(s=a.identifier(p))[a.NOT_LOCAL_BINDING]=!0;return function(e,t,r,n){if(e.selfReference){if(!n.hasBinding(r.name)||n.hasGlobal(r.name)){if(!a.isFunction(t))return;var s=o;t.generator&&(s=u);var l=s({FUNCTION:t,FUNCTION_ID:r,FUNCTION_KEY:n.generateUidIdentifier(r.name)}).expression;l.callee._skipModulesRemap=!0;for(var c=l.callee.body.body[0].params,p=0,h=(0,i.default)(t);p<h;p++)c.push(n.generateUidIdentifier("x"));return l}n.rename(r.name)}t.id=r,n.getProgramParent().references[r.name]=!0}(function(e,t,r){var n={selfAssignment:!1,selfReference:!1,outerDeclar:r.getBindingIdentifier(t),references:[],name:t},i=r.getOwnBinding(t);return i?"param"===i.kind&&(n.selfReference=!0):(n.outerDeclar||r.hasGlobal(t))&&r.traverse(e,l,n),n}(t,p,n),t,s,n)||t}};var i=n(e("babel-helper-get-function-arity")),s=n(e("babel-template")),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),o=(0,s.default)("\n (function (FUNCTION_KEY) {\n function FUNCTION_ID() {\n return FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n }\n\n return FUNCTION_ID;\n })(FUNCTION)\n"),u=(0,s.default)("\n (function (FUNCTION_KEY) {\n function* FUNCTION_ID() {\n return yield* FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n };\n\n return FUNCTION_ID;\n })(FUNCTION)\n"),l={"ReferencedIdentifier|BindingIdentifier":function(e,t){if(e.node.name===t.name){e.scope.getBindingIdentifier(t.name)===t.outerDeclar&&(t.selfReference=!0,e.stop())}}};t.exports=r.default},{"babel-helper-get-function-arity":105,"babel-template":139,"babel-types":180}],105:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){for(var t=e.params,r=0;r<t.length;r++){var i=t[r];if(n.isAssignmentPattern(i)||n.isRestElement(i))return r}return t.length};var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));t.exports=r.default},{"babel-types":180}],106:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t,r){return 1===r.length&&n.isSpreadElement(r[0])&&n.isIdentifier(r[0].argument,{name:"arguments"})?n.callExpression(n.memberExpression(e,n.identifier("apply")),[t,r[0].argument]):n.callExpression(n.memberExpression(e,n.identifier("call")),[t].concat(r))};var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));t.exports=r.default},{"babel-types":180}],107:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){return p.isMemberExpression(e)&&p.isSuper(e.object)}function a(e,t){var r=t?e:p.memberExpression(e,p.identifier("prototype"));return p.logicalExpression("||",p.memberExpression(r,p.identifier("__proto__")),p.callExpression(p.memberExpression(p.identifier("Object"),p.identifier("getPrototypeOf")),[r]))}r.__esModule=!0;var o=i(e("babel-runtime/helpers/classCallCheck")),u=i(e("babel-runtime/core-js/symbol")),l=i(e("babel-helper-optimise-call-expression")),c=n(e("babel-messages")),p=n(e("babel-types")),h=(0,u.default)(),f={Function:function(e){e.inShadow("this")||e.skip()},ReturnStatement:function(e,t){e.inShadow("this")||t.returns.push(e)},ThisExpression:function(e,t){e.node[h]||t.thises.push(e)},enter:function(e,t){var r=t.specHandle;t.isLoose&&(r=t.looseHandle);var n=e.isCallExpression()&&e.get("callee").isSuper(),i=r.call(t,e);i&&(t.hasSuper=!0),n&&t.bareSupers.push(e),!0===i&&e.requeue(),!0!==i&&i&&(Array.isArray(i)?e.replaceWithMultiple(i):e.replaceWith(i))}},d=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,o.default)(this,e),this.forceSuperMemoisation=t.forceSuperMemoisation,this.methodPath=t.methodPath,this.methodNode=t.methodNode,this.superRef=t.superRef,this.isStatic=t.isStatic,this.hasSuper=!1,this.inClass=r,this.isLoose=t.isLoose,this.scope=this.methodPath.scope,this.file=t.file,this.opts=t,this.bareSupers=[],this.returns=[],this.thises=[]}return e.prototype.getObjectRef=function(){return this.opts.objectRef||this.opts.getObjectRef()},e.prototype.setSuperProperty=function(e,t,r){return p.callExpression(this.file.addHelper("set"),[a(this.getObjectRef(),this.isStatic),r?e:p.stringLiteral(e.name),t,p.thisExpression()])},e.prototype.getSuperProperty=function(e,t){return p.callExpression(this.file.addHelper("get"),[a(this.getObjectRef(),this.isStatic),t?e:p.stringLiteral(e.name),p.thisExpression()])},e.prototype.replace=function(){this.methodPath.traverse(f,this)},e.prototype.getLooseSuperProperty=function(e,t){var r=this.methodNode,n=this.superRef||p.identifier("Function");return t.property===e?void 0:p.isCallExpression(t,{callee:e})?void 0:p.isMemberExpression(t)&&!r.static?p.memberExpression(n,p.identifier("prototype")):n},e.prototype.looseHandle=function(e){var t=e.node;if(e.isSuper())return this.getLooseSuperProperty(t,e.parent);if(e.isCallExpression()){var r=t.callee;if(!p.isMemberExpression(r))return;if(!p.isSuper(r.object))return;return p.appendToMemberExpression(r,p.identifier("call")),t.arguments.unshift(p.thisExpression()),!0}},e.prototype.specHandleAssignmentExpression=function(e,t,r){return"="===r.operator?this.setSuperProperty(r.left.property,r.right,r.left.computed):(e=e||t.scope.generateUidIdentifier("ref"),[p.variableDeclaration("var",[p.variableDeclarator(e,r.left)]),p.expressionStatement(p.assignmentExpression("=",r.left,p.binaryExpression(r.operator[0],e,r.right)))])},e.prototype.specHandle=function(e){var t=void 0,r=void 0,n=void 0,i=e.parent,a=e.node;if(function(e,t){return!!p.isSuper(e)&&!p.isMemberExpression(t,{computed:!1})&&!p.isCallExpression(t,{callee:e})}(a,i))throw e.buildCodeFrameError(c.get("classesIllegalBareSuper"));if(p.isCallExpression(a)){var o=a.callee;if(p.isSuper(o))return;s(o)&&(t=o.property,r=o.computed,n=a.arguments)}else if(p.isMemberExpression(a)&&p.isSuper(a.object))t=a.property,r=a.computed;else{if(p.isUpdateExpression(a)&&s(a.argument)){var u=p.binaryExpression(a.operator[0],a.argument,p.numericLiteral(1));if(a.prefix)return this.specHandleAssignmentExpression(null,e,u);var l=e.scope.generateUidIdentifier("ref");return this.specHandleAssignmentExpression(l,e,u).concat(p.expressionStatement(l))}if(p.isAssignmentExpression(a)&&s(a.left))return this.specHandleAssignmentExpression(null,e,a)}if(t){var h=this.getSuperProperty(t,r);return n?this.optimiseCall(h,n):h}},e.prototype.optimiseCall=function(e,t){var r=p.thisExpression();return r[h]=!0,(0,l.default)(e,r,t)},e}();r.default=d,t.exports=r.default},{"babel-helper-optimise-call-expression":106,"babel-messages":110,"babel-runtime/core-js/symbol":129,"babel-runtime/helpers/classCallCheck":134,"babel-types":180}],108:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-template")),i={};r.default=i,i.typeof=(0,n.default)('\n (typeof Symbol === "function" && typeof Symbol.iterator === "symbol")\n ? function (obj) { return typeof obj; }\n : function (obj) {\n return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype\n ? "symbol"\n : typeof obj;\n };\n'),i.jsx=(0,n.default)('\n (function () {\n var REACT_ELEMENT_TYPE = (typeof Symbol === "function" && Symbol.for && Symbol.for("react.element")) || 0xeac7;\n\n return function createRawReactElement (type, props, key, children) {\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n // If we\'re going to assign props.children, we create a new object now\n // to avoid mutating defaultProps.\n props = {};\n }\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : \'\' + key,\n ref: null,\n props: props,\n _owner: null,\n };\n };\n\n })()\n'),i.asyncIterator=(0,n.default)('\n (function (iterable) {\n if (typeof Symbol === "function") {\n if (Symbol.asyncIterator) {\n var method = iterable[Symbol.asyncIterator];\n if (method != null) return method.call(iterable);\n }\n if (Symbol.iterator) {\n return iterable[Symbol.iterator]();\n }\n }\n throw new TypeError("Object is not async iterable");\n })\n'),i.asyncGenerator=(0,n.default)('\n (function () {\n function AwaitValue(value) {\n this.value = value;\n }\n\n function AsyncGenerator(gen) {\n var front, back;\n\n function send(key, arg) {\n return new Promise(function (resolve, reject) {\n var request = {\n key: key,\n arg: arg,\n resolve: resolve,\n reject: reject,\n next: null\n };\n\n if (back) {\n back = back.next = request;\n } else {\n front = back = request;\n resume(key, arg);\n }\n });\n }\n\n function resume(key, arg) {\n try {\n var result = gen[key](arg)\n var value = result.value;\n if (value instanceof AwaitValue) {\n Promise.resolve(value.value).then(\n function (arg) { resume("next", arg); },\n function (arg) { resume("throw", arg); });\n } else {\n settle(result.done ? "return" : "normal", result.value);\n }\n } catch (err) {\n settle("throw", err);\n }\n }\n\n function settle(type, value) {\n switch (type) {\n case "return":\n front.resolve({ value: value, done: true });\n break;\n case "throw":\n front.reject(value);\n break;\n default:\n front.resolve({ value: value, done: false });\n break;\n }\n\n front = front.next;\n if (front) {\n resume(front.key, front.arg);\n } else {\n back = null;\n }\n }\n\n this._invoke = send;\n\n // Hide "return" method if generator return is not supported\n if (typeof gen.return !== "function") {\n this.return = undefined;\n }\n }\n\n if (typeof Symbol === "function" && Symbol.asyncIterator) {\n AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; };\n }\n\n AsyncGenerator.prototype.next = function (arg) { return this._invoke("next", arg); };\n AsyncGenerator.prototype.throw = function (arg) { return this._invoke("throw", arg); };\n AsyncGenerator.prototype.return = function (arg) { return this._invoke("return", arg); };\n\n return {\n wrap: function (fn) {\n return function () {\n return new AsyncGenerator(fn.apply(this, arguments));\n };\n },\n await: function (value) {\n return new AwaitValue(value);\n }\n };\n\n })()\n'),i.asyncGeneratorDelegate=(0,n.default)('\n (function (inner, awaitWrap) {\n var iter = {}, waiting = false;\n\n function pump(key, value) {\n waiting = true;\n value = new Promise(function (resolve) { resolve(inner[key](value)); });\n return { done: false, value: awaitWrap(value) };\n };\n\n if (typeof Symbol === "function" && Symbol.iterator) {\n iter[Symbol.iterator] = function () { return this; };\n }\n\n iter.next = function (value) {\n if (waiting) {\n waiting = false;\n return value;\n }\n return pump("next", value);\n };\n\n if (typeof inner.throw === "function") {\n iter.throw = function (value) {\n if (waiting) {\n waiting = false;\n throw value;\n }\n return pump("throw", value);\n };\n }\n\n if (typeof inner.return === "function") {\n iter.return = function (value) {\n return pump("return", value);\n };\n }\n\n return iter;\n })\n'),i.asyncToGenerator=(0,n.default)('\n (function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new Promise(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return Promise.resolve(value).then(function (value) {\n step("next", value);\n }, function (err) {\n step("throw", err);\n });\n }\n }\n\n return step("next");\n });\n };\n })\n'),i.classCallCheck=(0,n.default)('\n (function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError("Cannot call a class as a function");\n }\n });\n'),i.createClass=(0,n.default)('\n (function() {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i ++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ("value" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n })()\n'),i.defineEnumerableProperties=(0,n.default)('\n (function (obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if ("value" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n return obj;\n })\n'),i.defaults=(0,n.default)("\n (function (obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n return obj;\n })\n"),i.defineProperty=(0,n.default)("\n (function (obj, key, value) {\n // Shortcircuit the slow defineProperty path when possible.\n // We are trying to avoid issues where setters defined on the\n // prototype cause side effects under the fast path of simple\n // assignment. By checking for existence of the property with\n // the in operator, we can optimize most of this overhead away.\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n });\n"),i.extends=(0,n.default)("\n Object.assign || (function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n })\n"),i.get=(0,n.default)('\n (function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if ("value" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n });\n'),i.inherits=(0,n.default)('\n (function (subClass, superClass) {\n if (typeof superClass !== "function" && superClass !== null) {\n throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n })\n'),i.instanceof=(0,n.default)('\n (function (left, right) {\n if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n });\n'),i.interopRequireDefault=(0,n.default)("\n (function (obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n })\n"),i.interopRequireWildcard=(0,n.default)("\n (function (obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n newObj.default = obj;\n return newObj;\n }\n })\n"),i.newArrowCheck=(0,n.default)('\n (function (innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError("Cannot instantiate an arrow function");\n }\n });\n'),i.objectDestructuringEmpty=(0,n.default)('\n (function (obj) {\n if (obj == null) throw new TypeError("Cannot destructure undefined");\n });\n'),i.objectWithoutProperties=(0,n.default)("\n (function (obj, keys) {\n var target = {};\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n return target;\n })\n"),i.possibleConstructorReturn=(0,n.default)('\n (function (self, call) {\n if (!self) {\n throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n }\n return call && (typeof call === "object" || typeof call === "function") ? call : self;\n });\n'),i.selfGlobal=(0,n.default)('\n typeof global === "undefined" ? self : global\n'),i.set=(0,n.default)('\n (function set(object, property, value, receiver) {\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent !== null) {\n set(parent, property, value, receiver);\n }\n } else if ("value" in desc && desc.writable) {\n desc.value = value;\n } else {\n var setter = desc.set;\n\n if (setter !== undefined) {\n setter.call(receiver, value);\n }\n }\n\n return value;\n });\n'),i.slicedToArray=(0,n.default)('\n (function () {\n // Broken out into a separate function to avoid deoptimizations due to the try/catch for the\n // array iterator case.\n function sliceIterator(arr, i) {\n // this is an expanded form of `for...of` that properly supports abrupt completions of\n // iterators etc. variable names have been minimised to reduce the size of this massive\n // helper. sometimes spec compliancy is annoying :(\n //\n // _n = _iteratorNormalCompletion\n // _d = _didIteratorError\n // _e = _iteratorError\n // _i = _iterator\n // _s = _step\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i["return"]) _i["return"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n };\n })();\n'),i.slicedToArrayLoose=(0,n.default)('\n (function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n var _arr = [];\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n if (i && _arr.length === i) break;\n }\n return _arr;\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n });\n'),i.taggedTemplateLiteral=(0,n.default)("\n (function (strings, raw) {\n return Object.freeze(Object.defineProperties(strings, {\n raw: { value: Object.freeze(raw) }\n }));\n });\n"),i.taggedTemplateLiteralLoose=(0,n.default)("\n (function (strings, raw) {\n strings.raw = raw;\n return strings;\n });\n"),i.temporalRef=(0,n.default)('\n (function (val, name, undef) {\n if (val === undef) {\n throw new ReferenceError(name + " is not defined - temporal dead zone");\n } else {\n return val;\n }\n })\n'),i.temporalUndefined=(0,n.default)("\n ({})\n"),i.toArray=(0,n.default)("\n (function (arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n });\n"),i.toConsumableArray=(0,n.default)("\n (function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n return arr2;\n } else {\n return Array.from(arr);\n }\n });\n"),t.exports=r.default},{"babel-template":139}],109:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=a.default[e];if(!t)throw new ReferenceError("Unknown helper "+e);return t().expression}r.__esModule=!0,r.list=void 0;var s=n(e("babel-runtime/core-js/object/keys"));r.get=i;var a=n(e("./helpers"));r.list=(0,s.default)(a.default).map(function(e){return e.replace(/^_/,"")}).filter(function(e){return"__esModule"!==e});r.default=i},{"./helpers":108,"babel-runtime/core-js/object/keys":127}],110:[function(e,t,r){"use strict";function n(e){return e.map(function(e){if(null!=e&&e.inspect)return e.inspect();try{return(0,i.default)(e)||e+""}catch(t){return s.inspect(e)}})}r.__esModule=!0,r.MESSAGES=void 0;var i=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/json/stringify"));r.get=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),s=1;s<t;s++)r[s-1]=arguments[s];var o=a[e];if(!o)throw new ReferenceError("Unknown message "+(0,i.default)(e));return r=n(r),o.replace(/\$(\d+)/g,function(e,t){return r[t-1]})},r.parseArgs=n;var s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("util")),a=r.MESSAGES={tailCallReassignmentDeopt:"Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence",classesIllegalBareSuper:"Illegal use of bare super",classesIllegalSuperCall:"Direct super call is illegal in non-constructor, use super.$1() instead",scopeDuplicateDeclaration:"Duplicate declaration $1",settersNoRest:"Setters aren't allowed to have a rest",noAssignmentsInForHead:"No assignments allowed in for-in/of head",expectedMemberExpressionOrIdentifier:"Expected type MemberExpression or Identifier",invalidParentForThisNode:"We don't know how to handle this node within the current parent - please open an issue",readOnly:"$1 is read-only",unknownForHead:"Unknown node type $1 in ForStatement",didYouMean:"Did you mean $1?",codeGeneratorDeopt:"Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.",missingTemplatesDirectory:"no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues",unsupportedOutputType:"Unsupported output type $1",illegalMethodName:"Illegal method name $1",lostTrackNodePath:"We lost track of this node's position, likely because the AST was directly manipulated",modulesIllegalExportName:"Illegal export $1",modulesDuplicateDeclarations:"Duplicate module declarations with the same source but in different scopes",undeclaredVariable:"Reference to undeclared variable $1",undeclaredVariableType:"Referencing a type alias outside of a type annotation",undeclaredVariableSuggestion:"Reference to undeclared variable $1 - did you mean $2?",traverseNeedsParent:"You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a $1 node without passing scope and parentPath.",traverseVerifyRootFunction:"You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?",traverseVerifyVisitorProperty:"You passed `traverse()` a visitor object with the property $1 that has the invalid property $2",traverseVerifyNodeType:"You gave us a visitor for the node type $1 but it's not a valid type",pluginNotObject:"Plugin $2 specified in $1 was expected to return an object when invoked but returned $3",pluginNotFunction:"Plugin $2 specified in $1 was expected to return a function but returned $3",pluginUnknown:"Unknown plugin $1 specified in $2 at $3, attempted to resolve relative to $4",pluginInvalidProperty:"Plugin $2 specified in $1 provided an invalid property of $3"}},{"babel-runtime/core-js/json/stringify":121,util:613}],111:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("asyncFunctions")}}},t.exports=r.default},{}],112:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("asyncGenerators")}}},t.exports=r.default},{}],113:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){var t=e.types;return{visitor:{ArrowFunctionExpression:function(e,r){if(r.opts.spec){var n=e.node;if(n.shadow)return;n.shadow={this:!1},n.type="FunctionExpression";var i=t.thisExpression();i._forceShadow=e,e.ensureBlock(),e.get("body").unshiftContainer("body",t.expressionStatement(t.callExpression(r.addHelper("newArrowCheck"),[t.thisExpression(),i]))),e.replaceWith(t.callExpression(t.memberExpression(n,t.identifier("bind")),[t.thisExpression()]))}else e.arrowFunctionToShadowed()}}}},t.exports=r.default},{}],114:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return!!h.isVariableDeclaration(e)&&(!!e[h.BLOCK_SCOPED_SYMBOL]||("let"===e.kind||"const"===e.kind))}function s(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(t||(t=e.node),!h.isFor(r))for(var s=0;s<t.declarations.length;s++){var a=t.declarations[s];a.init=a.init||n.buildUndefinedNode()}if(t[h.BLOCK_SCOPED_SYMBOL]=!0,t.kind="var",i){var o=n.getFunctionParent(),u=e.getBindingIdentifiers();for(var l in u){var c=n.getOwnBinding(l);c&&(c.kind="var"),n.moveBindingTo(l,o)}}}function a(e){return h.isVariableDeclaration(e,{kind:"var"})&&!i(e)}r.__esModule=!0;var o=n(e("babel-runtime/core-js/symbol")),u=n(e("babel-runtime/core-js/object/create")),l=n(e("babel-runtime/helpers/classCallCheck"));r.default=function(){return{visitor:{VariableDeclaration:function(e,t){var r=e.node,n=e.parent,a=e.scope;if(i(r)&&(s(e,null,n,a,!0),r._tdzThis)){for(var o=[r],u=0;u<r.declarations.length;u++){var l=r.declarations[u];if(l.init){var c=h.assignmentExpression("=",l.id,l.init);c._ignoreBlockScopingTDZ=!0,o.push(h.expressionStatement(c))}l.init=t.addHelper("temporalUndefined")}r._blockHoist=2,e.isCompletionRecord()&&o.push(h.expressionStatement(a.buildUndefinedNode())),e.replaceWithMultiple(o)}},Loop:function(e,t){var r=e.node,n=e.parent,i=e.scope;h.ensureBlock(r);var s=new A(e,e.get("body"),n,i,t).run();s&&e.replaceWith(s)},CatchClause:function(e,t){var r=e.parent,n=e.scope;new A(null,e.get("body"),r,n,t).run()},"BlockStatement|SwitchStatement|Program":function(e,t){if(!function(e){return h.isLoop(e.parent)||h.isCatchClause(e.parent)}(e)){new A(null,e,e.parent,e.scope,t).run()}}}}};var c=n(e("babel-traverse")),p=e("./tdz"),h=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),f=n(e("lodash/values")),d=n(e("lodash/extend")),m=(0,n(e("babel-template")).default)('\n if (typeof RETURN === "object") return RETURN.v;\n'),y=c.default.visitors.merge([{Loop:{enter:function(e,t){t.loopDepth++},exit:function(e,t){t.loopDepth--}},Function:function(e,t){return t.loopDepth>0&&e.traverse(g,t),e.skip()}},p.visitor]),g=c.default.visitors.merge([{ReferencedIdentifier:function(e,t){var r=t.letReferences[e.node.name];if(r){var n=e.scope.getBindingIdentifier(e.node.name);n&&n!==r||(t.closurify=!0)}}},p.visitor]),b={enter:function(e,t){var r=e.node;e.parent;if(e.isForStatement()){if(a(r.init)){var n=t.pushDeclar(r.init);1===n.length?r.init=n[0]:r.init=h.sequenceExpression(n)}}else if(e.isFor())a(r.left)&&(t.pushDeclar(r.left),r.left=r.left.declarations[0].id);else if(a(r))e.replaceWithMultiple(t.pushDeclar(r).map(function(e){return h.expressionStatement(e)}));else if(e.isFunction())return e.skip()}},v={LabeledStatement:function(e,t){var r=e.node;t.innerLabels.push(r.label.name)}},x={enter:function(e,t){if(e.isAssignmentExpression()||e.isUpdateExpression()){var r=e.getBindingIdentifiers();for(var n in r)t.outsideReferences[n]===e.scope.getBindingIdentifier(n)&&(t.reassignments[n]=!0)}}},E={Loop:function(e,t){var r=t.ignoreLabeless;t.ignoreLabeless=!0,e.traverse(E,t),t.ignoreLabeless=r,e.skip()},Function:function(e){e.skip()},SwitchCase:function(e,t){var r=t.inSwitchCase;t.inSwitchCase=!0,e.traverse(E,t),t.inSwitchCase=r,e.skip()},"BreakStatement|ContinueStatement|ReturnStatement":function(e,t){var r=e.node,n=e.parent,i=e.scope;if(!r[this.LOOP_IGNORE]){var s=void 0,a=function(e){return h.isBreakStatement(e)?"break":h.isContinueStatement(e)?"continue":void 0}(r);if(a){if(r.label){if(t.innerLabels.indexOf(r.label.name)>=0)return;a=a+"|"+r.label.name}else{if(t.ignoreLabeless)return;if(t.inSwitchCase)return;if(h.isBreakStatement(r)&&h.isSwitchCase(n))return}t.hasBreakContinue=!0,t.map[a]=r,s=h.stringLiteral(a)}e.isReturnStatement()&&(t.hasReturn=!0,s=h.objectExpression([h.objectProperty(h.identifier("v"),r.argument||i.buildUndefinedNode())])),s&&((s=h.returnStatement(s))[this.LOOP_IGNORE]=!0,e.skip(),e.replaceWith(h.inherits(s,r)))}}},A=function(){function e(t,r,n,i,s){(0,l.default)(this,e),this.parent=n,this.scope=i,this.file=s,this.blockPath=r,this.block=r.node,this.outsideLetReferences=(0,u.default)(null),this.hasLetReferences=!1,this.letReferences=(0,u.default)(null),this.body=[],t&&(this.loopParent=t.parent,this.loopLabel=h.isLabeledStatement(this.loopParent)&&this.loopParent.label,this.loopPath=t,this.loop=t.node)}return e.prototype.run=function(){var e=this.block;if(!e._letDone){e._letDone=!0;var t=this.getLetReferences();if(h.isFunction(this.parent)||h.isProgram(this.block))this.updateScopeInfo();else if(this.hasLetReferences)return t?this.wrapClosure():this.remap(),this.updateScopeInfo(t),this.loopLabel&&!h.isLabeledStatement(this.loopParent)?h.labeledStatement(this.loopLabel,this.loop):void 0}},e.prototype.updateScopeInfo=function(e){var t=this.scope,r=t.getFunctionParent(),n=this.letReferences;for(var i in n){var s=n[i],a=t.getBinding(s.name);a&&("let"!==a.kind&&"const"!==a.kind||(a.kind="var",e?t.removeBinding(s.name):t.moveBindingTo(s.name,r)))}},e.prototype.remap=function(){var e=this.letReferences,t=this.scope;for(var r in e){var n=e[r];(t.parentHasBinding(r)||t.hasGlobal(r))&&(t.hasOwnBinding(r)&&t.rename(n.name),this.blockPath.scope.hasOwnBinding(r)&&this.blockPath.scope.rename(n.name))}},e.prototype.wrapClosure=function(){if(this.file.opts.throwIfClosureRequired)throw this.blockPath.buildCodeFrameError("Compiling let/const in this block would add a closure (throwIfClosureRequired).");var e=this.block,t=this.outsideLetReferences;if(this.loop)for(var r in t){var n=t[r];(this.scope.hasGlobal(n.name)||this.scope.parentHasBinding(n.name))&&(delete t[n.name],delete this.letReferences[n.name],this.scope.rename(n.name),this.letReferences[n.name]=n,t[n.name]=n)}this.has=this.checkLoop(),this.hoistVarDeclarations();var i=(0,f.default)(t),s=(0,f.default)(t),a=this.blockPath.isSwitchStatement(),o=h.functionExpression(null,i,h.blockStatement(a?[e]:e.body));o.shadow=!0,this.addContinuations(o);var u=o;this.loop&&(u=this.scope.generateUidIdentifier("loop"),this.loopPath.insertBefore(h.variableDeclaration("var",[h.variableDeclarator(u,o)])));var l=h.callExpression(u,s),p=this.scope.generateUidIdentifier("ret");c.default.hasType(o.body,this.scope,"YieldExpression",h.FUNCTION_TYPES)&&(o.generator=!0,l=h.yieldExpression(l,!0));c.default.hasType(o.body,this.scope,"AwaitExpression",h.FUNCTION_TYPES)&&(o.async=!0,l=h.awaitExpression(l)),this.buildClosure(p,l),a?this.blockPath.replaceWithMultiple(this.body):e.body=this.body},e.prototype.buildClosure=function(e,t){var r=this.has;r.hasReturn||r.hasBreakContinue?this.buildHas(e,t):this.body.push(h.expressionStatement(t))},e.prototype.addContinuations=function(e){var t={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(e,x,t);for(var r=0;r<e.params.length;r++){var n=e.params[r];if(t.reassignments[n.name]){var i=this.scope.generateUidIdentifier(n.name);e.params[r]=i,this.scope.rename(n.name,i.name,e),e.body.body.push(h.expressionStatement(h.assignmentExpression("=",n,i)))}}},e.prototype.getLetReferences=function(){var e=this,t=this.block,r=[];if(this.loop){var n=this.loop.left||this.loop.init;i(n)&&(r.push(n),(0,d.default)(this.outsideLetReferences,h.getBindingIdentifiers(n)))}var a=function n(a,o){o=o||a.node,(h.isClassDeclaration(o)||h.isFunctionDeclaration(o)||i(o))&&(i(o)&&s(a,o,t,e.scope),r=r.concat(o.declarations||o)),h.isLabeledStatement(o)&&n(a.get("body"),o.body)};if(t.body)for(var o=0;o<t.body.length;o++){a(this.blockPath.get("body")[o])}if(t.cases)for(var u=0;u<t.cases.length;u++)for(var l=t.cases[u].consequent,c=0;c<l.length;c++){a(this.blockPath.get("cases")[u],l[c])}for(var p=0;p<r.length;p++){var f=r[p],m=h.getBindingIdentifiers(f,!1,!0);(0,d.default)(this.letReferences,m),this.hasLetReferences=!0}if(this.hasLetReferences){var g={letReferences:this.letReferences,closurify:!1,file:this.file,loopDepth:0},b=this.blockPath.find(function(e){return e.isLoop()||e.isFunction()});return b&&b.isLoop()&&g.loopDepth++,this.blockPath.traverse(y,g),g.closurify}},e.prototype.checkLoop=function(){var e={hasBreakContinue:!1,ignoreLabeless:!1,inSwitchCase:!1,innerLabels:[],hasReturn:!1,isLoop:!!this.loop,map:{},LOOP_IGNORE:(0,o.default)()};return this.blockPath.traverse(v,e),this.blockPath.traverse(E,e),e},e.prototype.hoistVarDeclarations=function(){this.blockPath.traverse(b,this)},e.prototype.pushDeclar=function(e){var t=[],r=h.getBindingIdentifiers(e);for(var n in r)t.push(h.variableDeclarator(r[n]));this.body.push(h.variableDeclaration(e.kind,t));for(var i=[],s=0;s<e.declarations.length;s++){var a=e.declarations[s];if(a.init){var o=h.assignmentExpression("=",a.id,a.init);i.push(h.inherits(o,a))}}return i},e.prototype.buildHas=function(e,t){var r=this.body;r.push(h.variableDeclaration("var",[h.variableDeclarator(e,t)]));var n=void 0,i=this.has,s=[];if(i.hasReturn&&(n=m({RETURN:e})),i.hasBreakContinue){for(var a in i.map)s.push(h.switchCase(h.stringLiteral(a),[i.map[a]]));if(i.hasReturn&&s.push(h.switchCase(null,[n])),1===s.length){var o=s[0];r.push(h.ifStatement(h.binaryExpression("===",e,o.test),o.consequent[0]))}else{if(this.loop)for(var u=0;u<s.length;u++){var l=s[u].consequent[0];h.isBreakStatement(l)&&!l.label&&(l.label=this.loopLabel=this.loopLabel||this.scope.generateUidIdentifier("loop"))}r.push(h.switchStatement(e,s))}}else i.hasReturn&&r.push(n)},e}();t.exports=r.default},{"./tdz":115,"babel-runtime/core-js/object/create":125,"babel-runtime/core-js/symbol":129,"babel-runtime/helpers/classCallCheck":134,"babel-template":139,"babel-traverse":143,"babel-types":180,"lodash/extend":498,"lodash/values":541}],115:[function(e,t,r){"use strict";function n(e,t){return s.callExpression(t.addHelper("temporalRef"),[e,s.stringLiteral(e.name),t.addHelper("temporalUndefined")])}function i(e,t,r){var n=r.letReferences[e.name];return!!n&&t.getBindingIdentifier(e.name)===n}r.__esModule=!0,r.visitor=void 0;var s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.visitor={ReferencedIdentifier:function(e,t){if(this.file.opts.tdz){var r=e.node,a=e.parent,o=e.scope;if(!e.parentPath.isFor({left:r})&&i(r,o,t)){var u=o.getBinding(r.name).path,l=function(e,t){var r=t._guessExecutionStatusRelativeTo(e);return"before"===r?"inside":"after"===r?"outside":"maybe"}(e,u);if("inside"!==l)if("maybe"===l){var c=n(r,t.file);if(u.parent._tdzThis=!0,e.skip(),e.parentPath.isUpdateExpression()){if(a._ignoreBlockScopingTDZ)return;e.parentPath.replaceWith(s.sequenceExpression([c,a]))}else e.replaceWith(c)}else"outside"===l&&e.replaceWith(s.throwStatement(s.inherits(s.newExpression(s.identifier("ReferenceError"),[s.stringLiteral(r.name+" is not defined - temporal dead zone")]),r)))}}},AssignmentExpression:{exit:function(e,t){if(this.file.opts.tdz){var r=e.node;if(!r._ignoreBlockScopingTDZ){var a=[],o=e.getBindingIdentifiers();for(var u in o){var l=o[u];i(l,e.scope,t)&&a.push(n(l,t.file))}a.length&&(r._ignoreBlockScopingTDZ=!0,a.push(r),e.replaceWithMultiple(a.map(s.expressionStatement)))}}}}}},{"babel-types":180}],116:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/symbol"));r.default=function(e){var t=e.types,r=(0,i.default)();return{visitor:{ExportDefaultDeclaration:function(e){if(e.get("declaration").isClassDeclaration()){var r=e.node,n=r.declaration.id||e.scope.generateUidIdentifier("class");r.declaration.id=n,e.replaceWith(r.declaration),e.insertAfter(t.exportDefaultDeclaration(n))}},ClassDeclaration:function(e){var r=e.node,n=r.id||e.scope.generateUidIdentifier("class");e.replaceWith(t.variableDeclaration("let",[t.variableDeclarator(n,t.toExpression(r))]))},ClassExpression:function(e,t){var n=e.node;if(!n[r]){var i=(0,o.default)(e);if(i&&i!==n)return e.replaceWith(i);n[r]=!0;var u=a.default;t.opts.loose&&(u=s.default),e.replaceWith(new u(e,t.file).run())}}}}};var s=n(e("./loose")),a=n(e("./vanilla")),o=n(e("babel-helper-function-name"));t.exports=r.default},{"./loose":117,"./vanilla":118,"babel-helper-function-name":104,"babel-runtime/core-js/symbol":129}],117:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=n(e("babel-runtime/helpers/possibleConstructorReturn")),a=n(e("babel-runtime/helpers/inherits")),o=n(e("babel-helper-function-name")),u=n(e("./vanilla")),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),c=function(e){function t(){(0,i.default)(this,t);var r=(0,s.default)(this,e.apply(this,arguments));return r.isLoose=!0,r}return(0,a.default)(t,e),t.prototype._processMethod=function(e,t){if(!e.decorators){var r=this.classRef;e.static||(r=l.memberExpression(r,l.identifier("prototype")));var n=l.memberExpression(r,e.key,e.computed||l.isLiteral(e.key)),i=l.functionExpression(null,e.params,e.body,e.generator,e.async);i.returnType=e.returnType;var s=l.toComputedKey(e,e.key);l.isStringLiteral(s)&&(i=(0,o.default)({node:i,id:s,scope:t}));var a=l.expressionStatement(l.assignmentExpression("=",n,i));return l.inheritsComments(a,e),this.body.push(a),!0}},t}(u.default);r.default=c,t.exports=r.default},{"./vanilla":118,"babel-helper-function-name":104,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/inherits":135,"babel-runtime/helpers/possibleConstructorReturn":137,"babel-types":180}],118:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=i(e("babel-runtime/core-js/get-iterator")),a=i(e("babel-runtime/helpers/classCallCheck")),o=e("babel-traverse"),u=i(e("babel-helper-replace-supers")),l=i(e("babel-helper-optimise-call-expression")),c=n(e("babel-helper-define-map")),p=i(e("babel-template")),h=n(e("babel-types")),f=(0,p.default)("\n (function () {\n super(...arguments);\n })\n"),d={"FunctionExpression|FunctionDeclaration":function(e){e.is("shadow")||e.skip()},Method:function(e){e.skip()}},m=o.visitors.merge([d,{Super:function(e){if(this.isDerived&&!this.hasBareSuper&&!e.parentPath.isCallExpression({callee:e.node}))throw e.buildCodeFrameError("'super.*' is not allowed before super()")},CallExpression:{exit:function(e){if(e.get("callee").isSuper()&&(this.hasBareSuper=!0,!this.isDerived))throw e.buildCodeFrameError("super() is only allowed in a derived constructor")}},ThisExpression:function(e){if(this.isDerived&&!this.hasBareSuper&&!e.inShadow("this"))throw e.buildCodeFrameError("'this' is not allowed before super()")}}]),y=o.visitors.merge([d,{ThisExpression:function(e){this.superThises.push(e)}}]),g=function(){function e(t,r){(0,a.default)(this,e),this.parent=t.parent,this.scope=t.scope,this.node=t.node,this.path=t,this.file=r,this.clearDescriptors(),this.instancePropBody=[],this.instancePropRefs={},this.staticPropBody=[],this.body=[],this.bareSuperAfter=[],this.bareSupers=[],this.pushedConstructor=!1,this.pushedInherits=!1,this.isLoose=!1,this.superThises=[],this.classId=this.node.id,this.classRef=this.node.id?h.identifier(this.node.id.name):this.scope.generateUidIdentifier("class"),this.superName=this.node.superClass||h.identifier("Function"),this.isDerived=!!this.node.superClass}return e.prototype.run=function(){var e=this,t=this.superName,r=this.file,n=this.body,i=this.constructorBody=h.blockStatement([]);this.constructor=this.buildConstructor();var s=[],a=[];if(this.isDerived&&(a.push(t),t=this.scope.generateUidIdentifierBasedOnNode(t),s.push(t),this.superName=t),this.buildBody(),i.body.unshift(h.expressionStatement(h.callExpression(r.addHelper("classCallCheck"),[h.thisExpression(),this.classRef]))),n=n.concat(this.staticPropBody.map(function(t){return t(e.classRef)})),this.classId&&1===n.length)return h.toExpression(n[0]);n.push(h.returnStatement(this.classRef));var o=h.functionExpression(null,s,h.blockStatement(n));return o.shadow=!0,h.callExpression(o,a)},e.prototype.buildConstructor=function(){var e=h.functionDeclaration(this.classRef,[],this.constructorBody);return h.inherits(e,this.node),e},e.prototype.pushToMap=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"value",n=arguments[3],i=void 0;e.static?(this.hasStaticDescriptors=!0,i=this.staticMutatorMap):(this.hasInstanceDescriptors=!0,i=this.instanceMutatorMap);var s=c.push(i,e,r,this.file,n);return t&&(s.enumerable=h.booleanLiteral(!0)),s},e.prototype.constructorMeMaybe=function(){var e=!1,t=this.path.get("body.body"),r=Array.isArray(t),n=0;for(t=r?t:(0,s.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}if(e=i.equals("kind","constructor"))break}if(!e){var a=void 0,o=void 0;if(this.isDerived){var u=f().expression;a=u.params,o=u.body}else a=[],o=h.blockStatement([]);this.path.get("body").unshiftContainer("body",h.classMethod("constructor",h.identifier("constructor"),a,o))}},e.prototype.buildBody=function(){if(this.constructorMeMaybe(),this.pushBody(),this.verifyConstructor(),this.userConstructor){var e=this.constructorBody;e.body=e.body.concat(this.userConstructor.body.body),h.inherits(this.constructor,this.userConstructor),h.inherits(e,this.userConstructor.body)}this.pushDescriptors()},e.prototype.pushBody=function(){var e=this.path.get("body.body"),t=Array.isArray(e),r=0;for(e=t?e:(0,s.default)(e);;){var n;if(t){if(r>=e.length)break;n=e[r++]}else{if((r=e.next()).done)break;n=r.value}var i=n,a=i.node;if(i.isClassProperty())throw i.buildCodeFrameError("Missing class properties transform.");if(a.decorators)throw i.buildCodeFrameError("Method has decorators, put the decorator plugin before the classes one.");if(h.isClassMethod(a)){var o="constructor"===a.kind;if(o&&(i.traverse(m,this),!this.hasBareSuper&&this.isDerived))throw i.buildCodeFrameError("missing super() call in constructor");var l=new u.default({forceSuperMemoisation:o,methodPath:i,methodNode:a,objectRef:this.classRef,superRef:this.superName,isStatic:a.static,isLoose:this.isLoose,scope:this.scope,file:this.file},!0);l.replace(),o?this.pushConstructor(l,a,i):this.pushMethod(a,i)}}},e.prototype.clearDescriptors=function(){this.hasInstanceDescriptors=!1,this.hasStaticDescriptors=!1,this.instanceMutatorMap={},this.staticMutatorMap={}},e.prototype.pushDescriptors=function(){this.pushInherits();var e=this.body,t=void 0,r=void 0;if(this.hasInstanceDescriptors&&(t=c.toClassObject(this.instanceMutatorMap)),this.hasStaticDescriptors&&(r=c.toClassObject(this.staticMutatorMap)),t||r){t&&(t=c.toComputedObjectFromClass(t)),r&&(r=c.toComputedObjectFromClass(r));var n=h.nullLiteral(),i=[this.classRef,n,n,n,n];t&&(i[1]=t),r&&(i[2]=r),this.instanceInitializersId&&(i[3]=this.instanceInitializersId,e.unshift(this.buildObjectAssignment(this.instanceInitializersId))),this.staticInitializersId&&(i[4]=this.staticInitializersId,e.unshift(this.buildObjectAssignment(this.staticInitializersId)));for(var s=0,a=0;a<i.length;a++)i[a]!==n&&(s=a);i=i.slice(0,s+1),e.push(h.expressionStatement(h.callExpression(this.file.addHelper("createClass"),i)))}this.clearDescriptors()},e.prototype.buildObjectAssignment=function(e){return h.variableDeclaration("var",[h.variableDeclarator(e,h.objectExpression([]))])},e.prototype.wrapSuperCall=function(e,t,r,n){var i=e.node;this.isLoose?(i.arguments.unshift(h.thisExpression()),2===i.arguments.length&&h.isSpreadElement(i.arguments[1])&&h.isIdentifier(i.arguments[1].argument,{name:"arguments"})?(i.arguments[1]=i.arguments[1].argument,i.callee=h.memberExpression(t,h.identifier("apply"))):i.callee=h.memberExpression(t,h.identifier("call"))):i=(0,l.default)(h.logicalExpression("||",h.memberExpression(this.classRef,h.identifier("__proto__")),h.callExpression(h.memberExpression(h.identifier("Object"),h.identifier("getPrototypeOf")),[this.classRef])),h.thisExpression(),i.arguments);var s=h.callExpression(this.file.addHelper("possibleConstructorReturn"),[h.thisExpression(),i]),a=this.bareSuperAfter.map(function(e){return e(r)});e.parentPath.isExpressionStatement()&&e.parentPath.container===n.node.body&&n.node.body.length-1===e.parentPath.key?((this.superThises.length||a.length)&&(e.scope.push({id:r}),s=h.assignmentExpression("=",r,s)),a.length&&(s=h.toSequenceExpression([s].concat(a,[r]))),e.parentPath.replaceWith(h.returnStatement(s))):e.replaceWithMultiple([h.variableDeclaration("var",[h.variableDeclarator(r,s)])].concat(a,[h.expressionStatement(r)]))},e.prototype.verifyConstructor=function(){var e=this;if(this.isDerived){var t=this.userConstructorPath,r=t.get("body");t.traverse(y,this);var n=!!this.bareSupers.length,i=this.superName||h.identifier("Function"),a=t.scope.generateUidIdentifier("this"),o=this.bareSupers,u=Array.isArray(o),l=0;for(o=u?o:(0,s.default)(o);;){var c;if(u){if(l>=o.length)break;c=o[l++]}else{if((l=o.next()).done)break;c=l.value}var p=c;this.wrapSuperCall(p,i,a,r),n&&p.find(function(e){return e===t||(e.isLoop()||e.isConditional()?(n=!1,!0):void 0)})}var f=this.superThises,d=Array.isArray(f),m=0;for(f=d?f:(0,s.default)(f);;){var g;if(d){if(m>=f.length)break;g=f[m++]}else{if((m=f.next()).done)break;g=m.value}g.replaceWith(a)}var b=function(t){return h.callExpression(e.file.addHelper("possibleConstructorReturn"),[a].concat(t||[]))},v=r.get("body");v.length&&!v.pop().isReturnStatement()&&r.pushContainer("body",h.returnStatement(n?a:b()));var x=this.superReturns,E=Array.isArray(x),A=0;for(x=E?x:(0,s.default)(x);;){var D;if(E){if(A>=x.length)break;D=x[A++]}else{if((A=x.next()).done)break;D=A.value}var S=D;if(S.node.argument){var C=S.scope.generateDeclaredUidIdentifier("ret");S.get("argument").replaceWithMultiple([h.assignmentExpression("=",C,S.node.argument),b(C)])}else S.get("argument").replaceWith(b())}}},e.prototype.pushMethod=function(e,t){var r=t?t.scope:this.scope;"method"===e.kind&&this._processMethod(e,r)||this.pushToMap(e,!1,null,r)},e.prototype._processMethod=function(){return!1},e.prototype.pushConstructor=function(e,t,r){this.bareSupers=e.bareSupers,this.superReturns=e.returns,r.scope.hasOwnBinding(this.classRef.name)&&r.scope.rename(this.classRef.name);var n=this.constructor;this.userConstructorPath=r,this.userConstructor=t,this.hasConstructor=!0,h.inheritsComments(n,t),n._ignoreUserWhitespace=!0,n.params=t.params,h.inherits(n.body,t.body),n.body.directives=t.body.directives,this._pushConstructor()},e.prototype._pushConstructor=function(){this.pushedConstructor||(this.pushedConstructor=!0,(this.hasInstanceDescriptors||this.hasStaticDescriptors)&&this.pushDescriptors(),this.body.push(this.constructor),this.pushInherits())},e.prototype.pushInherits=function(){this.isDerived&&!this.pushedInherits&&(this.pushedInherits=!0,this.body.unshift(h.expressionStatement(h.callExpression(this.file.addHelper("inherits"),[this.classRef,this.superName]))))},e}();r.default=g,t.exports=r.default},{"babel-helper-define-map":103,"babel-helper-optimise-call-expression":106,"babel-helper-replace-supers":107,"babel-runtime/core-js/get-iterator":120,"babel-runtime/helpers/classCallCheck":134,"babel-template":139,"babel-traverse":143,"babel-types":180}],119:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){function t(e){var t=e.node,r=e.scope,n=[],i=t.right;if(!a.isIdentifier(i)||!r.hasBinding(i.name)){var s=r.generateUidIdentifier("arr");n.push(a.variableDeclaration("var",[a.variableDeclarator(s,i)])),i=s}var u=r.generateUidIdentifier("i"),l=o({BODY:t.body,KEY:u,ARR:i});a.inherits(l,t),a.ensureBlock(l);var c=a.memberExpression(i,u,!0),p=t.left;return a.isVariableDeclaration(p)?(p.declarations[0].init=c,l.body.body.unshift(p)):l.body.body.unshift(a.expressionStatement(a.assignmentExpression("=",p,c))),e.parentPath.isLabeledStatement()&&(l=a.labeledStatement(e.parentPath.node.label,l)),n.push(l),n}function r(e,t){var r=e.node,n=e.scope,s=e.parent,o=r.left,l=void 0,c=void 0;if(a.isIdentifier(o)||a.isPattern(o)||a.isMemberExpression(o))c=o;else{if(!a.isVariableDeclaration(o))throw t.buildCodeFrameError(o,i.get("unknownForHead",o.type));c=n.generateUidIdentifier("ref"),l=a.variableDeclaration(o.kind,[a.variableDeclarator(o.declarations[0].id,c)])}var p=n.generateUidIdentifier("iterator"),h=n.generateUidIdentifier("isArray"),f=u({LOOP_OBJECT:p,IS_ARRAY:h,OBJECT:r.right,INDEX:n.generateUidIdentifier("i"),ID:c});l||f.body.body.shift();var d=a.isLabeledStatement(s),m=void 0;return d&&(m=a.labeledStatement(s.label,f)),{replaceParent:d,declar:l,node:m||f,loop:f}}function n(e,t){var r=e.node,n=e.scope,s=e.parent,o=r.left,u=void 0,c=n.generateUidIdentifier("step"),p=a.memberExpression(c,a.identifier("value"));if(a.isIdentifier(o)||a.isPattern(o)||a.isMemberExpression(o))u=a.expressionStatement(a.assignmentExpression("=",o,p));else{if(!a.isVariableDeclaration(o))throw t.buildCodeFrameError(o,i.get("unknownForHead",o.type));u=a.variableDeclaration(o.kind,[a.variableDeclarator(o.declarations[0].id,p)])}var h=n.generateUidIdentifier("iterator"),f=l({ITERATOR_HAD_ERROR_KEY:n.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:n.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:n.generateUidIdentifier("iteratorError"),ITERATOR_KEY:h,STEP_KEY:c,OBJECT:r.right,BODY:null}),d=a.isLabeledStatement(s),m=f[3].block.body,y=m[0];return d&&(m[0]=a.labeledStatement(s.label,y)),{replaceParent:d,declar:u,loop:y,node:f}}var i=e.messages,s=e.template,a=e.types,o=s("\n for (var KEY = 0; KEY < ARR.length; KEY++) BODY;\n "),u=s("\n for (var LOOP_OBJECT = OBJECT,\n IS_ARRAY = Array.isArray(LOOP_OBJECT),\n INDEX = 0,\n LOOP_OBJECT = IS_ARRAY ? LOOP_OBJECT : LOOP_OBJECT[Symbol.iterator]();;) {\n var ID;\n if (IS_ARRAY) {\n if (INDEX >= LOOP_OBJECT.length) break;\n ID = LOOP_OBJECT[INDEX++];\n } else {\n INDEX = LOOP_OBJECT.next();\n if (INDEX.done) break;\n ID = INDEX.value;\n }\n }\n "),l=s("\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (var ITERATOR_KEY = OBJECT[Symbol.iterator](), STEP_KEY; !(ITERATOR_COMPLETION = (STEP_KEY = ITERATOR_KEY.next()).done); ITERATOR_COMPLETION = true) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return) {\n ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n ");return{visitor:{ForOfStatement:function(e,i){if(e.get("right").isArrayExpression())return e.parentPath.isLabeledStatement()?e.parentPath.replaceWithMultiple(t(e)):e.replaceWithMultiple(t(e));var s=n;i.opts.loose&&(s=r);var o=e.node,u=s(e,i),l=u.declar,c=u.loop,p=c.body;e.ensureBlock(),l&&p.body.push(l),p.body=p.body.concat(o.body.body),a.inherits(c,o),a.inherits(c.body,o.body),u.replaceParent?(e.parentPath.replaceWithMultiple(u.node),e.remove()):e.replaceWithMultiple(u.node)}}}},t.exports=r.default},{}],120:[function(e,t,r){t.exports={default:e("core-js/library/fn/get-iterator"),__esModule:!0}},{"core-js/library/fn/get-iterator":196}],121:[function(e,t,r){t.exports={default:e("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":197}],122:[function(e,t,r){t.exports={default:e("core-js/library/fn/map"),__esModule:!0}},{"core-js/library/fn/map":198}],123:[function(e,t,r){t.exports={default:e("core-js/library/fn/number/max-safe-integer"),__esModule:!0}},{"core-js/library/fn/number/max-safe-integer":199}],124:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":200}],125:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":201}],126:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/get-own-property-symbols"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-symbols":202}],127:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":203}],128:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/set-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/set-prototype-of":204}],129:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":206}],130:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol/for"),__esModule:!0}},{"core-js/library/fn/symbol/for":205}],131:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":207}],132:[function(e,t,r){t.exports={default:e("core-js/library/fn/weak-map"),__esModule:!0}},{"core-js/library/fn/weak-map":208}],133:[function(e,t,r){t.exports={default:e("core-js/library/fn/weak-set"),__esModule:!0}},{"core-js/library/fn/weak-set":209}],134:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},{}],135:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("../core-js/object/set-prototype-of")),s=n(e("../core-js/object/create")),a=n(e("../helpers/typeof"));r.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,a.default)(t)));e.prototype=(0,s.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.default?(0,i.default)(e,t):e.__proto__=t)}},{"../core-js/object/create":125,"../core-js/object/set-prototype-of":128,"../helpers/typeof":138}],136:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}},{}],137:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("../helpers/typeof"));r.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,n.default)(t))&&"function"!=typeof t?e:t}},{"../helpers/typeof":138}],138:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("../core-js/symbol/iterator")),s=n(e("../core-js/symbol")),a="function"==typeof s.default&&"symbol"==typeof i.default?function(e){return typeof e}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":typeof e};r.default="function"==typeof s.default&&"symbol"===a(i.default)?function(e){return void 0===e?"undefined":a(e)}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":void 0===e?"undefined":a(e)}},{"../core-js/symbol":129,"../core-js/symbol/iterator":131}],139:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=i(e("babel-runtime/core-js/symbol"));r.default=function(e,t){var r=void 0;try{throw new Error}catch(e){e.stack&&(r=e.stack.split("\n").slice(1).join("\n"))}t=(0,o.default)({allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,preserveComments:!1},t);var n=function(){var i=void 0;try{i=c.parse(e,t),i=l.default.removeProperties(i,{preserveComments:t.preserveComments}),l.default.cheap(i,function(e){e[h]=!0})}catch(e){throw e.stack=e.stack+"from\n"+r,e}return n=function(){return i},i};return function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e,t){var r=(e=(0,a.default)(e)).program;return t.length&&(0,l.default)(e,d,null,t),r.body.length>1?r.body:r.body[0]}(n(),t)}};var a=i(e("lodash/cloneDeep")),o=i(e("lodash/assign")),u=i(e("lodash/has")),l=i(e("babel-traverse")),c=n(e("babylon")),p=n(e("babel-types")),h="_fromTemplate",f=(0,s.default)(),d={noScope:!0,enter:function(e,t){var r=e.node;if(r[f])return e.skip();p.isExpressionStatement(r)&&(r=r.expression);var n=void 0;if(p.isIdentifier(r)&&r[h])if((0,u.default)(t[0],r.name))n=t[0][r.name];else if("$"===r.name[0]){var i=+r.name.slice(1);t[i]&&(n=t[i])}null===n&&e.remove(),n&&(n[f]=!0,e.replaceInline(n))},exit:function(e){var t=e.node;t.loc||l.default.clearNode(t)}};t.exports=r.default},{"babel-runtime/core-js/symbol":129,"babel-traverse":143,"babel-types":180,babylon:188,"lodash/assign":488,"lodash/cloneDeep":492,"lodash/has":504}],140:[function(e,t,r){"use strict";function n(){r.path=new s.default}function i(){r.scope=new s.default}r.__esModule=!0,r.scope=r.path=void 0;var s=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/weak-map"));r.clear=function(){n(),i()},r.clearPath=n,r.clearScope=i;r.path=new s.default,r.scope=new s.default},{"babel-runtime/core-js/weak-map":132}],141:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=i(e("babel-runtime/core-js/get-iterator")),a=i(e("babel-runtime/helpers/classCallCheck")),o=i(e("./path")),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),l="test"===n.env.NODE_ENV,c=function(){function e(t,r,n,i){(0,a.default)(this,e),this.queue=null,this.parentPath=i,this.scope=t,this.state=n,this.opts=r}return e.prototype.shouldVisit=function(e){var t=this.opts;if(t.enter||t.exit)return!0;if(t[e.type])return!0;var r=u.VISITOR_KEYS[e.type];if(!r||!r.length)return!1;var n=r,i=Array.isArray(n),a=0;for(n=i?n:(0,s.default)(n);;){var o;if(i){if(a>=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}if(e[o])return!0}return!1},e.prototype.create=function(e,t,r,n){return o.default.get({parentPath:this.parentPath,parent:e,container:t,key:r,listKey:n})},e.prototype.maybeQueue=function(e,t){if(this.trap)throw new Error("Infinite cycle detected");this.queue&&(t?this.queue.push(e):this.priorityQueue.push(e))},e.prototype.visitMultiple=function(e,t,r){if(0===e.length)return!1;for(var n=[],i=0;i<e.length;i++){var s=e[i];s&&this.shouldVisit(s)&&n.push(this.create(t,e,i,r))}return this.visitQueue(n)},e.prototype.visitSingle=function(e,t){return!!this.shouldVisit(e[t])&&this.visitQueue([this.create(e,e,t)])},e.prototype.visitQueue=function(e){this.queue=e,this.priorityQueue=[];var t=[],r=!1,n=e,i=Array.isArray(n),a=0;for(n=i?n:(0,s.default)(n);;){var o;if(i){if(a>=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}var u=o;if(u.resync(),0!==u.contexts.length&&u.contexts[u.contexts.length-1]===this||u.pushContext(this),null!==u.key&&(l&&e.length>=1e4&&(this.trap=!0),!(t.indexOf(u.node)>=0))){if(t.push(u.node),u.visit()){r=!0;break}if(this.priorityQueue.length&&(r=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=e,r))break}}var c=e,p=Array.isArray(c),h=0;for(c=p?c:(0,s.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if((h=c.next()).done)break;f=h.value}f.popContext()}return this.queue=null,r},e.prototype.visit=function(e,t){var r=e[t];return!!r&&(Array.isArray(r)?this.visitMultiple(r,e,t):this.visitSingle(e,t))},e}();r.default=c,t.exports=r.default}).call(this,e("_process"))},{"./path":150,_process:550,"babel-runtime/core-js/get-iterator":120,"babel-runtime/helpers/classCallCheck":134,"babel-types":180}],142:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/helpers/classCallCheck"));r.default=function e(t,r){(0,n.default)(this,e),this.file=t,this.options=r},t.exports=r.default},{"babel-runtime/helpers/classCallCheck":134}],143:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r,n,i){if(e){if(t||(t={}),!t.noScope&&!r&&"Program"!==e.type&&"File"!==e.type)throw new Error(f.get("traverseNeedsParent",e.type));h.explode(t),s.node(e,t,r,n,i)}}function a(e,t){e.node.type===t.type&&(t.has=!0,e.stop())}r.__esModule=!0,r.visitors=r.Hub=r.Scope=r.NodePath=void 0;var o=i(e("babel-runtime/core-js/get-iterator")),u=e("./path");Object.defineProperty(r,"NodePath",{enumerable:!0,get:function(){return i(u).default}});var l=e("./scope");Object.defineProperty(r,"Scope",{enumerable:!0,get:function(){return i(l).default}});var c=e("./hub");Object.defineProperty(r,"Hub",{enumerable:!0,get:function(){return i(c).default}}),r.default=s;var p=i(e("./context")),h=n(e("./visitors")),f=n(e("babel-messages")),d=i(e("lodash/includes")),m=n(e("babel-types")),y=n(e("./cache"));r.visitors=h,s.visitors=h,s.verify=h.verify,s.explode=h.explode,s.NodePath=e("./path"),s.Scope=e("./scope"),s.Hub=e("./hub"),s.cheap=function(e,t){return m.traverseFast(e,t)},s.node=function(e,t,r,n,i,s){var a=m.VISITOR_KEYS[e.type];if(a){var u=new p.default(r,t,n,i),l=a,c=Array.isArray(l),h=0;for(l=c?l:(0,o.default)(l);;){var f;if(c){if(h>=l.length)break;f=l[h++]}else{if((h=l.next()).done)break;f=h.value}var d=f;if((!s||!s[d])&&u.visit(e,d))return}}},s.clearNode=function(e,t){m.removeProperties(e,t),y.path.delete(e)},s.removeProperties=function(e,t){return m.traverseFast(e,s.clearNode,t),e},s.hasType=function(e,t,r,n){if((0,d.default)(n,e.type))return!1;if(e.type===r)return!0;var i={has:!1,type:r};return s(e,{blacklist:n,enter:a},t,i),i.has},(s.clearCache=function(){y.clear()}).clearPath=y.clearPath,s.clearCache.clearScope=y.clearScope,s.copyCache=function(e,t){y.path.has(e)&&y.path.set(t,y.path.get(e))}},{"./cache":140,"./context":141,"./hub":142,"./path":150,"./scope":162,"./visitors":164,"babel-messages":110,"babel-runtime/core-js/get-iterator":120,"babel-types":180,"lodash/includes":507}],144:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator"));r.findParent=function(e){for(var t=this;t=t.parentPath;)if(e(t))return t;return null},r.find=function(e){var t=this;do{if(e(t))return t}while(t=t.parentPath);return null},r.getFunctionParent=function(){return this.findParent(function(e){return e.isFunction()||e.isProgram()})},r.getStatementParent=function(){var e=this;do{if(Array.isArray(e.container))return e}while(e=e.parentPath)},r.getEarliestCommonAncestorFrom=function(e){return this.getDeepestCommonAncestorFrom(e,function(e,t,r){var n=void 0,a=s.VISITOR_KEYS[e.type],o=r,u=Array.isArray(o),l=0;for(o=u?o:(0,i.default)(o);;){var c;if(u){if(l>=o.length)break;c=o[l++]}else{if((l=o.next()).done)break;c=l.value}var p=c[t+1];n?p.listKey&&n.listKey===p.listKey&&p.key<n.key?n=p:a.indexOf(n.parentKey)>a.indexOf(p.parentKey)&&(n=p):n=p}return n})},r.getDeepestCommonAncestorFrom=function(e,t){var r=this;if(!e.length)return this;if(1===e.length)return e[0];var n=1/0,s=void 0,a=void 0,o=e.map(function(e){var t=[];do{t.unshift(e)}while((e=e.parentPath)&&e!==r);return t.length<n&&(n=t.length),t}),u=o[0];e:for(var l=0;l<n;l++){var c=u[l],p=o,h=Array.isArray(p),f=0;for(p=h?p:(0,i.default)(p);;){var d;if(h){if(f>=p.length)break;d=p[f++]}else{if((f=p.next()).done)break;d=f.value}if(d[l]!==c)break e}s=l,a=c}if(a)return t?t(a,s,o):a;throw new Error("Couldn't find intersection")},r.getAncestry=function(){var e=this,t=[];do{t.push(e)}while(e=e.parentPath);return t},r.isAncestor=function(e){return e.isDescendant(this)},r.isDescendant=function(e){return!!this.findParent(function(t){return t===e})},r.inType=function(){for(var e=this;e;){var t=arguments,r=Array.isArray(t),n=0;for(t=r?t:(0,i.default)(t);;){var s;if(r){if(n>=t.length)break;s=t[n++]}else{if((n=t.next()).done)break;s=n.value}var a=s;if(e.node.type===a)return!0}e=e.parentPath}return!1},r.inShadow=function(e){var t=this.isFunction()?this:this.findParent(function(e){return e.isFunction()});if(t){if(t.isFunctionExpression()||t.isFunctionDeclaration()){var r=t.node.shadow;if(r&&(!e||!1!==r[e]))return t}else if(t.isArrowFunctionExpression())return t;return null}};var s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));n(e("./index"))},{"./index":150,"babel-runtime/core-js/get-iterator":120,"babel-types":180}],145:[function(e,t,r){"use strict";r.__esModule=!0,r.shareCommentsWithSiblings=function(){if("string"!=typeof this.key){var e=this.node;if(e){var t=e.trailingComments,r=e.leadingComments;if(t||r){var n=this.getSibling(this.key-1),i=this.getSibling(this.key+1);n.node||(n=i),i.node||(i=n),n.addComments("trailing",r),i.addComments("leading",t)}}}},r.addComment=function(e,t,r){this.addComments(e,[{type:r?"CommentLine":"CommentBlock",value:t}])},r.addComments=function(e,t){if(t){var r=this.node;if(r){var n=e+"Comments";r[n]?r[n]=r[n].concat(t):r[n]=t}}}},{}],146:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator"));r.call=function(e){var t=this.opts;return this.debug(function(){return e}),!(!this.node||!this._call(t[e]))||!!this.node&&this._call(t[this.node.type]&&t[this.node.type][e])},r._call=function(e){if(!e)return!1;var t=e,r=Array.isArray(t),n=0;for(t=r?t:(0,i.default)(t);;){var s;if(r){if(n>=t.length)break;s=t[n++]}else{if((n=t.next()).done)break;s=n.value}var a=s;if(a){var o=this.node;if(!o)return!0;if(a.call(this.state,this,this.state))throw new Error("Unexpected return value from visitor method "+a);if(this.node!==o)return!0;if(this.shouldStop||this.shouldSkip||this.removed)return!0}}return!1},r.isBlacklisted=function(){var e=this.opts.blacklist;return e&&e.indexOf(this.node.type)>-1},r.visit=function(){return!!this.node&&!this.isBlacklisted()&&(!this.opts.shouldSkip||!this.opts.shouldSkip(this))&&(this.call("enter")||this.shouldSkip?(this.debug(function(){return"Skip..."}),this.shouldStop):(this.debug(function(){return"Recursing into..."}),s.default.node(this.node,this.opts,this.scope,this.state,this,this.skipKeys),this.call("exit"),this.shouldStop))},r.skip=function(){this.shouldSkip=!0},r.skipKey=function(e){this.skipKeys[e]=!0},r.stop=function(){this.shouldStop=!0,this.shouldSkip=!0},r.setScope=function(){if(!this.opts||!this.opts.noScope){var e=this.context&&this.context.scope;if(!e)for(var t=this.parentPath;t&&!e;){if(t.opts&&t.opts.noScope)return;e=t.scope,t=t.parentPath}this.scope=this.getScope(e),this.scope&&this.scope.init()}},r.setContext=function(e){return this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.skipKeys={},e&&(this.context=e,this.state=e.state,this.opts=e.opts),this.setScope(),this},r.resync=function(){this.removed||(this._resyncParent(),this._resyncList(),this._resyncKey())},r._resyncParent=function(){this.parentPath&&(this.parent=this.parentPath.node)},r._resyncKey=function(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(var e=0;e<this.container.length;e++)if(this.container[e]===this.node)return this.setKey(e)}else for(var t in this.container)if(this.container[t]===this.node)return this.setKey(t);this.key=null}},r._resyncList=function(){if(this.parent&&this.inList){var e=this.parent[this.listKey];this.container!==e&&(this.container=e||null)}},r._resyncRemoved=function(){null!=this.key&&this.container&&this.container[this.key]===this.node||this._markRemoved()},r.popContext=function(){this.contexts.pop(),this.setContext(this.contexts[this.contexts.length-1])},r.pushContext=function(e){this.contexts.push(e),this.setContext(e)},r.setup=function(e,t,r,n){this.inList=!!r,this.listKey=r,this.parentKey=r||n,this.container=t,this.parentPath=e||this.parentPath,this.setKey(n)},r.setKey=function(e){this.key=e,this.node=this.container[this.key],this.type=this.node&&this.node.type},r.requeue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this;if(!e.removed){var t=this.contexts,r=Array.isArray(t),n=0;for(t=r?t:(0,i.default)(t);;){var s;if(r){if(n>=t.length)break;s=t[n++]}else{if((n=t.next()).done)break;s=n.value}s.maybeQueue(e)}}},r._getQueueContexts=function(){for(var e=this,t=this.contexts;!t.length;)t=(e=e.parentPath).contexts;return t};var s=n(e("../index"))},{"../index":143,"babel-runtime/core-js/get-iterator":120}],147:[function(e,t,r){"use strict";r.__esModule=!0,r.toComputedKey=function(){var e=this.node,t=void 0;if(this.isMemberExpression())t=e.property;else{if(!this.isProperty()&&!this.isMethod())throw new ReferenceError("todo");t=e.key}return e.computed||n.isIdentifier(t)&&(t=n.stringLiteral(t.name)),t},r.ensureBlock=function(){return n.ensureBlock(this.node)},r.arrowFunctionToShadowed=function(){if(this.isArrowFunctionExpression()){this.ensureBlock();var e=this.node;e.expression=!1,e.type="FunctionExpression",e.shadow=e.shadow||!0}};var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))},{"babel-types":180}],148:[function(e,t,r){(function(t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/typeof")),s=n(e("babel-runtime/core-js/get-iterator")),a=n(e("babel-runtime/core-js/map"));r.evaluateTruthy=function(){var e=this.evaluate();if(e.confident)return!!e.value},r.evaluate=function(){function e(e){n&&(l=e,n=!1)}function r(a){var l=a.node;if(c.has(l)){var p=c.get(l);return p.resolved?p.value:void e(a)}var h={resolved:!1};c.set(l,h);var f=function(a){if(n){var l=a.node;if(a.isSequenceExpression()){var c=a.get("expressions");return r(c[c.length-1])}if(a.isStringLiteral()||a.isNumericLiteral()||a.isBooleanLiteral())return l.value;if(a.isNullLiteral())return null;if(a.isTemplateLiteral()){for(var p="",h=0,f=a.get("expressions"),d=l.quasis,m=Array.isArray(d),y=0,d=m?d:(0,s.default)(d);;){var g;if(m){if(y>=d.length)break;g=d[y++]}else{if((y=d.next()).done)break;g=y.value}var b=g;if(!n)break;p+=b.value.cooked;var v=f[h++];v&&(p+=String(r(v)))}if(!n)return;return p}if(a.isConditionalExpression()){var x=r(a.get("test"));if(!n)return;return r(x?a.get("consequent"):a.get("alternate"))}if(a.isExpressionWrapper())return r(a.get("expression"));if(a.isMemberExpression()&&!a.parentPath.isCallExpression({callee:l})){var E=a.get("property"),A=a.get("object");if(A.isLiteral()&&E.isIdentifier()){var D=A.node.value,S=void 0===D?"undefined":(0,i.default)(D);if("number"===S||"string"===S)return D[E.node.name]}}if(a.isReferencedIdentifier()){var C=a.scope.getBinding(l.name);if(C&&C.constantViolations.length>0)return e(C.path);if(C&&a.node.start<C.path.node.end)return e(C.path);if(C&&C.hasValue)return C.value;if("undefined"===l.name)return C?e(C.path):void 0;if("Infinity"===l.name)return C?e(C.path):1/0;if("NaN"===l.name)return C?e(C.path):NaN;var _=a.resolve();return _===a?e(a):r(_)}if(a.isUnaryExpression({prefix:!0})){if("void"===l.operator)return;var w=a.get("argument");if("typeof"===l.operator&&(w.isFunction()||w.isClass()))return"function";var k=r(w);if(!n)return;switch(l.operator){case"!":return!k;case"+":return+k;case"-":return-k;case"~":return~k;case"typeof":return void 0===k?"undefined":(0,i.default)(k)}}if(a.isArrayExpression()){for(var F=[],T=a.get("elements"),P=T,B=Array.isArray(P),O=0,P=B?P:(0,s.default)(P);;){var N;if(B){if(O>=P.length)break;N=P[O++]}else{if((O=P.next()).done)break;N=O.value}var j=N;if(!(j=j.evaluate()).confident)return e(j);F.push(j.value)}return F}if(a.isObjectExpression()){for(var I={},L=a.get("properties"),M=L,R=Array.isArray(M),V=0,M=R?M:(0,s.default)(M);;){var U;if(R){if(V>=M.length)break;U=M[V++]}else{if((V=M.next()).done)break;U=V.value}var q=U;if(q.isObjectMethod()||q.isSpreadProperty())return e(q);var G=q.get("key"),X=G;if(q.node.computed){if(!(X=X.evaluate()).confident)return e(G);X=X.value}else X=X.isIdentifier()?X.node.name:X.node.value;var J=q.get("value"),W=J.evaluate();if(!W.confident)return e(J);W=W.value,I[X]=W}return I}if(a.isLogicalExpression()){var K=n,z=r(a.get("left")),Y=n;n=K;var H=r(a.get("right")),$=n;switch(n=Y&&$,l.operator){case"||":if(z&&Y)return n=!0,z;if(!n)return;return z||H;case"&&":if((!z&&Y||!H&&$)&&(n=!0),!n)return;return z&&H}}if(a.isBinaryExpression()){var Q=r(a.get("left"));if(!n)return;var Z=r(a.get("right"));if(!n)return;switch(l.operator){case"-":return Q-Z;case"+":return Q+Z;case"/":return Q/Z;case"*":return Q*Z;case"%":return Q%Z;case"**":return Math.pow(Q,Z);case"<":return Q<Z;case">":return Q>Z;case"<=":return Q<=Z;case">=":return Q>=Z;case"==":return Q==Z;case"!=":return Q!=Z;case"===":return Q===Z;case"!==":return Q!==Z;case"|":return Q|Z;case"&":return Q&Z;case"^":return Q^Z;case"<<":return Q<<Z;case">>":return Q>>Z;case">>>":return Q>>>Z}}if(a.isCallExpression()){var ee=a.get("callee"),te=void 0,re=void 0;if(ee.isIdentifier()&&!a.scope.getBinding(ee.node.name,!0)&&o.indexOf(ee.node.name)>=0&&(re=t[l.callee.name]),ee.isMemberExpression()){var ne=ee.get("object"),ie=ee.get("property");if(ne.isIdentifier()&&ie.isIdentifier()&&o.indexOf(ne.node.name)>=0&&u.indexOf(ie.node.name)<0&&(te=t[ne.node.name],re=te[ie.node.name]),ne.isLiteral()&&ie.isIdentifier()){var se=(0,i.default)(ne.node.value);"string"!==se&&"number"!==se||(te=ne.node.value,re=te[ie.node.name])}}if(re){var ae=a.get("arguments").map(r);if(!n)return;return re.apply(te,ae)}}e(a)}}(a);return n&&(h.resolved=!0,h.value=f),f}var n=!0,l=void 0,c=new a.default,p=r(this);return n||(p=void 0),{confident:n,deopt:l,value:p}};var o=["String","Number","Math"],u=["random"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/map":122,"babel-runtime/helpers/typeof":138}],149:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/object/create")),s=n(e("babel-runtime/core-js/get-iterator"));r.getStatementParent=function(){var e=this;do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())break;e=e.parentPath}while(e);if(e&&(e.isProgram()||e.isFile()))throw new Error("File/Program node, we can't possibly find a statement parent to this");return e},r.getOpposite=function(){return"left"===this.key?this.getSibling("right"):"right"===this.key?this.getSibling("left"):void 0},r.getCompletionRecords=function(){var e=[],t=function(t){t&&(e=e.concat(t.getCompletionRecords()))};if(this.isIfStatement())t(this.get("consequent")),t(this.get("alternate"));else if(this.isDoExpression()||this.isFor()||this.isWhile())t(this.get("body"));else if(this.isProgram()||this.isBlockStatement())t(this.get("body").pop());else{if(this.isFunction())return this.get("body").getCompletionRecords();this.isTryStatement()?(t(this.get("block")),t(this.get("handler")),t(this.get("finalizer"))):e.push(this)}return e},r.getSibling=function(e){return a.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e})},r.getPrevSibling=function(){return this.getSibling(this.key-1)},r.getNextSibling=function(){return this.getSibling(this.key+1)},r.getAllNextSiblings=function(){for(var e=this.key,t=this.getSibling(++e),r=[];t.node;)r.push(t),t=this.getSibling(++e);return r},r.getAllPrevSiblings=function(){for(var e=this.key,t=this.getSibling(--e),r=[];t.node;)r.push(t),t=this.getSibling(--e);return r},r.get=function(e,t){!0===t&&(t=this.context);var r=e.split(".");return 1===r.length?this._getKey(e,t):this._getPattern(r,t)},r._getKey=function(e,t){var r=this,n=this.node,i=n[e];return Array.isArray(i)?i.map(function(s,o){return a.default.get({listKey:e,parentPath:r,parent:n,container:i,key:o}).setContext(t)}):a.default.get({parentPath:this,parent:n,container:n,key:e}).setContext(t)},r._getPattern=function(e,t){var r=this,n=e,i=Array.isArray(n),a=0;for(n=i?n:(0,s.default)(n);;){var o;if(i){if(a>=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}var u=o;r="."===u?r.parentPath:Array.isArray(r)?r[u]:r.get(u,t)}return r},r.getBindingIdentifiers=function(e){return o.getBindingIdentifiers(this.node,e)},r.getOuterBindingIdentifiers=function(e){return o.getOuterBindingIdentifiers(this.node,e)},r.getBindingIdentifierPaths=function(){for(var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=[].concat(this),n=(0,i.default)(null);r.length;){var s=r.shift();if(s&&s.node){var a=o.getBindingIdentifiers.keys[s.node.type];if(s.isIdentifier())e?(n[s.node.name]=n[s.node.name]||[]).push(s):n[s.node.name]=s;else if(s.isExportDeclaration()){var u=s.get("declaration");u.isDeclaration()&&r.push(u)}else{if(t){if(s.isFunctionDeclaration()){r.push(s.get("id"));continue}if(s.isFunctionExpression())continue}if(a)for(var l=0;l<a.length;l++){var c=a[l],p=s.get(c);(Array.isArray(p)||p.node)&&(r=r.concat(p))}}}}return n},r.getOuterBindingIdentifierPaths=function(e){return this.getBindingIdentifierPaths(e,!0)};var a=n(e("./index")),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))},{"./index":150,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/object/create":125,"babel-types":180}],150:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=i(e("babel-runtime/core-js/get-iterator")),a=i(e("babel-runtime/helpers/classCallCheck")),o=n(e("./lib/virtual-types")),u=i(e("debug")),l=i(e("invariant")),c=i(e("../index")),p=i(e("lodash/assign")),h=i(e("../scope")),f=n(e("babel-types")),d=e("../cache"),m=(0,u.default)("babel"),y=function(){function e(t,r){(0,a.default)(this,e),this.parent=r,this.hub=t,this.contexts=[],this.data={},this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.state=null,this.opts=null,this.skipKeys=null,this.parentPath=null,this.context=null,this.container=null,this.listKey=null,this.inList=!1,this.parentKey=null,this.key=null,this.node=null,this.scope=null,this.type=null,this.typeAnnotation=null}return e.get=function(t){var r=t.hub,n=t.parentPath,i=t.parent,s=t.container,a=t.listKey,o=t.key;!r&&n&&(r=n.hub),(0,l.default)(i,"To get a node path the parent needs to exist");var u=s[o],c=d.path.get(i)||[];d.path.has(i)||d.path.set(i,c);for(var p=void 0,h=0;h<c.length;h++){var f=c[h];if(f.node===u){p=f;break}}return p||(p=new e(r,i),c.push(p)),p.setup(n,s,a,o),p},e.prototype.getScope=function(e){var t=e;return this.isScope()&&(t=new h.default(this,e)),t},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e,t){var r=this.data[e];return!r&&t&&(r=this.data[e]=t),r},e.prototype.buildCodeFrameError=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:SyntaxError;return this.hub.file.buildCodeFrameError(this.node,e,t)},e.prototype.traverse=function(e,t){(0,c.default)(this.node,e,this.scope,t,this)},e.prototype.mark=function(e,t){this.hub.file.metadata.marked.push({type:e,message:t,loc:this.node.loc})},e.prototype.set=function(e,t){f.validate(this.node,e,t),this.node[e]=t},e.prototype.getPathLocation=function(){var e=[],t=this;do{var r=t.key;t.inList&&(r=t.listKey+"["+r+"]"),e.unshift(r)}while(t=t.parentPath);return e.join(".")},e.prototype.debug=function(e){m.enabled&&m(this.getPathLocation()+" "+this.type+": "+e())},e}();r.default=y,(0,p.default)(y.prototype,e("./ancestry")),(0,p.default)(y.prototype,e("./inference")),(0,p.default)(y.prototype,e("./replacement")),(0,p.default)(y.prototype,e("./evaluation")),(0,p.default)(y.prototype,e("./conversion")),(0,p.default)(y.prototype,e("./introspection")),(0,p.default)(y.prototype,e("./context")),(0,p.default)(y.prototype,e("./removal")),(0,p.default)(y.prototype,e("./modification")),(0,p.default)(y.prototype,e("./family")),(0,p.default)(y.prototype,e("./comments"));var g=function(){if(v){if(x>=b.length)return"break";E=b[x++]}else{if((x=b.next()).done)return"break";E=x.value}var e=E,t="is"+e;y.prototype[t]=function(e){return f[t](this.node,e)},y.prototype["assert"+e]=function(r){if(!this[t](r))throw new TypeError("Expected node path of type "+e)}},b=f.TYPES,v=Array.isArray(b),x=0;for(b=v?b:(0,s.default)(b);;){var E;if("break"===g())break}var A=function(e){if("_"===e[0])return"continue";f.TYPES.indexOf(e)<0&&f.TYPES.push(e);var t=o[e];y.prototype["is"+e]=function(e){return t.checkPath(this,e)}};for(var D in o){A(D)}t.exports=r.default},{"../cache":140,"../index":143,"../scope":162,"./ancestry":144,"./comments":145,"./context":146,"./conversion":147,"./evaluation":148,"./family":149,"./inference":151,"./introspection":154,"./lib/virtual-types":157,"./modification":158,"./removal":159,"./replacement":160,"babel-runtime/core-js/get-iterator":120,"babel-runtime/helpers/classCallCheck":134,"babel-types":180,debug:165,invariant:318,"lodash/assign":488}],151:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e,t,r){if("string"===e)return o.isStringTypeAnnotation(t);if("number"===e)return o.isNumberTypeAnnotation(t);if("boolean"===e)return o.isBooleanTypeAnnotation(t);if("any"===e)return o.isAnyTypeAnnotation(t);if("mixed"===e)return o.isMixedTypeAnnotation(t);if("empty"===e)return o.isEmptyTypeAnnotation(t);if("void"===e)return o.isVoidTypeAnnotation(t);if(r)return!1;throw new Error("Unknown base type "+e)}r.__esModule=!0;var s=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.getTypeAnnotation=function(){if(this.typeAnnotation)return this.typeAnnotation;var e=this._getTypeAnnotation()||o.anyTypeAnnotation();return o.isTypeAnnotation(e)&&(e=e.typeAnnotation),this.typeAnnotation=e},r._getTypeAnnotation=function(){var e=this.node;if(e){if(e.typeAnnotation)return e.typeAnnotation;var t=a[e.type];return t?t.call(this,e):(t=a[this.parentPath.type])&&t.validParent?this.parentPath.getTypeAnnotation():void 0}if("init"===this.key&&this.parentPath.isVariableDeclarator()){var r=this.parentPath.parentPath,n=r.parentPath;return"left"===r.key&&n.isForInStatement()?o.stringTypeAnnotation():"left"===r.key&&n.isForOfStatement()?o.anyTypeAnnotation():o.voidTypeAnnotation()}},r.isBaseType=function(e,t){return i(e,this.getTypeAnnotation(),t)},r.couldBeBaseType=function(e){var t=this.getTypeAnnotation();if(o.isAnyTypeAnnotation(t))return!0;if(o.isUnionTypeAnnotation(t)){var r=t.types,n=Array.isArray(r),a=0;for(r=n?r:(0,s.default)(r);;){var u;if(n){if(a>=r.length)break;u=r[a++]}else{if((a=r.next()).done)break;u=a.value}var l=u;if(o.isAnyTypeAnnotation(l)||i(e,l,!0))return!0}return!1}return i(e,t,!0)},r.baseTypeStrictlyMatches=function(e){var t=this.getTypeAnnotation();if(e=e.getTypeAnnotation(),!o.isAnyTypeAnnotation(t)&&o.isFlowBaseAnnotation(t))return e.type===t.type},r.isGenericType=function(e){var t=this.getTypeAnnotation();return o.isGenericTypeAnnotation(t)&&o.isIdentifier(t.id,{name:e})};var a=n(e("./inferers")),o=n(e("babel-types"))},{"./inferers":153,"babel-runtime/core-js/get-iterator":120,"babel-types":180}],152:[function(e,t,r){"use strict";function n(e,t,r){var n=e.constantViolations.slice();return n.unshift(e.path),n.filter(function(e){var n=(e=e.resolve())._guessExecutionStatusRelativeTo(t);return r&&"function"===n&&r.push(e),"before"===n})}function i(e,t){var r=t.node.operator,n=t.get("right").resolve(),i=t.get("left").resolve(),s=void 0;if(i.isIdentifier({name:e})?s=n:n.isIdentifier({name:e})&&(s=i),s)return"==="===r?s.getTypeAnnotation():o.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(r)>=0?o.numberTypeAnnotation():void 0;if("==="===r){var a=void 0,u=void 0;if(i.isUnaryExpression({operator:"typeof"})?(a=i,u=n):n.isUnaryExpression({operator:"typeof"})&&(a=n,u=i),(u||a)&&(u=u.resolve()).isLiteral()){if("string"==typeof u.node.value&&a.get("argument").isIdentifier({name:e}))return o.createTypeAnnotationBasedOnTypeof(u.node.value)}}}function s(e,t){var r=function(e){for(var t=void 0;t=e.parentPath;){if(t.isIfStatement()||t.isConditionalExpression())return"test"===e.key?void 0:t;e=t}}(e);if(r){var n=[r.get("test")],a=[];do{var u=n.shift().resolve();if(u.isLogicalExpression()&&(n.push(u.get("left")),n.push(u.get("right"))),u.isBinaryExpression()){var l=i(t,u);l&&a.push(l)}}while(n.length);return a.length?{typeAnnotation:o.createUnionTypeAnnotation(a),ifStatement:r}:s(r,t)}}r.__esModule=!0;var a=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.default=function(e){if(this.isReferenced()){var t=this.scope.getBinding(e.name);return t?t.identifier.typeAnnotation?t.identifier.typeAnnotation:function(e,t){var r=e.scope.getBinding(t),i=[];e.typeAnnotation=o.unionTypeAnnotation(i);var u=[],l=n(r,e,u),c=s(e,t);if(c){var p=n(r,c.ifStatement);l=l.filter(function(e){return p.indexOf(e)<0}),i.push(c.typeAnnotation)}if(l.length){var h=l=l.concat(u),f=Array.isArray(h),d=0;for(h=f?h:(0,a.default)(h);;){var m;if(f){if(d>=h.length)break;m=h[d++]}else{if((d=h.next()).done)break;m=d.value}var y=m;i.push(y.getTypeAnnotation())}}if(i.length)return o.createUnionTypeAnnotation(i)}(this,e.name):"undefined"===e.name?o.voidTypeAnnotation():"NaN"===e.name||"Infinity"===e.name?o.numberTypeAnnotation():void e.name}};var o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));t.exports=r.default},{"babel-runtime/core-js/get-iterator":120,"babel-types":180}],153:[function(e,t,r){"use strict";function n(e){return e.typeAnnotation}function i(){return l.genericTypeAnnotation(l.identifier("Array"))}function s(){return i()}function a(){return l.genericTypeAnnotation(l.identifier("Function"))}function o(e){if((e=e.resolve()).isFunction()){if(e.is("async"))return e.is("generator")?l.genericTypeAnnotation(l.identifier("AsyncIterator")):l.genericTypeAnnotation(l.identifier("Promise"));if(e.node.returnType)return e.node.returnType}}r.__esModule=!0,r.ClassDeclaration=r.ClassExpression=r.FunctionDeclaration=r.ArrowFunctionExpression=r.FunctionExpression=r.Identifier=void 0;var u=e("./inferer-reference");Object.defineProperty(r,"Identifier",{enumerable:!0,get:function(){return function(e){return e&&e.__esModule?e:{default:e}}(u).default}}),r.VariableDeclarator=function(){return this.get("id").isIdentifier()?this.get("init").getTypeAnnotation():void 0},r.TypeCastExpression=n,r.NewExpression=function(e){if(this.get("callee").isIdentifier())return l.genericTypeAnnotation(e.callee)},r.TemplateLiteral=function(){return l.stringTypeAnnotation()},r.UnaryExpression=function(e){var t=e.operator;return"void"===t?l.voidTypeAnnotation():l.NUMBER_UNARY_OPERATORS.indexOf(t)>=0?l.numberTypeAnnotation():l.STRING_UNARY_OPERATORS.indexOf(t)>=0?l.stringTypeAnnotation():l.BOOLEAN_UNARY_OPERATORS.indexOf(t)>=0?l.booleanTypeAnnotation():void 0},r.BinaryExpression=function(e){var t=e.operator;if(l.NUMBER_BINARY_OPERATORS.indexOf(t)>=0)return l.numberTypeAnnotation();if(l.BOOLEAN_BINARY_OPERATORS.indexOf(t)>=0)return l.booleanTypeAnnotation();if("+"===t){var r=this.get("right"),n=this.get("left");return n.isBaseType("number")&&r.isBaseType("number")?l.numberTypeAnnotation():n.isBaseType("string")||r.isBaseType("string")?l.stringTypeAnnotation():l.unionTypeAnnotation([l.stringTypeAnnotation(),l.numberTypeAnnotation()])}},r.LogicalExpression=function(){return l.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])},r.ConditionalExpression=function(){return l.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])},r.SequenceExpression=function(){return this.get("expressions").pop().getTypeAnnotation()},r.AssignmentExpression=function(){return this.get("right").getTypeAnnotation()},r.UpdateExpression=function(e){var t=e.operator;if("++"===t||"--"===t)return l.numberTypeAnnotation()},r.StringLiteral=function(){return l.stringTypeAnnotation()},r.NumericLiteral=function(){return l.numberTypeAnnotation()},r.BooleanLiteral=function(){return l.booleanTypeAnnotation()},r.NullLiteral=function(){return l.nullLiteralTypeAnnotation()},r.RegExpLiteral=function(){return l.genericTypeAnnotation(l.identifier("RegExp"))},r.ObjectExpression=function(){return l.genericTypeAnnotation(l.identifier("Object"))},r.ArrayExpression=i,r.RestElement=s,r.CallExpression=function(){return o(this.get("callee"))},r.TaggedTemplateExpression=function(){return o(this.get("tag"))};var l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));n.validParent=!0,s.validParent=!0,r.FunctionExpression=a,r.ArrowFunctionExpression=a,r.FunctionDeclaration=a,r.ClassExpression=a,r.ClassDeclaration=a},{"./inferer-reference":152,"babel-types":180}],154:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=this.node&&this.node[e];return t&&Array.isArray(t)?!!t.length:!!t}r.__esModule=!0,r.is=void 0;var s=n(e("babel-runtime/core-js/get-iterator"));r.matchesPattern=function(e,t){function r(e){var t=n[s];return"*"===t||e===t}if(!this.isMemberExpression())return!1;for(var n=e.split("."),i=[this.node],s=0;i.length;){var a=i.shift();if(t&&s===n.length)return!0;if(o.isIdentifier(a)){if(!r(a.name))return!1}else if(o.isLiteral(a)){if(!r(a.value))return!1}else{if(o.isMemberExpression(a)){if(a.computed&&!o.isLiteral(a.property))return!1;i.unshift(a.property),i.unshift(a.object);continue}if(!o.isThisExpression(a))return!1;if(!r("this"))return!1}if(++s>n.length)return!1}return s===n.length},r.has=i,r.isStatic=function(){return this.scope.isStatic(this.node)},r.isnt=function(e){return!this.has(e)},r.equals=function(e,t){return this.node[e]===t},r.isNodeType=function(e){return o.isType(this.type,e)},r.canHaveVariableDeclarationOrExpression=function(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()},r.canSwapBetweenExpressionAndStatement=function(e){return!("body"!==this.key||!this.parentPath.isArrowFunctionExpression())&&(this.isExpression()?o.isBlockStatement(e):!!this.isBlockStatement()&&o.isExpression(e))},r.isCompletionRecord=function(e){var t=this,r=!0;do{var n=t.container;if(t.isFunction()&&!r)return!!e;if(r=!1,Array.isArray(n)&&t.key!==n.length-1)return!1}while((t=t.parentPath)&&!t.isProgram());return!0},r.isStatementOrBlock=function(){return!this.parentPath.isLabeledStatement()&&!o.isBlockStatement(this.container)&&(0,a.default)(o.STATEMENT_OR_BLOCK_KEYS,this.key)},r.referencesImport=function(e,t){if(!this.isReferencedIdentifier())return!1;var r=this.scope.getBinding(this.node.name);if(!r||"module"!==r.kind)return!1;var n=r.path,i=n.parentPath;return!(!i.isImportDeclaration()||i.node.source.value!==e||t&&(!n.isImportDefaultSpecifier()||"default"!==t)&&(!n.isImportNamespaceSpecifier()||"*"!==t)&&(!n.isImportSpecifier()||n.node.imported.name!==t))},r.getSource=function(){var e=this.node;return e.end?this.hub.file.code.slice(e.start,e.end):""},r.willIMaybeExecuteBefore=function(e){return"after"!==this._guessExecutionStatusRelativeTo(e)},r._guessExecutionStatusRelativeTo=function(e){var t=e.scope.getFunctionParent(),r=this.scope.getFunctionParent();if(t.node!==r.node){var n=this._guessExecutionStatusRelativeToDifferentFunctions(t);if(n)return n;e=t.path}var i=e.getAncestry();if(i.indexOf(this)>=0)return"after";var s=this.getAncestry(),a=void 0,u=void 0,l=void 0;for(l=0;l<s.length;l++){var c=s[l];if((u=i.indexOf(c))>=0){a=c;break}}if(!a)return"before";var p=i[u-1],h=s[l-1];return p&&h?p.listKey&&p.container===h.container?p.key>h.key?"before":"after":o.VISITOR_KEYS[p.type].indexOf(p.key)>o.VISITOR_KEYS[h.type].indexOf(h.key)?"before":"after":"before"},r._guessExecutionStatusRelativeToDifferentFunctions=function(e){var t=e.path;if(t.isFunctionDeclaration()){var r=t.scope.getBinding(t.node.id.name);if(!r.references)return"before";var n=r.referencePaths,i=n,a=Array.isArray(i),o=0;for(i=a?i:(0,s.default)(i);;){var u;if(a){if(o>=i.length)break;u=i[o++]}else{if((o=i.next()).done)break;u=o.value}var l=u;if("callee"!==l.key||!l.parentPath.isCallExpression())return}var c=void 0,p=n,h=Array.isArray(p),f=0;for(p=h?p:(0,s.default)(p);;){var d;if(h){if(f>=p.length)break;d=p[f++]}else{if((f=p.next()).done)break;d=f.value}var m=d;if(!m.find(function(e){return e.node===t.node})){var y=this._guessExecutionStatusRelativeTo(m);if(c){if(c!==y)return}else c=y}}return c}},r.resolve=function(e,t){return this._resolve(e,t)||this},r._resolve=function(e,t){if(!(t&&t.indexOf(this)>=0))if((t=t||[]).push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(e,t)}else if(this.isReferencedIdentifier()){var r=this.scope.getBinding(this.node.name);if(!r)return;if(!r.constant)return;if("module"===r.kind)return;if(r.path!==this){var n=r.path.resolve(e,t);if(this.find(function(e){return e.node===n.node}))return;return n}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(e,t);if(e&&this.isMemberExpression()){var i=this.toComputedKey();if(!o.isLiteral(i))return;var a=i.value,u=this.get("object").resolve(e,t);if(u.isObjectExpression()){var l=u.get("properties"),c=Array.isArray(l),p=0;for(l=c?l:(0,s.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if((p=l.next()).done)break;h=p.value}var f=h;if(f.isProperty()){var d=f.get("key"),m=f.isnt("computed")&&d.isIdentifier({name:a});if(m=m||d.isLiteral({value:a}))return f.get("value").resolve(e,t)}}}else if(u.isArrayExpression()&&!isNaN(+a)){var y=u.get("elements")[a];if(y)return y.resolve(e,t)}}}};var a=n(e("lodash/includes")),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.is=i},{"babel-runtime/core-js/get-iterator":120,"babel-types":180,"lodash/includes":507}],155:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator")),s=n(e("babel-runtime/helpers/classCallCheck")),a=e("babel-types"),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(a),u={ReferencedIdentifier:function(e,t){if(!e.isJSXIdentifier()||!a.react.isCompatTag(e.node.name)||e.parentPath.isJSXMemberExpression()){if("this"===e.node.name){var r=e.scope;do{if(r.path.isFunction()&&!r.path.isArrowFunctionExpression())break}while(r=r.parent);r&&t.breakOnScopePaths.push(r.path)}var n=e.scope.getBinding(e.node.name);n&&n===t.scope.getBinding(e.node.name)&&(t.bindings[e.node.name]=n)}}},l=function(){function e(t,r){(0,s.default)(this,e),this.breakOnScopePaths=[],this.bindings={},this.scopes=[],this.scope=r,this.path=t,this.attachAfter=!1}return e.prototype.isCompatibleScope=function(e){for(var t in this.bindings){var r=this.bindings[t];if(!e.bindingIdentifierEquals(t,r.identifier))return!1}return!0},e.prototype.getCompatibleScopes=function(){var e=this.path.scope;do{if(!this.isCompatibleScope(e))break;if(this.scopes.push(e),this.breakOnScopePaths.indexOf(e.path)>=0)break}while(e=e.parent)},e.prototype.getAttachmentPath=function(){var e=this._getAttachmentPath();if(e){var t=e.scope;if(t.path===e&&(t=e.scope.parent),t.path.isProgram()||t.path.isFunction())for(var r in this.bindings)if(t.hasOwnBinding(r)){var n=this.bindings[r];if("param"!==n.kind&&this.getAttachmentParentForPath(n.path).key>e.key){this.attachAfter=!0,e=n.path;var s=n.constantViolations,a=Array.isArray(s),o=0;for(s=a?s:(0,i.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var l=u;this.getAttachmentParentForPath(l).key>e.key&&(e=l)}}}return e.parentPath.isExportDeclaration()&&(e=e.parentPath),e}},e.prototype._getAttachmentPath=function(){var e=this.scopes.pop();if(e){if(e.path.isFunction()){if(this.hasOwnParamBindings(e)){if(this.scope===e)return;return e.path.get("body").get("body")[0]}return this.getNextScopeAttachmentParent()}return e.path.isProgram()?this.getNextScopeAttachmentParent():void 0}},e.prototype.getNextScopeAttachmentParent=function(){var e=this.scopes.pop();if(e)return this.getAttachmentParentForPath(e.path)},e.prototype.getAttachmentParentForPath=function(e){do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement()||e.isVariableDeclarator()&&null!==e.parentPath.node&&e.parentPath.node.declarations.length>1)return e}while(e=e.parentPath)},e.prototype.hasOwnParamBindings=function(e){for(var t in this.bindings)if(e.hasOwnBinding(t)){var r=this.bindings[t];if("param"===r.kind&&r.constant)return!0}return!1},e.prototype.run=function(){var e=this.path.node;if(!e._hoisted){e._hoisted=!0,this.path.traverse(u,this),this.getCompatibleScopes();var t=this.getAttachmentPath();if(t&&t.getFunctionParent()!==this.path.getFunctionParent()){var r=t.scope.generateUidIdentifier("ref"),n=o.variableDeclarator(r,this.path.node);t[this.attachAfter?"insertAfter":"insertBefore"]([t.isVariableDeclarator()?n:o.variableDeclaration("var",[n])]);var i=this.path.parentPath;i.isJSXElement()&&this.path.container===i.node.children&&(r=o.JSXExpressionContainer(r)),this.path.replaceWith(r)}}},e}();r.default=l,t.exports=r.default},{"babel-runtime/core-js/get-iterator":120,"babel-runtime/helpers/classCallCheck":134,"babel-types":180}],156:[function(e,t,r){"use strict";r.__esModule=!0;r.hooks=[function(e,t){if("test"===e.key&&(t.isWhile()||t.isSwitchCase())||"declaration"===e.key&&t.isExportDeclaration()||"body"===e.key&&t.isLabeledStatement()||"declarations"===e.listKey&&t.isVariableDeclaration()&&1===t.node.declarations.length||"expression"===e.key&&t.isExpressionStatement())return t.remove(),!0},function(e,t){if(t.isSequenceExpression()&&1===t.node.expressions.length)return t.replaceWith(t.node.expressions[0]),!0},function(e,t){if(t.isBinary())return"left"===e.key?t.replaceWith(t.node.right):t.replaceWith(t.node.left),!0},function(e,t){if(t.isIfStatement()&&("consequent"===e.key||"alternate"===e.key)||"body"===e.key&&(t.isLoop()||t.isArrowFunctionExpression()))return e.replaceWith({type:"BlockStatement",body:[]}),!0}]},{}],157:[function(e,t,r){"use strict";r.__esModule=!0,r.Flow=r.Pure=r.Generated=r.User=r.Var=r.BlockScoped=r.Referenced=r.Scope=r.Expression=r.Statement=r.BindingIdentifier=r.ReferencedMemberExpression=r.ReferencedIdentifier=void 0;var n=e("babel-types"),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n);r.ReferencedIdentifier={types:["Identifier","JSXIdentifier"],checkPath:function(e,t){var r=e.node,s=e.parent;if(!i.isIdentifier(r,t)&&!i.isJSXMemberExpression(s,t)){if(!i.isJSXIdentifier(r,t))return!1;if(n.react.isCompatTag(r.name))return!1}return i.isReferenced(r,s)}},r.ReferencedMemberExpression={types:["MemberExpression"],checkPath:function(e){var t=e.node,r=e.parent;return i.isMemberExpression(t)&&i.isReferenced(t,r)}},r.BindingIdentifier={types:["Identifier"],checkPath:function(e){var t=e.node,r=e.parent;return i.isIdentifier(t)&&i.isBinding(t,r)}},r.Statement={types:["Statement"],checkPath:function(e){var t=e.node,r=e.parent;if(i.isStatement(t)){if(i.isVariableDeclaration(t)){if(i.isForXStatement(r,{left:t}))return!1;if(i.isForStatement(r,{init:t}))return!1}return!0}return!1}},r.Expression={types:["Expression"],checkPath:function(e){return e.isIdentifier()?e.isReferencedIdentifier():i.isExpression(e.node)}},r.Scope={types:["Scopable"],checkPath:function(e){return i.isScope(e.node,e.parent)}},r.Referenced={checkPath:function(e){return i.isReferenced(e.node,e.parent)}},r.BlockScoped={checkPath:function(e){return i.isBlockScoped(e.node)}},r.Var={types:["VariableDeclaration"],checkPath:function(e){return i.isVar(e.node)}},r.User={checkPath:function(e){return e.node&&!!e.node.loc}},r.Generated={checkPath:function(e){return!e.isUser()}},r.Pure={checkPath:function(e,t){return e.scope.isPure(e.node,t)}},r.Flow={types:["Flow","ImportDeclaration","ExportDeclaration","ImportSpecifier"],checkPath:function(e){var t=e.node;return!!i.isFlow(t)||(i.isImportDeclaration(t)?"type"===t.importKind||"typeof"===t.importKind:i.isExportDeclaration(t)?"type"===t.exportKind:!!i.isImportSpecifier(t)&&("type"===t.importKind||"typeof"===t.importKind))}}},{"babel-types":180}],158:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/typeof")),s=n(e("babel-runtime/core-js/get-iterator"));r.insertBefore=function(e){if(this._assertUnremoved(),e=this._verifyNodeList(e),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertBefore(e);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key)this.node&&e.push(this.node),this.replaceExpressionWithStatements(e);else{if(this._maybePopFromStatements(e),Array.isArray(this.container))return this._containerInsertBefore(e);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&e.push(this.node),this._replaceWith(l.blockStatement(e))}return[this]},r._containerInsert=function(e,t){this.updateSiblingKeys(e,t.length);for(var r=[],n=0;n<t.length;n++){var i=e+n,a=t[n];if(this.container.splice(i,0,a),this.context){var o=this.context.create(this.parent,this.container,i,this.listKey);this.context.queue&&o.pushContext(this.context),r.push(o)}else r.push(u.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:i}))}var l=this._getQueueContexts(),c=r,p=Array.isArray(c),h=0;for(c=p?c:(0,s.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if((h=c.next()).done)break;f=h.value}var d=f;d.setScope(),d.debug(function(){return"Inserted."});var m=l,y=Array.isArray(m),g=0;for(m=y?m:(0,s.default)(m);;){var b;if(y){if(g>=m.length)break;b=m[g++]}else{if((g=m.next()).done)break;b=g.value}b.maybeQueue(d,!0)}}return r},r._containerInsertBefore=function(e){return this._containerInsert(this.key,e)},r._containerInsertAfter=function(e){return this._containerInsert(this.key+1,e)},r._maybePopFromStatements=function(e){var t=e[e.length-1];(l.isIdentifier(t)||l.isExpressionStatement(t)&&l.isIdentifier(t.expression))&&!this.isCompletionRecord()&&e.pop()},r.insertAfter=function(e){if(this._assertUnremoved(),e=this._verifyNodeList(e),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertAfter(e);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key){if(this.node){var t=this.scope.generateDeclaredUidIdentifier();e.unshift(l.expressionStatement(l.assignmentExpression("=",t,this.node))),e.push(l.expressionStatement(t))}this.replaceExpressionWithStatements(e)}else{if(this._maybePopFromStatements(e),Array.isArray(this.container))return this._containerInsertAfter(e);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&e.unshift(this.node),this._replaceWith(l.blockStatement(e))}return[this]},r.updateSiblingKeys=function(e,t){if(this.parent)for(var r=a.path.get(this.parent),n=0;n<r.length;n++){var i=r[n];i.key>=e&&(i.key+=t)}},r._verifyNodeList=function(e){if(!e)return[];e.constructor!==Array&&(e=[e]);for(var t=0;t<e.length;t++){var r=e[t],n=void 0;if(r?"object"!==(void 0===r?"undefined":(0,i.default)(r))?n="contains a non-object node":r.type?r instanceof u.default&&(n="has a NodePath when it expected a raw object"):n="without a type":n="has falsy node",n){var s=Array.isArray(r)?"array":void 0===r?"undefined":(0,i.default)(r);throw new Error("Node list "+n+" with the index of "+t+" and type of "+s)}}return e},r.unshiftContainer=function(e,t){return this._assertUnremoved(),t=this._verifyNodeList(t),u.default.get({parentPath:this,parent:this.node,container:this.node[e],listKey:e,key:0}).insertBefore(t)},r.pushContainer=function(e,t){this._assertUnremoved(),t=this._verifyNodeList(t);var r=this.node[e];return u.default.get({parentPath:this,parent:this.node,container:r,listKey:e,key:r.length}).replaceWithMultiple(t)},r.hoist=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.scope;return new o.default(this,e).run()};var a=e("../cache"),o=n(e("./lib/hoister")),u=n(e("./index")),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))},{"../cache":140,"./index":150,"./lib/hoister":155,"babel-runtime/core-js/get-iterator":120,"babel-runtime/helpers/typeof":138,"babel-types":180}],159:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.remove=function(){this._assertUnremoved(),this.resync(),this._callRemovalHooks()?this._markRemoved():(this.shareCommentsWithSiblings(),this._remove(),this._markRemoved())},r._callRemovalHooks=function(){var e=i.hooks,t=Array.isArray(e),r=0;for(e=t?e:(0,n.default)(e);;){var s;if(t){if(r>=e.length)break;s=e[r++]}else{if((r=e.next()).done)break;s=r.value}if(s(this,this.parentPath))return!0}},r._remove=function(){Array.isArray(this.container)?(this.container.splice(this.key,1),this.updateSiblingKeys(this.key,-1)):this._replaceWith(null)},r._markRemoved=function(){this.shouldSkip=!0,this.removed=!0,this.node=null},r._assertUnremoved=function(){if(this.removed)throw this.buildCodeFrameError("NodePath has been removed so is read-only.")};var i=e("./lib/removal-hooks")},{"./lib/removal-hooks":156,"babel-runtime/core-js/get-iterator":120}],160:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator"));r.replaceWithMultiple=function(e){this.resync(),e=this._verifyNodeList(e),l.inheritLeadingComments(e[0],this.node),l.inheritTrailingComments(e[e.length-1],this.node),this.node=this.container[this.key]=null,this.insertAfter(e),this.node?this.requeue():this.remove()},r.replaceWithSourceString=function(e){this.resync();try{e="("+e+")",e=(0,u.parse)(e)}catch(r){var t=r.loc;throw t&&(r.message+=" - make sure this is an expression.",r.message+="\n"+(0,s.default)(e,t.line,t.column+1)),r}return e=e.program.body[0].expression,a.default.removeProperties(e),this.replaceWith(e)},r.replaceWith=function(e){if(this.resync(),this.removed)throw new Error("You can't replace this node, we've already removed it");if(e instanceof o.default&&(e=e.node),!e)throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");if(this.node!==e){if(this.isProgram()&&!l.isProgram(e))throw new Error("You can only replace a Program root node with another Program node");if(Array.isArray(e))throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");if("string"==typeof e)throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");if(this.isNodeType("Statement")&&l.isExpression(e)&&(this.canHaveVariableDeclarationOrExpression()||this.canSwapBetweenExpressionAndStatement(e)||this.parentPath.isExportDefaultDeclaration()||(e=l.expressionStatement(e))),this.isNodeType("Expression")&&l.isStatement(e)&&!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(e))return this.replaceExpressionWithStatements([e]);var t=this.node;t&&(l.inheritsComments(e,t),l.removeComments(t)),this._replaceWith(e),this.type=e.type,this.setScope(),this.requeue()}},r._replaceWith=function(e){if(!this.container)throw new ReferenceError("Container is falsy");this.inList?l.validate(this.parent,this.key,[e]):l.validate(this.parent,this.key,e),this.debug(function(){return"Replace with "+(e&&e.type)}),this.node=this.container[this.key]=e},r.replaceExpressionWithStatements=function(e){this.resync();var t=l.toSequenceExpression(e,this.scope);if(l.isSequenceExpression(t)){var r=t.expressions;r.length>=2&&this.parentPath.isExpressionStatement()&&this._maybePopFromStatements(r),1===r.length?this.replaceWith(r[0]):this.replaceWith(t)}else{if(!t){var n=l.functionExpression(null,[],l.blockStatement(e));n.shadow=!0,this.replaceWith(l.callExpression(n,[])),this.traverse(c);var s=this.get("callee").getCompletionRecords(),a=Array.isArray(s),o=0;for(s=a?s:(0,i.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var p=u;if(p.isExpressionStatement()){var h=p.findParent(function(e){return e.isLoop()});if(h){var f=h.getData("expressionReplacementReturnUid");if(f)f=l.identifier(f.name);else{var d=this.get("callee");f=d.scope.generateDeclaredUidIdentifier("ret"),d.get("body").pushContainer("body",l.returnStatement(f)),h.setData("expressionReplacementReturnUid",f)}p.get("expression").replaceWith(l.assignmentExpression("=",f,p.node.expression))}else p.replaceWith(l.returnStatement(p.node.expression))}}return this.node}this.replaceWith(t)}},r.replaceInline=function(e){return this.resync(),Array.isArray(e)?Array.isArray(this.container)?(e=this._verifyNodeList(e),this._containerInsertAfter(e),this.remove()):this.replaceWithMultiple(e):this.replaceWith(e)};var s=n(e("babel-code-frame")),a=n(e("../index")),o=n(e("./index")),u=e("babylon"),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),c={Function:function(e){e.skip()},VariableDeclaration:function(e){if("var"===e.node.kind){var t=e.getBindingIdentifiers();for(var r in t)e.scope.push({id:t[r]});var n=[],s=e.node.declarations,a=Array.isArray(s),o=0;for(s=a?s:(0,i.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var c=u;c.init&&n.push(l.expressionStatement(l.assignmentExpression("=",c.id,c.init)))}e.replaceWithMultiple(n)}}}},{"../index":143,"./index":150,"babel-code-frame":21,"babel-runtime/core-js/get-iterator":120,"babel-types":180,babylon:188}],161:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/helpers/classCallCheck")),i=function(){function e(t){var r=t.existing,i=t.identifier,s=t.scope,a=t.path,o=t.kind;(0,n.default)(this,e),this.identifier=i,this.scope=s,this.path=a,this.kind=o,this.constantViolations=[],this.constant=!0,this.referencePaths=[],this.referenced=!1,this.references=0,this.clearValue(),r&&(this.constantViolations=[].concat(r.path,r.constantViolations,this.constantViolations))}return e.prototype.deoptValue=function(){this.clearValue(),this.hasDeoptedValue=!0},e.prototype.setValue=function(e){this.hasDeoptedValue||(this.hasValue=!0,this.value=e)},e.prototype.clearValue=function(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null},e.prototype.reassign=function(e){this.constant=!1,-1===this.constantViolations.indexOf(e)&&this.constantViolations.push(e)},e.prototype.reference=function(e){-1===this.referencePaths.indexOf(e)&&(this.referenced=!0,this.references++,this.referencePaths.push(e))},e.prototype.dereference=function(){this.references--,this.referenced=!!this.references},e}();r.default=i,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":134}],162:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(v.isModuleDeclaration(e))if(e.source)s(e.source,t);else if(e.specifiers&&e.specifiers.length){var r=e.specifiers,n=Array.isArray(r),i=0;for(r=n?r:(0,c.default)(r);;){var a;if(n){if(i>=r.length)break;a=r[i++]}else{if((i=r.next()).done)break;a=i.value}s(a,t)}}else e.declaration&&s(e.declaration,t);else if(v.isModuleSpecifier(e))s(e.local,t);else if(v.isMemberExpression(e))s(e.object,t),s(e.property,t);else if(v.isIdentifier(e))t.push(e.name);else if(v.isLiteral(e))t.push(e.value);else if(v.isCallExpression(e))s(e.callee,t);else if(v.isObjectExpression(e)||v.isObjectPattern(e)){var o=e.properties,u=Array.isArray(o),l=0;for(o=u?o:(0,c.default)(o);;){var p;if(u){if(l>=o.length)break;p=o[l++]}else{if((l=o.next()).done)break;p=l.value}var h=p;s(h.key||h.argument,t)}}}r.__esModule=!0;var a=i(e("babel-runtime/core-js/object/keys")),o=i(e("babel-runtime/core-js/object/create")),u=i(e("babel-runtime/core-js/map")),l=i(e("babel-runtime/helpers/classCallCheck")),c=i(e("babel-runtime/core-js/get-iterator")),p=i(e("lodash/includes")),h=i(e("lodash/repeat")),f=i(e("./lib/renamer")),d=i(e("../index")),m=i(e("lodash/defaults")),y=n(e("babel-messages")),g=i(e("./binding")),b=i(e("globals")),v=n(e("babel-types")),x=e("../cache"),E=0,A={For:function(e){var t=v.FOR_INIT_KEYS,r=Array.isArray(t),n=0;for(t=r?t:(0,c.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i,a=e.get(s);a.isVar()&&e.scope.getFunctionParent().registerBinding("var",a)}},Declaration:function(e){e.isBlockScoped()||e.isExportDeclaration()&&e.get("declaration").isDeclaration()||e.scope.getFunctionParent().registerDeclaration(e)},ReferencedIdentifier:function(e,t){t.references.push(e)},ForXStatement:function(e,t){var r=e.get("left");(r.isPattern()||r.isIdentifier())&&t.constantViolations.push(r)},ExportDeclaration:{exit:function(e){var t=e.node,r=e.scope,n=t.declaration;if(v.isClassDeclaration(n)||v.isFunctionDeclaration(n)){var i=n.id;if(!i)return;var s=r.getBinding(i.name);s&&s.reference(e)}else if(v.isVariableDeclaration(n)){var a=n.declarations,o=Array.isArray(a),u=0;for(a=o?a:(0,c.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var p=l,h=v.getBindingIdentifiers(p);for(var f in h){var d=r.getBinding(f);d&&d.reference(e)}}}}},LabeledStatement:function(e){e.scope.getProgramParent().addGlobal(e.node),e.scope.getBlockParent().registerDeclaration(e)},AssignmentExpression:function(e,t){t.assignments.push(e)},UpdateExpression:function(e,t){t.constantViolations.push(e.get("argument"))},UnaryExpression:function(e,t){"delete"===e.node.operator&&t.constantViolations.push(e.get("argument"))},BlockScoped:function(e){var t=e.scope;t.path===e&&(t=t.parent),t.getBlockParent().registerDeclaration(e)},ClassDeclaration:function(e){var t=e.node.id;if(t){var r=t.name;e.scope.bindings[r]=e.scope.getBinding(r)}},Block:function(e){var t=e.get("body"),r=Array.isArray(t),n=0;for(t=r?t:(0,c.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;s.isFunctionDeclaration()&&e.scope.getBlockParent().registerDeclaration(s)}}},D=0,S=function(){function e(t,r){if((0,l.default)(this,e),r&&r.block===t.node)return r;var n=function(e,t,r){var n=x.scope.get(e.node)||[],i=n,s=Array.isArray(i),a=0;for(i=s?i:(0,c.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if((a=i.next()).done)break;o=a.value}var u=o;if(u.parent===t&&u.path===e)return u}n.push(r),x.scope.has(e.node)||x.scope.set(e.node,n)}(t,r,this);if(n)return n;this.uid=D++,this.parent=r,this.hub=t.hub,this.parentBlock=t.parent,this.block=t.node,this.path=t,this.labels=new u.default}return e.prototype.traverse=function(e,t,r){(0,d.default)(e,t,this,r,this.path)},e.prototype.generateDeclaredUidIdentifier=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp",t=this.generateUidIdentifier(e);return this.push({id:t}),t},e.prototype.generateUidIdentifier=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp";return v.identifier(this.generateUid(e))},e.prototype.generateUid=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp";e=v.toIdentifier(e).replace(/^_+/,"").replace(/[0-9]+$/g,"");var t=void 0,r=0;do{t=this._generateUid(e,r),r++}while(this.hasLabel(t)||this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));var n=this.getProgramParent();return n.references[t]=!0,n.uids[t]=!0,t},e.prototype._generateUid=function(e,t){var r=e;return t>1&&(r+=t),"_"+r},e.prototype.generateUidIdentifierBasedOnNode=function(e,t){var r=e;v.isAssignmentExpression(e)?r=e.left:v.isVariableDeclarator(e)?r=e.id:(v.isObjectProperty(r)||v.isObjectMethod(r))&&(r=r.key);var n=[];s(r,n);var i=n.join("$");return i=i.replace(/^_/,"")||t||"ref",this.generateUidIdentifier(i.slice(0,20))},e.prototype.isStatic=function(e){if(v.isThisExpression(e)||v.isSuper(e))return!0;if(v.isIdentifier(e)){var t=this.getBinding(e.name);return t?t.constant:this.hasBinding(e.name)}return!1},e.prototype.maybeGenerateMemoised=function(e,t){if(this.isStatic(e))return null;var r=this.generateUidIdentifierBasedOnNode(e);return t||this.push({id:r}),r},e.prototype.checkBlockScopedCollisions=function(e,t,r,n){if("param"!==t&&("hoisted"!==t||"let"!==e.kind)){if("let"===t||"let"===e.kind||"const"===e.kind||"module"===e.kind||"param"===e.kind&&("let"===t||"const"===t))throw this.hub.file.buildCodeFrameError(n,y.get("scopeDuplicateDeclaration",r),TypeError)}},e.prototype.rename=function(e,t,r){var n=this.getBinding(e);if(n)return t=t||this.generateUidIdentifier(e).name,new f.default(n,e,t).rename(r)},e.prototype._renameFromMap=function(e,t,r,n){e[t]&&(e[r]=n,e[t]=null)},e.prototype.dump=function(){var e=(0,h.default)("-",60);console.log(e);var t=this;do{console.log("#",t.block.type);for(var r in t.bindings){var n=t.bindings[r];console.log(" -",r,{constant:n.constant,references:n.references,violations:n.constantViolations.length,kind:n.kind})}}while(t=t.parent);console.log(e)},e.prototype.toArray=function(e,t){var r=this.hub.file;if(v.isIdentifier(e)){var n=this.getBinding(e.name);if(n&&n.constant&&n.path.isGenericType("Array"))return e}if(v.isArrayExpression(e))return e;if(v.isIdentifier(e,{name:"arguments"}))return v.callExpression(v.memberExpression(v.memberExpression(v.memberExpression(v.identifier("Array"),v.identifier("prototype")),v.identifier("slice")),v.identifier("call")),[e]);var i="toArray",s=[e];return!0===t?i="toConsumableArray":t&&(s.push(v.numericLiteral(t)),i="slicedToArray"),v.callExpression(r.addHelper(i),s)},e.prototype.hasLabel=function(e){return!!this.getLabel(e)},e.prototype.getLabel=function(e){return this.labels.get(e)},e.prototype.registerLabel=function(e){this.labels.set(e.node.label.name,e)},e.prototype.registerDeclaration=function(e){if(e.isLabeledStatement())this.registerLabel(e);else if(e.isFunctionDeclaration())this.registerBinding("hoisted",e.get("id"),e);else if(e.isVariableDeclaration()){var t=e.get("declarations"),r=Array.isArray(t),n=0;for(t=r?t:(0,c.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;this.registerBinding(e.node.kind,s)}}else if(e.isClassDeclaration())this.registerBinding("let",e);else if(e.isImportDeclaration()){var a=e.get("specifiers"),o=Array.isArray(a),u=0;for(a=o?a:(0,c.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var p=l;this.registerBinding("module",p)}}else if(e.isExportDeclaration()){var h=e.get("declaration");(h.isClassDeclaration()||h.isFunctionDeclaration()||h.isVariableDeclaration())&&this.registerDeclaration(h)}else this.registerBinding("unknown",e)},e.prototype.buildUndefinedNode=function(){return this.hasBinding("undefined")?v.unaryExpression("void",v.numericLiteral(0),!0):v.identifier("undefined")},e.prototype.registerConstantViolation=function(e){var t=e.getBindingIdentifiers();for(var r in t){var n=this.getBinding(r);n&&n.reassign(e)}},e.prototype.registerBinding=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;if(!e)throw new ReferenceError("no `kind`");if(t.isVariableDeclaration()){var n=t.get("declarations"),i=Array.isArray(n),s=0;for(n=i?n:(0,c.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a;this.registerBinding(e,o)}}else{var u=this.getProgramParent(),l=t.getBindingIdentifiers(!0);for(var p in l){var h=l[p],f=Array.isArray(h),d=0;for(h=f?h:(0,c.default)(h);;){var m;if(f){if(d>=h.length)break;m=h[d++]}else{if((d=h.next()).done)break;m=d.value}var y=m,b=this.getOwnBinding(p);if(b){if(b.identifier===y)continue;this.checkBlockScopedCollisions(b,e,p,y)}b&&b.path.isFlow()&&(b=null),u.references[p]=!0,this.bindings[p]=new g.default({identifier:y,existing:b,scope:this,path:r,kind:e})}}}},e.prototype.addGlobal=function(e){this.globals[e.name]=e},e.prototype.hasUid=function(e){var t=this;do{if(t.uids[e])return!0}while(t=t.parent);return!1},e.prototype.hasGlobal=function(e){var t=this;do{if(t.globals[e])return!0}while(t=t.parent);return!1},e.prototype.hasReference=function(e){var t=this;do{if(t.references[e])return!0}while(t=t.parent);return!1},e.prototype.isPure=function(e,t){if(v.isIdentifier(e)){var r=this.getBinding(e.name);return!!r&&(!t||r.constant)}if(v.isClass(e))return!(e.superClass&&!this.isPure(e.superClass,t))&&this.isPure(e.body,t);if(v.isClassBody(e)){var n=e.body,i=Array.isArray(n),s=0;for(n=i?n:(0,c.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a;if(!this.isPure(o,t))return!1}return!0}if(v.isBinary(e))return this.isPure(e.left,t)&&this.isPure(e.right,t);if(v.isArrayExpression(e)){var u=e.elements,l=Array.isArray(u),p=0;for(u=l?u:(0,c.default)(u);;){var h;if(l){if(p>=u.length)break;h=u[p++]}else{if((p=u.next()).done)break;h=p.value}var f=h;if(!this.isPure(f,t))return!1}return!0}if(v.isObjectExpression(e)){var d=e.properties,m=Array.isArray(d),y=0;for(d=m?d:(0,c.default)(d);;){var g;if(m){if(y>=d.length)break;g=d[y++]}else{if((y=d.next()).done)break;g=y.value}var b=g;if(!this.isPure(b,t))return!1}return!0}return v.isClassMethod(e)?!(e.computed&&!this.isPure(e.key,t))&&("get"!==e.kind&&"set"!==e.kind):v.isClassProperty(e)||v.isObjectProperty(e)?!(e.computed&&!this.isPure(e.key,t))&&this.isPure(e.value,t):v.isUnaryExpression(e)?this.isPure(e.argument,t):v.isPureish(e)},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e){var t=this;do{var r=t.data[e];if(null!=r)return r}while(t=t.parent)},e.prototype.removeData=function(e){var t=this;do{null!=t.data[e]&&(t.data[e]=null)}while(t=t.parent)},e.prototype.init=function(){this.references||this.crawl()},e.prototype.crawl=function(){E++,this._crawl(),E--},e.prototype._crawl=function(){var e=this.path;if(this.references=(0,o.default)(null),this.bindings=(0,o.default)(null),this.globals=(0,o.default)(null),this.uids=(0,o.default)(null),this.data=(0,o.default)(null),e.isLoop()){var t=v.FOR_INIT_KEYS,r=Array.isArray(t),n=0;for(t=r?t:(0,c.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i,a=e.get(s);a.isBlockScoped()&&this.registerBinding(a.node.kind,a)}}if(e.isFunctionExpression()&&e.has("id")&&(e.get("id").node[v.NOT_LOCAL_BINDING]||this.registerBinding("local",e.get("id"),e)),e.isClassExpression()&&e.has("id")&&(e.get("id").node[v.NOT_LOCAL_BINDING]||this.registerBinding("local",e)),e.isFunction()){var u=e.get("params"),l=Array.isArray(u),p=0;for(u=l?u:(0,c.default)(u);;){var h;if(l){if(p>=u.length)break;h=u[p++]}else{if((p=u.next()).done)break;h=p.value}var f=h;this.registerBinding("param",f)}}e.isCatchClause()&&this.registerBinding("let",e);if(!this.getProgramParent().crawling){var d={references:[],constantViolations:[],assignments:[]};this.crawling=!0,e.traverse(A,d),this.crawling=!1;var m=d.assignments,y=Array.isArray(m),g=0;for(m=y?m:(0,c.default)(m);;){var b;if(y){if(g>=m.length)break;b=m[g++]}else{if((g=m.next()).done)break;b=g.value}var x=b,E=x.getBindingIdentifiers(),D=void 0;for(var S in E)x.scope.getBinding(S)||(D=D||x.scope.getProgramParent()).addGlobal(E[S]);x.scope.registerConstantViolation(x)}var C=d.references,_=Array.isArray(C),w=0;for(C=_?C:(0,c.default)(C);;){var k;if(_){if(w>=C.length)break;k=C[w++]}else{if((w=C.next()).done)break;k=w.value}var F=k,T=F.scope.getBinding(F.node.name);T?T.reference(F):F.scope.getProgramParent().addGlobal(F.node)}var P=d.constantViolations,B=Array.isArray(P),O=0;for(P=B?P:(0,c.default)(P);;){var N;if(B){if(O>=P.length)break;N=P[O++]}else{if((O=P.next()).done)break;N=O.value}var j=N;j.scope.registerConstantViolation(j)}}},e.prototype.push=function(e){var t=this.path;t.isBlockStatement()||t.isProgram()||(t=this.getBlockParent().path),t.isSwitchStatement()&&(t=this.getFunctionParent().path),(t.isLoop()||t.isCatchClause()||t.isFunction())&&(v.ensureBlock(t.node),t=t.get("body"));var r=e.unique,n=e.kind||"var",i=null==e._blockHoist?2:e._blockHoist,s="declaration:"+n+":"+i,a=!r&&t.getData(s);if(!a){var o=v.variableDeclaration(n,[]);o._generated=!0,o._blockHoist=i;a=t.unshiftContainer("body",[o])[0],r||t.setData(s,a)}var u=v.variableDeclarator(e.id,e.init);a.node.declarations.push(u),this.registerBinding(n,a.get("declarations").pop())},e.prototype.getProgramParent=function(){var e=this;do{if(e.path.isProgram())return e}while(e=e.parent);throw new Error("We couldn't find a Function or Program...")},e.prototype.getFunctionParent=function(){var e=this;do{if(e.path.isFunctionParent())return e}while(e=e.parent);throw new Error("We couldn't find a Function or Program...")},e.prototype.getBlockParent=function(){var e=this;do{if(e.path.isBlockParent())return e}while(e=e.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")},e.prototype.getAllBindings=function(){var e=(0,o.default)(null),t=this;do{(0,m.default)(e,t.bindings),t=t.parent}while(t);return e},e.prototype.getAllBindingsOfKind=function(){var e=(0,o.default)(null),t=arguments,r=Array.isArray(t),n=0;for(t=r?t:(0,c.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i,a=this;do{for(var u in a.bindings){var l=a.bindings[u];l.kind===s&&(e[u]=l)}a=a.parent}while(a)}return e},e.prototype.bindingIdentifierEquals=function(e,t){return this.getBindingIdentifier(e)===t},e.prototype.warnOnFlowBinding=function(e){return 0===E&&e&&e.path.isFlow()&&console.warn("\n You or one of the Babel plugins you are using are using Flow declarations as bindings.\n Support for this will be removed in version 7. To find out the caller, grep for this\n message and change it to a `console.trace()`.\n "),e},e.prototype.getBinding=function(e){var t=this;do{var r=t.getOwnBinding(e);if(r)return this.warnOnFlowBinding(r)}while(t=t.parent)},e.prototype.getOwnBinding=function(e){return this.warnOnFlowBinding(this.bindings[e])},e.prototype.getBindingIdentifier=function(e){var t=this.getBinding(e);return t&&t.identifier},e.prototype.getOwnBindingIdentifier=function(e){var t=this.bindings[e];return t&&t.identifier},e.prototype.hasOwnBinding=function(e){return!!this.getOwnBinding(e)},e.prototype.hasBinding=function(t,r){return!!t&&(!!this.hasOwnBinding(t)||(!!this.parentHasBinding(t,r)||(!!this.hasUid(t)||(!(r||!(0,p.default)(e.globals,t))||!(r||!(0,p.default)(e.contextVariables,t))))))},e.prototype.parentHasBinding=function(e,t){return this.parent&&this.parent.hasBinding(e,t)},e.prototype.moveBindingTo=function(e,t){var r=this.getBinding(e);r&&(r.scope.removeOwnBinding(e),r.scope=t,t.bindings[e]=r)},e.prototype.removeOwnBinding=function(e){delete this.bindings[e]},e.prototype.removeBinding=function(e){var t=this.getBinding(e);t&&t.scope.removeOwnBinding(e);var r=this;do{r.uids[e]&&(r.uids[e]=!1)}while(r=r.parent)},e}();S.globals=(0,a.default)(b.default.builtin),S.contextVariables=["arguments","undefined","Infinity","NaN"],r.default=S,t.exports=r.default},{"../cache":140,"../index":143,"./binding":161,"./lib/renamer":163,"babel-messages":110,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/map":122,"babel-runtime/core-js/object/create":125,"babel-runtime/core-js/object/keys":127,"babel-runtime/helpers/classCallCheck":134,"babel-types":180,globals:168,"lodash/defaults":495,"lodash/includes":507,"lodash/repeat":530}],163:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=(n(e("../binding")),function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))),a={ReferencedIdentifier:function(e,t){var r=e.node;r.name===t.oldName&&(r.name=t.newName)},Scope:function(e,t){e.scope.bindingIdentifierEquals(t.oldName,t.binding.identifier)||e.skip()},"AssignmentExpression|Declaration":function(e,t){var r=e.getOuterBindingIdentifiers();for(var n in r)n===t.oldName&&(r[n].name=t.newName)}},o=function(){function e(t,r,n){(0,i.default)(this,e),this.newName=n,this.oldName=r,this.binding=t}return e.prototype.maybeConvertFromExportDeclaration=function(e){var t=e.parentPath.isExportDeclaration()&&e.parentPath;if(t){var r=t.isExportDefaultDeclaration();r&&(e.isFunctionDeclaration()||e.isClassDeclaration())&&!e.node.id&&(e.node.id=e.scope.generateUidIdentifier("default"));var n=e.getOuterBindingIdentifiers(),i=[];for(var a in n){var o=a===this.oldName?this.newName:a,u=r?"default":a;i.push(s.exportSpecifier(s.identifier(o),s.identifier(u)))}if(i.length){var l=s.exportNamedDeclaration(null,i);e.isFunctionDeclaration()&&(l._blockHoist=3),t.insertAfter(l),t.replaceWith(e.node)}}},e.prototype.rename=function(e){var t=this.binding,r=this.oldName,n=this.newName,i=t.scope,s=t.path.find(function(e){return e.isDeclaration()||e.isFunctionExpression()});s&&this.maybeConvertFromExportDeclaration(s),i.traverse(e||i.block,a,this),e||(i.removeOwnBinding(r),i.bindings[n]=t,this.binding.identifier.name=n),t.type},e}();r.default=o,t.exports=r.default},{"../binding":161,"babel-runtime/helpers/classCallCheck":134,"babel-types":180}],164:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){if(e._exploded)return e;e._exploded=!0;for(var t in e)if(!l(t)){var r=t.split("|");if(1!==r.length){var n=e[t];delete e[t];var i=r,s=Array.isArray(i),o=0;for(i=s?i:(0,f.default)(i);;){var p;if(s){if(o>=i.length)break;p=i[o++]}else{if((o=i.next()).done)break;p=o.value}e[p]=n}}}a(e),delete e.__esModule,function(e){for(var t in e)if(!l(t)){var r=e[t];"function"==typeof r&&(e[t]={enter:r})}}(e),u(e);var m=(0,h.default)(e),b=Array.isArray(m),v=0;for(m=b?m:(0,f.default)(m);;){var x;if(b){if(v>=m.length)break;x=m[v++]}else{if((v=m.next()).done)break;x=v.value}var E=x;if(!l(E)){var A=d[E];if(A){var D=e[E];for(var S in D)D[S]=function(e,t){var r=function(r){if(e.checkPath(r))return t.apply(this,arguments)};return r.toString=function(){return t.toString()},r}(A,D[S]);if(delete e[E],A.types){var C=A.types,_=Array.isArray(C),w=0;for(C=_?C:(0,f.default)(C);;){var k;if(_){if(w>=C.length)break;k=C[w++]}else{if((w=C.next()).done)break;k=w.value}var F=k;e[F]?c(e[F],D):e[F]=D}}else c(e,D)}}}for(var T in e)if(!l(T)){var P=e[T],B=y.FLIPPED_ALIAS_KEYS[T],O=y.DEPRECATED_KEYS[T];if(O&&(console.trace("Visitor defined for "+T+" but it has been renamed to "+O),B=[O]),B){delete e[T];var N=B,j=Array.isArray(N),I=0;for(N=j?N:(0,f.default)(N);;){var L;if(j){if(I>=N.length)break;L=N[I++]}else{if((I=N.next()).done)break;L=I.value}var M=L,R=e[M];R?c(R,P):e[M]=(0,g.default)(P)}}}for(var V in e)l(V)||u(e[V]);return e}function a(e){if(!e._verified){if("function"==typeof e)throw new Error(m.get("traverseVerifyRootFunction"));for(var t in e)if("enter"!==t&&"exit"!==t||o(t,e[t]),!l(t)){if(y.TYPES.indexOf(t)<0)throw new Error(m.get("traverseVerifyNodeType",t));var r=e[t];if("object"===(void 0===r?"undefined":(0,p.default)(r)))for(var n in r){if("enter"!==n&&"exit"!==n)throw new Error(m.get("traverseVerifyVisitorProperty",t,n));o(t+"."+n,r[n])}}e._verified=!0}}function o(e,t){var r=[].concat(t),n=Array.isArray(r),i=0;for(r=n?r:(0,f.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;if("function"!=typeof a)throw new TypeError("Non-function found defined in "+e+" with type "+(void 0===a?"undefined":(0,p.default)(a)))}}function u(e){e.enter&&!Array.isArray(e.enter)&&(e.enter=[e.enter]),e.exit&&!Array.isArray(e.exit)&&(e.exit=[e.exit])}function l(e){return"_"===e[0]||("enter"===e||"exit"===e||"shouldSkip"===e||("blacklist"===e||"noScope"===e||"skipKeys"===e))}function c(e,t){for(var r in t)e[r]=[].concat(e[r]||[],t[r])}r.__esModule=!0;var p=i(e("babel-runtime/helpers/typeof")),h=i(e("babel-runtime/core-js/object/keys")),f=i(e("babel-runtime/core-js/get-iterator"));r.explode=s,r.verify=a,r.merge=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2],n={},i=0;i<e.length;i++){var a=e[i],o=t[i];s(a);for(var u in a){var l=a[u];(o||r)&&(l=function(e,t,r){var n={},i=function(i){var s=e[i];if(!Array.isArray(s))return"continue";s=s.map(function(e){var n=e;return t&&(n=function(r){return e.call(t,r,t)}),r&&(n=r(t.key,i,n)),n}),n[i]=s};for(var s in e)i(s);return n}(l,o,r)),c(n[u]=n[u]||{},l)}}return n};var d=n(e("./path/lib/virtual-types")),m=n(e("babel-messages")),y=n(e("babel-types")),g=i(e("lodash/clone"))},{"./path/lib/virtual-types":157,"babel-messages":110,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/object/keys":127,"babel-runtime/helpers/typeof":138,"babel-types":180,"lodash/clone":491}],165:[function(e,t,r){(function(n){function i(){var e;try{e=r.storage.debug}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e}(r=t.exports=e("./debug")).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},r.formatArgs=function(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+r.humanize(this.diff),t){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,s=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(s=i))}),e.splice(s,0,n)}},r.save=function(e){try{null==e?r.storage.removeItem("debug"):r.storage.debug=e}catch(e){}},r.load=i,r.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},r.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},r.enable(i())}).call(this,e("_process"))},{"./debug":166,_process:550}],166:[function(e,t,r){arguments[4][60][0].apply(r,arguments)},{dup:60,ms:543}],167:[function(e,t,r){t.exports={builtin:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},es5:{Array:!1,Boolean:!1,constructor:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,propertyIsEnumerable:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1},es6:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},browser:{addEventListener:!1,alert:!1,AnalyserNode:!1,Animation:!1,AnimationEffectReadOnly:!1,AnimationEffectTiming:!1,AnimationEffectTimingReadOnly:!1,AnimationEvent:!1,AnimationPlaybackEvent:!1,AnimationTimeline:!1,applicationCache:!1,ApplicationCache:!1,ApplicationCacheErrorEvent:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBufferSourceNode:!1,AudioContext:!1,AudioDestinationNode:!1,AudioListener:!1,AudioNode:!1,AudioParam:!1,AudioProcessingEvent:!1,AutocompleteErrorEvent:!1,BarProp:!1,BatteryManager:!1,BeforeUnloadEvent:!1,BiquadFilterNode:!1,Blob:!1,blur:!1,btoa:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,cancelIdleCallback:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CDATASection:!1,ChannelMergerNode:!1,ChannelSplitterNode:!1,CharacterData:!1,clearInterval:!1,clearTimeout:!1,clientInformation:!1,ClientRect:!1,ClientRectList:!1,ClipboardEvent:!1,close:!1,closed:!1,CloseEvent:!1,Comment:!1,CompositionEvent:!1,confirm:!1,console:!1,ConvolverNode:!1,createImageBitmap:!1,Credential:!1,CredentialsContainer:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSS:!1,CSSAnimation:!1,CSSFontFaceRule:!1,CSSImportRule:!1,CSSKeyframeRule:!1,CSSKeyframesRule:!1,CSSMediaRule:!1,CSSPageRule:!1,CSSRule:!1,CSSRuleList:!1,CSSStyleDeclaration:!1,CSSStyleRule:!1,CSSStyleSheet:!1,CSSSupportsRule:!1,CSSTransition:!1,CSSUnknownRule:!1,CSSViewportRule:!1,customElements:!1,CustomEvent:!1,DataTransfer:!1,DataTransferItem:!1,DataTransferItemList:!1,Debug:!1,defaultStatus:!1,defaultstatus:!1,DelayNode:!1,DeviceMotionEvent:!1,DeviceOrientationEvent:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,DocumentTimeline:!1,DocumentType:!1,DOMError:!1,DOMException:!1,DOMImplementation:!1,DOMParser:!1,DOMSettableTokenList:!1,DOMStringList:!1,DOMStringMap:!1,DOMTokenList:!1,DragEvent:!1,DynamicsCompressorNode:!1,Element:!1,ElementTimeControl:!1,ErrorEvent:!1,event:!1,Event:!1,EventSource:!1,EventTarget:!1,external:!1,FederatedCredential:!1,fetch:!1,File:!1,FileError:!1,FileList:!1,FileReader:!1,find:!1,focus:!1,FocusEvent:!1,FontFace:!1,FormData:!1,frameElement:!1,frames:!1,GainNode:!1,Gamepad:!1,GamepadButton:!1,GamepadEvent:!1,getComputedStyle:!1,getSelection:!1,HashChangeEvent:!1,Headers:!1,history:!1,History:!1,HTMLAllCollection:!1,HTMLAnchorElement:!1,HTMLAppletElement:!1,HTMLAreaElement:!1,HTMLAudioElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLContentElement:!1,HTMLDataListElement:!1,HTMLDetailsElement:!1,HTMLDialogElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLDocument:!1,HTMLElement:!1,HTMLEmbedElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormControlsCollection:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLKeygenElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMarqueeElement:!1,HTMLMediaElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLMeterElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLOptionsCollection:!1,HTMLOutputElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPictureElement:!1,HTMLPreElement:!1,HTMLProgressElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLShadowElement:!1,HTMLSourceElement:!1,HTMLSpanElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLTrackElement:!1,HTMLUListElement:!1,HTMLUnknownElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBEnvironment:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,Image:!1,ImageBitmap:!1,ImageData:!1,indexedDB:!1,innerHeight:!1,innerWidth:!1,InputEvent:!1,InputMethodContext:!1,IntersectionObserver:!1,IntersectionObserverEntry:!1,Intl:!1,KeyboardEvent:!1,KeyframeEffect:!1,KeyframeEffectReadOnly:!1,length:!1,localStorage:!1,location:!1,Location:!1,locationbar:!1,matchMedia:!1,MediaElementAudioSourceNode:!1,MediaEncryptedEvent:!1,MediaError:!1,MediaKeyError:!1,MediaKeyEvent:!1,MediaKeyMessageEvent:!1,MediaKeys:!1,MediaKeySession:!1,MediaKeyStatusMap:!1,MediaKeySystemAccess:!1,MediaList:!1,MediaQueryList:!1,MediaQueryListEvent:!1,MediaSource:!1,MediaRecorder:!1,MediaStream:!1,MediaStreamAudioDestinationNode:!1,MediaStreamAudioSourceNode:!1,MediaStreamEvent:!1,MediaStreamTrack:!1,menubar:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MIDIAccess:!1,MIDIConnectionEvent:!1,MIDIInput:!1,MIDIInputMap:!1,MIDIMessageEvent:!1,MIDIOutput:!1,MIDIOutputMap:!1,MIDIPort:!1,MimeType:!1,MimeTypeArray:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationEvent:!1,MutationObserver:!1,MutationRecord:!1,name:!1,NamedNodeMap:!1,navigator:!1,Navigator:!1,Node:!1,NodeFilter:!1,NodeIterator:!1,NodeList:!1,Notification:!1,OfflineAudioCompletionEvent:!1,OfflineAudioContext:!1,offscreenBuffering:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,opera:!1,Option:!1,OscillatorNode:!1,outerHeight:!1,outerWidth:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,parent:!1,PasswordCredential:!1,Path2D:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,PeriodicWave:!1,Permissions:!1,PermissionStatus:!1,personalbar:!1,Plugin:!1,PluginArray:!1,PopStateEvent:!1,postMessage:!1,print:!1,ProcessingInstruction:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,prompt:!1,PushManager:!1,PushSubscription:!1,RadioNodeList:!1,Range:!1,ReadableByteStream:!1,ReadableStream:!1,removeEventListener:!1,Request:!1,requestAnimationFrame:!1,requestIdleCallback:!1,resizeBy:!1,resizeTo:!1,Response:!1,RTCIceCandidate:!1,RTCSessionDescription:!1,RTCPeerConnection:!1,screen:!1,Screen:!1,screenLeft:!1,ScreenOrientation:!1,screenTop:!1,screenX:!1,screenY:!1,ScriptProcessorNode:!1,scroll:!1,scrollbars:!1,scrollBy:!1,scrollTo:!1,scrollX:!1,scrollY:!1,SecurityPolicyViolationEvent:!1,Selection:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerRegistration:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,ShadowRoot:!1,SharedKeyframeList:!1,SharedWorker:!1,showModalDialog:!1,SiteBoundCredential:!1,speechSynthesis:!1,SpeechSynthesisEvent:!1,SpeechSynthesisUtterance:!1,status:!1,statusbar:!1,stop:!1,Storage:!1,StorageEvent:!1,styleMedia:!1,StyleSheet:!1,StyleSheetList:!1,SubtleCrypto:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCSSRule:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDiscardElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGEvent:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEDropShadowElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGeometryElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGGraphicsElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGLocatable:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformable:!1,SVGTransformList:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGURIReference:!1,SVGUseElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGVKernElement:!1,SVGZoomAndPan:!1,SVGZoomEvent:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TextEvent:!1,TextMetrics:!1,TextTrack:!1,TextTrackCue:!1,TextTrackCueList:!1,TextTrackList:!1,TimeEvent:!1,TimeRanges:!1,toolbar:!1,top:!1,Touch:!1,TouchEvent:!1,TouchList:!1,TrackEvent:!1,TransitionEvent:!1,TreeWalker:!1,UIEvent:!1,URL:!1,URLSearchParams:!1,ValidityState:!1,VTTCue:!1,WaveShaperNode:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLTexture:!1,WebGLUniformLocation:!1,WebSocket:!1,WheelEvent:!1,window:!1,Window:!1,Worker:!1,XDomainRequest:!1,XMLDocument:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestProgressEvent:!1,XMLHttpRequestUpload:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1,XSLTProcessor:!1},worker:{applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Cache:!1,caches:!1,clearInterval:!1,clearTimeout:!1,close:!0,console:!1,fetch:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!0,indexedDB:!1,location:!1,MessageChannel:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onlanguagechange:!0,onmessage:!0,onoffline:!0,ononline:!0,onrejectionhandled:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,Promise:!1,Request:!1,Response:!1,self:!0,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,TextDecoder:!1,TextEncoder:!1,URL:!1,URLSearchParams:!1,WebSocket:!1,Worker:!1,XMLHttpRequest:!1},node:{__dirname:!1,__filename:!1,arguments:!1,Buffer:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,console:!1,exports:!0,GLOBAL:!1,global:!1,Intl:!1,module:!1,process:!1,require:!1,root:!1,setImmediate:!1,setInterval:!1,setTimeout:!1},commonjs:{exports:!0,module:!1,require:!1,global:!1},amd:{define:!1,require:!1},mocha:{after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,run:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},jasmine:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,spyOnProperty:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},jest:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,check:!1,describe:!1,expect:!1,gen:!1,it:!1,fdescribe:!1,fit:!1,jest:!1,pit:!1,require:!1,test:!1,xdescribe:!1,xit:!1,xtest:!1},qunit:{asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notOk:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},phantomjs:{console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},couch:{emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},rhino:{defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},nashorn:{__DIR__:!1,__FILE__:!1,__LINE__:!1,com:!1,edu:!1,exit:!1,Java:!1,java:!1,javafx:!1,JavaImporter:!1,javax:!1,JSAdapter:!1,load:!1,loadWithNewGlobal:!1,org:!1,Packages:!1,print:!1,quit:!1},wsh:{ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WScript:!0,WSH:!0,XDomainRequest:!0},jquery:{$:!1,jQuery:!1},yui:{Y:!1,YUI:!1,YUI_config:!1},shelljs:{cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,ls:!1,ln:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,set:!1,target:!1,tempdir:!1,test:!1,touch:!1,which:!1},prototypejs:{$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},meteor:{$:!1,_:!1,Accounts:!1,AccountsClient:!1,AccountsServer:!1,AccountsCommon:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPServer:!1,DDPRateLimiter:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,ServiceConfiguration:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},mongo:{_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,ISODate:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,NumberInt:!1,NumberLong:!1,ObjectId:!1,PlanCache:!1,print:!1,printjson:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},applescript:{$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1},serviceworker:{caches:!1,Cache:!1,CacheStorage:!1,Client:!1,clients:!1,Clients:!1,ExtendableEvent:!1,ExtendableMessageEvent:!1,FetchEvent:!1,importScripts:!1,registration:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerGlobalScope:!1,ServiceWorkerMessageEvent:!1,ServiceWorkerRegistration:!1,skipWaiting:!1,WindowClient:!1},atomtest:{advanceClock:!1,fakeClearInterval:!1,fakeClearTimeout:!1,fakeSetInterval:!1,fakeSetTimeout:!1,resetTimeouts:!1,waitsForPromise:!1},embertest:{andThen:!1,click:!1,currentPath:!1,currentRouteName:!1,currentURL:!1,fillIn:!1,find:!1,findWithAssert:!1,keyEvent:!1,pauseTest:!1,resumeTest:!1,triggerEvent:!1,visit:!1},protractor:{$:!1,$$:!1,browser:!1,By:!1,by:!1,DartObject:!1,element:!1,protractor:!1},"shared-node-browser":{clearInterval:!1,clearTimeout:!1,console:!1,setInterval:!1,setTimeout:!1},webextensions:{browser:!1,chrome:!1,opr:!1},greasemonkey:{GM_addStyle:!1,GM_deleteValue:!1,GM_getResourceText:!1,GM_getResourceURL:!1,GM_getValue:!1,GM_info:!1,GM_listValues:!1,GM_log:!1,GM_openInTab:!1,GM_registerMenuCommand:!1,GM_setClipboard:!1,GM_setValue:!1,GM_xmlhttpRequest:!1,unsafeWindow:!1}}},{}],168:[function(e,t,r){t.exports=e("./globals.json")},{"./globals.json":167}],169:[function(e,t,r){"use strict";r.__esModule=!0,r.NOT_LOCAL_BINDING=r.BLOCK_SCOPED_SYMBOL=r.INHERIT_KEYS=r.UNARY_OPERATORS=r.STRING_UNARY_OPERATORS=r.NUMBER_UNARY_OPERATORS=r.BOOLEAN_UNARY_OPERATORS=r.BINARY_OPERATORS=r.NUMBER_BINARY_OPERATORS=r.BOOLEAN_BINARY_OPERATORS=r.COMPARISON_BINARY_OPERATORS=r.EQUALITY_BINARY_OPERATORS=r.BOOLEAN_NUMBER_BINARY_OPERATORS=r.UPDATE_OPERATORS=r.LOGICAL_OPERATORS=r.COMMENT_KEYS=r.FOR_INIT_KEYS=r.FLATTENABLE_KEYS=r.STATEMENT_OR_BLOCK_KEYS=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/symbol/for")),i=(r.STATEMENT_OR_BLOCK_KEYS=["consequent","body","alternate"],r.FLATTENABLE_KEYS=["body","expressions"],r.FOR_INIT_KEYS=["left","init"],r.COMMENT_KEYS=["leadingComments","trailingComments","innerComments"],r.LOGICAL_OPERATORS=["||","&&"],r.UPDATE_OPERATORS=["++","--"],r.BOOLEAN_NUMBER_BINARY_OPERATORS=[">","<",">=","<="]),s=r.EQUALITY_BINARY_OPERATORS=["==","===","!=","!=="],a=r.COMPARISON_BINARY_OPERATORS=[].concat(s,["in","instanceof"]),o=r.BOOLEAN_BINARY_OPERATORS=[].concat(a,i),u=r.NUMBER_BINARY_OPERATORS=["-","/","%","*","**","&","|",">>",">>>","<<","^"],l=(r.BINARY_OPERATORS=["+"].concat(u,o),r.BOOLEAN_UNARY_OPERATORS=["delete","!"]),c=r.NUMBER_UNARY_OPERATORS=["+","-","++","--","~"],p=r.STRING_UNARY_OPERATORS=["typeof"];r.UNARY_OPERATORS=["void"].concat(l,c,p),r.INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]},r.BLOCK_SCOPED_SYMBOL=(0,n.default)("var used to be block scoped"),r.NOT_LOCAL_BINDING=(0,n.default)("should not be considered a local binding")},{"babel-runtime/core-js/symbol/for":130}],170:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t,r){var n=[],s=!0,a=e,o=Array.isArray(a),u=0;for(a=o?a:(0,l.default)(a);;){var c;if(o){if(u>=a.length)break;c=a[u++]}else{if((u=a.next()).done)break;c=u.value}var p=c;if(s=!1,h.isExpression(p))n.push(p);else if(h.isExpressionStatement(p))n.push(p.expression);else if(h.isVariableDeclaration(p)){if("var"!==p.kind)return;var f=p.declarations,d=Array.isArray(f),m=0;for(f=d?f:(0,l.default)(f);;){var y;if(d){if(m>=f.length)break;y=f[m++]}else{if((m=f.next()).done)break;y=m.value}var g=y,b=h.getBindingIdentifiers(g);for(var v in b)r.push({kind:p.kind,id:b[v]});g.init&&n.push(h.assignmentExpression("=",g.id,g.init))}s=!0}else if(h.isIfStatement(p)){var x=p.consequent?i([p.consequent],t,r):t.buildUndefinedNode(),E=p.alternate?i([p.alternate],t,r):t.buildUndefinedNode();if(!x||!E)return;n.push(h.conditionalExpression(p.test,x,E))}else if(h.isBlockStatement(p)){var A=i(p.body,t,r);if(!A)return;n.push(A)}else{if(!h.isEmptyStatement(p))return;s=!0}}return s&&n.push(t.buildUndefinedNode()),1===n.length?n[0]:h.sequenceExpression(n)}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.key,r=void 0;return"method"===e.kind?s.increment()+"":(r=h.isIdentifier(t)?t.name:h.isStringLiteral(t)?(0,u.default)(t.value):(0,u.default)(h.removePropertiesDeep(h.cloneDeep(t))),e.computed&&(r="["+r+"]"),e.static&&(r="static:"+r),r)}function a(e){return e+="",e=e.replace(/[^a-zA-Z0-9$_]/g,"-"),e=e.replace(/^[-0-9]+/,""),e=e.replace(/[-\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""}),h.isValidIdentifier(e)||(e="_"+e),e||"_"}r.__esModule=!0;var o=n(e("babel-runtime/core-js/number/max-safe-integer")),u=n(e("babel-runtime/core-js/json/stringify")),l=n(e("babel-runtime/core-js/get-iterator"));r.toComputedKey=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.key||e.property;return e.computed||h.isIdentifier(t)&&(t=h.stringLiteral(t.name)),t},r.toSequenceExpression=function(e,t){if(e&&e.length){var r=[],n=i(e,t,r);if(n){var s=r,a=Array.isArray(s),o=0;for(s=a?s:(0,l.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var c=u;t.push(c)}return n}}},r.toKeyAlias=s,r.toIdentifier=a,r.toBindingIdentifierName=function(e){return"eval"!==(e=a(e))&&"arguments"!==e||(e="_"+e),e},r.toStatement=function(e,t){if(h.isStatement(e))return e;var r=!1,n=void 0;if(h.isClass(e))r=!0,n="ClassDeclaration";else if(h.isFunction(e))r=!0,n="FunctionDeclaration";else if(h.isAssignmentExpression(e))return h.expressionStatement(e);if(r&&!e.id&&(n=!1),!n){if(t)return!1;throw new Error("cannot turn "+e.type+" to a statement")}return e.type=n,e},r.toExpression=function(e){if(h.isExpressionStatement(e)&&(e=e.expression),h.isExpression(e))return e;if(h.isClass(e)?e.type="ClassExpression":h.isFunction(e)&&(e.type="FunctionExpression"),!h.isExpression(e))throw new Error("cannot turn "+e.type+" to an expression");return e},r.toBlock=function(e,t){return h.isBlockStatement(e)?e:(h.isEmptyStatement(e)&&(e=[]),Array.isArray(e)||(h.isStatement(e)||(e=h.isFunction(t)?h.returnStatement(e):h.expressionStatement(e)),e=[e]),h.blockStatement(e))},r.valueToNode=function(e){if(void 0===e)return h.identifier("undefined");if(!0===e||!1===e)return h.booleanLiteral(e);if(null===e)return h.nullLiteral();if("string"==typeof e)return h.stringLiteral(e);if("number"==typeof e)return h.numericLiteral(e);if((0,p.default)(e)){var t=e.source,r=e.toString().match(/\/([a-z]+|)$/)[1];return h.regExpLiteral(t,r)}if(Array.isArray(e))return h.arrayExpression(e.map(h.valueToNode));if((0,c.default)(e)){var n=[];for(var i in e){var s=void 0;s=h.isValidIdentifier(i)?h.identifier(i):h.stringLiteral(i),n.push(h.objectProperty(s,h.valueToNode(e[i])))}return h.objectExpression(n)}throw new Error("don't know how to turn this value into a node")};var c=n(e("lodash/isPlainObject")),p=n(e("lodash/isRegExp")),h=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./index"));s.uid=0,s.increment=function(){return s.uid>=o.default?s.uid=0:s.uid++}},{"./index":180,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/json/stringify":121,"babel-runtime/core-js/number/max-safe-integer":123,"lodash/isPlainObject":518,"lodash/isRegExp":519}],171:[function(e,t,r){"use strict";var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("../index")),i=e("../constants"),s=e("./index"),a=function(e){return e&&e.__esModule?e:{default:e}}(s);(0,a.default)("ArrayExpression",{fields:{elements:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeOrValueType)("null","Expression","SpreadElement"))),default:[]}},visitor:["elements"],aliases:["Expression"]}),(0,a.default)("AssignmentExpression",{fields:{operator:{validate:(0,s.assertValueType)("string")},left:{validate:(0,s.assertNodeType)("LVal")},right:{validate:(0,s.assertNodeType)("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]}),(0,a.default)("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:s.assertOneOf.apply(void 0,i.BINARY_OPERATORS)},left:{validate:(0,s.assertNodeType)("Expression")},right:{validate:(0,s.assertNodeType)("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]}),(0,a.default)("Directive",{visitor:["value"],fields:{value:{validate:(0,s.assertNodeType)("DirectiveLiteral")}}}),(0,a.default)("DirectiveLiteral",{builder:["value"],fields:{value:{validate:(0,s.assertValueType)("string")}}}),(0,a.default)("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Directive"))),default:[]},body:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","Statement"]}),(0,a.default)("BreakStatement",{visitor:["label"],fields:{label:{validate:(0,s.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),(0,a.default)("CallExpression",{visitor:["callee","arguments"],fields:{callee:{validate:(0,s.assertNodeType)("Expression")},arguments:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Expression","SpreadElement")))}},aliases:["Expression"]}),(0,a.default)("CatchClause",{visitor:["param","body"],fields:{param:{validate:(0,s.assertNodeType)("Identifier")},body:{validate:(0,s.assertNodeType)("BlockStatement")}},aliases:["Scopable"]}),(0,a.default)("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:(0,s.assertNodeType)("Expression")},consequent:{validate:(0,s.assertNodeType)("Expression")},alternate:{validate:(0,s.assertNodeType)("Expression")}},aliases:["Expression","Conditional"]}),(0,a.default)("ContinueStatement",{visitor:["label"],fields:{label:{validate:(0,s.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),(0,a.default)("DebuggerStatement",{aliases:["Statement"]}),(0,a.default)("DoWhileStatement",{visitor:["test","body"],fields:{test:{validate:(0,s.assertNodeType)("Expression")},body:{validate:(0,s.assertNodeType)("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]}),(0,a.default)("EmptyStatement",{aliases:["Statement"]}),(0,a.default)("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:(0,s.assertNodeType)("Expression")}},aliases:["Statement","ExpressionWrapper"]}),(0,a.default)("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:(0,s.assertNodeType)("Program")}}}),(0,a.default)("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,s.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,s.assertNodeType)("Expression")},body:{validate:(0,s.assertNodeType)("Statement")}}}),(0,a.default)("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:(0,s.assertNodeType)("VariableDeclaration","Expression"),optional:!0},test:{validate:(0,s.assertNodeType)("Expression"),optional:!0},update:{validate:(0,s.assertNodeType)("Expression"),optional:!0},body:{validate:(0,s.assertNodeType)("Statement")}}}),(0,a.default)("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","params","body","returnType","typeParameters"],fields:{id:{validate:(0,s.assertNodeType)("Identifier")},params:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("LVal")))},body:{validate:(0,s.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,s.assertValueType)("boolean")},async:{default:!1,validate:(0,s.assertValueType)("boolean")}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"]}),(0,a.default)("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{id:{validate:(0,s.assertNodeType)("Identifier"),optional:!0},params:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("LVal")))},body:{validate:(0,s.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,s.assertValueType)("boolean")},async:{default:!1,validate:(0,s.assertValueType)("boolean")}}}),(0,a.default)("Identifier",{builder:["name"],visitor:["typeAnnotation"],aliases:["Expression","LVal"],fields:{name:{validate:function(e,t,r){n.isValidIdentifier(r)}},decorators:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Decorator")))}}}),(0,a.default)("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,s.assertNodeType)("Expression")},consequent:{validate:(0,s.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,s.assertNodeType)("Statement")}}}),(0,a.default)("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,s.assertNodeType)("Identifier")},body:{validate:(0,s.assertNodeType)("Statement")}}}),(0,a.default)("StringLiteral",{builder:["value"],fields:{value:{validate:(0,s.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,a.default)("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,s.assertValueType)("number")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,a.default)("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),(0,a.default)("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,s.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,a.default)("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Literal"],fields:{pattern:{validate:(0,s.assertValueType)("string")},flags:{validate:(0,s.assertValueType)("string"),default:""}}}),(0,a.default)("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:s.assertOneOf.apply(void 0,i.LOGICAL_OPERATORS)},left:{validate:(0,s.assertNodeType)("Expression")},right:{validate:(0,s.assertNodeType)("Expression")}}}),(0,a.default)("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal"],fields:{object:{validate:(0,s.assertNodeType)("Expression")},property:{validate:function(e,t,r){var n=e.computed?"Expression":"Identifier";(0,s.assertNodeType)(n)(e,t,r)}},computed:{default:!1}}}),(0,a.default)("NewExpression",{visitor:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:(0,s.assertNodeType)("Expression")},arguments:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Expression","SpreadElement")))}}}),(0,a.default)("Program",{visitor:["directives","body"],builder:["body","directives"],fields:{directives:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Directive"))),default:[]},body:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","FunctionParent"]}),(0,a.default)("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("ObjectMethod","ObjectProperty","SpreadProperty")))}}}),(0,a.default)("ObjectMethod",{builder:["kind","key","params","body","computed"],fields:{kind:{validate:(0,s.chain)((0,s.assertValueType)("string"),(0,s.assertOneOf)("method","get","set")),default:"method"},computed:{validate:(0,s.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var n=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];s.assertNodeType.apply(void 0,n)(e,t,r)}},decorators:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Decorator")))},body:{validate:(0,s.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,s.assertValueType)("boolean")},async:{default:!1,validate:(0,s.assertValueType)("boolean")}},visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]}),(0,a.default)("ObjectProperty",{builder:["key","value","computed","shorthand","decorators"],fields:{computed:{validate:(0,s.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var n=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];s.assertNodeType.apply(void 0,n)(e,t,r)}},value:{validate:(0,s.assertNodeType)("Expression","Pattern","RestElement")},shorthand:{validate:(0,s.assertValueType)("boolean"),default:!1},decorators:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Decorator"))),optional:!0}},visitor:["key","value","decorators"],aliases:["UserWhitespacable","Property","ObjectMember"]}),(0,a.default)("RestElement",{visitor:["argument","typeAnnotation"],aliases:["LVal"],fields:{argument:{validate:(0,s.assertNodeType)("LVal")},decorators:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Decorator")))}}}),(0,a.default)("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,s.assertNodeType)("Expression"),optional:!0}}}),(0,a.default)("SequenceExpression",{visitor:["expressions"],fields:{expressions:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Expression")))}},aliases:["Expression"]}),(0,a.default)("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:(0,s.assertNodeType)("Expression"),optional:!0},consequent:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Statement")))}}}),(0,a.default)("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:(0,s.assertNodeType)("Expression")},cases:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("SwitchCase")))}}}),(0,a.default)("ThisExpression",{aliases:["Expression"]}),(0,a.default)("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,s.assertNodeType)("Expression")}}}),(0,a.default)("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{body:{validate:(0,s.assertNodeType)("BlockStatement")},handler:{optional:!0,handler:(0,s.assertNodeType)("BlockStatement")},finalizer:{optional:!0,validate:(0,s.assertNodeType)("BlockStatement")}}}),(0,a.default)("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:(0,s.assertNodeType)("Expression")},operator:{validate:s.assertOneOf.apply(void 0,i.UNARY_OPERATORS)}},visitor:["argument"],aliases:["UnaryLike","Expression"]}),(0,a.default)("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:(0,s.assertNodeType)("Expression")},operator:{validate:s.assertOneOf.apply(void 0,i.UPDATE_OPERATORS)}},visitor:["argument"],aliases:["Expression"]}),(0,a.default)("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{kind:{validate:(0,s.chain)((0,s.assertValueType)("string"),(0,s.assertOneOf)("var","let","const"))},declarations:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("VariableDeclarator")))}}}),(0,a.default)("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:(0,s.assertNodeType)("LVal")},init:{optional:!0,validate:(0,s.assertNodeType)("Expression")}}}),(0,a.default)("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:(0,s.assertNodeType)("Expression")},body:{validate:(0,s.assertNodeType)("BlockStatement","Statement")}}}),(0,a.default)("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{object:(0,s.assertNodeType)("Expression")},body:{validate:(0,s.assertNodeType)("BlockStatement","Statement")}}})},{"../constants":169,"../index":180,"./index":175}],172:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AssignmentPattern",{visitor:["left","right"],aliases:["Pattern","LVal"],fields:{left:{validate:(0,n.assertNodeType)("Identifier")},right:{validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ArrayPattern",{visitor:["elements","typeAnnotation"],aliases:["Pattern","LVal"],fields:{elements:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Identifier","Pattern","RestElement")))},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["params","body","returnType","typeParameters"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{params:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("LVal")))},body:{validate:(0,n.assertNodeType)("BlockStatement","Expression")},async:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("ClassBody",{visitor:["body"],fields:{body:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ClassMethod","ClassProperty")))}}}),(0,i.default)("ClassDeclaration",{builder:["id","superClass","body","decorators"],visitor:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],aliases:["Scopable","Class","Statement","Declaration","Pureish"],fields:{id:{validate:(0,n.assertNodeType)("Identifier")},body:{validate:(0,n.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ClassExpression",{inherits:"ClassDeclaration",aliases:["Scopable","Class","Expression","Pureish"],fields:{id:{optional:!0,validate:(0,n.assertNodeType)("Identifier")},body:{validate:(0,n.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ExportAllDeclaration",{visitor:["source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{source:{validate:(0,n.assertNodeType)("StringLiteral")}}}),(0,i.default)("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,n.assertNodeType)("FunctionDeclaration","ClassDeclaration","Expression")}}}),(0,i.default)("ExportNamedDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,n.assertNodeType)("Declaration"),optional:!0},specifiers:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ExportSpecifier")))},source:{validate:(0,n.assertNodeType)("StringLiteral"),optional:!0}}}),(0,i.default)("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")},exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ForOfStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,n.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,n.assertNodeType)("Expression")},body:{validate:(0,n.assertNodeType)("Statement")}}}),(0,i.default)("ImportDeclaration",{visitor:["specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration"],fields:{specifiers:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier")))},source:{validate:(0,n.assertNodeType)("StringLiteral")}}}),(0,i.default)("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ImportSpecifier",{visitor:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")},imported:{validate:(0,n.assertNodeType)("Identifier")},importKind:{validate:(0,n.assertOneOf)(null,"type","typeof")}}}),(0,i.default)("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:(0,n.assertValueType)("string")},property:{validate:(0,n.assertValueType)("string")}}}),(0,i.default)("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static"],visitor:["key","params","body","decorators","returnType","typeParameters"],fields:{kind:{validate:(0,n.chain)((0,n.assertValueType)("string"),(0,n.assertOneOf)("get","set","method","constructor")),default:"method"},computed:{default:!1,validate:(0,n.assertValueType)("boolean")},static:{default:!1,validate:(0,n.assertValueType)("boolean")},key:{validate:function(e,t,r){var i=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];n.assertNodeType.apply(void 0,i)(e,t,r)}},params:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("LVal")))},body:{validate:(0,n.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,n.assertValueType)("boolean")},async:{default:!1,validate:(0,n.assertValueType)("boolean")}}}),(0,i.default)("ObjectPattern",{visitor:["properties","typeAnnotation"],aliases:["Pattern","LVal"],fields:{properties:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("RestProperty","Property")))},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("Super",{aliases:["Expression"]}),(0,i.default)("TaggedTemplateExpression",{visitor:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:(0,n.assertNodeType)("Expression")},quasi:{validate:(0,n.assertNodeType)("TemplateLiteral")}}}),(0,i.default)("TemplateElement",{builder:["value","tail"],fields:{value:{},tail:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("TemplateElement")))},expressions:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Expression")))}}}),(0,i.default)("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:(0,n.assertValueType)("boolean"),default:!1},argument:{optional:!0,validate:(0,n.assertNodeType)("Expression")}}})},{"./index":175}],173:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("ForAwaitStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,n.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,n.assertNodeType)("Expression")},body:{validate:(0,n.assertNodeType)("Statement")}}}),(0,i.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:{}}),(0,i.default)("Import",{aliases:["Expression"]}),(0,i.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("DoExpression",{visitor:["body"],aliases:["Expression"],fields:{body:{validate:(0,n.assertNodeType)("BlockStatement")}}}),(0,i.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("RestProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("LVal")}}}),(0,i.default)("SpreadProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}})},{"./index":175}],174:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AnyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["Flow"],fields:{}}),(0,i.default)("BooleanTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("BooleanLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("NullLiteralTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ClassImplements",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed"],aliases:["Property"],fields:{computed:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("DeclareClass",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareFunction",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareInterface",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareModule",{visitor:["id","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareVariable",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareExportDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("ExistentialTypeParam",{aliases:["Flow"]}),(0,i.default)("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["Flow"],fields:{}}),(0,i.default)("FunctionTypeParam",{visitor:["name","typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("InterfaceExtends",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("InterfaceDeclaration",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("IntersectionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("MixedTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),(0,i.default)("EmptyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),(0,i.default)("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("NumericLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("NumberTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("StringLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("StringTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ThisTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("TupleTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeofTypeAnnotation",{visitor:["argument"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("OpaqueType",{visitor:["id","typeParameters","impltype","supertype"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("TypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["Flow","ExpressionWrapper","Expression"],fields:{}}),(0,i.default)("TypeParameter",{visitor:["bound"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeParameterDeclaration",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeParameterInstantiation",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,i.default)("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties"],aliases:["Flow"],fields:{}}),(0,i.default)("ObjectTypeCallProperty",{visitor:["value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("ObjectTypeIndexer",{visitor:["id","key","value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("ObjectTypeProperty",{visitor:["key","value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("QualifiedTypeIdentifier",{visitor:["id","qualification"],aliases:["Flow"],fields:{}}),(0,i.default)("UnionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("VoidTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}})},{"./index":175}],175:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return Array.isArray(e)?"array":null===e?"null":void 0===e?"undefined":void 0===e?"undefined":(0,u.default)(e)}function s(e){function t(t,r,n){if(!(i(n)===e))throw new TypeError("Property "+r+" expected type of "+e+" but got "+i(n))}return t.type=e,t}r.__esModule=!0,r.DEPRECATED_KEYS=r.BUILDER_KEYS=r.NODE_FIELDS=r.ALIAS_KEYS=r.VISITOR_KEYS=void 0;var a=n(e("babel-runtime/core-js/get-iterator")),o=n(e("babel-runtime/core-js/json/stringify")),u=n(e("babel-runtime/helpers/typeof"));r.assertEach=function(e){function t(t,r,n){if(Array.isArray(n))for(var i=0;i<n.length;i++)e(t,r+"["+i+"]",n[i])}return t.each=e,t},r.assertOneOf=function(){function e(e,t,n){if(r.indexOf(n)<0)throw new TypeError("Property "+t+" expected value to be one of "+(0,o.default)(r)+" but got "+(0,o.default)(n))}for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.oneOf=r,e},r.assertNodeType=function(){function e(e,t,n){var i=!1,s=r,u=Array.isArray(s),c=0;for(s=u?s:(0,a.default)(s);;){var p;if(u){if(c>=s.length)break;p=s[c++]}else{if((c=s.next()).done)break;p=c.value}var h=p;if(l.is(h,n)){i=!0;break}}if(!i)throw new TypeError("Property "+t+" of "+e.type+" expected node to be of a type "+(0,o.default)(r)+" but instead got "+(0,o.default)(n&&n.type))}for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.oneOfNodeTypes=r,e},r.assertNodeOrValueType=function(){function e(e,t,n){var s=!1,u=r,c=Array.isArray(u),p=0;for(u=c?u:(0,a.default)(u);;){var h;if(c){if(p>=u.length)break;h=u[p++]}else{if((p=u.next()).done)break;h=p.value}var f=h;if(i(n)===f||l.is(f,n)){s=!0;break}}if(!s)throw new TypeError("Property "+t+" of "+e.type+" expected node to be of a type "+(0,o.default)(r)+" but instead got "+(0,o.default)(n&&n.type))}for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.oneOfNodeOrValueTypes=r,e},r.assertValueType=s,r.chain=function(){function e(){var e=r,t=Array.isArray(e),n=0;for(e=t?e:(0,a.default)(e);;){var i;if(t){if(n>=e.length)break;i=e[n++]}else{if((n=e.next()).done)break;i=n.value}i.apply(void 0,arguments)}}for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.chainOf=r,e},r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.inherits&&m[t.inherits]||{};t.fields=t.fields||r.fields||{},t.visitor=t.visitor||r.visitor||[],t.aliases=t.aliases||r.aliases||[],t.builder=t.builder||r.builder||t.visitor||[],t.deprecatedAlias&&(d[t.deprecatedAlias]=e);var n=t.visitor.concat(t.builder),o=Array.isArray(n),u=0;for(n=o?n:(0,a.default)(n);;){var l;if(o){if(u>=n.length)break;l=n[u++]}else{if((u=n.next()).done)break;l=u.value}var y=l;t.fields[y]=t.fields[y]||{}}for(var g in t.fields){var b=t.fields[g];-1===t.builder.indexOf(g)&&(b.optional=!0),void 0===b.default?b.default=null:b.validate||(b.validate=s(i(b.default)))}c[e]=t.visitor,f[e]=t.builder,h[e]=t.fields,p[e]=t.aliases,m[e]=t};var l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("../index")),c=r.VISITOR_KEYS={},p=r.ALIAS_KEYS={},h=r.NODE_FIELDS={},f=r.BUILDER_KEYS={},d=r.DEPRECATED_KEYS={},m={}},{"../index":180,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/json/stringify":121,"babel-runtime/helpers/typeof":138}],176:[function(e,t,r){"use strict";e("./index"),e("./core"),e("./es2015"),e("./flow"),e("./jsx"),e("./misc"),e("./experimental")},{"./core":171,"./es2015":172,"./experimental":173,"./flow":174,"./index":175,"./jsx":177,"./misc":178}],177:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("JSXAttribute",{visitor:["name","value"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:(0,n.assertNodeType)("JSXElement","StringLiteral","JSXExpressionContainer")}}}),(0,i.default)("JSXClosingElement",{visitor:["name"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXMemberExpression")}}}),(0,i.default)("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["JSX","Immutable","Expression"],fields:{openingElement:{validate:(0,n.assertNodeType)("JSXOpeningElement")},closingElement:{optional:!0,validate:(0,n.assertNodeType)("JSXClosingElement")},children:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement")))}}}),(0,i.default)("JSXEmptyExpression",{aliases:["JSX","Expression"]}),(0,i.default)("JSXExpressionContainer",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXSpreadChild",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXIdentifier",{builder:["name"],aliases:["JSX","Expression"],fields:{name:{validate:(0,n.assertValueType)("string")}}}),(0,i.default)("JSXMemberExpression",{visitor:["object","property"],aliases:["JSX","Expression"],fields:{object:{validate:(0,n.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,n.assertNodeType)("JSXIdentifier")}}}),(0,i.default)("JSXNamespacedName",{visitor:["namespace","name"],aliases:["JSX"],fields:{namespace:{validate:(0,n.assertNodeType)("JSXIdentifier")},name:{validate:(0,n.assertNodeType)("JSXIdentifier")}}}),(0,i.default)("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXMemberExpression")},selfClosing:{default:!1,validate:(0,n.assertValueType)("boolean")},attributes:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("JSXAttribute","JSXSpreadAttribute")))}}}),(0,i.default)("JSXSpreadAttribute",{visitor:["argument"],aliases:["JSX"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXText",{aliases:["JSX","Immutable"],builder:["value"],fields:{value:{validate:(0,n.assertValueType)("string")}}})},{"./index":175}],178:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("Noop",{visitor:[]}),(0,i.default)("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}})},{"./index":175}],179:[function(e,t,r){"use strict";function n(e){for(var t={},r={},s=[],a=[],o=0;o<e.length;o++){var u=e[o];if(u&&!(a.indexOf(u)>=0)){if(i.isAnyTypeAnnotation(u))return[u];if(i.isFlowBaseAnnotation(u))r[u.type]=u;else if(i.isUnionTypeAnnotation(u))s.indexOf(u.types)<0&&(e=e.concat(u.types),s.push(u.types));else if(i.isGenericTypeAnnotation(u)){var l=u.id.name;if(t[l]){var c=t[l];c.typeParameters?u.typeParameters&&(c.typeParameters.params=n(c.typeParameters.params.concat(u.typeParameters.params))):c=u.typeParameters}else t[l]=u}else a.push(u)}}for(var p in r)a.push(r[p]);for(var h in t)a.push(t[h]);return a}r.__esModule=!0,r.createUnionTypeAnnotation=function(e){var t=n(e);return 1===t.length?t[0]:i.unionTypeAnnotation(t)},r.removeTypeDuplicates=n,r.createTypeAnnotationBasedOnTypeof=function(e){if("string"===e)return i.stringTypeAnnotation();if("number"===e)return i.numberTypeAnnotation();if("undefined"===e)return i.voidTypeAnnotation();if("boolean"===e)return i.booleanTypeAnnotation();if("function"===e)return i.genericTypeAnnotation(i.identifier("Function"));if("object"===e)return i.genericTypeAnnotation(i.identifier("Object"));if("symbol"===e)return i.genericTypeAnnotation(i.identifier("Symbol"));throw new Error("Invalid typeof value")};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./index"))},{"./index":180}],180:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=F["is"+e];t||(t=F["is"+e]=function(t,r){return F.is(e,t,r)}),F["assert"+e]=function(r,n){if(n=n||{},!t(r,n))throw new Error("Expected type "+(0,b.default)(e)+" with option "+(0,b.default)(n))}}function s(e,t){if(e===t)return!0;if(F.ALIAS_KEYS[t])return!1;var r=F.FLIPPED_ALIAS_KEYS[t];if(r){if(r[0]===e)return!0;var n=r,i=Array.isArray(n),s=0;for(n=i?n:(0,y.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}if(e===a)return!0}}return!1}function a(e,t,r){if(e){var n=F.NODE_FIELDS[e.type];if(n){var i=n[t];i&&i.validate&&(i.optional&&null==r||i.validate(e,t,r))}}}function o(e){if(!e)return e;var t={};for(var r in e)"_"!==r[0]&&(t[r]=e[r]);return t}function u(e,t){p("trailingComments",e,t)}function l(e,t){p("leadingComments",e,t)}function c(e,t){p("innerComments",e,t)}function p(e,t,r){t&&r&&(t[e]=(0,_.default)([].concat(t[e],r[e]).filter(Boolean)))}function h(e){return!(!e||!w.VISITOR_KEYS[e.type])}function f(e,t,r){if(e){var n=F.VISITOR_KEYS[e.type];if(n){t(e,r=r||{});var i=n,s=Array.isArray(i),a=0;for(i=s?i:(0,y.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if((a=i.next()).done)break;o=a.value}var u=e[o];if(Array.isArray(u)){var l=u,c=Array.isArray(l),p=0;for(l=c?l:(0,y.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if((p=l.next()).done)break;h=p.value}f(h,t,r)}}else f(u,t,r)}}}}function d(e,t){var r=(t=t||{}).preserveComments?O:N,n=Array.isArray(r),i=0;for(r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;null!=e[a]&&(e[a]=void 0)}for(var o in e)"_"===o[0]&&null!=e[o]&&(e[o]=void 0);var u=(0,m.default)(e),l=Array.isArray(u),c=0;for(u=l?u:(0,y.default)(u);;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if((c=u.next()).done)break;p=c.value}e[p]=null}}r.__esModule=!0,r.createTypeAnnotationBasedOnTypeof=r.removeTypeDuplicates=r.createUnionTypeAnnotation=r.valueToNode=r.toBlock=r.toExpression=r.toStatement=r.toBindingIdentifierName=r.toIdentifier=r.toKeyAlias=r.toSequenceExpression=r.toComputedKey=r.isNodesEquivalent=r.isImmutable=r.isScope=r.isSpecifierDefault=r.isVar=r.isBlockScoped=r.isLet=r.isValidIdentifier=r.isReferenced=r.isBinding=r.getOuterBindingIdentifiers=r.getBindingIdentifiers=r.TYPES=r.react=r.DEPRECATED_KEYS=r.BUILDER_KEYS=r.NODE_FIELDS=r.ALIAS_KEYS=r.VISITOR_KEYS=r.NOT_LOCAL_BINDING=r.BLOCK_SCOPED_SYMBOL=r.INHERIT_KEYS=r.UNARY_OPERATORS=r.STRING_UNARY_OPERATORS=r.NUMBER_UNARY_OPERATORS=r.BOOLEAN_UNARY_OPERATORS=r.BINARY_OPERATORS=r.NUMBER_BINARY_OPERATORS=r.BOOLEAN_BINARY_OPERATORS=r.COMPARISON_BINARY_OPERATORS=r.EQUALITY_BINARY_OPERATORS=r.BOOLEAN_NUMBER_BINARY_OPERATORS=r.UPDATE_OPERATORS=r.LOGICAL_OPERATORS=r.COMMENT_KEYS=r.FOR_INIT_KEYS=r.FLATTENABLE_KEYS=r.STATEMENT_OR_BLOCK_KEYS=void 0;var m=n(e("babel-runtime/core-js/object/get-own-property-symbols")),y=n(e("babel-runtime/core-js/get-iterator")),g=n(e("babel-runtime/core-js/object/keys")),b=n(e("babel-runtime/core-js/json/stringify")),v=e("./constants");Object.defineProperty(r,"STATEMENT_OR_BLOCK_KEYS",{enumerable:!0,get:function(){return v.STATEMENT_OR_BLOCK_KEYS}}),Object.defineProperty(r,"FLATTENABLE_KEYS",{enumerable:!0,get:function(){return v.FLATTENABLE_KEYS}}),Object.defineProperty(r,"FOR_INIT_KEYS",{enumerable:!0,get:function(){return v.FOR_INIT_KEYS}}),Object.defineProperty(r,"COMMENT_KEYS",{enumerable:!0,get:function(){return v.COMMENT_KEYS}}),Object.defineProperty(r,"LOGICAL_OPERATORS",{enumerable:!0,get:function(){return v.LOGICAL_OPERATORS}}),Object.defineProperty(r,"UPDATE_OPERATORS",{enumerable:!0,get:function(){return v.UPDATE_OPERATORS}}),Object.defineProperty(r,"BOOLEAN_NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return v.BOOLEAN_NUMBER_BINARY_OPERATORS}}),Object.defineProperty(r,"EQUALITY_BINARY_OPERATORS",{enumerable:!0,get:function(){return v.EQUALITY_BINARY_OPERATORS}}),Object.defineProperty(r,"COMPARISON_BINARY_OPERATORS",{enumerable:!0,get:function(){return v.COMPARISON_BINARY_OPERATORS}}),Object.defineProperty(r,"BOOLEAN_BINARY_OPERATORS",{enumerable:!0,get:function(){return v.BOOLEAN_BINARY_OPERATORS}}),Object.defineProperty(r,"NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return v.NUMBER_BINARY_OPERATORS}}),Object.defineProperty(r,"BINARY_OPERATORS",{enumerable:!0,get:function(){return v.BINARY_OPERATORS}}),Object.defineProperty(r,"BOOLEAN_UNARY_OPERATORS",{enumerable:!0,get:function(){return v.BOOLEAN_UNARY_OPERATORS}}),Object.defineProperty(r,"NUMBER_UNARY_OPERATORS",{enumerable:!0,get:function(){return v.NUMBER_UNARY_OPERATORS}}),Object.defineProperty(r,"STRING_UNARY_OPERATORS",{enumerable:!0,get:function(){return v.STRING_UNARY_OPERATORS}}),Object.defineProperty(r,"UNARY_OPERATORS",{enumerable:!0,get:function(){return v.UNARY_OPERATORS}}),Object.defineProperty(r,"INHERIT_KEYS",{enumerable:!0,get:function(){return v.INHERIT_KEYS}}),Object.defineProperty(r,"BLOCK_SCOPED_SYMBOL",{enumerable:!0,get:function(){return v.BLOCK_SCOPED_SYMBOL}}),Object.defineProperty(r,"NOT_LOCAL_BINDING",{enumerable:!0,get:function(){return v.NOT_LOCAL_BINDING}}),r.is=function(e,t,r){return!!t&&!!s(t.type,e)&&(void 0===r||F.shallowEqual(t,r))},r.isType=s,r.validate=a,r.shallowEqual=function(e,t){var r=(0,g.default)(t),n=Array.isArray(r),i=0;for(r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;if(e[a]!==t[a])return!1}return!0},r.appendToMemberExpression=function(e,t,r){return e.object=F.memberExpression(e.object,e.property,e.computed),e.property=t,e.computed=!!r,e},r.prependToMemberExpression=function(e,t){return e.object=F.memberExpression(t,e.object),e},r.ensureBlock=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"body";return e[t]=F.toBlock(e[t],e)},r.clone=o,r.cloneWithoutLoc=function(e){var t=o(e);return delete t.loc,t},r.cloneDeep=function(e){if(!e)return e;var t={};for(var r in e)if("_"!==r[0]){var n=e[r];n&&(n.type?n=F.cloneDeep(n):Array.isArray(n)&&(n=n.map(F.cloneDeep))),t[r]=n}return t},r.buildMatchMemberExpression=function(e,t){var r=e.split(".");return function(e){if(!F.isMemberExpression(e))return!1;for(var n=[e],i=0;n.length;){var s=n.shift();if(t&&i===r.length)return!0;if(F.isIdentifier(s)){if(r[i]!==s.name)return!1}else{if(!F.isStringLiteral(s)){if(F.isMemberExpression(s)){if(s.computed&&!F.isStringLiteral(s.property))return!1;n.push(s.object),n.push(s.property);continue}return!1}if(r[i]!==s.value)return!1}if(++i>r.length)return!1}return!0}},r.removeComments=function(e){var t=F.COMMENT_KEYS,r=Array.isArray(t),n=0;for(t=r?t:(0,y.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}delete e[i]}return e},r.inheritsComments=function(e,t){return u(e,t),l(e,t),c(e,t),e},r.inheritTrailingComments=u,r.inheritLeadingComments=l,r.inheritInnerComments=c,r.inherits=function(e,t){if(!e||!t)return e;var r=F.INHERIT_KEYS.optional,n=Array.isArray(r),i=0;for(r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;null==e[a]&&(e[a]=t[a])}for(var o in t)"_"===o[0]&&(e[o]=t[o]);var u=F.INHERIT_KEYS.force,l=Array.isArray(u),c=0;for(u=l?u:(0,y.default)(u);;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if((c=u.next()).done)break;p=c.value}var h=p;e[h]=t[h]}return F.inheritsComments(e,t),e},r.assertNode=function(e){if(!h(e))throw new TypeError("Not a valid node "+(e&&e.type))},r.isNode=h,r.traverseFast=f,r.removeProperties=d,r.removePropertiesDeep=function(e,t){return f(e,d,t),e};var x=e("./retrievers");Object.defineProperty(r,"getBindingIdentifiers",{enumerable:!0,get:function(){return x.getBindingIdentifiers}}),Object.defineProperty(r,"getOuterBindingIdentifiers",{enumerable:!0,get:function(){return x.getOuterBindingIdentifiers}});var E=e("./validators");Object.defineProperty(r,"isBinding",{enumerable:!0,get:function(){return E.isBinding}}),Object.defineProperty(r,"isReferenced",{enumerable:!0,get:function(){return E.isReferenced}}),Object.defineProperty(r,"isValidIdentifier",{enumerable:!0,get:function(){return E.isValidIdentifier}}),Object.defineProperty(r,"isLet",{enumerable:!0,get:function(){return E.isLet}}),Object.defineProperty(r,"isBlockScoped",{enumerable:!0,get:function(){return E.isBlockScoped}}),Object.defineProperty(r,"isVar",{enumerable:!0,get:function(){return E.isVar}}),Object.defineProperty(r,"isSpecifierDefault",{enumerable:!0,get:function(){return E.isSpecifierDefault}}),Object.defineProperty(r,"isScope",{enumerable:!0,get:function(){return E.isScope}}),Object.defineProperty(r,"isImmutable",{enumerable:!0,get:function(){return E.isImmutable}}),Object.defineProperty(r,"isNodesEquivalent",{enumerable:!0,get:function(){return E.isNodesEquivalent}});var A=e("./converters");Object.defineProperty(r,"toComputedKey",{enumerable:!0,get:function(){return A.toComputedKey}}),Object.defineProperty(r,"toSequenceExpression",{enumerable:!0,get:function(){return A.toSequenceExpression}}),Object.defineProperty(r,"toKeyAlias",{enumerable:!0,get:function(){return A.toKeyAlias}}),Object.defineProperty(r,"toIdentifier",{enumerable:!0,get:function(){return A.toIdentifier}}),Object.defineProperty(r,"toBindingIdentifierName",{enumerable:!0,get:function(){return A.toBindingIdentifierName}}),Object.defineProperty(r,"toStatement",{enumerable:!0,get:function(){return A.toStatement}}),Object.defineProperty(r,"toExpression",{enumerable:!0,get:function(){return A.toExpression}}),Object.defineProperty(r,"toBlock",{enumerable:!0,get:function(){return A.toBlock}}),Object.defineProperty(r,"valueToNode",{enumerable:!0,get:function(){return A.valueToNode}});var D=e("./flow");Object.defineProperty(r,"createUnionTypeAnnotation",{enumerable:!0,get:function(){return D.createUnionTypeAnnotation}}),Object.defineProperty(r,"removeTypeDuplicates",{enumerable:!0,get:function(){return D.removeTypeDuplicates}}),Object.defineProperty(r,"createTypeAnnotationBasedOnTypeof",{enumerable:!0,get:function(){return D.createTypeAnnotationBasedOnTypeof}});var S=n(e("to-fast-properties")),C=n(e("lodash/clone")),_=n(e("lodash/uniq"));e("./definitions/init");var w=e("./definitions"),k=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./react")),F=r;r.VISITOR_KEYS=w.VISITOR_KEYS,r.ALIAS_KEYS=w.ALIAS_KEYS,r.NODE_FIELDS=w.NODE_FIELDS,r.BUILDER_KEYS=w.BUILDER_KEYS,r.DEPRECATED_KEYS=w.DEPRECATED_KEYS,r.react=k;for(var T in F.VISITOR_KEYS)i(T);F.FLIPPED_ALIAS_KEYS={},(0,g.default)(F.ALIAS_KEYS).forEach(function(e){F.ALIAS_KEYS[e].forEach(function(t){(F.FLIPPED_ALIAS_KEYS[t]=F.FLIPPED_ALIAS_KEYS[t]||[]).push(e)})}),(0,g.default)(F.FLIPPED_ALIAS_KEYS).forEach(function(e){F[e.toUpperCase()+"_TYPES"]=F.FLIPPED_ALIAS_KEYS[e],i(e)});r.TYPES=(0,g.default)(F.VISITOR_KEYS).concat((0,g.default)(F.FLIPPED_ALIAS_KEYS)).concat((0,g.default)(F.DEPRECATED_KEYS));(0,g.default)(F.BUILDER_KEYS).forEach(function(e){function t(){if(arguments.length>r.length)throw new Error("t."+e+": Too many arguments passed. Received "+arguments.length+" but can receive no more than "+r.length);var t={};t.type=e;var n=0,i=r,s=Array.isArray(i),o=0;for(i=s?i:(0,y.default)(i);;){var u;if(s){if(o>=i.length)break;u=i[o++]}else{if((o=i.next()).done)break;u=o.value}var l=u,c=F.NODE_FIELDS[e][l],p=arguments[n++];void 0===p&&(p=(0,C.default)(c.default)),t[l]=p}for(var h in t)a(t,h,t[h]);return t}var r=F.BUILDER_KEYS[e];F[e]=t,F[e[0].toLowerCase()+e.slice(1)]=t});var P=function(e){function t(t){return function(){return console.trace("The node type "+e+" has been renamed to "+r),t.apply(this,arguments)}}var r=F.DEPRECATED_KEYS[e];F[e]=F[e[0].toLowerCase()+e.slice(1)]=t(F[r]),F["is"+e]=t(F["is"+r]),F["assert"+e]=t(F["assert"+r])};for(var B in F.DEPRECATED_KEYS)P(B);(0,S.default)(F),(0,S.default)(F.VISITOR_KEYS);var O=["tokens","start","end","loc","raw","rawValue"],N=F.COMMENT_KEYS.concat(["comments"]).concat(O)},{"./constants":169,"./converters":170,"./definitions":175,"./definitions/init":176,"./flow":179,"./react":181,"./retrievers":182,"./validators":183,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/json/stringify":121,"babel-runtime/core-js/object/get-own-property-symbols":126,"babel-runtime/core-js/object/keys":127,"lodash/clone":491,"lodash/uniq":540,"to-fast-properties":607}],181:[function(e,t,r){"use strict";function n(e,t){for(var r=e.value.split(/\r\n|\n|\r/),n=0,s=0;s<r.length;s++)r[s].match(/[^ \t]/)&&(n=s);for(var a="",o=0;o<r.length;o++){var u=r[o],l=0===o,c=o===r.length-1,p=o===n,h=u.replace(/\t/g," ");l||(h=h.replace(/^[ ]+/,"")),c||(h=h.replace(/[ ]+$/,"")),h&&(p||(h+=" "),a+=h)}a&&t.push(i.stringLiteral(a))}r.__esModule=!0,r.isReactComponent=void 0,r.isCompatTag=function(e){return!!e&&/^[a-z]|\-/.test(e)},r.buildChildren=function(e){for(var t=[],r=0;r<e.children.length;r++){var s=e.children[r];i.isJSXText(s)?n(s,t):(i.isJSXExpressionContainer(s)&&(s=s.expression),i.isJSXEmptyExpression(s)||t.push(s))}return t};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./index"));r.isReactComponent=i.buildMatchMemberExpression("React.Component")},{"./index":180}],182:[function(e,t,r){"use strict";function n(e,t,r){for(var n=[].concat(e),a=(0,i.default)(null);n.length;){var o=n.shift();if(o){var u=s.getBindingIdentifiers.keys[o.type];if(s.isIdentifier(o))if(t){(a[o.name]=a[o.name]||[]).push(o)}else a[o.name]=o;else if(s.isExportDeclaration(o))s.isDeclaration(o.declaration)&&n.push(o.declaration);else{if(r){if(s.isFunctionDeclaration(o)){n.push(o.id);continue}if(s.isFunctionExpression(o))continue}if(u)for(var l=0;l<u.length;l++){var c=u[l];o[c]&&(n=n.concat(o[c]))}}}}return a}r.__esModule=!0;var i=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/object/create"));r.getBindingIdentifiers=n,r.getOuterBindingIdentifiers=function(e,t){return n(e,t,!0)};var s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./index"));n.keys={DeclareClass:["id"],DeclareFunction:["id"],DeclareModule:["id"],DeclareVariable:["id"],InterfaceDeclaration:["id"],TypeAlias:["id"],OpaqueType:["id"],CatchClause:["param"],LabeledStatement:["label"],UnaryExpression:["argument"],AssignmentExpression:["left"],ImportSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportDefaultSpecifier:["local"],ImportDeclaration:["specifiers"],ExportSpecifier:["exported"],ExportNamespaceSpecifier:["exported"],ExportDefaultSpecifier:["exported"],FunctionDeclaration:["id","params"],FunctionExpression:["id","params"],ClassDeclaration:["id"],ClassExpression:["id"],RestElement:["argument"],UpdateExpression:["argument"],RestProperty:["argument"],ObjectProperty:["value"],AssignmentPattern:["left"],ArrayPattern:["elements"],ObjectPattern:["properties"],VariableDeclaration:["declarations"],VariableDeclarator:["id"]}},{"./index":180,"babel-runtime/core-js/object/create":125}],183:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if("object"!==(void 0===e?"undefined":(0,a.default)(e))||"object"!==(void 0===e?"undefined":(0,a.default)(e))||null==e||null==t)return e===t;if(e.type!==t.type)return!1;var r=(0,s.default)(c.NODE_FIELDS[e.type]||e.type),n=Array.isArray(r),u=0;for(r=n?r:(0,o.default)(r);;){var l;if(n){if(u>=r.length)break;l=r[u++]}else{if((u=r.next()).done)break;l=u.value}var p=l;if((0,a.default)(e[p])!==(0,a.default)(t[p]))return!1;if(Array.isArray(e[p])){if(!Array.isArray(t[p]))return!1;if(e[p].length!==t[p].length)return!1;for(var h=0;h<e[p].length;h++)if(!i(e[p][h],t[p][h]))return!1}else if(!i(e[p],t[p]))return!1}return!0}r.__esModule=!0;var s=n(e("babel-runtime/core-js/object/keys")),a=n(e("babel-runtime/helpers/typeof")),o=n(e("babel-runtime/core-js/get-iterator"));r.isBinding=function(e,t){var r=u.getBindingIdentifiers.keys[t.type];if(r)for(var n=0;n<r.length;n++){var i=t[r[n]];if(Array.isArray(i)){if(i.indexOf(e)>=0)return!0}else if(i===e)return!0}return!1},r.isReferenced=function(e,t){switch(t.type){case"BindExpression":return t.object===e||t.callee===e;case"MemberExpression":case"JSXMemberExpression":return!(t.property!==e||!t.computed)||t.object===e;case"MetaProperty":return!1;case"ObjectProperty":if(t.key===e)return t.computed;case"VariableDeclarator":return t.id!==e;case"ArrowFunctionExpression":case"FunctionDeclaration":case"FunctionExpression":var r=t.params,n=Array.isArray(r),i=0;for(r=n?r:(0,o.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}if(s===e)return!1}return t.id!==e;case"ExportSpecifier":return!t.source&&t.local===e;case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return!1;case"JSXAttribute":return t.name!==e;case"ClassProperty":return t.key===e?t.computed:t.value===e;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return!1;case"ClassDeclaration":case"ClassExpression":return t.id!==e;case"ClassMethod":case"ObjectMethod":return t.key===e&&t.computed;case"LabeledStatement":return!1;case"CatchClause":return t.param!==e;case"RestElement":return!1;case"AssignmentExpression":case"AssignmentPattern":return t.right===e;case"ObjectPattern":case"ArrayPattern":return!1}return!0},r.isValidIdentifier=function(e){return"string"==typeof e&&!l.default.keyword.isReservedWordES6(e,!0)&&"await"!==e&&l.default.keyword.isIdentifierNameES6(e)},r.isLet=function(e){return c.isVariableDeclaration(e)&&("var"!==e.kind||e[p.BLOCK_SCOPED_SYMBOL])},r.isBlockScoped=function(e){return c.isFunctionDeclaration(e)||c.isClassDeclaration(e)||c.isLet(e)},r.isVar=function(e){return c.isVariableDeclaration(e,{kind:"var"})&&!e[p.BLOCK_SCOPED_SYMBOL]},r.isSpecifierDefault=function(e){return c.isImportDefaultSpecifier(e)||c.isIdentifier(e.imported||e.exported,{name:"default"})},r.isScope=function(e,t){return(!c.isBlockStatement(e)||!c.isFunction(t,{body:e}))&&c.isScopable(e)},r.isImmutable=function(e){return!!c.isType(e.type,"Immutable")||!!c.isIdentifier(e)&&"undefined"===e.name},r.isNodesEquivalent=i;var u=e("./retrievers"),l=n(e("esutils")),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./index")),p=e("./constants")},{"./constants":169,"./index":180,"./retrievers":182,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/object/keys":127,"babel-runtime/helpers/typeof":138,esutils:187}],184:[function(e,t,r){arguments[4][25][0].apply(r,arguments)},{dup:25}],185:[function(e,t,r){arguments[4][26][0].apply(r,arguments)},{dup:26}],186:[function(e,t,r){arguments[4][27][0].apply(r,arguments)},{"./code":185,dup:27}],187:[function(e,t,r){arguments[4][28][0].apply(r,arguments)},{"./ast":184,"./code":185,"./keyword":186,dup:28}],188:[function(e,t,r){"use strict";function n(e){return e=e.split(" "),function(t){return e.indexOf(t)>=0}}function i(e,t){for(var r=65536,n=0;n<t.length;n+=2){if((r+=t[n])>e)return!1;if((r+=t[n+1])>=e)return!0}}function s(e){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&g.test(String.fromCharCode(e)):i(e,v)))}function a(e){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&b.test(String.fromCharCode(e)):i(e,v)||i(e,x))))}function o(e){return 10===e||13===e||8232===e||8233===e}function u(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}function l(e,t,r,n){return e.type=t,e.end=r,e.loc.end=n,this.processComment(e),e}function c(e){return e[e.length-1]}function p(e){return e&&"Property"===e.type&&"init"===e.kind&&!1===e.method}function h(e){return"JSXIdentifier"===e.type?e.name:"JSXNamespacedName"===e.type?e.namespace.name+":"+e.name.name:"JSXMemberExpression"===e.type?h(e.object)+"."+h(e.property):void 0}Object.defineProperty(r,"__esModule",{value:!0});var f={6:n("enum await"),strict:n("implements interface let package private protected public static yield"),strictBind:n("eval arguments")},d=n("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super"),m="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",y="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",g=new RegExp("["+m+"]"),b=new RegExp("["+m+y+"]");m=y=null;var v=[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],x=[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],E={sourceType:"script",sourceFilename:void 0,startLine:1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,plugins:[],strictMode:null},A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},S=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},C=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},_=!0,w=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};D(this,e),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.rightAssociative=!!r.rightAssociative,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null},k=function(e){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return D(this,t),n.keyword=r,C(this,e.call(this,r,n))}return S(t,e),t}(w),F=function(e){function t(r,n){return D(this,t),C(this,e.call(this,r,{beforeExpr:_,binop:n}))}return S(t,e),t}(w),T={num:new w("num",{startsExpr:!0}),regexp:new w("regexp",{startsExpr:!0}),string:new w("string",{startsExpr:!0}),name:new w("name",{startsExpr:!0}),eof:new w("eof"),bracketL:new w("[",{beforeExpr:_,startsExpr:!0}),bracketR:new w("]"),braceL:new w("{",{beforeExpr:_,startsExpr:!0}),braceBarL:new w("{|",{beforeExpr:_,startsExpr:!0}),braceR:new w("}"),braceBarR:new w("|}"),parenL:new w("(",{beforeExpr:_,startsExpr:!0}),parenR:new w(")"),comma:new w(",",{beforeExpr:_}),semi:new w(";",{beforeExpr:_}),colon:new w(":",{beforeExpr:_}),doubleColon:new w("::",{beforeExpr:_}),dot:new w("."),question:new w("?",{beforeExpr:_}),arrow:new w("=>",{beforeExpr:_}),template:new w("template"),ellipsis:new w("...",{beforeExpr:_}),backQuote:new w("`",{startsExpr:!0}),dollarBraceL:new w("${",{beforeExpr:_,startsExpr:!0}),at:new w("@"),eq:new w("=",{beforeExpr:_,isAssign:!0}),assign:new w("_=",{beforeExpr:_,isAssign:!0}),incDec:new w("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new w("prefix",{beforeExpr:_,prefix:!0,startsExpr:!0}),logicalOR:new F("||",1),logicalAND:new F("&&",2),bitwiseOR:new F("|",3),bitwiseXOR:new F("^",4),bitwiseAND:new F("&",5),equality:new F("==/!=",6),relational:new F("</>",7),bitShift:new F("<</>>",8),plusMin:new w("+/-",{beforeExpr:_,binop:9,prefix:!0,startsExpr:!0}),modulo:new F("%",10),star:new F("*",10),slash:new F("/",10),exponent:new w("**",{beforeExpr:_,binop:11,rightAssociative:!0})},P={break:new k("break"),case:new k("case",{beforeExpr:_}),catch:new k("catch"),continue:new k("continue"),debugger:new k("debugger"),default:new k("default",{beforeExpr:_}),do:new k("do",{isLoop:!0,beforeExpr:_}),else:new k("else",{beforeExpr:_}),finally:new k("finally"),for:new k("for",{isLoop:!0}),function:new k("function",{startsExpr:!0}),if:new k("if"),return:new k("return",{beforeExpr:_}),switch:new k("switch"),throw:new k("throw",{beforeExpr:_}),try:new k("try"),var:new k("var"),let:new k("let"),const:new k("const"),while:new k("while",{isLoop:!0}),with:new k("with"),new:new k("new",{beforeExpr:_,startsExpr:!0}),this:new k("this",{startsExpr:!0}),super:new k("super",{startsExpr:!0}),class:new k("class"),extends:new k("extends",{beforeExpr:_}),export:new k("export"),import:new k("import",{startsExpr:!0}),yield:new k("yield",{beforeExpr:_,startsExpr:!0}),null:new k("null",{startsExpr:!0}),true:new k("true",{startsExpr:!0}),false:new k("false",{startsExpr:!0}),in:new k("in",{beforeExpr:_,binop:7}),instanceof:new k("instanceof",{beforeExpr:_,binop:7}),typeof:new k("typeof",{beforeExpr:_,prefix:!0,startsExpr:!0}),void:new k("void",{beforeExpr:_,prefix:!0,startsExpr:!0}),delete:new k("delete",{beforeExpr:_,prefix:!0,startsExpr:!0})};Object.keys(P).forEach(function(e){T["_"+e]=P[e]});var B=/\r\n?|\n|\u2028|\u2029/,O=new RegExp(B.source,"g"),N=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,j=function e(t,r,n,i){D(this,e),this.token=t,this.isExpr=!!r,this.preserveSpace=!!n,this.override=i},I={braceStatement:new j("{",!1),braceExpression:new j("{",!0),templateQuasi:new j("${",!0),parenStatement:new j("(",!1),parenExpression:new j("(",!0),template:new j("`",!0,!0,function(e){return e.readTmplToken()}),functionExpression:new j("function",!0)};T.parenR.updateContext=T.braceR.updateContext=function(){if(1!==this.state.context.length){var e=this.state.context.pop();e===I.braceStatement&&this.curContext()===I.functionExpression?(this.state.context.pop(),this.state.exprAllowed=!1):e===I.templateQuasi?this.state.exprAllowed=!0:this.state.exprAllowed=!e.isExpr}else this.state.exprAllowed=!0},T.name.updateContext=function(e){this.state.exprAllowed=!1,e!==T._let&&e!==T._const&&e!==T._var||B.test(this.input.slice(this.state.end))&&(this.state.exprAllowed=!0)},T.braceL.updateContext=function(e){this.state.context.push(this.braceIsBlock(e)?I.braceStatement:I.braceExpression),this.state.exprAllowed=!0},T.dollarBraceL.updateContext=function(){this.state.context.push(I.templateQuasi),this.state.exprAllowed=!0},T.parenL.updateContext=function(e){var t=e===T._if||e===T._for||e===T._with||e===T._while;this.state.context.push(t?I.parenStatement:I.parenExpression),this.state.exprAllowed=!0},T.incDec.updateContext=function(){},T._function.updateContext=function(){this.curContext()!==I.braceStatement&&this.state.context.push(I.functionExpression),this.state.exprAllowed=!1},T.backQuote.updateContext=function(){this.curContext()===I.template?this.state.context.pop():this.state.context.push(I.template),this.state.exprAllowed=!1};var L=function e(t,r){D(this,e),this.line=t,this.column=r},M=function e(t,r){D(this,e),this.start=t,this.end=r},R=function(){function e(){D(this,e)}return e.prototype.init=function(e,t){return this.strict=!1!==e.strictMode&&"module"===e.sourceType,this.input=t,this.potentialArrowAt=-1,this.inMethod=this.inFunction=this.inGenerator=this.inAsync=this.inPropertyName=this.inType=this.inClassProperty=this.noAnonFunctionType=!1,this.labels=[],this.decorators=[],this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.pos=this.lineStart=0,this.curLine=e.startLine,this.type=T.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=[I.braceStatement],this.exprAllowed=!0,this.containsEsc=this.containsOctal=!1,this.octalPosition=null,this.invalidTemplateEscapePosition=null,this.exportedIdentifiers=[],this},e.prototype.curPosition=function(){return new L(this.curLine,this.pos-this.lineStart)},e.prototype.clone=function(t){var r=new e;for(var n in this){var i=this[n];t&&"context"!==n||!Array.isArray(i)||(i=i.slice()),r[n]=i}return r},e}(),V={},U=["jsx","doExpressions","objectRestSpread","decorators","classProperties","exportExtensions","asyncGenerators","functionBind","functionSent","dynamicImport","flow"],q=function(e){function t(r,n){D(this,t),r=function(e){var t={};for(var r in E)t[r]=e&&r in e?e[r]:E[r];return t}(r);var i=C(this,e.call(this,r,n));return i.options=r,i.inModule="module"===i.options.sourceType,i.input=n,i.plugins=i.loadPlugins(i.options.plugins),i.filename=r.sourceFilename,0===i.state.pos&&"#"===i.input[0]&&"!"===i.input[1]&&i.skipLineComment(2),i}return S(t,e),t.prototype.isReservedWord=function(e){return"await"===e?this.inModule:f[6](e)},t.prototype.hasPlugin=function(e){return!!(this.plugins["*"]&&U.indexOf(e)>-1)||!!this.plugins[e]},t.prototype.extend=function(e,t){this[e]=t(this[e])},t.prototype.loadAllPlugins=function(){var e=this,t=Object.keys(V).filter(function(e){return"flow"!==e&&"estree"!==e});t.push("flow"),t.forEach(function(t){var r=V[t];r&&r(e)})},t.prototype.loadPlugins=function(e){if(e.indexOf("*")>=0)return this.loadAllPlugins(),{"*":!0};var t={};e.indexOf("flow")>=0&&(e=e.filter(function(e){return"flow"!==e})).push("flow"),e.indexOf("estree")>=0&&(e=e.filter(function(e){return"estree"!==e})).unshift("estree");var r=e,n=Array.isArray(r),i=0;for(r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;if(!t[a]){t[a]=!0;var o=V[a];o&&o(this)}}return t},t.prototype.parse=function(){var e=this.startNode(),t=this.startNode();return this.nextToken(),this.parseTopLevel(e,t)},t}(function(){function e(t,r){D(this,e),this.state=new R,this.state.init(t,r)}return e.prototype.next=function(){this.isLookahead||this.state.tokens.push(new function e(t){D(this,e),this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new M(t.startLoc,t.endLoc)}(this.state)),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()},e.prototype.eat=function(e){return!!this.match(e)&&(this.next(),!0)},e.prototype.match=function(e){return this.state.type===e},e.prototype.isKeyword=function(e){return d(e)},e.prototype.lookahead=function(){var e=this.state;this.state=e.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;var t=this.state.clone(!0);return this.state=e,t},e.prototype.setStrict=function(e){if(this.state.strict=e,this.match(T.num)||this.match(T.string)){for(this.state.pos=this.state.start;this.state.pos<this.state.lineStart;)this.state.lineStart=this.input.lastIndexOf("\n",this.state.lineStart-2)+1,--this.state.curLine;this.nextToken()}},e.prototype.curContext=function(){return this.state.context[this.state.context.length-1]},e.prototype.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.state.containsOctal=!1,this.state.octalPosition=null,this.state.start=this.state.pos,this.state.startLoc=this.state.curPosition(),this.state.pos>=this.input.length?this.finishToken(T.eof):e.override?e.override(this):this.readToken(this.fullCharCodeAtPos())},e.prototype.readToken=function(e){return s(e)||92===e?this.readWord():this.getTokenFromCode(e)},e.prototype.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.state.pos);if(e<=55295||e>=57344)return e;return(e<<10)+this.input.charCodeAt(this.state.pos+1)-56613888},e.prototype.pushComment=function(e,t,r,n,i,s){var a={type:e?"CommentBlock":"CommentLine",value:t,start:r,end:n,loc:new M(i,s)};this.isLookahead||(this.state.tokens.push(a),this.state.comments.push(a),this.addComment(a))},e.prototype.skipBlockComment=function(){var e=this.state.curPosition(),t=this.state.pos,r=this.input.indexOf("*/",this.state.pos+=2);-1===r&&this.raise(this.state.pos-2,"Unterminated comment"),this.state.pos=r+2,O.lastIndex=t;for(var n=void 0;(n=O.exec(this.input))&&n.index<this.state.pos;)++this.state.curLine,this.state.lineStart=n.index+n[0].length;this.pushComment(!0,this.input.slice(t+2,r),t,this.state.pos,e,this.state.curPosition())},e.prototype.skipLineComment=function(e){for(var t=this.state.pos,r=this.state.curPosition(),n=this.input.charCodeAt(this.state.pos+=e);this.state.pos<this.input.length&&10!==n&&13!==n&&8232!==n&&8233!==n;)++this.state.pos,n=this.input.charCodeAt(this.state.pos);this.pushComment(!1,this.input.slice(t+e,this.state.pos),t,this.state.pos,r,this.state.curPosition())},e.prototype.skipSpace=function(){e:for(;this.state.pos<this.input.length;){var e=this.input.charCodeAt(this.state.pos);switch(e){case 32:case 160:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&N.test(String.fromCharCode(e))))break e;++this.state.pos}}},e.prototype.finishToken=function(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var r=this.state.type;this.state.type=e,this.state.value=t,this.updateContext(r)},e.prototype.readToken_dot=function(){var e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.state.pos+2);return 46===e&&46===t?(this.state.pos+=3,this.finishToken(T.ellipsis)):(++this.state.pos,this.finishToken(T.dot))},e.prototype.readToken_slash=function(){if(this.state.exprAllowed)return++this.state.pos,this.readRegexp();return 61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(T.assign,2):this.finishOp(T.slash,1)},e.prototype.readToken_mult_modulo=function(e){var t=42===e?T.star:T.modulo,r=1,n=this.input.charCodeAt(this.state.pos+1);return 42===n&&(r++,n=this.input.charCodeAt(this.state.pos+2),t=T.exponent),61===n&&(r++,t=T.assign),this.finishOp(t,r)},e.prototype.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?this.finishOp(124===e?T.logicalOR:T.logicalAND,2):61===t?this.finishOp(T.assign,2):124===e&&125===t&&this.hasPlugin("flow")?this.finishOp(T.braceBarR,2):this.finishOp(124===e?T.bitwiseOR:T.bitwiseAND,1)},e.prototype.readToken_caret=function(){return 61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(T.assign,2):this.finishOp(T.bitwiseXOR,1)},e.prototype.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?45===t&&62===this.input.charCodeAt(this.state.pos+2)&&B.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(T.incDec,2):61===t?this.finishOp(T.assign,2):this.finishOp(T.plusMin,1)},e.prototype.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.state.pos+1),r=1;return t===e?(r=62===e&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+r)?this.finishOp(T.assign,r+1):this.finishOp(T.bitShift,r)):33===t&&60===e&&45===this.input.charCodeAt(this.state.pos+2)&&45===this.input.charCodeAt(this.state.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(r=2),this.finishOp(T.relational,r))},e.prototype.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.state.pos+1);return 61===t?this.finishOp(T.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2):61===e&&62===t?(this.state.pos+=2,this.finishToken(T.arrow)):this.finishOp(61===e?T.eq:T.prefix,1)},e.prototype.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.state.pos,this.finishToken(T.parenL);case 41:return++this.state.pos,this.finishToken(T.parenR);case 59:return++this.state.pos,this.finishToken(T.semi);case 44:return++this.state.pos,this.finishToken(T.comma);case 91:return++this.state.pos,this.finishToken(T.bracketL);case 93:return++this.state.pos,this.finishToken(T.bracketR);case 123:return this.hasPlugin("flow")&&124===this.input.charCodeAt(this.state.pos+1)?this.finishOp(T.braceBarL,2):(++this.state.pos,this.finishToken(T.braceL));case 125:return++this.state.pos,this.finishToken(T.braceR);case 58:return this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(T.doubleColon,2):(++this.state.pos,this.finishToken(T.colon));case 63:return++this.state.pos,this.finishToken(T.question);case 64:return++this.state.pos,this.finishToken(T.at);case 96:return++this.state.pos,this.finishToken(T.backQuote);case 48:var t=this.input.charCodeAt(this.state.pos+1);if(120===t||88===t)return this.readRadixNumber(16);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(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(T.prefix,1)}this.raise(this.state.pos,"Unexpected character '"+u(e)+"'")},e.prototype.finishOp=function(e,t){var r=this.input.slice(this.state.pos,this.state.pos+t);return this.state.pos+=t,this.finishToken(e,r)},e.prototype.readRegexp=function(){for(var e=this.state.pos,t=void 0,r=void 0;;){this.state.pos>=this.input.length&&this.raise(e,"Unterminated regular expression");var n=this.input.charAt(this.state.pos);if(B.test(n)&&this.raise(e,"Unterminated regular expression"),t)t=!1;else{if("["===n)r=!0;else if("]"===n&&r)r=!1;else if("/"===n&&!r)break;t="\\"===n}++this.state.pos}var i=this.input.slice(e,this.state.pos);++this.state.pos;var s=this.readWord1();if(s){/^[gmsiyu]*$/.test(s)||this.raise(e,"Invalid regular expression flag")}return this.finishToken(T.regexp,{pattern:i,flags:s})},e.prototype.readInt=function(e,t){for(var r=this.state.pos,n=0,i=0,s=null==t?1/0:t;i<s;++i){var a=this.input.charCodeAt(this.state.pos),o=void 0;if((o=a>=97?a-97+10:a>=65?a-65+10:a>=48&&a<=57?a-48:1/0)>=e)break;++this.state.pos,n=n*e+o}return this.state.pos===r||null!=t&&this.state.pos-r!==t?null:n},e.prototype.readRadixNumber=function(e){this.state.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.state.start+2,"Expected number in radix "+e),s(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number"),this.finishToken(T.num,t)},e.prototype.readNumber=function(e){var t=this.state.pos,r=48===this.input.charCodeAt(t),n=!1;e||null!==this.readInt(10)||this.raise(t,"Invalid number"),r&&this.state.pos==t+1&&(r=!1);var i=this.input.charCodeAt(this.state.pos);46!==i||r||(++this.state.pos,this.readInt(10),n=!0,i=this.input.charCodeAt(this.state.pos)),69!==i&&101!==i||r||(43!==(i=this.input.charCodeAt(++this.state.pos))&&45!==i||++this.state.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),n=!0),s(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number");var a=this.input.slice(t,this.state.pos),o=void 0;return n?o=parseFloat(a):r&&1!==a.length?this.state.strict?this.raise(t,"Invalid number"):o=/[89]/.test(a)?parseInt(a,10):parseInt(a,8):o=parseInt(a,10),this.finishToken(T.num,o)},e.prototype.readCodePoint=function(e){var t=void 0;if(123===this.input.charCodeAt(this.state.pos)){var r=++this.state.pos;if(t=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,e),++this.state.pos,null===t)--this.state.invalidTemplateEscapePosition;else if(t>1114111){if(!e)return this.state.invalidTemplateEscapePosition=r-2,null;this.raise(r,"Code point out of bounds")}}else t=this.readHexChar(4,e);return t},e.prototype.readString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;92===n?(t+=this.input.slice(r,this.state.pos),t+=this.readEscapedChar(!1),r=this.state.pos):(o(n)&&this.raise(this.state.start,"Unterminated string constant"),++this.state.pos)}return t+=this.input.slice(r,this.state.pos++),this.finishToken(T.string,t)},e.prototype.readTmplToken=function(){for(var e="",t=this.state.pos,r=!1;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated template");var n=this.input.charCodeAt(this.state.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(T.template)?36===n?(this.state.pos+=2,this.finishToken(T.dollarBraceL)):(++this.state.pos,this.finishToken(T.backQuote)):(e+=this.input.slice(t,this.state.pos),this.finishToken(T.template,r?null:e));if(92===n){e+=this.input.slice(t,this.state.pos);var i=this.readEscapedChar(!0);null===i?r=!0:e+=i,t=this.state.pos}else if(o(n)){switch(e+=this.input.slice(t,this.state.pos),++this.state.pos,n){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}++this.state.curLine,this.state.lineStart=this.state.pos,t=this.state.pos}else++this.state.pos}},e.prototype.readEscapedChar=function(e){var t=!e,r=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,r){case 110:return"\n";case 114:return"\r";case 120:var n=this.readHexChar(2,t);return null===n?null:String.fromCharCode(n);case 117:var i=this.readCodePoint(t);return null===i?null:u(i);case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:return this.state.lineStart=this.state.pos,++this.state.curLine,"";default:if(r>=48&&r<=55){var s=this.state.pos-1,a=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],o=parseInt(a,8);if(o>255&&(a=a.slice(0,-1),o=parseInt(a,8)),o>0){if(e)return this.state.invalidTemplateEscapePosition=s,null;this.state.strict?this.raise(s,"Octal literal in strict mode"):this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=s)}return this.state.pos+=a.length-1,String.fromCharCode(o)}return String.fromCharCode(r)}},e.prototype.readHexChar=function(e,t){var r=this.state.pos,n=this.readInt(16,e);return null===n&&(t?this.raise(r,"Bad character escape sequence"):(this.state.pos=r-1,this.state.invalidTemplateEscapePosition=r-1)),n},e.prototype.readWord1=function(){this.state.containsEsc=!1;for(var e="",t=!0,r=this.state.pos;this.state.pos<this.input.length;){var n=this.fullCharCodeAtPos();if(a(n))this.state.pos+=n<=65535?1:2;else{if(92!==n)break;this.state.containsEsc=!0,e+=this.input.slice(r,this.state.pos);var i=this.state.pos;117!==this.input.charCodeAt(++this.state.pos)&&this.raise(this.state.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.state.pos;var o=this.readCodePoint(!0);(t?s:a)(o,!0)||this.raise(i,"Invalid Unicode escape"),e+=u(o),r=this.state.pos}t=!1}return e+this.input.slice(r,this.state.pos)},e.prototype.readWord=function(){var e=this.readWord1(),t=T.name;return!this.state.containsEsc&&this.isKeyword(e)&&(t=P[e]),this.finishToken(t,e)},e.prototype.braceIsBlock=function(e){if(e===T.colon){var t=this.curContext();if(t===I.braceStatement||t===I.braceExpression)return!t.isExpr}return e===T._return?B.test(this.input.slice(this.state.lastTokEnd,this.state.start)):e===T._else||e===T.semi||e===T.eof||e===T.parenR||(e===T.braceL?this.curContext()===I.braceStatement:!this.state.exprAllowed)},e.prototype.updateContext=function(e){var t=this.state.type,r=void 0;t.keyword&&e===T.dot?this.state.exprAllowed=!1:(r=t.updateContext)?r.call(this,e):this.state.exprAllowed=t.beforeExpr},e}()),G=q.prototype;G.addExtra=function(e,t,r){if(e){(e.extra=e.extra||{})[t]=r}},G.isRelational=function(e){return this.match(T.relational)&&this.state.value===e},G.expectRelational=function(e){this.isRelational(e)?this.next():this.unexpected(null,T.relational)},G.isContextual=function(e){return this.match(T.name)&&this.state.value===e},G.eatContextual=function(e){return this.state.value===e&&this.eat(T.name)},G.expectContextual=function(e,t){this.eatContextual(e)||this.unexpected(null,t)},G.canInsertSemicolon=function(){return this.match(T.eof)||this.match(T.braceR)||B.test(this.input.slice(this.state.lastTokEnd,this.state.start))},G.isLineTerminator=function(){return this.eat(T.semi)||this.canInsertSemicolon()},G.semicolon=function(){this.isLineTerminator()||this.unexpected(null,T.semi)},G.expect=function(e,t){return this.eat(e)||this.unexpected(t,e)},G.unexpected=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Unexpected token";t&&"object"===(void 0===t?"undefined":A(t))&&t.label&&(t="Unexpected token, expected "+t.label),this.raise(null!=e?e:this.state.start,t)};var X=q.prototype;X.parseTopLevel=function(e,t){return t.sourceType=this.options.sourceType,this.parseBlockBody(t,!0,!0,T.eof),e.program=this.finishNode(t,"Program"),e.comments=this.state.comments,e.tokens=this.state.tokens,this.finishNode(e,"File")};var J={kind:"loop"},W={kind:"switch"};X.stmtToDirective=function(e){var t=e.expression,r=this.startNodeAt(t.start,t.loc.start),n=this.startNodeAt(e.start,e.loc.start),i=this.input.slice(t.start,t.end),s=r.value=i.slice(1,-1);return this.addExtra(r,"raw",i),this.addExtra(r,"rawValue",s),n.value=this.finishNodeAt(r,"DirectiveLiteral",t.end,t.loc.end),this.finishNodeAt(n,"Directive",e.end,e.loc.end)},X.parseStatement=function(e,t){this.match(T.at)&&this.parseDecorators(!0);var r=this.state.type,n=this.startNode();switch(r){case T._break:case T._continue:return this.parseBreakContinueStatement(n,r.keyword);case T._debugger:return this.parseDebuggerStatement(n);case T._do:return this.parseDoStatement(n);case T._for:return this.parseForStatement(n);case T._function:return e||this.unexpected(),this.parseFunctionStatement(n);case T._class:return e||this.unexpected(),this.parseClass(n,!0);case T._if:return this.parseIfStatement(n);case T._return:return this.parseReturnStatement(n);case T._switch:return this.parseSwitchStatement(n);case T._throw:return this.parseThrowStatement(n);case T._try:return this.parseTryStatement(n);case T._let:case T._const:e||this.unexpected();case T._var:return this.parseVarStatement(n,r);case T._while:return this.parseWhileStatement(n);case T._with:return this.parseWithStatement(n);case T.braceL:return this.parseBlock();case T.semi:return this.parseEmptyStatement(n);case T._export:case T._import:if(this.hasPlugin("dynamicImport")&&this.lookahead().type===T.parenL)break;return this.options.allowImportExportEverywhere||(t||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: \"module\"'")),r===T._import?this.parseImport(n):this.parseExport(n);case T.name:if("async"===this.state.value){var i=this.state.clone();if(this.next(),this.match(T._function)&&!this.canInsertSemicolon())return this.expect(T._function),this.parseFunction(n,!0,!1,!0);this.state=i}}var s=this.state.value,a=this.parseExpression();return r===T.name&&"Identifier"===a.type&&this.eat(T.colon)?this.parseLabeledStatement(n,s,a):this.parseExpressionStatement(n,a)},X.takeDecorators=function(e){this.state.decorators.length&&(e.decorators=this.state.decorators,this.state.decorators=[])},X.parseDecorators=function(e){for(;this.match(T.at);){var t=this.parseDecorator();this.state.decorators.push(t)}e&&this.match(T._export)||this.match(T._class)||this.raise(this.state.start,"Leading decorators must be attached to a class declaration")},X.parseDecorator=function(){this.hasPlugin("decorators")||this.unexpected();var e=this.startNode();return this.next(),e.expression=this.parseMaybeAssign(),this.finishNode(e,"Decorator")},X.parseBreakContinueStatement=function(e,t){var r="break"===t;this.next(),this.isLineTerminator()?e.label=null:this.match(T.name)?(e.label=this.parseIdentifier(),this.semicolon()):this.unexpected();var n=void 0;for(n=0;n<this.state.labels.length;++n){var i=this.state.labels[n];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(r||"loop"===i.kind))break;if(e.label&&r)break}}return n===this.state.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")},X.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},X.parseDoStatement=function(e){return this.next(),this.state.labels.push(J),e.body=this.parseStatement(!1),this.state.labels.pop(),this.expect(T._while),e.test=this.parseParenExpression(),this.eat(T.semi),this.finishNode(e,"DoWhileStatement")},X.parseForStatement=function(e){this.next(),this.state.labels.push(J);var t=!1;if(this.hasPlugin("asyncGenerators")&&this.state.inAsync&&this.isContextual("await")&&(t=!0,this.next()),this.expect(T.parenL),this.match(T.semi))return t&&this.unexpected(),this.parseFor(e,null);if(this.match(T._var)||this.match(T._let)||this.match(T._const)){var r=this.startNode(),n=this.state.type;return this.next(),this.parseVar(r,!0,n),this.finishNode(r,"VariableDeclaration"),!this.match(T._in)&&!this.isContextual("of")||1!==r.declarations.length||r.declarations[0].init?(t&&this.unexpected(),this.parseFor(e,r)):this.parseForIn(e,r,t)}var i={start:0},s=this.parseExpression(!0,i);if(this.match(T._in)||this.isContextual("of")){var a=this.isContextual("of")?"for-of statement":"for-in statement";return this.toAssignable(s,void 0,a),this.checkLVal(s,void 0,void 0,a),this.parseForIn(e,s,t)}return i.start&&this.unexpected(i.start),t&&this.unexpected(),this.parseFor(e,s)},X.parseFunctionStatement=function(e){return this.next(),this.parseFunction(e,!0)},X.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!1),e.alternate=this.eat(T._else)?this.parseStatement(!1):null,this.finishNode(e,"IfStatement")},X.parseReturnStatement=function(e){return this.state.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.state.start,"'return' outside of function"),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},X.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(T.braceL),this.state.labels.push(W);for(var t,r=void 0;!this.match(T.braceR);)if(this.match(T._case)||this.match(T._default)){var n=this.match(T._case);r&&this.finishNode(r,"SwitchCase"),e.cases.push(r=this.startNode()),r.consequent=[],this.next(),n?r.test=this.parseExpression():(t&&this.raise(this.state.lastTokStart,"Multiple default clauses"),t=!0,r.test=null),this.expect(T.colon)}else r?r.consequent.push(this.parseStatement(!0)):this.unexpected();return r&&this.finishNode(r,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")},X.parseThrowStatement=function(e){return this.next(),B.test(this.input.slice(this.state.lastTokEnd,this.state.start))&&this.raise(this.state.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var K=[];X.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(T._catch)){var t=this.startNode();this.next(),this.expect(T.parenL),t.param=this.parseBindingAtom(),this.checkLVal(t.param,!0,Object.create(null),"catch clause"),this.expect(T.parenR),t.body=this.parseBlock(),e.handler=this.finishNode(t,"CatchClause")}return e.guardedHandlers=K,e.finalizer=this.eat(T._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},X.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},X.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.state.labels.push(J),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,"WhileStatement")},X.parseWithStatement=function(e){return this.state.strict&&this.raise(this.state.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(!1),this.finishNode(e,"WithStatement")},X.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},X.parseLabeledStatement=function(e,t,r){var n=this.state.labels,i=Array.isArray(n),s=0;for(n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}a.name===t&&this.raise(r.start,"Label '"+t+"' is already declared")}for(var o=this.state.type.isLoop?"loop":this.match(T._switch)?"switch":null,u=this.state.labels.length-1;u>=0;u--){var l=this.state.labels[u];if(l.statementStart!==e.start)break;l.statementStart=this.state.start,l.kind=o}return this.state.labels.push({name:t,kind:o,statementStart:this.state.start}),e.body=this.parseStatement(!0),this.state.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")},X.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},X.parseBlock=function(e){var t=this.startNode();return this.expect(T.braceL),this.parseBlockBody(t,e,!1,T.braceR),this.finishNode(t,"BlockStatement")},X.isValidDirective=function(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized},X.parseBlockBody=function(e,t,r,n){e.body=[],e.directives=[];for(var i=!1,s=void 0,a=void 0;!this.eat(n);){i||!this.state.containsOctal||a||(a=this.state.octalPosition);var o=this.parseStatement(!0,r);if(t&&!i&&this.isValidDirective(o)){var u=this.stmtToDirective(o);e.directives.push(u),void 0===s&&"use strict"===u.value.value&&(s=this.state.strict,this.setStrict(!0),a&&this.raise(a,"Octal literal in strict mode"))}else i=!0,e.body.push(o)}!1===s&&this.setStrict(!1)},X.parseFor=function(e,t){return e.init=t,this.expect(T.semi),e.test=this.match(T.semi)?null:this.parseExpression(),this.expect(T.semi),e.update=this.match(T.parenR)?null:this.parseExpression(),this.expect(T.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,"ForStatement")},X.parseForIn=function(e,t,r){var n=void 0;return r?(this.eatContextual("of"),n="ForAwaitStatement"):(n=this.match(T._in)?"ForInStatement":"ForOfStatement",this.next()),e.left=t,e.right=this.parseExpression(),this.expect(T.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,n)},X.parseVar=function(e,t,r){for(e.declarations=[],e.kind=r.keyword;;){var n=this.startNode();if(this.parseVarHead(n),this.eat(T.eq)?n.init=this.parseMaybeAssign(t):r!==T._const||this.match(T._in)||this.isContextual("of")?"Identifier"===n.id.type||t&&(this.match(T._in)||this.isContextual("of"))?n.init=null:this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(T.comma))break}return e},X.parseVarHead=function(e){e.id=this.parseBindingAtom(),this.checkLVal(e.id,!0,void 0,"variable declaration")},X.parseFunction=function(e,t,r,n,i){var s=this.state.inMethod;return this.state.inMethod=!1,this.initFunction(e,n),this.match(T.star)&&(e.async&&!this.hasPlugin("asyncGenerators")?this.unexpected():(e.generator=!0,this.next())),!t||i||this.match(T.name)||this.match(T._yield)||this.unexpected(),(this.match(T.name)||this.match(T._yield))&&(e.id=this.parseBindingIdentifier()),this.parseFunctionParams(e),this.parseFunctionBody(e,r),this.state.inMethod=s,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},X.parseFunctionParams=function(e){this.expect(T.parenL),e.params=this.parseBindingList(T.parenR)},X.parseClass=function(e,t,r){return this.next(),this.takeDecorators(e),this.parseClassId(e,t,r),this.parseClassSuper(e),this.parseClassBody(e),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},X.isClassProperty=function(){return this.match(T.eq)||this.match(T.semi)||this.match(T.braceR)},X.isClassMethod=function(){return this.match(T.parenL)},X.isNonstaticConstructor=function(e){return!(e.computed||e.static||"constructor"!==e.key.name&&"constructor"!==e.key.value)},X.parseClassBody=function(e){var t=this.state.strict;this.state.strict=!0;var r=!1,n=!1,i=[],s=this.startNode();for(s.body=[],this.expect(T.braceL);!this.eat(T.braceR);)if(this.eat(T.semi))i.length>0&&this.raise(this.state.lastTokEnd,"Decorators must not be followed by a semicolon");else if(this.match(T.at))i.push(this.parseDecorator());else{var a=this.startNode();if(i.length&&(a.decorators=i,i=[]),a.static=!1,this.match(T.name)&&"static"===this.state.value){var o=this.parseIdentifier(!0);if(this.isClassMethod()){a.kind="method",a.computed=!1,a.key=o,this.parseClassMethod(s,a,!1,!1);continue}if(this.isClassProperty()){a.computed=!1,a.key=o,s.body.push(this.parseClassProperty(a));continue}a.static=!0}if(this.eat(T.star))a.kind="method",this.parsePropertyName(a),this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't be a generator"),a.computed||!a.static||"prototype"!==a.key.name&&"prototype"!==a.key.value||this.raise(a.key.start,"Classes may not have static property named prototype"),this.parseClassMethod(s,a,!0,!1);else{var u=this.match(T.name),l=this.parsePropertyName(a);if(a.computed||!a.static||"prototype"!==a.key.name&&"prototype"!==a.key.value||this.raise(a.key.start,"Classes may not have static property named prototype"),this.isClassMethod())this.isNonstaticConstructor(a)?(n?this.raise(l.start,"Duplicate constructor in the same class"):a.decorators&&this.raise(a.start,"You can't attach decorators to a class constructor"),n=!0,a.kind="constructor"):a.kind="method",this.parseClassMethod(s,a,!1,!1);else if(this.isClassProperty())this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Classes may not have a non-static field named 'constructor'"),s.body.push(this.parseClassProperty(a));else if(u&&"async"===l.name&&!this.isLineTerminator()){var c=this.hasPlugin("asyncGenerators")&&this.eat(T.star);a.kind="method",this.parsePropertyName(a),this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't be an async function"),this.parseClassMethod(s,a,c,!0)}else!u||"get"!==l.name&&"set"!==l.name||this.isLineTerminator()&&this.match(T.star)?this.hasPlugin("classConstructorCall")&&u&&"call"===l.name&&this.match(T.name)&&"constructor"===this.state.value?(r?this.raise(a.start,"Duplicate constructor call in the same class"):a.decorators&&this.raise(a.start,"You can't attach decorators to a class constructor"),r=!0,a.kind="constructorCall",this.parsePropertyName(a),this.parseClassMethod(s,a,!1,!1)):this.isLineTerminator()?(this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Classes may not have a non-static field named 'constructor'"),s.body.push(this.parseClassProperty(a))):this.unexpected():(a.kind=l.name,this.parsePropertyName(a),this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't have get/set modifier"),this.parseClassMethod(s,a,!1,!1),this.checkGetterSetterParamCount(a))}}i.length&&this.raise(this.state.start,"You have trailing decorators with no method"),e.body=this.finishNode(s,"ClassBody"),this.state.strict=t},X.parseClassProperty=function(e){return this.state.inClassProperty=!0,this.match(T.eq)?(this.hasPlugin("classProperties")||this.unexpected(),this.next(),e.value=this.parseMaybeAssign()):e.value=null,this.semicolon(),this.state.inClassProperty=!1,this.finishNode(e,"ClassProperty")},X.parseClassMethod=function(e,t,r,n){this.parseMethod(t,r,n),e.body.push(this.finishNode(t,"ClassMethod"))},X.parseClassId=function(e,t,r){this.match(T.name)?e.id=this.parseIdentifier():r||!t?e.id=null:this.unexpected()},X.parseClassSuper=function(e){e.superClass=this.eat(T._extends)?this.parseExprSubscripts():null},X.parseExport=function(e){if(this.next(),this.match(T.star)){var t=this.startNode();if(this.next(),!this.hasPlugin("exportExtensions")||!this.eatContextual("as"))return this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration");t.exported=this.parseIdentifier(),e.specifiers=[this.finishNode(t,"ExportNamespaceSpecifier")],this.parseExportSpecifiersMaybe(e),this.parseExportFrom(e,!0)}else if(this.hasPlugin("exportExtensions")&&this.isExportDefaultSpecifier()){var r=this.startNode();if(r.exported=this.parseIdentifier(!0),e.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],this.match(T.comma)&&this.lookahead().type===T.star){this.expect(T.comma);var n=this.startNode();this.expect(T.star),this.expectContextual("as"),n.exported=this.parseIdentifier(),e.specifiers.push(this.finishNode(n,"ExportNamespaceSpecifier"))}else this.parseExportSpecifiersMaybe(e);this.parseExportFrom(e,!0)}else{if(this.eat(T._default)){var i=this.startNode(),s=!1;return this.eat(T._function)?i=this.parseFunction(i,!0,!1,!1,!0):this.match(T._class)?i=this.parseClass(i,!0,!0):(s=!0,i=this.parseMaybeAssign()),e.declaration=i,s&&this.semicolon(),this.checkExport(e,!0,!0),this.finishNode(e,"ExportDefaultDeclaration")}this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,e.declaration=this.parseExportDeclaration(e)):(e.declaration=null,e.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(e))}return this.checkExport(e,!0),this.finishNode(e,"ExportNamedDeclaration")},X.parseExportDeclaration=function(){return this.parseStatement(!0)},X.isExportDefaultSpecifier=function(){if(this.match(T.name))return"async"!==this.state.value;if(!this.match(T._default))return!1;var e=this.lookahead();return e.type===T.comma||e.type===T.name&&"from"===e.value},X.parseExportSpecifiersMaybe=function(e){this.eat(T.comma)&&(e.specifiers=e.specifiers.concat(this.parseExportSpecifiers()))},X.parseExportFrom=function(e,t){this.eatContextual("from")?(e.source=this.match(T.string)?this.parseExprAtom():this.unexpected(),this.checkExport(e)):t?this.unexpected():e.source=null,this.semicolon()},X.shouldParseExportDeclaration=function(){return"var"===this.state.type.keyword||"const"===this.state.type.keyword||"let"===this.state.type.keyword||"function"===this.state.type.keyword||"class"===this.state.type.keyword||this.isContextual("async")},X.checkExport=function(e,t,r){if(t)if(r)this.checkDuplicateExports(e,"default");else if(e.specifiers&&e.specifiers.length){var n=e.specifiers,i=Array.isArray(n),s=0;for(n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a;this.checkDuplicateExports(o,o.exported.name)}}else if(e.declaration)if("FunctionDeclaration"===e.declaration.type||"ClassDeclaration"===e.declaration.type)this.checkDuplicateExports(e,e.declaration.id.name);else if("VariableDeclaration"===e.declaration.type){var u=e.declaration.declarations,l=Array.isArray(u),c=0;for(u=l?u:u[Symbol.iterator]();;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if((c=u.next()).done)break;p=c.value}var h=p;this.checkDeclaration(h.id)}}if(this.state.decorators.length){var f=e.declaration&&("ClassDeclaration"===e.declaration.type||"ClassExpression"===e.declaration.type);e.declaration&&f||this.raise(e.start,"You can only use decorators on an export when exporting a class"),this.takeDecorators(e.declaration)}},X.checkDeclaration=function(e){if("ObjectPattern"===e.type){var t=e.properties,r=Array.isArray(t),n=0;for(t=r?t:t[Symbol.iterator]();;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;this.checkDeclaration(s)}}else if("ArrayPattern"===e.type){var a=e.elements,o=Array.isArray(a),u=0;for(a=o?a:a[Symbol.iterator]();;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var c=l;c&&this.checkDeclaration(c)}}else"ObjectProperty"===e.type?this.checkDeclaration(e.value):"RestElement"===e.type||"RestProperty"===e.type?this.checkDeclaration(e.argument):"Identifier"===e.type&&this.checkDuplicateExports(e,e.name)},X.checkDuplicateExports=function(e,t){this.state.exportedIdentifiers.indexOf(t)>-1&&this.raiseDuplicateExportError(e,t),this.state.exportedIdentifiers.push(t)},X.raiseDuplicateExportError=function(e,t){this.raise(e.start,"default"===t?"Only one default export allowed per module.":"`"+t+"` has already been exported. Exported identifiers must be unique.")},X.parseExportSpecifiers=function(){var e=[],t=!0,r=void 0;for(this.expect(T.braceL);!this.eat(T.braceR);){if(t)t=!1;else if(this.expect(T.comma),this.eat(T.braceR))break;var n=this.match(T._default);n&&!r&&(r=!0);var i=this.startNode();i.local=this.parseIdentifier(n),i.exported=this.eatContextual("as")?this.parseIdentifier(!0):i.local.__clone(),e.push(this.finishNode(i,"ExportSpecifier"))}return r&&!this.isContextual("from")&&this.unexpected(),e},X.parseImport=function(e){return this.eat(T._import),this.match(T.string)?(e.specifiers=[],e.source=this.parseExprAtom()):(e.specifiers=[],this.parseImportSpecifiers(e),this.expectContextual("from"),e.source=this.match(T.string)?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},X.parseImportSpecifiers=function(e){var t=!0;if(this.match(T.name)){var r=this.state.start,n=this.state.startLoc;if(e.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(),r,n)),!this.eat(T.comma))return}if(this.match(T.star)){var i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdentifier(),this.checkLVal(i.local,!0,void 0,"import namespace specifier"),void e.specifiers.push(this.finishNode(i,"ImportNamespaceSpecifier"))}for(this.expect(T.braceL);!this.eat(T.braceR);){if(t)t=!1;else if(this.eat(T.colon)&&this.unexpected(null,"ES2015 named imports do not destructure. Use another statement for destructuring after the import."),this.expect(T.comma),this.eat(T.braceR))break;this.parseImportSpecifier(e)}},X.parseImportSpecifier=function(e){var t=this.startNode();t.imported=this.parseIdentifier(!0),this.eatContextual("as")?t.local=this.parseIdentifier():(this.checkReservedWord(t.imported.name,t.start,!0,!0),t.local=t.imported.__clone()),this.checkLVal(t.local,!0,void 0,"import specifier"),e.specifiers.push(this.finishNode(t,"ImportSpecifier"))},X.parseImportSpecifierDefault=function(e,t,r){var n=this.startNodeAt(t,r);return n.local=e,this.checkLVal(n.local,!0,void 0,"default import specifier"),this.finishNode(n,"ImportDefaultSpecifier")};var z=q.prototype;z.toAssignable=function(e,t,r){if(e)switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":e.type="ObjectPattern";var n=e.properties,i=Array.isArray(n),s=0;for(n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a;"ObjectMethod"===o.type?"get"===o.kind||"set"===o.kind?this.raise(o.key.start,"Object pattern can't contain getter or setter"):this.raise(o.key.start,"Object pattern can't contain methods"):this.toAssignable(o,t,"object destructuring pattern")}break;case"ObjectProperty":this.toAssignable(e.value,t,r);break;case"SpreadProperty":e.type="RestProperty";var u=e.argument;this.toAssignable(u,t,r);break;case"ArrayExpression":e.type="ArrayPattern",this.toAssignableList(e.elements,t,r);break;case"AssignmentExpression":"="===e.operator?(e.type="AssignmentPattern",delete e.operator):this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");break;case"MemberExpression":if(!t)break;default:var l="Invalid left-hand side"+(r?" in "+r:"expression");this.raise(e.start,l)}return e},z.toAssignableList=function(e,t,r){var n=e.length;if(n){var i=e[n-1];if(i&&"RestElement"===i.type)--n;else if(i&&"SpreadElement"===i.type){i.type="RestElement";var s=i.argument;this.toAssignable(s,t,r),"Identifier"!==s.type&&"MemberExpression"!==s.type&&"ArrayPattern"!==s.type&&this.unexpected(s.start),--n}}for(var a=0;a<n;a++){var o=e[a];o&&this.toAssignable(o,t,r)}return e},z.toReferencedList=function(e){return e},z.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},z.parseRest=function(){var e=this.startNode();return this.next(),e.argument=this.parseBindingIdentifier(),this.finishNode(e,"RestElement")},z.shouldAllowYieldIdentifier=function(){return this.match(T._yield)&&!this.state.strict&&!this.state.inGenerator},z.parseBindingIdentifier=function(){return this.parseIdentifier(this.shouldAllowYieldIdentifier())},z.parseBindingAtom=function(){switch(this.state.type){case T._yield:(this.state.strict||this.state.inGenerator)&&this.unexpected();case T.name:return this.parseIdentifier(!0);case T.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(T.bracketR,!0),this.finishNode(e,"ArrayPattern");case T.braceL:return this.parseObj(!0);default:this.unexpected()}},z.parseBindingList=function(e,t){for(var r=[],n=!0;!this.eat(e);)if(n?n=!1:this.expect(T.comma),t&&this.match(T.comma))r.push(null);else{if(this.eat(e))break;if(this.match(T.ellipsis)){r.push(this.parseAssignableListItemTypes(this.parseRest())),this.expect(e);break}for(var i=[];this.match(T.at);)i.push(this.parseDecorator());var s=this.parseMaybeDefault();i.length&&(s.decorators=i),this.parseAssignableListItemTypes(s),r.push(this.parseMaybeDefault(s.start,s.loc.start,s))}return r},z.parseAssignableListItemTypes=function(e){return e},z.parseMaybeDefault=function(e,t,r){if(t=t||this.state.startLoc,e=e||this.state.start,r=r||this.parseBindingAtom(),!this.eat(T.eq))return r;var n=this.startNodeAt(e,t);return n.left=r,n.right=this.parseMaybeAssign(),this.finishNode(n,"AssignmentPattern")},z.checkLVal=function(e,t,r,n){switch(e.type){case"Identifier":if(this.checkReservedWord(e.name,e.start,!1,!0),r){var i="_"+e.name;r[i]?this.raise(e.start,"Argument name clash in strict mode"):r[i]=!0}break;case"MemberExpression":t&&this.raise(e.start,(t?"Binding":"Assigning to")+" member expression");break;case"ObjectPattern":var s=e.properties,a=Array.isArray(s),o=0;for(s=a?s:s[Symbol.iterator]();;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var l=u;"ObjectProperty"===l.type&&(l=l.value),this.checkLVal(l,t,r,"object destructuring pattern")}break;case"ArrayPattern":var c=e.elements,p=Array.isArray(c),h=0;for(c=p?c:c[Symbol.iterator]();;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if((h=c.next()).done)break;f=h.value}var d=f;d&&this.checkLVal(d,t,r,"array destructuring pattern")}break;case"AssignmentPattern":this.checkLVal(e.left,t,r,"assignment pattern");break;case"RestProperty":this.checkLVal(e.argument,t,r,"rest property");break;case"RestElement":this.checkLVal(e.argument,t,r,"rest element");break;default:var m=(t?"Binding invalid":"Invalid")+" left-hand side"+(n?" in "+n:"expression");this.raise(e.start,m)}};var Y=q.prototype;Y.checkPropClash=function(e,t){if(!e.computed&&!e.kind){var r=e.key;"__proto__"===("Identifier"===r.type?r.name:String(r.value))&&(t.proto&&this.raise(r.start,"Redefinition of __proto__ property"),t.proto=!0)}},Y.getExpression=function(){this.nextToken();var e=this.parseExpression();return this.match(T.eof)||this.unexpected(),e},Y.parseExpression=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.parseMaybeAssign(e,t);if(this.match(T.comma)){var s=this.startNodeAt(r,n);for(s.expressions=[i];this.eat(T.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.toReferencedList(s.expressions),this.finishNode(s,"SequenceExpression")}return i},Y.parseMaybeAssign=function(e,t,r,n){var i=this.state.start,s=this.state.startLoc;if(this.match(T._yield)&&this.state.inGenerator){var a=this.parseYield();return r&&(a=r.call(this,a,i,s)),a}var o=void 0;t?o=!1:(t={start:0},o=!0),(this.match(T.parenL)||this.match(T.name))&&(this.state.potentialArrowAt=this.state.start);var u=this.parseMaybeConditional(e,t,n);if(r&&(u=r.call(this,u,i,s)),this.state.type.isAssign){var l=this.startNodeAt(i,s);if(l.operator=this.state.value,l.left=this.match(T.eq)?this.toAssignable(u,void 0,"assignment expression"):u,t.start=0,this.checkLVal(u,void 0,void 0,"assignment expression"),u.extra&&u.extra.parenthesized){var c=void 0;"ObjectPattern"===u.type?c="`({a}) = 0` use `({a} = 0)`":"ArrayPattern"===u.type&&(c="`([a]) = 0` use `([a] = 0)`"),c&&this.raise(u.start,"You're trying to assign to a parenthesized expression, eg. instead of "+c)}return this.next(),l.right=this.parseMaybeAssign(e),this.finishNode(l,"AssignmentExpression")}return o&&t.start&&this.unexpected(t.start),u},Y.parseMaybeConditional=function(e,t,r){var n=this.state.start,i=this.state.startLoc,s=this.parseExprOps(e,t);return t&&t.start?s:this.parseConditional(s,e,n,i,r)},Y.parseConditional=function(e,t,r,n){if(this.eat(T.question)){var i=this.startNodeAt(r,n);return i.test=e,i.consequent=this.parseMaybeAssign(),this.expect(T.colon),i.alternate=this.parseMaybeAssign(t),this.finishNode(i,"ConditionalExpression")}return e},Y.parseExprOps=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.parseMaybeUnary(t);return t&&t.start?i:this.parseExprOp(i,r,n,-1,e)},Y.parseExprOp=function(e,t,r,n,i){var s=this.state.type.binop;if(!(null==s||i&&this.match(T._in))&&s>n){var a=this.startNodeAt(t,r);a.left=e,a.operator=this.state.value,"**"!==a.operator||"UnaryExpression"!==e.type||!e.extra||e.extra.parenthesizedArgument||e.extra.parenthesized||this.raise(e.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");var o=this.state.type;this.next();var u=this.state.start,l=this.state.startLoc;return a.right=this.parseExprOp(this.parseMaybeUnary(),u,l,o.rightAssociative?s-1:s,i),this.finishNode(a,o===T.logicalOR||o===T.logicalAND?"LogicalExpression":"BinaryExpression"),this.parseExprOp(a,t,r,n,i)}return e},Y.parseMaybeUnary=function(e){if(this.state.type.prefix){var t=this.startNode(),r=this.match(T.incDec);t.operator=this.state.value,t.prefix=!0,this.next();var n=this.state.type;return t.argument=this.parseMaybeUnary(),this.addExtra(t,"parenthesizedArgument",!(n!==T.parenL||t.argument.extra&&t.argument.extra.parenthesized)),e&&e.start&&this.unexpected(e.start),r?this.checkLVal(t.argument,void 0,void 0,"prefix operation"):this.state.strict&&"delete"===t.operator&&"Identifier"===t.argument.type&&this.raise(t.start,"Deleting local variable in strict mode"),this.finishNode(t,r?"UpdateExpression":"UnaryExpression")}var i=this.state.start,s=this.state.startLoc,a=this.parseExprSubscripts(e);if(e&&e.start)return a;for(;this.state.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(i,s);o.operator=this.state.value,o.prefix=!1,o.argument=a,this.checkLVal(a,void 0,void 0,"postfix operation"),this.next(),a=this.finishNode(o,"UpdateExpression")}return a},Y.parseExprSubscripts=function(e){var t=this.state.start,r=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseExprAtom(e);return"ArrowFunctionExpression"===i.type&&i.start===n?i:e&&e.start?i:this.parseSubscripts(i,t,r)},Y.parseSubscripts=function(e,t,r,n){for(;;){if(!n&&this.eat(T.doubleColon)){var i=this.startNodeAt(t,r);return i.object=e,i.callee=this.parseNoCallExpr(),this.parseSubscripts(this.finishNode(i,"BindExpression"),t,r,n)}if(this.eat(T.dot)){var s=this.startNodeAt(t,r);s.object=e,s.property=this.parseIdentifier(!0),s.computed=!1,e=this.finishNode(s,"MemberExpression")}else if(this.eat(T.bracketL)){var a=this.startNodeAt(t,r);a.object=e,a.property=this.parseExpression(),a.computed=!0,this.expect(T.bracketR),e=this.finishNode(a,"MemberExpression")}else if(!n&&this.match(T.parenL)){var o=this.state.potentialArrowAt===e.start&&"Identifier"===e.type&&"async"===e.name&&!this.canInsertSemicolon();this.next();var u=this.startNodeAt(t,r);if(u.callee=e,u.arguments=this.parseCallExpressionArguments(T.parenR,o),"Import"===u.callee.type&&1!==u.arguments.length&&this.raise(u.start,"import() requires exactly one argument"),e=this.finishNode(u,"CallExpression"),o&&this.shouldParseAsyncArrow())return this.parseAsyncArrowFromCallExpression(this.startNodeAt(t,r),u);this.toReferencedList(u.arguments)}else{if(!this.match(T.backQuote))return e;var l=this.startNodeAt(t,r);l.tag=e,l.quasi=this.parseTemplate(!0),e=this.finishNode(l,"TaggedTemplateExpression")}}},Y.parseCallExpressionArguments=function(e,t){for(var r=[],n=void 0,i=!0;!this.eat(e);){if(i)i=!1;else if(this.expect(T.comma),this.eat(e))break;this.match(T.parenL)&&!n&&(n=this.state.start),r.push(this.parseExprListItem(!1,t?{start:0}:void 0,t?{start:0}:void 0))}return t&&n&&this.shouldParseAsyncArrow()&&this.unexpected(),r},Y.shouldParseAsyncArrow=function(){return this.match(T.arrow)},Y.parseAsyncArrowFromCallExpression=function(e,t){return this.expect(T.arrow),this.parseArrowExpression(e,t.arguments,!0)},Y.parseNoCallExpr=function(){var e=this.state.start,t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,t,!0)},Y.parseExprAtom=function(e){var t=this.state.potentialArrowAt===this.state.start,r=void 0;switch(this.state.type){case T._super:return this.state.inMethod||this.state.inClassProperty||this.options.allowSuperOutsideMethod||this.raise(this.state.start,"'super' outside of function or class"),r=this.startNode(),this.next(),this.match(T.parenL)||this.match(T.bracketL)||this.match(T.dot)||this.unexpected(),this.match(T.parenL)&&"constructor"!==this.state.inMethod&&!this.options.allowSuperOutsideMethod&&this.raise(r.start,"super() outside of class constructor"),this.finishNode(r,"Super");case T._import:return this.hasPlugin("dynamicImport")||this.unexpected(),r=this.startNode(),this.next(),this.match(T.parenL)||this.unexpected(null,T.parenL),this.finishNode(r,"Import");case T._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case T._yield:this.state.inGenerator&&this.unexpected();case T.name:r=this.startNode();var n="await"===this.state.value&&this.state.inAsync,i=this.shouldAllowYieldIdentifier(),s=this.parseIdentifier(n||i);if("await"===s.name){if(this.state.inAsync||this.inModule)return this.parseAwait(r)}else{if("async"===s.name&&this.match(T._function)&&!this.canInsertSemicolon())return this.next(),this.parseFunction(r,!1,!1,!0);if(t&&"async"===s.name&&this.match(T.name)){var a=[this.parseIdentifier()];return this.expect(T.arrow),this.parseArrowExpression(r,a,!0)}}return t&&!this.canInsertSemicolon()&&this.eat(T.arrow)?this.parseArrowExpression(r,[s]):s;case T._do:if(this.hasPlugin("doExpressions")){var o=this.startNode();this.next();var u=this.state.inFunction,l=this.state.labels;return this.state.labels=[],this.state.inFunction=!1,o.body=this.parseBlock(!1,!0),this.state.inFunction=u,this.state.labels=l,this.finishNode(o,"DoExpression")}case T.regexp:var c=this.state.value;return r=this.parseLiteral(c.value,"RegExpLiteral"),r.pattern=c.pattern,r.flags=c.flags,r;case T.num:return this.parseLiteral(this.state.value,"NumericLiteral");case T.string:return this.parseLiteral(this.state.value,"StringLiteral");case T._null:return r=this.startNode(),this.next(),this.finishNode(r,"NullLiteral");case T._true:case T._false:return r=this.startNode(),r.value=this.match(T._true),this.next(),this.finishNode(r,"BooleanLiteral");case T.parenL:return this.parseParenAndDistinguishExpression(null,null,t);case T.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(T.bracketR,!0,e),this.toReferencedList(r.elements),this.finishNode(r,"ArrayExpression");case T.braceL:return this.parseObj(!1,e);case T._function:return this.parseFunctionExpression();case T.at:this.parseDecorators();case T._class:return r=this.startNode(),this.takeDecorators(r),this.parseClass(r,!1);case T._new:return this.parseNew();case T.backQuote:return this.parseTemplate(!1);case T.doubleColon:r=this.startNode(),this.next(),r.object=null;var p=r.callee=this.parseNoCallExpr();if("MemberExpression"===p.type)return this.finishNode(r,"BindExpression");this.raise(p.start,"Binding should be performed on object property.");default:this.unexpected()}},Y.parseFunctionExpression=function(){var e=this.startNode(),t=this.parseIdentifier(!0);return this.state.inGenerator&&this.eat(T.dot)&&this.hasPlugin("functionSent")?this.parseMetaProperty(e,t,"sent"):this.parseFunction(e,!1)},Y.parseMetaProperty=function(e,t,r){return e.meta=t,e.property=this.parseIdentifier(!0),e.property.name!==r&&this.raise(e.property.start,"The only valid meta property for new is "+t.name+"."+r),this.finishNode(e,"MetaProperty")},Y.parseLiteral=function(e,t,r,n){r=r||this.state.start,n=n||this.state.startLoc;var i=this.startNodeAt(r,n);return this.addExtra(i,"rawValue",e),this.addExtra(i,"raw",this.input.slice(r,this.state.end)),i.value=e,this.next(),this.finishNode(i,t)},Y.parseParenExpression=function(){this.expect(T.parenL);var e=this.parseExpression();return this.expect(T.parenR),e},Y.parseParenAndDistinguishExpression=function(e,t,r){e=e||this.state.start,t=t||this.state.startLoc;var n=void 0;this.expect(T.parenL);for(var i=this.state.start,s=this.state.startLoc,a=[],o={start:0},u={start:0},l=!0,c=void 0,p=void 0;!this.match(T.parenR);){if(l)l=!1;else if(this.expect(T.comma,u.start||null),this.match(T.parenR)){p=this.state.start;break}if(this.match(T.ellipsis)){var h=this.state.start,f=this.state.startLoc;c=this.state.start,a.push(this.parseParenItem(this.parseRest(),h,f));break}a.push(this.parseMaybeAssign(!1,o,this.parseParenItem,u))}var d=this.state.start,m=this.state.startLoc;this.expect(T.parenR);var y=this.startNodeAt(e,t);if(r&&this.shouldParseArrow()&&(y=this.parseArrow(y))){var g=a,b=Array.isArray(g),v=0;for(g=b?g:g[Symbol.iterator]();;){var x;if(b){if(v>=g.length)break;x=g[v++]}else{if((v=g.next()).done)break;x=v.value}var E=x;E.extra&&E.extra.parenthesized&&this.unexpected(E.extra.parenStart)}return this.parseArrowExpression(y,a)}return a.length||this.unexpected(this.state.lastTokStart),p&&this.unexpected(p),c&&this.unexpected(c),o.start&&this.unexpected(o.start),u.start&&this.unexpected(u.start),a.length>1?((n=this.startNodeAt(i,s)).expressions=a,this.toReferencedList(n.expressions),this.finishNodeAt(n,"SequenceExpression",d,m)):n=a[0],this.addExtra(n,"parenthesized",!0),this.addExtra(n,"parenStart",e),n},Y.shouldParseArrow=function(){return!this.canInsertSemicolon()},Y.parseArrow=function(e){if(this.eat(T.arrow))return e},Y.parseParenItem=function(e){return e},Y.parseNew=function(){var e=this.startNode(),t=this.parseIdentifier(!0);if(this.eat(T.dot)){var r=this.parseMetaProperty(e,t,"target");return this.state.inFunction||this.raise(r.property.start,"new.target can only be used in functions"),r}return e.callee=this.parseNoCallExpr(),this.eat(T.parenL)?(e.arguments=this.parseExprList(T.parenR),this.toReferencedList(e.arguments)):e.arguments=[],this.finishNode(e,"NewExpression")},Y.parseTemplateElement=function(e){var t=this.startNode();return null===this.state.value&&(e&&this.hasPlugin("templateInvalidEscapes")?this.state.invalidTemplateEscapePosition=null:this.raise(this.state.invalidTemplateEscapePosition,"Invalid escape sequence in template")),t.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),t.tail=this.match(T.backQuote),this.finishNode(t,"TemplateElement")},Y.parseTemplate=function(e){var t=this.startNode();this.next(),t.expressions=[];var r=this.parseTemplateElement(e);for(t.quasis=[r];!r.tail;)this.expect(T.dollarBraceL),t.expressions.push(this.parseExpression()),this.expect(T.braceR),t.quasis.push(r=this.parseTemplateElement(e));return this.next(),this.finishNode(t,"TemplateLiteral")},Y.parseObj=function(e,t){var r=[],n=Object.create(null),i=!0,s=this.startNode();s.properties=[],this.next();for(var a=null;!this.eat(T.braceR);){if(i)i=!1;else if(this.expect(T.comma),this.eat(T.braceR))break;for(;this.match(T.at);)r.push(this.parseDecorator());var o=this.startNode(),u=!1,l=!1,c=void 0,p=void 0;if(r.length&&(o.decorators=r,r=[]),this.hasPlugin("objectRestSpread")&&this.match(T.ellipsis)){if(o=this.parseSpread(e?{start:0}:void 0),o.type=e?"RestProperty":"SpreadProperty",e&&this.toAssignable(o.argument,!0,"object pattern"),s.properties.push(o),!e)continue;var h=this.state.start;if(null===a){if(this.eat(T.braceR))break;if(this.match(T.comma)&&this.lookahead().type===T.braceR)continue;a=h;continue}this.unexpected(a,"Cannot have multiple rest elements when destructuring")}if(o.method=!1,o.shorthand=!1,(e||t)&&(c=this.state.start,p=this.state.startLoc),e||(u=this.eat(T.star)),!e&&this.isContextual("async")){u&&this.unexpected();var f=this.parseIdentifier();this.match(T.colon)||this.match(T.parenL)||this.match(T.braceR)||this.match(T.eq)||this.match(T.comma)?(o.key=f,o.computed=!1):(l=!0,this.hasPlugin("asyncGenerators")&&(u=this.eat(T.star)),this.parsePropertyName(o))}else this.parsePropertyName(o);this.parseObjPropValue(o,c,p,u,l,e,t),this.checkPropClash(o,n),o.shorthand&&this.addExtra(o,"shorthand",!0),s.properties.push(o)}return null!==a&&this.unexpected(a,"The rest element has to be the last element when destructuring"),r.length&&this.raise(this.state.start,"You have trailing decorators with no property"),this.finishNode(s,e?"ObjectPattern":"ObjectExpression")},Y.isGetterOrSetterMethod=function(e,t){return!t&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&(this.match(T.string)||this.match(T.num)||this.match(T.bracketL)||this.match(T.name)||this.state.type.keyword)},Y.checkGetterSetterParamCount=function(e){var t="get"===e.kind?0:1;if(e.params.length!==t){var r=e.start;"get"===e.kind?this.raise(r,"getter should have no params"):this.raise(r,"setter should have exactly one param")}},Y.parseObjectMethod=function(e,t,r,n){return r||t||this.match(T.parenL)?(n&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,r),this.finishNode(e,"ObjectMethod")):this.isGetterOrSetterMethod(e,n)?((t||r)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),this.parseMethod(e),this.checkGetterSetterParamCount(e),this.finishNode(e,"ObjectMethod")):void 0},Y.parseObjectProperty=function(e,t,r,n,i){return this.eat(T.colon)?(e.value=n?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(!1,i),this.finishNode(e,"ObjectProperty")):e.computed||"Identifier"!==e.key.type?void 0:(this.checkReservedWord(e.key.name,e.key.start,!0,!0),n?e.value=this.parseMaybeDefault(t,r,e.key.__clone()):this.match(T.eq)&&i?(i.start||(i.start=this.state.start),e.value=this.parseMaybeDefault(t,r,e.key.__clone())):e.value=e.key.__clone(),e.shorthand=!0,this.finishNode(e,"ObjectProperty"))},Y.parseObjPropValue=function(e,t,r,n,i,s,a){var o=this.parseObjectMethod(e,n,i,s)||this.parseObjectProperty(e,t,r,s,a);return o||this.unexpected(),o},Y.parsePropertyName=function(e){if(this.eat(T.bracketL))e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(T.bracketR);else{e.computed=!1;var t=this.state.inPropertyName;this.state.inPropertyName=!0,e.key=this.match(T.num)||this.match(T.string)?this.parseExprAtom():this.parseIdentifier(!0),this.state.inPropertyName=t}return e.key},Y.initFunction=function(e,t){e.id=null,e.generator=!1,e.expression=!1,e.async=!!t},Y.parseMethod=function(e,t,r){var n=this.state.inMethod;return this.state.inMethod=e.kind||!0,this.initFunction(e,r),this.expect(T.parenL),e.params=this.parseBindingList(T.parenR),e.generator=!!t,this.parseFunctionBody(e),this.state.inMethod=n,e},Y.parseArrowExpression=function(e,t,r){return this.initFunction(e,r),e.params=this.toAssignableList(t,!0,"arrow function parameters"),this.parseFunctionBody(e,!0),this.finishNode(e,"ArrowFunctionExpression")},Y.isStrictBody=function(e,t){if(!t&&e.body.directives.length){var r=e.body.directives,n=Array.isArray(r),i=0;for(r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}if("use strict"===s.value.value)return!0}}return!1},Y.parseFunctionBody=function(e,t){var r=t&&!this.match(T.braceL),n=this.state.inAsync;if(this.state.inAsync=e.async,r)e.body=this.parseMaybeAssign(),e.expression=!0;else{var i=this.state.inFunction,s=this.state.inGenerator,a=this.state.labels;this.state.inFunction=!0,this.state.inGenerator=e.generator,this.state.labels=[],e.body=this.parseBlock(!0),e.expression=!1,this.state.inFunction=i,this.state.inGenerator=s,this.state.labels=a}this.state.inAsync=n;var o=this.isStrictBody(e,r),u=this.state.strict||t||o;if(o&&e.id&&"Identifier"===e.id.type&&"yield"===e.id.name&&this.raise(e.id.start,"Binding yield in strict mode"),u){var l=Object.create(null),c=this.state.strict;o&&(this.state.strict=!0),e.id&&this.checkLVal(e.id,!0,void 0,"function name");var p=e.params,h=Array.isArray(p),f=0;for(p=h?p:p[Symbol.iterator]();;){var d;if(h){if(f>=p.length)break;d=p[f++]}else{if((f=p.next()).done)break;d=f.value}var m=d;o&&"Identifier"!==m.type&&this.raise(m.start,"Non-simple parameter in strict mode"),this.checkLVal(m,!0,l,"function parameter list")}this.state.strict=c}},Y.parseExprList=function(e,t,r){for(var n=[],i=!0;!this.eat(e);){if(i)i=!1;else if(this.expect(T.comma),this.eat(e))break;n.push(this.parseExprListItem(t,r))}return n},Y.parseExprListItem=function(e,t,r){return e&&this.match(T.comma)?null:this.match(T.ellipsis)?this.parseSpread(t):this.parseMaybeAssign(!1,t,this.parseParenItem,r)},Y.parseIdentifier=function(e){var t=this.startNode();return e||this.checkReservedWord(this.state.value,this.state.start,!!this.state.type.keyword,!1),this.match(T.name)?t.name=this.state.value:this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),!e&&"await"===t.name&&this.state.inAsync&&this.raise(t.start,"invalid use of await inside of an async function"),t.loc.identifierName=t.name,this.next(),this.finishNode(t,"Identifier")},Y.checkReservedWord=function(e,t,r,n){(this.isReservedWord(e)||r&&this.isKeyword(e))&&this.raise(t,e+" is a reserved word"),this.state.strict&&(f.strict(e)||n&&f.strictBind(e))&&this.raise(t,e+" is a reserved word in strict mode")},Y.parseAwait=function(e){return this.state.inAsync||this.unexpected(),this.match(T.star)&&this.raise(e.start,"await* has been removed from the async functions proposal. Use Promise.all() instead."),e.argument=this.parseMaybeUnary(),this.finishNode(e,"AwaitExpression")},Y.parseYield=function(){var e=this.startNode();return this.next(),this.match(T.semi)||this.canInsertSemicolon()||!this.match(T.star)&&!this.state.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(T.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")};var H=q.prototype,$=["leadingComments","trailingComments","innerComments"],Q=function(){function e(t,r,n){D(this,e),this.type="",this.start=t,this.end=0,this.loc=new M(r),n&&(this.loc.filename=n)}return e.prototype.__clone=function(){var t=new e;for(var r in this)$.indexOf(r)<0&&(t[r]=this[r]);return t},e}();H.startNode=function(){return new Q(this.state.start,this.state.startLoc,this.filename)},H.startNodeAt=function(e,t){return new Q(e,t,this.filename)},H.finishNode=function(e,t){return l.call(this,e,t,this.state.lastTokEnd,this.state.lastTokEndLoc)},H.finishNodeAt=function(e,t,r,n){return l.call(this,e,t,r,n)};q.prototype.raise=function(e,t){var r=function(e,t){for(var r=1,n=0;;){O.lastIndex=n;var i=O.exec(e);if(!(i&&i.index<t))return new L(r,t-n);++r,n=i.index+i[0].length}}(this.input,e);t+=" ("+r.line+":"+r.column+")";var n=new SyntaxError(t);throw n.pos=e,n.loc=r,n};var Z=q.prototype;Z.addComment=function(e){this.filename&&(e.loc.filename=this.filename),this.state.trailingComments.push(e),this.state.leadingComments.push(e)},Z.processComment=function(e){if(!("Program"===e.type&&e.body.length>0)){var t=this.state.commentStack,r=void 0,n=void 0,i=void 0,s=void 0,a=void 0;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=e.end?(i=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else{var o=c(t);t.length>0&&o.trailingComments&&o.trailingComments[0].start>=e.end&&(i=o.trailingComments,o.trailingComments=null)}for(t.length>0&&c(t).start>=e.start&&(r=t.pop());t.length>0&&c(t).start>=e.start;)n=t.pop();if(!n&&r&&(n=r),r&&this.state.leadingComments.length>0){var u=c(this.state.leadingComments);if("ObjectProperty"===r.type){if(u.start>=e.start&&this.state.commentPreviousNode){for(a=0;a<this.state.leadingComments.length;a++)this.state.leadingComments[a].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(a,1),a--);this.state.leadingComments.length>0&&(r.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}}else if("CallExpression"===e.type&&e.arguments&&e.arguments.length){var l=c(e.arguments);l&&u.start>=l.start&&u.end<=e.end&&this.state.commentPreviousNode&&this.state.leadingComments.length>0&&(l.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}}if(n){if(n.leadingComments)if(n!==e&&c(n.leadingComments).end<=e.start)e.leadingComments=n.leadingComments,n.leadingComments=null;else for(s=n.leadingComments.length-2;s>=0;--s)if(n.leadingComments[s].end<=e.start){e.leadingComments=n.leadingComments.splice(0,s+1);break}}else if(this.state.leadingComments.length>0)if(c(this.state.leadingComments).end<=e.start){if(this.state.commentPreviousNode)for(a=0;a<this.state.leadingComments.length;a++)this.state.leadingComments[a].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(a,1),a--);this.state.leadingComments.length>0&&(e.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(s=0;s<this.state.leadingComments.length&&!(this.state.leadingComments[s].end>e.start);s++);e.leadingComments=this.state.leadingComments.slice(0,s),0===e.leadingComments.length&&(e.leadingComments=null),0===(i=this.state.leadingComments.slice(s)).length&&(i=null)}this.state.commentPreviousNode=e,i&&(i.length&&i[0].start>=e.start&&c(i).end<=e.end?e.innerComments=i:e.trailingComments=i),t.push(e)}};var ee=q.prototype;ee.estreeParseRegExpLiteral=function(e){var t=e.pattern,r=e.flags,n=null;try{n=new RegExp(t,r)}catch(e){}var i=this.estreeParseLiteral(n);return i.regex={pattern:t,flags:r},i},ee.estreeParseLiteral=function(e){return this.parseLiteral(e,"Literal")},ee.directiveToStmt=function(e){var t=e.value,r=this.startNodeAt(e.start,e.loc.start),n=this.startNodeAt(t.start,t.loc.start);return n.value=t.value,n.raw=t.extra.raw,r.expression=this.finishNodeAt(n,"Literal",t.end,t.loc.end),r.directive=t.extra.raw.slice(1,-1),this.finishNodeAt(r,"ExpressionStatement",e.end,e.loc.end)};var te=["any","mixed","empty","bool","boolean","number","string","void","null"],re=q.prototype;re.flowParseTypeInitialiser=function(e){var t=this.state.inType;this.state.inType=!0,this.expect(e||T.colon);var r=this.flowParseType();return this.state.inType=t,r},re.flowParsePredicate=function(){var e=this.startNode(),t=this.state.startLoc,r=this.state.start;this.expect(T.modulo);var n=this.state.startLoc;return this.expectContextual("checks"),t.line===n.line&&t.column===n.column-1||this.raise(r,"Spaces between ´%´ and ´checks´ are not allowed here."),this.eat(T.parenL)?(e.expression=this.parseExpression(),this.expect(T.parenR),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")},re.flowParseTypeAndPredicateInitialiser=function(){var e=this.state.inType;this.state.inType=!0,this.expect(T.colon);var t=null,r=null;return this.match(T.modulo)?(this.state.inType=e,r=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(T.modulo)&&(r=this.flowParsePredicate())),[t,r]},re.flowParseDeclareClass=function(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")},re.flowParseDeclareFunction=function(e){this.next();var t=e.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.isRelational("<")?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(T.parenL);var i=this.flowParseFunctionTypeParams();r.params=i.params,r.rest=i.rest,this.expect(T.parenR);var s=null,a=this.flowParseTypeAndPredicateInitialiser();return r.returnType=a[0],s=a[1],n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),n.predicate=s,t.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.finishNode(t,t.type),this.semicolon(),this.finishNode(e,"DeclareFunction")},re.flowParseDeclare=function(e){return this.match(T._class)?this.flowParseDeclareClass(e):this.match(T._function)?this.flowParseDeclareFunction(e):this.match(T._var)?this.flowParseDeclareVariable(e):this.isContextual("module")?this.lookahead().type===T.dot?this.flowParseDeclareModuleExports(e):this.flowParseDeclareModule(e):this.isContextual("type")?this.flowParseDeclareTypeAlias(e):this.isContextual("opaque")?this.flowParseDeclareOpaqueType(e):this.isContextual("interface")?this.flowParseDeclareInterface(e):this.match(T._export)?this.flowParseDeclareExportDeclaration(e):void this.unexpected()},re.flowParseDeclareExportDeclaration=function(e){if(this.expect(T._export),this.isContextual("opaque"))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");throw this.unexpected()},re.flowParseDeclareVariable=function(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(),this.semicolon(),this.finishNode(e,"DeclareVariable")},re.flowParseDeclareModule=function(e){this.next(),this.match(T.string)?e.id=this.parseExprAtom():e.id=this.parseIdentifier();var t=e.body=this.startNode(),r=t.body=[];for(this.expect(T.braceL);!this.match(T.braceR);){var n=this.startNode();if(this.match(T._import)){var i=this.lookahead();"type"!==i.value&&"typeof"!==i.value&&this.unexpected(null,"Imports within a `declare module` body must always be `import type` or `import typeof`"),this.parseImport(n)}else this.expectContextual("declare","Only declares and type imports are allowed inside declare module"),n=this.flowParseDeclare(n,!0);r.push(n)}return this.expect(T.braceR),this.finishNode(t,"BlockStatement"),this.finishNode(e,"DeclareModule")},re.flowParseDeclareModuleExports=function(e){return this.expectContextual("module"),this.expect(T.dot),this.expectContextual("exports"),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")},re.flowParseDeclareTypeAlias=function(e){return this.next(),this.flowParseTypeAlias(e),this.finishNode(e,"DeclareTypeAlias")},re.flowParseDeclareOpaqueType=function(e){return this.next(),this.flowParseOpaqueType(e,!0),this.finishNode(e,"DeclareOpaqueType")},re.flowParseDeclareInterface=function(e){return this.next(),this.flowParseInterfaceish(e),this.finishNode(e,"DeclareInterface")},re.flowParseInterfaceish=function(e){if(e.id=this.parseIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],e.mixins=[],this.eat(T._extends))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(T.comma));if(this.isContextual("mixins")){this.next();do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(T.comma))}e.body=this.flowParseObjectType(!0,!1,!1)},re.flowParseInterfaceExtends=function(){var e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")},re.flowParseInterface=function(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")},re.flowParseRestrictedIdentifier=function(e){return te.indexOf(this.state.value)>-1&&this.raise(this.state.start,"Cannot overwrite primitive type "+this.state.value),this.parseIdentifier(e)},re.flowParseTypeAlias=function(e){return e.id=this.flowParseRestrictedIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(T.eq),this.semicolon(),this.finishNode(e,"TypeAlias")},re.flowParseOpaqueType=function(e,t){return this.expectContextual("type"),e.id=this.flowParseRestrictedIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(T.colon)&&(e.supertype=this.flowParseTypeInitialiser(T.colon)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(T.eq)),this.semicolon(),this.finishNode(e,"OpaqueType")},re.flowParseTypeParameter=function(){var e=this.startNode(),t=this.flowParseVariance(),r=this.flowParseTypeAnnotatableIdentifier();return e.name=r.name,e.variance=t,e.bound=r.typeAnnotation,this.match(T.eq)&&(this.eat(T.eq),e.default=this.flowParseType()),this.finishNode(e,"TypeParameter")},re.flowParseTypeParameterDeclaration=function(){var e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.isRelational("<")||this.match(T.jsxTagStart)?this.next():this.unexpected();do{t.params.push(this.flowParseTypeParameter()),this.isRelational(">")||this.expect(T.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")},re.flowParseTypeParameterInstantiation=function(){var e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flowParseType()),this.isRelational(">")||this.expect(T.comma);return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")},re.flowParseObjectPropertyKey=function(){return this.match(T.num)||this.match(T.string)?this.parseExprAtom():this.parseIdentifier(!0)},re.flowParseObjectTypeIndexer=function(e,t,r){return e.static=t,this.expect(T.bracketL),this.lookahead().type===T.colon?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(T.bracketR),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeIndexer")},re.flowParseObjectTypeMethodish=function(e){for(e.params=[],e.rest=null,e.typeParameters=null,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(T.parenL);!this.match(T.parenR)&&!this.match(T.ellipsis);)e.params.push(this.flowParseFunctionTypeParam()),this.match(T.parenR)||this.expect(T.comma);return this.eat(T.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),this.expect(T.parenR),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")},re.flowParseObjectTypeMethod=function(e,t,r,n){var i=this.startNodeAt(e,t);return i.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e,t)),i.static=r,i.key=n,i.optional=!1,this.flowObjectTypeSemicolon(),this.finishNode(i,"ObjectTypeProperty")},re.flowParseObjectTypeCallProperty=function(e,t){var r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeCallProperty")},re.flowParseObjectType=function(e,t,r){var n=this.state.inType;this.state.inType=!0;var i=this.startNode(),s=void 0,a=void 0,o=!1;i.callProperties=[],i.properties=[],i.indexers=[];var u=void 0,l=void 0;for(t&&this.match(T.braceBarL)?(this.expect(T.braceBarL),u=T.braceBarR,l=!0):(this.expect(T.braceL),u=T.braceR,l=!1),i.exact=l;!this.match(u);){var c=!1,p=this.state.start,h=this.state.startLoc;s=this.startNode(),e&&this.isContextual("static")&&this.lookahead().type!==T.colon&&(this.next(),o=!0);var f=this.state.start,d=this.flowParseVariance();this.match(T.bracketL)?i.indexers.push(this.flowParseObjectTypeIndexer(s,o,d)):this.match(T.parenL)||this.isRelational("<")?(d&&this.unexpected(f),i.callProperties.push(this.flowParseObjectTypeCallProperty(s,o))):this.match(T.ellipsis)?(r||this.unexpected(null,"Spread operator cannot appear in class or interface definitions"),d&&this.unexpected(d.start,"Spread properties cannot have variance"),this.expect(T.ellipsis),s.argument=this.flowParseType(),this.flowObjectTypeSemicolon(),i.properties.push(this.finishNode(s,"ObjectTypeSpreadProperty"))):(a=this.flowParseObjectPropertyKey(),this.isRelational("<")||this.match(T.parenL)?(d&&this.unexpected(d.start),i.properties.push(this.flowParseObjectTypeMethod(p,h,o,a))):(this.eat(T.question)&&(c=!0),s.key=a,s.value=this.flowParseTypeInitialiser(),s.optional=c,s.static=o,s.variance=d,this.flowObjectTypeSemicolon(),i.properties.push(this.finishNode(s,"ObjectTypeProperty")))),o=!1}this.expect(u);var m=this.finishNode(i,"ObjectTypeAnnotation");return this.state.inType=n,m},re.flowObjectTypeSemicolon=function(){this.eat(T.semi)||this.eat(T.comma)||this.match(T.braceR)||this.match(T.braceBarR)||this.unexpected()},re.flowParseQualifiedTypeIdentifier=function(e,t,r){e=e||this.state.start,t=t||this.state.startLoc;for(var n=r||this.parseIdentifier();this.eat(T.dot);){var i=this.startNodeAt(e,t);i.qualification=n,i.id=this.parseIdentifier(),n=this.finishNode(i,"QualifiedTypeIdentifier")}return n},re.flowParseGenericType=function(e,t,r){var n=this.startNodeAt(e,t);return n.typeParameters=null,n.id=this.flowParseQualifiedTypeIdentifier(e,t,r),this.isRelational("<")&&(n.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(n,"GenericTypeAnnotation")},re.flowParseTypeofType=function(){var e=this.startNode();return this.expect(T._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")},re.flowParseTupleType=function(){var e=this.startNode();for(e.types=[],this.expect(T.bracketL);this.state.pos<this.input.length&&!this.match(T.bracketR)&&(e.types.push(this.flowParseType()),!this.match(T.bracketR));)this.expect(T.comma);return this.expect(T.bracketR),this.finishNode(e,"TupleTypeAnnotation")},re.flowParseFunctionTypeParam=function(){var e=null,t=!1,r=null,n=this.startNode(),i=this.lookahead();return i.type===T.colon||i.type===T.question?(e=this.parseIdentifier(),this.eat(T.question)&&(t=!0),r=this.flowParseTypeInitialiser()):r=this.flowParseType(),n.name=e,n.optional=t,n.typeAnnotation=r,this.finishNode(n,"FunctionTypeParam")},re.reinterpretTypeAsFunctionTypeParam=function(e){var t=this.startNodeAt(e.start,e.loc.start);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,"FunctionTypeParam")},re.flowParseFunctionTypeParams=function(){for(var e={params:arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],rest:null};!this.match(T.parenR)&&!this.match(T.ellipsis);)e.params.push(this.flowParseFunctionTypeParam()),this.match(T.parenR)||this.expect(T.comma);return this.eat(T.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),e},re.flowIdentToTypeAnnotation=function(e,t,r,n){switch(n.name){case"any":return this.finishNode(r,"AnyTypeAnnotation");case"void":return this.finishNode(r,"VoidTypeAnnotation");case"bool":case"boolean":return this.finishNode(r,"BooleanTypeAnnotation");case"mixed":return this.finishNode(r,"MixedTypeAnnotation");case"empty":return this.finishNode(r,"EmptyTypeAnnotation");case"number":return this.finishNode(r,"NumberTypeAnnotation");case"string":return this.finishNode(r,"StringTypeAnnotation");default:return this.flowParseGenericType(e,t,n)}},re.flowParsePrimaryType=function(){var e=this.state.start,t=this.state.startLoc,r=this.startNode(),n=void 0,i=void 0,s=!1,a=this.state.noAnonFunctionType;switch(this.state.type){case T.name:return this.flowIdentToTypeAnnotation(e,t,r,this.parseIdentifier());case T.braceL:return this.flowParseObjectType(!1,!1,!0);case T.braceBarL:return this.flowParseObjectType(!1,!0,!0);case T.bracketL:return this.flowParseTupleType();case T.relational:if("<"===this.state.value)return r.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(T.parenL),n=this.flowParseFunctionTypeParams(),r.params=n.params,r.rest=n.rest,this.expect(T.parenR),this.expect(T.arrow),r.returnType=this.flowParseType(),this.finishNode(r,"FunctionTypeAnnotation");break;case T.parenL:if(this.next(),!this.match(T.parenR)&&!this.match(T.ellipsis))if(this.match(T.name)){var o=this.lookahead().type;s=o!==T.question&&o!==T.colon}else s=!0;if(s){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(T.comma)||this.match(T.parenR)&&this.lookahead().type===T.arrow))return this.expect(T.parenR),i;this.eat(T.comma)}return n=i?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):this.flowParseFunctionTypeParams(),r.params=n.params,r.rest=n.rest,this.expect(T.parenR),this.expect(T.arrow),r.returnType=this.flowParseType(),r.typeParameters=null,this.finishNode(r,"FunctionTypeAnnotation");case T.string:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case T._true:case T._false:return r.value=this.match(T._true),this.next(),this.finishNode(r,"BooleanLiteralTypeAnnotation");case T.plusMin:if("-"===this.state.value)return this.next(),this.match(T.num)||this.unexpected(null,"Unexpected token, expected number"),this.parseLiteral(-this.state.value,"NumericLiteralTypeAnnotation",r.start,r.loc.start);this.unexpected();case T.num:return this.parseLiteral(this.state.value,"NumericLiteralTypeAnnotation");case T._null:return r.value=this.match(T._null),this.next(),this.finishNode(r,"NullLiteralTypeAnnotation");case T._this:return r.value=this.match(T._this),this.next(),this.finishNode(r,"ThisTypeAnnotation");case T.star:return this.next(),this.finishNode(r,"ExistentialTypeParam");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType()}this.unexpected()},re.flowParsePostfixType=function(){for(var e=this.state.start,t=this.state.startLoc,r=this.flowParsePrimaryType();!this.canInsertSemicolon()&&this.match(T.bracketL);){var n=this.startNodeAt(e,t);n.elementType=r,this.expect(T.bracketL),this.expect(T.bracketR),r=this.finishNode(n,"ArrayTypeAnnotation")}return r},re.flowParsePrefixType=function(){var e=this.startNode();return this.eat(T.question)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()},re.flowParseAnonFunctionWithoutParens=function(){var e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(T.arrow)){var t=this.startNodeAt(e.start,e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e},re.flowParseIntersectionType=function(){var e=this.startNode();this.eat(T.bitwiseAND);var t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(T.bitwiseAND);)e.types.push(this.flowParseAnonFunctionWithoutParens());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")},re.flowParseUnionType=function(){var e=this.startNode();this.eat(T.bitwiseOR);var t=this.flowParseIntersectionType();for(e.types=[t];this.eat(T.bitwiseOR);)e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")},re.flowParseType=function(){var e=this.state.inType;this.state.inType=!0;var t=this.flowParseUnionType();return this.state.inType=e,t},re.flowParseTypeAnnotation=function(){var e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")},re.flowParseTypeAndPredicateAnnotation=function(){var e=this.startNode(),t=this.flowParseTypeAndPredicateInitialiser();return e.typeAnnotation=t[0],e.predicate=t[1],this.finishNode(e,"TypeAnnotation")},re.flowParseTypeAnnotatableIdentifier=function(){var e=this.flowParseRestrictedIdentifier();return this.match(T.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(e,e.type)),e},re.typeCastToParameter=function(e){return e.expression.typeAnnotation=e.typeAnnotation,this.finishNodeAt(e.expression,e.expression.type,e.typeAnnotation.end,e.typeAnnotation.loc.end)},re.flowParseVariance=function(){var e=null;return this.match(T.plusMin)&&("+"===this.state.value?e="plus":"-"===this.state.value&&(e="minus"),this.next()),e};var ne=String.fromCodePoint;if(!ne){var ie=String.fromCharCode,se=Math.floor;ne=function(){var e=[],t=void 0,r=void 0,n=-1,i=arguments.length;if(!i)return"";for(var s="";++n<i;){var a=Number(arguments[n]);if(!isFinite(a)||a<0||a>1114111||se(a)!=a)throw RangeError("Invalid code point: "+a);a<=65535?e.push(a):(t=55296+((a-=65536)>>10),r=a%1024+56320,e.push(t,r)),(n+1==i||e.length>16384)&&(s+=ie.apply(null,e),e.length=0)}return s}}var ae=ne,oe={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:"♦"},ue=/^[\da-fA-F]+$/,le=/^\d+$/;I.j_oTag=new j("<tag",!1),I.j_cTag=new j("</tag",!1),I.j_expr=new j("<tag>...</tag>",!0,!0),T.jsxName=new w("jsxName"),T.jsxText=new w("jsxText",{beforeExpr:!0}),T.jsxTagStart=new w("jsxTagStart",{startsExpr:!0}),T.jsxTagEnd=new w("jsxTagEnd"),T.jsxTagStart.updateContext=function(){this.state.context.push(I.j_expr),this.state.context.push(I.j_oTag),this.state.exprAllowed=!1},T.jsxTagEnd.updateContext=function(e){var t=this.state.context.pop();t===I.j_oTag&&e===T.slash||t===I.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===I.j_expr):this.state.exprAllowed=!0};var ce=q.prototype;ce.jsxReadToken=function(){for(var e="",t=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated JSX contents");var r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:return this.state.pos===this.state.start?60===r&&this.state.exprAllowed?(++this.state.pos,this.finishToken(T.jsxTagStart)):this.getTokenFromCode(r):(e+=this.input.slice(t,this.state.pos),this.finishToken(T.jsxText,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:o(r)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}},ce.jsxReadNewLine=function(e){var t=this.input.charCodeAt(this.state.pos),r=void 0;return++this.state.pos,13===t&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,r=e?"\n":"\r\n"):r=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,r},ce.jsxReadString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;38===n?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos):o(n)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}return t+=this.input.slice(r,this.state.pos++),this.finishToken(T.string,t)},ce.jsxReadEntity=function(){for(var e="",t=0,r=void 0,n=this.input[this.state.pos],i=++this.state.pos;this.state.pos<this.input.length&&t++<10;){if(";"===(n=this.input[this.state.pos++])){"#"===e[0]?"x"===e[1]?(e=e.substr(2),ue.test(e)&&(r=ae(parseInt(e,16)))):(e=e.substr(1),le.test(e)&&(r=ae(parseInt(e,10)))):r=oe[e];break}e+=n}return r||(this.state.pos=i,"&")},ce.jsxReadWord=function(){var e=void 0,t=this.state.pos;do{e=this.input.charCodeAt(++this.state.pos)}while(a(e)||45===e);return this.finishToken(T.jsxName,this.input.slice(t,this.state.pos))},ce.jsxParseIdentifier=function(){var e=this.startNode();return this.match(T.jsxName)?e.name=this.state.value:this.state.type.keyword?e.name=this.state.type.keyword:this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")},ce.jsxParseNamespacedName=function(){var e=this.state.start,t=this.state.startLoc,r=this.jsxParseIdentifier();if(!this.eat(T.colon))return r;var n=this.startNodeAt(e,t);return n.namespace=r,n.name=this.jsxParseIdentifier(),this.finishNode(n,"JSXNamespacedName")},ce.jsxParseElementName=function(){for(var e=this.state.start,t=this.state.startLoc,r=this.jsxParseNamespacedName();this.eat(T.dot);){var n=this.startNodeAt(e,t);n.object=r,n.property=this.jsxParseIdentifier(),r=this.finishNode(n,"JSXMemberExpression")}return r},ce.jsxParseAttributeValue=function(){var e=void 0;switch(this.state.type){case T.braceL:if("JSXEmptyExpression"!==(e=this.jsxParseExpressionContainer()).expression.type)return e;this.raise(e.start,"JSX attributes must only be assigned a non-empty expression");case T.jsxTagStart:case T.string:return e=this.parseExprAtom(),e.extra=null,e;default:this.raise(this.state.start,"JSX value should be either an expression or a quoted JSX text")}},ce.jsxParseEmptyExpression=function(){var e=this.startNodeAt(this.state.lastTokEnd,this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.start,this.state.startLoc)},ce.jsxParseSpreadChild=function(){var e=this.startNode();return this.expect(T.braceL),this.expect(T.ellipsis),e.expression=this.parseExpression(),this.expect(T.braceR),this.finishNode(e,"JSXSpreadChild")},ce.jsxParseExpressionContainer=function(){var e=this.startNode();return this.next(),this.match(T.braceR)?e.expression=this.jsxParseEmptyExpression():e.expression=this.parseExpression(),this.expect(T.braceR),this.finishNode(e,"JSXExpressionContainer")},ce.jsxParseAttribute=function(){var e=this.startNode();return this.eat(T.braceL)?(this.expect(T.ellipsis),e.argument=this.parseMaybeAssign(),this.expect(T.braceR),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(T.eq)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))},ce.jsxParseOpeningElementAt=function(e,t){var r=this.startNodeAt(e,t);for(r.attributes=[],r.name=this.jsxParseElementName();!this.match(T.slash)&&!this.match(T.jsxTagEnd);)r.attributes.push(this.jsxParseAttribute());return r.selfClosing=this.eat(T.slash),this.expect(T.jsxTagEnd),this.finishNode(r,"JSXOpeningElement")},ce.jsxParseClosingElementAt=function(e,t){var r=this.startNodeAt(e,t);return r.name=this.jsxParseElementName(),this.expect(T.jsxTagEnd),this.finishNode(r,"JSXClosingElement")},ce.jsxParseElementAt=function(e,t){var r=this.startNodeAt(e,t),n=[],i=this.jsxParseOpeningElementAt(e,t),s=null;if(!i.selfClosing){e:for(;;)switch(this.state.type){case T.jsxTagStart:if(e=this.state.start,t=this.state.startLoc,this.next(),this.eat(T.slash)){s=this.jsxParseClosingElementAt(e,t);break e}n.push(this.jsxParseElementAt(e,t));break;case T.jsxText:n.push(this.parseExprAtom());break;case T.braceL:this.lookahead().type===T.ellipsis?n.push(this.jsxParseSpreadChild()):n.push(this.jsxParseExpressionContainer());break;default:this.unexpected()}h(s.name)!==h(i.name)&&this.raise(s.start,"Expected corresponding JSX closing tag for <"+h(i.name)+">")}return r.openingElement=i,r.closingElement=s,r.children=n,this.match(T.relational)&&"<"===this.state.value&&this.raise(this.state.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(r,"JSXElement")},ce.jsxParseElement=function(){var e=this.state.start,t=this.state.startLoc;return this.next(),this.jsxParseElementAt(e,t)};V.estree=function(e){e.extend("checkDeclaration",function(e){return function(t){p(t)?this.checkDeclaration(t.value):e.call(this,t)}}),e.extend("checkGetterSetterParamCount",function(){return function(e){var t="get"===e.kind?0:1;if(e.value.params.length!==t){var r=e.start;"get"===e.kind?this.raise(r,"getter should have no params"):this.raise(r,"setter should have exactly one param")}}}),e.extend("checkLVal",function(e){return function(t,r,n){var i=this;switch(t.type){case"ObjectPattern":t.properties.forEach(function(e){i.checkLVal("Property"===e.type?e.value:e,r,n,"object destructuring pattern")});break;default:for(var s=arguments.length,a=Array(s>3?s-3:0),o=3;o<s;o++)a[o-3]=arguments[o];e.call.apply(e,[this,t,r,n].concat(a))}}}),e.extend("checkPropClash",function(){return function(e,t){if(!e.computed&&p(e)){var r=e.key;"__proto__"===("Identifier"===r.type?r.name:String(r.value))&&(t.proto&&this.raise(r.start,"Redefinition of __proto__ property"),t.proto=!0)}}}),e.extend("isStrictBody",function(){return function(e,t){if(!t&&e.body.body.length>0){var r=e.body.body,n=Array.isArray(r),i=0;for(r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;if("ExpressionStatement"!==a.type||"Literal"!==a.expression.type)break;if("use strict"===a.expression.value)return!0}}return!1}}),e.extend("isValidDirective",function(){return function(e){return!("ExpressionStatement"!==e.type||"Literal"!==e.expression.type||"string"!=typeof e.expression.value||e.expression.extra&&e.expression.extra.parenthesized)}}),e.extend("stmtToDirective",function(e){return function(t){var r=e.call(this,t),n=t.expression.value;return r.value.value=n,r}}),e.extend("parseBlockBody",function(e){return function(t){for(var r=this,n=arguments.length,i=Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];e.call.apply(e,[this,t].concat(i)),t.directives.reverse().forEach(function(e){t.body.unshift(r.directiveToStmt(e))}),delete t.directives}}),e.extend("parseClassMethod",function(){return function(e,t,r,n){this.parseMethod(t,r,n),t.typeParameters&&(t.value.typeParameters=t.typeParameters,delete t.typeParameters),e.body.push(this.finishNode(t,"MethodDefinition"))}}),e.extend("parseExprAtom",function(e){return function(){switch(this.state.type){case T.regexp:return this.estreeParseRegExpLiteral(this.state.value);case T.num:case T.string:return this.estreeParseLiteral(this.state.value);case T._null:return this.estreeParseLiteral(null);case T._true:return this.estreeParseLiteral(!0);case T._false:return this.estreeParseLiteral(!1);default:for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.call.apply(e,[this].concat(r))}}}),e.extend("parseLiteral",function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=e.call.apply(e,[this].concat(r));return i.raw=i.extra.raw,delete i.extra,i}}),e.extend("parseMethod",function(e){return function(t){var r=this.startNode();r.kind=t.kind;for(var n=arguments.length,i=Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];return r=e.call.apply(e,[this,r].concat(i)),delete r.kind,t.value=this.finishNode(r,"FunctionExpression"),t}}),e.extend("parseObjectMethod",function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=e.call.apply(e,[this].concat(r));return i&&("method"===i.kind&&(i.kind="init"),i.type="Property"),i}}),e.extend("parseObjectProperty",function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=e.call.apply(e,[this].concat(r));return i&&(i.kind="init",i.type="Property"),i}}),e.extend("toAssignable",function(e){return function(t,r){for(var n=arguments.length,i=Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];if(p(t))return this.toAssignable.apply(this,[t.value,r].concat(i)),t;if("ObjectExpression"===t.type){t.type="ObjectPattern";var a=t.properties,o=Array.isArray(a),u=0;for(a=o?a:a[Symbol.iterator]();;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var c=l;"get"===c.kind||"set"===c.kind?this.raise(c.key.start,"Object pattern can't contain getter or setter"):c.method?this.raise(c.key.start,"Object pattern can't contain methods"):this.toAssignable(c,r,"object destructuring pattern")}return t}return e.call.apply(e,[this,t,r].concat(i))}})},V.flow=function(e){e.extend("parseFunctionBody",function(e){return function(t,r){return this.match(T.colon)&&!r&&(t.returnType=this.flowParseTypeAndPredicateAnnotation()),e.call(this,t,r)}}),e.extend("parseStatement",function(e){return function(t,r){if(this.state.strict&&this.match(T.name)&&"interface"===this.state.value){var n=this.startNode();return this.next(),this.flowParseInterface(n)}return e.call(this,t,r)}}),e.extend("parseExpressionStatement",function(e){return function(t,r){if("Identifier"===r.type)if("declare"===r.name){if(this.match(T._class)||this.match(T.name)||this.match(T._function)||this.match(T._var)||this.match(T._export))return this.flowParseDeclare(t)}else if(this.match(T.name)){if("interface"===r.name)return this.flowParseInterface(t);if("type"===r.name)return this.flowParseTypeAlias(t);if("opaque"===r.name)return this.flowParseOpaqueType(t,!1)}return e.call(this,t,r)}}),e.extend("shouldParseExportDeclaration",function(e){return function(){return this.isContextual("type")||this.isContextual("interface")||this.isContextual("opaque")||e.call(this)}}),e.extend("isExportDefaultSpecifier",function(e){return function(){return(!this.match(T.name)||"type"!==this.state.value&&"interface"!==this.state.value&&"opaque"!==this.state.value)&&e.call(this)}}),e.extend("parseConditional",function(e){return function(t,r,n,i,s){if(s&&this.match(T.question)){var a=this.state.clone();try{return e.call(this,t,r,n,i)}catch(e){if(e instanceof SyntaxError)return this.state=a,s.start=e.pos||this.state.start,t;throw e}}return e.call(this,t,r,n,i)}}),e.extend("parseParenItem",function(e){return function(t,r,n){if(t=e.call(this,t,r,n),this.eat(T.question)&&(t.optional=!0),this.match(T.colon)){var i=this.startNodeAt(r,n);return i.expression=t,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return t}}),e.extend("parseExport",function(e){return function(t){return"ExportNamedDeclaration"===(t=e.call(this,t)).type&&(t.exportKind=t.exportKind||"value"),t}}),e.extend("parseExportDeclaration",function(e){return function(t){if(this.isContextual("type")){t.exportKind="type";var r=this.startNode();return this.next(),this.match(T.braceL)?(t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t),null):this.flowParseTypeAlias(r)}if(this.isContextual("opaque")){t.exportKind="type";var n=this.startNode();return this.next(),this.flowParseOpaqueType(n,!1)}if(this.isContextual("interface")){t.exportKind="type";var i=this.startNode();return this.next(),this.flowParseInterface(i)}return e.call(this,t)}}),e.extend("parseClassId",function(e){return function(t){e.apply(this,arguments),this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}}),e.extend("isKeyword",function(e){return function(t){return(!this.state.inType||"void"!==t)&&e.call(this,t)}}),e.extend("readToken",function(e){return function(t){return!this.state.inType||62!==t&&60!==t?e.call(this,t):this.finishOp(T.relational,1)}}),e.extend("jsx_readToken",function(e){return function(){if(!this.state.inType)return e.call(this)}}),e.extend("toAssignable",function(e){return function(t,r,n){return"TypeCastExpression"===t.type?e.call(this,this.typeCastToParameter(t),r,n):e.call(this,t,r,n)}}),e.extend("toAssignableList",function(e){return function(t,r,n){for(var i=0;i<t.length;i++){var s=t[i];s&&"TypeCastExpression"===s.type&&(t[i]=this.typeCastToParameter(s))}return e.call(this,t,r,n)}}),e.extend("toReferencedList",function(){return function(e){for(var t=0;t<e.length;t++){var r=e[t];r&&r._exprListItem&&"TypeCastExpression"===r.type&&this.raise(r.start,"Unexpected type cast")}return e}}),e.extend("parseExprListItem",function(e){return function(){for(var t=this.startNode(),r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];var s=e.call.apply(e,[this].concat(n));return this.match(T.colon)?(t._exprListItem=!0,t.expression=s,t.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(t,"TypeCastExpression")):s}}),e.extend("checkLVal",function(e){return function(t){if("TypeCastExpression"!==t.type)return e.apply(this,arguments)}}),e.extend("parseClassProperty",function(e){return function(t){return delete t.variancePos,this.match(T.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),e.call(this,t)}}),e.extend("isClassMethod",function(e){return function(){return this.isRelational("<")||e.call(this)}}),e.extend("isClassProperty",function(e){return function(){return this.match(T.colon)||e.call(this)}}),e.extend("isNonstaticConstructor",function(e){return function(t){return!this.match(T.colon)&&e.call(this,t)}}),e.extend("parseClassMethod",function(e){return function(t,r){r.variance&&this.unexpected(r.variancePos),delete r.variance,delete r.variancePos,this.isRelational("<")&&(r.typeParameters=this.flowParseTypeParameterDeclaration());for(var n=arguments.length,i=Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];e.call.apply(e,[this,t,r].concat(i))}}),e.extend("parseClassSuper",function(e){return function(t,r){if(e.call(this,t,r),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();var n=t.implements=[];do{var i=this.startNode();i.id=this.parseIdentifier(),this.isRelational("<")?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,n.push(this.finishNode(i,"ClassImplements"))}while(this.eat(T.comma))}}}),e.extend("parsePropertyName",function(e){return function(t){var r=this.state.start,n=this.flowParseVariance(),i=e.call(this,t);return t.variance=n,t.variancePos=r,i}}),e.extend("parseObjPropValue",function(e){return function(t){t.variance&&this.unexpected(t.variancePos),delete t.variance,delete t.variancePos;var r=void 0;this.isRelational("<")&&(r=this.flowParseTypeParameterDeclaration(),this.match(T.parenL)||this.unexpected()),e.apply(this,arguments),r&&((t.value||t).typeParameters=r)}}),e.extend("parseAssignableListItemTypes",function(){return function(e){return this.eat(T.question)&&(e.optional=!0),this.match(T.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),this.finishNode(e,e.type),e}}),e.extend("parseMaybeDefault",function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=e.apply(this,r);return"AssignmentPattern"===i.type&&i.typeAnnotation&&i.right.start<i.typeAnnotation.start&&this.raise(i.typeAnnotation.start,"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`"),i}}),e.extend("parseImportSpecifiers",function(e){return function(t){t.importKind="value";var r=null;if(this.match(T._typeof)?r="typeof":this.isContextual("type")&&(r="type"),r){var n=this.lookahead();(n.type===T.name&&"from"!==n.value||n.type===T.braceL||n.type===T.star)&&(this.next(),t.importKind=r)}e.call(this,t)}}),e.extend("parseImportSpecifier",function(){return function(e){var t=this.startNode(),r=this.state.start,n=this.parseIdentifier(!0),i=null;"type"===n.name?i="type":"typeof"===n.name&&(i="typeof");var s=!1;if(this.isContextual("as")){var a=this.parseIdentifier(!0);null===i||this.match(T.name)||this.state.type.keyword?(t.imported=n,t.importKind=null,t.local=this.parseIdentifier()):(t.imported=a,t.importKind=i,t.local=a.__clone())}else null!==i&&(this.match(T.name)||this.state.type.keyword)?(t.imported=this.parseIdentifier(!0),t.importKind=i,this.eatContextual("as")?t.local=this.parseIdentifier():(s=!0,t.local=t.imported.__clone())):(s=!0,t.imported=n,t.importKind=null,t.local=t.imported.__clone());"type"!==e.importKind&&"typeof"!==e.importKind||"type"!==t.importKind&&"typeof"!==t.importKind||this.raise(r,"`The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements`"),s&&this.checkReservedWord(t.local.name,t.start,!0,!0),this.checkLVal(t.local,!0,void 0,"import specifier"),e.specifiers.push(this.finishNode(t,"ImportSpecifier"))}}),e.extend("parseFunctionParams",function(e){return function(t){this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),e.call(this,t)}}),e.extend("parseVarHead",function(e){return function(t){e.call(this,t),this.match(T.colon)&&(t.id.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(t.id,t.id.type))}}),e.extend("parseAsyncArrowFromCallExpression",function(e){return function(t,r){if(this.match(T.colon)){var n=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,t.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=n}return e.call(this,t,r)}}),e.extend("shouldParseAsyncArrow",function(e){return function(){return this.match(T.colon)||e.call(this)}}),e.extend("parseMaybeAssign",function(e){return function(){for(var t=null,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];if(T.jsxTagStart&&this.match(T.jsxTagStart)){var s=this.state.clone();try{return e.apply(this,n)}catch(e){if(!(e instanceof SyntaxError))throw e;this.state=s,this.state.context.length-=2,t=e}}if(null!=t||this.isRelational("<")){var a=void 0,o=void 0;try{o=this.flowParseTypeParameterDeclaration(),(a=e.apply(this,n)).typeParameters=o,a.start=o.start,a.loc.start=o.loc.start}catch(e){throw t||e}if("ArrowFunctionExpression"===a.type)return a;if(null!=t)throw t;this.raise(o.start,"Expected an arrow function after this type parameter declaration")}return e.apply(this,n)}}),e.extend("parseArrow",function(e){return function(t){if(this.match(T.colon)){var r=this.state.clone();try{var n=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;var i=this.flowParseTypeAndPredicateAnnotation();this.state.noAnonFunctionType=n,this.canInsertSemicolon()&&this.unexpected(),this.match(T.arrow)||this.unexpected(),t.returnType=i}catch(e){if(!(e instanceof SyntaxError))throw e;this.state=r}}return e.call(this,t)}}),e.extend("shouldParseArrow",function(e){return function(){return this.match(T.colon)||e.call(this)}})},V.jsx=function(e){e.extend("parseExprAtom",function(e){return function(t){if(this.match(T.jsxText)){var r=this.parseLiteral(this.state.value,"JSXText");return r.extra=null,r}return this.match(T.jsxTagStart)?this.jsxParseElement():e.call(this,t)}}),e.extend("readToken",function(e){return function(t){if(this.state.inPropertyName)return e.call(this,t);var r=this.curContext();if(r===I.j_expr)return this.jsxReadToken();if(r===I.j_oTag||r===I.j_cTag){if(s(t))return this.jsxReadWord();if(62===t)return++this.state.pos,this.finishToken(T.jsxTagEnd);if((34===t||39===t)&&r===I.j_oTag)return this.jsxReadString(t)}return 60===t&&this.state.exprAllowed?(++this.state.pos,this.finishToken(T.jsxTagStart)):e.call(this,t)}}),e.extend("updateContext",function(e){return function(t){if(this.match(T.braceL)){var r=this.curContext();r===I.j_oTag?this.state.context.push(I.braceExpression):r===I.j_expr?this.state.context.push(I.templateQuasi):e.call(this,t),this.state.exprAllowed=!0}else{if(!this.match(T.slash)||t!==T.jsxTagStart)return e.call(this,t);this.state.context.length-=2,this.state.context.push(I.j_cTag),this.state.exprAllowed=!1}}})},r.parse=function(e,t){return new q(t,e).parse()},r.parseExpression=function(e,t){var r=new q(t,e);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()},r.tokTypes=T},{}],189:[function(e,t,r){"use strict";function n(e,t,r){e instanceof RegExp&&(e=i(e,r)),t instanceof RegExp&&(t=i(t,r));var n=s(e,t,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+e.length,n[1]),post:r.slice(n[1]+t.length)}}function i(e,t){var r=t.match(e);return r?r[0]:null}function s(e,t,r){var n,i,s,a,o,u=r.indexOf(e),l=r.indexOf(t,u+1),c=u;if(u>=0&&l>0){for(n=[],s=r.length;c>=0&&!o;)c==u?(n.push(c),u=r.indexOf(e,c+1)):1==n.length?o=[n.pop(),l]:((i=n.pop())<s&&(s=i,a=l),l=r.indexOf(t,c+1)),c=u<l&&u>=0?u:l;n.length&&(o=[s,a])}return o}t.exports=n,n.range=s},{}],190:[function(e,t,r){"use strict";function n(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 a[e>>18&63]+a[e>>12&63]+a[e>>6&63]+a[63&e]}function s(e,t,r){for(var n,s=[],a=t;a<r;a+=3)n=(e[a]<<16)+(e[a+1]<<8)+e[a+2],s.push(i(n));return s.join("")}r.byteLength=function(e){return 3*e.length/4-n(e)},r.toByteArray=function(e){var t,r,i,s,a,l=e.length;s=n(e),a=new u(3*l/4-s),r=s>0?l-4:l;var c=0;for(t=0;t<r;t+=4)i=o[e.charCodeAt(t)]<<18|o[e.charCodeAt(t+1)]<<12|o[e.charCodeAt(t+2)]<<6|o[e.charCodeAt(t+3)],a[c++]=i>>16&255,a[c++]=i>>8&255,a[c++]=255&i;return 2===s?(i=o[e.charCodeAt(t)]<<2|o[e.charCodeAt(t+1)]>>4,a[c++]=255&i):1===s&&(i=o[e.charCodeAt(t)]<<10|o[e.charCodeAt(t+1)]<<4|o[e.charCodeAt(t+2)]>>2,a[c++]=i>>8&255,a[c++]=255&i),a},r.fromByteArray=function(e){for(var t,r=e.length,n=r%3,i="",o=[],u=0,l=r-n;u<l;u+=16383)o.push(s(e,u,u+16383>l?l:u+16383));return 1===n?(t=e[r-1],i+=a[t>>2],i+=a[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=a[t>>10],i+=a[t>>4&63],i+=a[t<<2&63],i+="="),o.push(i),o.join("")};for(var a=[],o=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,p=l.length;c<p;++c)a[c]=l[c],o[l.charCodeAt(c)]=c;o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},{}],191:[function(e,t,r){function n(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function i(e){return e.split(f).join("\\").split(d).join("{").split(m).join("}").split(y).join(",").split(g).join(".")}function s(e){if(!e)return[""];var t=[],r=h("{","}",e);if(!r)return e.split(",");var n=r.pre,i=r.body,a=r.post,o=n.split(",");o[o.length-1]+="{"+i+"}";var u=s(a);return a.length&&(o[o.length-1]+=u.shift(),o.push.apply(o,u)),t.push.apply(t,o),t}function a(e){return"{"+e+"}"}function o(e){return/^-?0\d/.test(e)}function u(e,t){return e<=t}function l(e,t){return e>=t}function c(e,t){var r=[],i=h("{","}",e);if(!i||/\$$/.test(i.pre))return[e];var f=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),d=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),y=f||d,g=i.body.indexOf(",")>=0;if(!y&&!g)return i.post.match(/,.*\}/)?(e=i.pre+"{"+i.body+m+i.post,c(e)):[e];var b;if(y)b=i.body.split(/\.\./);else if(1===(b=s(i.body)).length&&1===(b=c(b[0],!1).map(a)).length){return(E=i.post.length?c(i.post,!1):[""]).map(function(e){return i.pre+b[0]+e})}var v,x=i.pre,E=i.post.length?c(i.post,!1):[""];if(y){var A=n(b[0]),D=n(b[1]),S=Math.max(b[0].length,b[1].length),C=3==b.length?Math.abs(n(b[2])):1,_=u;D<A&&(C*=-1,_=l);var w=b.some(o);v=[];for(var k=A;_(k,D);k+=C){var F;if(d)"\\"===(F=String.fromCharCode(k))&&(F="");else if(F=String(k),w){var T=S-F.length;if(T>0){var P=new Array(T+1).join("0");F=k<0?"-"+P+F.slice(1):P+F}}v.push(F)}}else v=p(b,function(e){return c(e,!1)});for(var B=0;B<v.length;B++)for(var O=0;O<E.length;O++){var N=x+v[B]+E[O];(!t||y||N)&&r.push(N)}return r}var p=e("concat-map"),h=e("balanced-match");t.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),c(function(e){return e.split("\\\\").join(f).split("\\{").join(d).split("\\}").join(m).split("\\,").join(y).split("\\.").join(g)}(e),!0).map(i)):[]};var f="\0SLASH"+Math.random()+"\0",d="\0OPEN"+Math.random()+"\0",m="\0CLOSE"+Math.random()+"\0",y="\0COMMA"+Math.random()+"\0",g="\0PERIOD"+Math.random()+"\0"},{"balanced-match":189,"concat-map":195}],192:[function(e,t,r){},{}],193:[function(e,t,r){arguments[4][192][0].apply(r,arguments)},{dup:192}],194:[function(e,t,r){"use strict";function n(e){if(e>j)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=i.prototype,t}function i(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return o(e)}return s(e,t,r)}function s(e,t,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return T(e)?function(e,t,r){if(t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(r||0))throw new RangeError("'length' is out of bounds");var n;n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r);return n.__proto__=i.prototype,n}(e,t,r):"string"==typeof e?function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!i.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var r=0|c(e,t),s=n(r),a=s.write(e,t);a!==r&&(s=s.slice(0,a));return s}(e,t):function(e){if(i.isBuffer(e)){var t=0|l(e.length),r=n(t);return 0===r.length?r:(e.copy(r,0,0,t),r)}if(e){if(P(e)||"length"in e)return"number"!=typeof e.length||B(e.length)?n(0):u(e);if("Buffer"===e.type&&Array.isArray(e.data))return u(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e)}function a(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 o(e){return a(e),n(e<0?0:0|l(e))}function u(e){for(var t=e.length<0?0:0|l(e.length),r=n(t),i=0;i<t;i+=1)r[i]=255&e[i];return r}function l(e){if(e>=j)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+j.toString(16)+" bytes");return 0|e}function c(e,t){if(i.isBuffer(e))return e.length;if(P(e)||T(e))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return w(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return k(e).length;default:if(n)return w(e).length;t=(""+t).toLowerCase(),n=!0}}function p(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0);(!r||r<0||r>n)&&(r=n);for(var i="",s=t;s<r;++s)i+=function(e){return e<16?"0"+e.toString(16):e.toString(16)}(e[s]);return i}(this,t,r);case"utf8":case"utf-8":return E(this,t,r);case"ascii":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}(this,t,r);case"base64":return function(e,t,r){return 0===t&&r===e.length?O.fromByteArray(e):O.fromByteArray(e.slice(t,r))}(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){for(var n=e.slice(t,r),i="",s=0;s<n.length;s+=2)i+=String.fromCharCode(n[s]+256*n[s+1]);return i}(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function h(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function f(e,t,r,n,s){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,B(r)&&(r=s?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(s)return-1;r=e.length-1}else if(r<0){if(!s)return-1;r=0}if("string"==typeof t&&(t=i.from(t,n)),i.isBuffer(t))return 0===t.length?-1:d(e,t,r,n,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):d(e,[t],r,n,s);throw new TypeError("val must be string, number or Buffer")}function d(e,t,r,n,i){function s(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,o=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,o/=2,u/=2,r/=2}var l;if(i){var c=-1;for(l=r;l<o;l++)if(s(e,l)===s(t,-1===c?0:l-c)){if(-1===c&&(c=l),l-c+1===u)return c*a}else-1!==c&&(l-=l-c),c=-1}else for(r+u>o&&(r=o-u),l=r;l>=0;l--){for(var p=!0,h=0;h<u;h++)if(s(e,l+h)!==s(t,h)){p=!1;break}if(p)return l}return-1}function m(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var a=0;a<n;++a){var o=parseInt(t.substr(2*a,2),16);if(B(o))return a;e[r+a]=o}return a}function y(e,t,r,n){return F(w(t,e.length-r),e,r,n)}function g(e,t,r,n){return F(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function b(e,t,r,n){return g(e,t,r,n)}function v(e,t,r,n){return F(k(t),e,r,n)}function x(e,t,r,n){return F(function(e,t){for(var r,n,i,s=[],a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,s.push(i),s.push(n);return s}(t,e.length-r),e,r,n)}function E(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var s=e[i],a=null,o=s>239?4:s>223?3:s>191?2:1;if(i+o<=r){var u,l,c,p;switch(o){case 1:s<128&&(a=s);break;case 2:128==(192&(u=e[i+1]))&&(p=(31&s)<<6|63&u)>127&&(a=p);break;case 3:u=e[i+1],l=e[i+2],128==(192&u)&&128==(192&l)&&(p=(15&s)<<12|(63&u)<<6|63&l)>2047&&(p<55296||p>57343)&&(a=p);break;case 4:u=e[i+1],l=e[i+2],c=e[i+3],128==(192&u)&&128==(192&l)&&128==(192&c)&&(p=(15&s)<<18|(63&u)<<12|(63&l)<<6|63&c)>65535&&p<1114112&&(a=p)}}null===a?(a=65533,o=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=o}return function(e){var t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=I));return r}(n)}function A(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,r,n,s,a){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<a)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function S(e,t,r,n,i,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(e,t,r,n,i){return t=+t,r>>>=0,i||S(e,0,r,4),N.write(e,t,r,n,23,4),r+4}function _(e,t,r,n,i){return t=+t,r>>>=0,i||S(e,0,r,8),N.write(e,t,r,n,52,8),r+8}function w(e,t){t=t||1/0;for(var r,n=e.length,i=null,s=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function k(e){return O.toByteArray(function(e){if((e=e.trim().replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function T(e){return e instanceof ArrayBuffer||null!=e&&null!=e.constructor&&"ArrayBuffer"===e.constructor.name&&"number"==typeof e.byteLength}function P(e){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(e)}function B(e){return e!=e}var O=e("base64-js"),N=e("ieee754");r.Buffer=i,r.SlowBuffer=function(e){return+e!=e&&(e=0),i.alloc(+e)},r.INSPECT_MAX_BYTES=50;var j=2147483647;r.kMaxLength=j,(i.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(e,t,r){return s(e,t,r)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(e,t,r){return function(e,t,r){return a(e),e<=0?n(e):void 0!==t?"string"==typeof r?n(e).fill(t,r):n(e).fill(t):n(e)}(e,t,r)},i.allocUnsafe=function(e){return o(e)},i.allocUnsafeSlow=function(e){return o(e)},i.isBuffer=function(e){return null!=e&&!0===e._isBuffer},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,s=0,a=Math.min(r,n);s<a;++s)if(e[s]!==t[s]){r=e[s],n=t[s];break}return r<n?-1:n<r?1:0},i.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}},i.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return i.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=i.allocUnsafe(t),s=0;for(r=0;r<e.length;++r){var a=e[r];if(!i.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,s),s+=a.length}return n},i.byteLength=c,i.prototype._isBuffer=!0,i.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)h(this,t,t+1);return this},i.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)h(this,t,t+3),h(this,t+1,t+2);return this},i.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)h(this,t,t+7),h(this,t+1,t+6),h(this,t+2,t+5),h(this,t+3,t+4);return this},i.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?E(this,0,e):p.apply(this,arguments)},i.prototype.equals=function(e){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===i.compare(this,e)},i.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},i.prototype.compare=function(e,t,r,n,s){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===s&&(s=this.length),t<0||r>e.length||n<0||s>this.length)throw new RangeError("out of range index");if(n>=s&&t>=r)return 0;if(n>=s)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,s>>>=0,this===e)return 0;for(var a=s-n,o=r-t,u=Math.min(a,o),l=this.slice(n,s),c=e.slice(t,r),p=0;p<u;++p)if(l[p]!==c[p]){a=l[p],o=c[p];break}return a<o?-1:o<a?1:0},i.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},i.prototype.indexOf=function(e,t,r){return f(this,e,t,r,!0)},i.prototype.lastIndexOf=function(e,t,r){return f(this,e,t,r,!1)},i.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return m(this,e,t,r);case"utf8":case"utf-8":return y(this,e,t,r);case"ascii":return g(this,e,t,r);case"latin1":case"binary":return b(this,e,t,r);case"base64":return v(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;i.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return n.__proto__=i.prototype,n},i.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||A(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return n},i.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||A(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},i.prototype.readUInt8=function(e,t){return e>>>=0,t||A(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||A(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||A(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||A(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},i.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||A(e,t,this.length);for(var n=t,i=1,s=this[e+--n];n>0&&(i*=256);)s+=this[e+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},i.prototype.readInt8=function(e,t){return e>>>=0,t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||A(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(e,t){e>>>=0,t||A(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e>>>=0,t||A(e,4,this.length),N.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||A(e,4,this.length),N.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||A(e,8,this.length),N.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||A(e,8,this.length),N.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){D(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=1,s=0;for(this[t]=255&e;++s<r&&(i*=256);)this[t+s]=e/i&255;return t+r},i.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){D(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},i.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},i.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var s=0,a=1,o=0;for(this[t]=255&e;++s<r&&(a*=256);)e<0&&0===o&&0!==this[t+s-1]&&(o=1),this[t+s]=(e/a>>0)-o&255;return t+r},i.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var s=r-1,a=1,o=0;for(this[t+s]=255&e;--s>=0&&(a*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/a>>0)-o&255;return t+r},i.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeFloatLE=function(e,t,r){return C(this,e,t,!0,r)},i.prototype.writeFloatBE=function(e,t,r){return C(this,e,t,!1,r)},i.prototype.writeDoubleLE=function(e,t,r){return _(this,e,t,!0,r)},i.prototype.writeDoubleBE=function(e,t,r){return _(this,e,t,!1,r)},i.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,s=n-r;if(this===e&&r<t&&t<n)for(i=s-1;i>=0;--i)e[i+t]=this[i+r];else if(s<1e3)for(i=0;i<s;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+s),t);return s},i.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var s=e.charCodeAt(0);s<256&&(e=s)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!i.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a<r;++a)this[a]=e;else{var o=i.isBuffer(e)?e:new i(e,n),u=o.length;for(a=0;a<r-t;++a)this[a+t]=o[a%u]}return this};var L=/[^+/0-9A-Za-z-_]/g},{"base64-js":190,ieee754:316}],195:[function(e,t,r){t.exports=function(e,t){for(var r=[],i=0;i<e.length;i++){var s=t(e[i],i);n(s)?r.push.apply(r,s):r.push(s)}return r};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],196:[function(e,t,r){e("../modules/web.dom.iterable"),e("../modules/es6.string.iterator"),t.exports=e("../modules/core.get-iterator")},{"../modules/core.get-iterator":287,"../modules/es6.string.iterator":296,"../modules/web.dom.iterable":309}],197:[function(e,t,r){var n=e("../../modules/_core"),i=n.JSON||(n.JSON={stringify:JSON.stringify});t.exports=function(e){return i.stringify.apply(i,arguments)}},{"../../modules/_core":225}],198:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/es6.string.iterator"),e("../modules/web.dom.iterable"),e("../modules/es6.map"),e("../modules/es7.map.to-json"),e("../modules/es7.map.of"),e("../modules/es7.map.from"),t.exports=e("../modules/_core").Map},{"../modules/_core":225,"../modules/es6.map":289,"../modules/es6.object.to-string":295,"../modules/es6.string.iterator":296,"../modules/es7.map.from":300,"../modules/es7.map.of":301,"../modules/es7.map.to-json":302,"../modules/web.dom.iterable":309}],199:[function(e,t,r){e("../../modules/es6.number.max-safe-integer"),t.exports=9007199254740991},{"../../modules/es6.number.max-safe-integer":290}],200:[function(e,t,r){e("../../modules/es6.object.assign"),t.exports=e("../../modules/_core").Object.assign},{"../../modules/_core":225,"../../modules/es6.object.assign":291}],201:[function(e,t,r){e("../../modules/es6.object.create");var n=e("../../modules/_core").Object;t.exports=function(e,t){return n.create(e,t)}},{"../../modules/_core":225,"../../modules/es6.object.create":292}],202:[function(e,t,r){e("../../modules/es6.symbol"),t.exports=e("../../modules/_core").Object.getOwnPropertySymbols},{"../../modules/_core":225,"../../modules/es6.symbol":297}],203:[function(e,t,r){e("../../modules/es6.object.keys"),t.exports=e("../../modules/_core").Object.keys},{"../../modules/_core":225,"../../modules/es6.object.keys":293}],204:[function(e,t,r){e("../../modules/es6.object.set-prototype-of"),t.exports=e("../../modules/_core").Object.setPrototypeOf},{"../../modules/_core":225,"../../modules/es6.object.set-prototype-of":294}],205:[function(e,t,r){e("../../modules/es6.symbol"),t.exports=e("../../modules/_core").Symbol.for},{"../../modules/_core":225,"../../modules/es6.symbol":297}],206:[function(e,t,r){e("../../modules/es6.symbol"),e("../../modules/es6.object.to-string"),e("../../modules/es7.symbol.async-iterator"),e("../../modules/es7.symbol.observable"),t.exports=e("../../modules/_core").Symbol},{"../../modules/_core":225,"../../modules/es6.object.to-string":295,"../../modules/es6.symbol":297,"../../modules/es7.symbol.async-iterator":303,"../../modules/es7.symbol.observable":304}],207:[function(e,t,r){e("../../modules/es6.string.iterator"),e("../../modules/web.dom.iterable"),t.exports=e("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":284,"../../modules/es6.string.iterator":296,"../../modules/web.dom.iterable":309}],208:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/web.dom.iterable"),e("../modules/es6.weak-map"),e("../modules/es7.weak-map.of"),e("../modules/es7.weak-map.from"),t.exports=e("../modules/_core").WeakMap},{"../modules/_core":225,"../modules/es6.object.to-string":295,"../modules/es6.weak-map":298,"../modules/es7.weak-map.from":305,"../modules/es7.weak-map.of":306,"../modules/web.dom.iterable":309}],209:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/web.dom.iterable"),e("../modules/es6.weak-set"),e("../modules/es7.weak-set.of"),e("../modules/es7.weak-set.from"),t.exports=e("../modules/_core").WeakSet},{"../modules/_core":225,"../modules/es6.object.to-string":295,"../modules/es6.weak-set":299,"../modules/es7.weak-set.from":307,"../modules/es7.weak-set.of":308,"../modules/web.dom.iterable":309}],210:[function(e,t,r){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},{}],211:[function(e,t,r){t.exports=function(){}},{}],212:[function(e,t,r){t.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},{}],213:[function(e,t,r){var n=e("./_is-object");t.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},{"./_is-object":243}],214:[function(e,t,r){var n=e("./_for-of");t.exports=function(e,t){var r=[];return n(e,!1,r.push,r,t),r}},{"./_for-of":234}],215:[function(e,t,r){var n=e("./_to-iobject"),i=e("./_to-length"),s=e("./_to-absolute-index");t.exports=function(e){return function(t,r,a){var o,u=n(t),l=i(u.length),c=s(a,l);if(e&&r!=r){for(;l>c;)if((o=u[c++])!=o)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===r)return e||c||0;return!e&&-1}}},{"./_to-absolute-index":275,"./_to-iobject":277,"./_to-length":278}],216:[function(e,t,r){var n=e("./_ctx"),i=e("./_iobject"),s=e("./_to-object"),a=e("./_to-length"),o=e("./_array-species-create");t.exports=function(e,t){var r=1==e,u=2==e,l=3==e,c=4==e,p=6==e,h=5==e||p,f=t||o;return function(t,o,d){for(var m,y,g=s(t),b=i(g),v=n(o,d,3),x=a(b.length),E=0,A=r?f(t,x):u?f(t,0):void 0;x>E;E++)if((h||E in b)&&(m=b[E],y=v(m,E,g),e))if(r)A[E]=y;else if(y)switch(e){case 3:return!0;case 5:return m;case 6:return E;case 2:A.push(m)}else if(c)return!1;return p?-1:l||c?c:A}}},{"./_array-species-create":218,"./_ctx":226,"./_iobject":240,"./_to-length":278,"./_to-object":279}],217:[function(e,t,r){var n=e("./_is-object"),i=e("./_is-array"),s=e("./_wks")("species");t.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),n(t)&&null===(t=t[s])&&(t=void 0)),void 0===t?Array:t}},{"./_is-array":242,"./_is-object":243,"./_wks":285}],218:[function(e,t,r){var n=e("./_array-species-constructor");t.exports=function(e,t){return new(n(e))(t)}},{"./_array-species-constructor":217}],219:[function(e,t,r){var n=e("./_cof"),i=e("./_wks")("toStringTag"),s="Arguments"==n(function(){return arguments}());t.exports=function(e){var t,r,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?r:s?n(t):"Object"==(a=n(t))&&"function"==typeof t.callee?"Arguments":a}},{"./_cof":220,"./_wks":285}],220:[function(e,t,r){var n={}.toString;t.exports=function(e){return n.call(e).slice(8,-1)}},{}],221:[function(e,t,r){"use strict";var n=e("./_object-dp").f,i=e("./_object-create"),s=e("./_redefine-all"),a=e("./_ctx"),o=e("./_an-instance"),u=e("./_for-of"),l=e("./_iter-define"),c=e("./_iter-step"),p=e("./_set-species"),h=e("./_descriptors"),f=e("./_meta").fastKey,d=e("./_validate-collection"),m=h?"_s":"size",y=function(e,t){var r,n=f(t);if("F"!==n)return e._i[n];for(r=e._f;r;r=r.n)if(r.k==t)return r};t.exports={getConstructor:function(e,t,r,l){var c=e(function(e,n){o(e,c,t,"_i"),e._t=t,e._i=i(null),e._f=void 0,e._l=void 0,e[m]=0,void 0!=n&&u(n,r,e[l],e)});return s(c.prototype,{clear:function(){for(var e=d(this,t),r=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete r[n.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var r=d(this,t),n=y(r,e);if(n){var i=n.n,s=n.p;delete r._i[n.i],n.r=!0,s&&(s.n=i),i&&(i.p=s),r._f==n&&(r._f=i),r._l==n&&(r._l=s),r[m]--}return!!n},forEach:function(e){d(this,t);for(var r,n=a(e,arguments.length>1?arguments[1]:void 0,3);r=r?r.n:this._f;)for(n(r.v,r.k,this);r&&r.r;)r=r.p},has:function(e){return!!y(d(this,t),e)}}),h&&n(c.prototype,"size",{get:function(){return d(this,t)[m]}}),c},def:function(e,t,r){var n,i,s=y(e,t);return s?s.v=r:(e._l=s={i:i=f(t,!0),k:t,v:r,p:n=e._l,n:void 0,r:!1},e._f||(e._f=s),n&&(n.n=s),e[m]++,"F"!==i&&(e._i[i]=s)),e},getEntry:y,setStrong:function(e,t,r){l(e,t,function(e,r){this._t=d(e,t),this._k=r,this._l=void 0},function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?c(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,c(1))},r?"entries":"values",!r,!0),p(t)}}},{"./_an-instance":212,"./_ctx":226,"./_descriptors":228,"./_for-of":234,"./_iter-define":246,"./_iter-step":247,"./_meta":250,"./_object-create":252,"./_object-dp":253,"./_redefine-all":265,"./_set-species":270,"./_validate-collection":282}],222:[function(e,t,r){var n=e("./_classof"),i=e("./_array-from-iterable");t.exports=function(e){return function(){if(n(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},{"./_array-from-iterable":214,"./_classof":219}],223:[function(e,t,r){"use strict";var n=e("./_redefine-all"),i=e("./_meta").getWeak,s=e("./_an-object"),a=e("./_is-object"),o=e("./_an-instance"),u=e("./_for-of"),l=e("./_array-methods"),c=e("./_has"),p=e("./_validate-collection"),h=l(5),f=l(6),d=0,m=function(e){return e._l||(e._l=new y)},y=function(){this.a=[]},g=function(e,t){return h(e.a,function(e){return e[0]===t})};y.prototype={get:function(e){var t=g(this,e);if(t)return t[1]},has:function(e){return!!g(this,e)},set:function(e,t){var r=g(this,e);r?r[1]=t:this.a.push([e,t])},delete:function(e){var t=f(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},t.exports={getConstructor:function(e,t,r,s){var l=e(function(e,n){o(e,l,t,"_i"),e._t=t,e._i=d++,e._l=void 0,void 0!=n&&u(n,r,e[s],e)});return n(l.prototype,{delete:function(e){if(!a(e))return!1;var r=i(e);return!0===r?m(p(this,t)).delete(e):r&&c(r,this._i)&&delete r[this._i]},has:function(e){if(!a(e))return!1;var r=i(e);return!0===r?m(p(this,t)).has(e):r&&c(r,this._i)}}),l},def:function(e,t,r){var n=i(s(t),!0);return!0===n?m(e).set(t,r):n[e._i]=r,e},ufstore:m}},{"./_an-instance":212,"./_an-object":213,"./_array-methods":216,"./_for-of":234,"./_has":236,"./_is-object":243,"./_meta":250,"./_redefine-all":265,"./_validate-collection":282}],224:[function(e,t,r){"use strict";var n=e("./_global"),i=e("./_export"),s=e("./_meta"),a=e("./_fails"),o=e("./_hide"),u=e("./_redefine-all"),l=e("./_for-of"),c=e("./_an-instance"),p=e("./_is-object"),h=e("./_set-to-string-tag"),f=e("./_object-dp").f,d=e("./_array-methods")(0),m=e("./_descriptors");t.exports=function(e,t,r,y,g,b){var v=n[e],x=v,E=g?"set":"add",A=x&&x.prototype,D={};return m&&"function"==typeof x&&(b||A.forEach&&!a(function(){(new x).entries().next()}))?(x=t(function(t,r){c(t,x,e,"_c"),t._c=new v,void 0!=r&&l(r,g,t[E],t)}),d("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in A&&(!b||"clear"!=e)&&o(x.prototype,e,function(r,n){if(c(this,x,e),!t&&b&&!p(r))return"get"==e&&void 0;var i=this._c[e](0===r?0:r,n);return t?this:i})}),b||f(x.prototype,"size",{get:function(){return this._c.size}})):(x=y.getConstructor(t,e,g,E),u(x.prototype,r),s.NEED=!0),h(x,e),D[e]=x,i(i.G+i.W+i.F,D),b||y.setStrong(x,e,g),x}},{"./_an-instance":212,"./_array-methods":216,"./_descriptors":228,"./_export":232,"./_fails":233,"./_for-of":234,"./_global":235,"./_hide":237,"./_is-object":243,"./_meta":250,"./_object-dp":253,"./_redefine-all":265,"./_set-to-string-tag":271}],225:[function(e,t,r){var n=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=n)},{}],226:[function(e,t,r){var n=e("./_a-function");t.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},{"./_a-function":210}],227:[function(e,t,r){t.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},{}],228:[function(e,t,r){t.exports=!e("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":233}],229:[function(e,t,r){var n=e("./_is-object"),i=e("./_global").document,s=n(i)&&n(i.createElement);t.exports=function(e){return s?i.createElement(e):{}}},{"./_global":235,"./_is-object":243}],230:[function(e,t,r){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],231:[function(e,t,r){var n=e("./_object-keys"),i=e("./_object-gops"),s=e("./_object-pie");t.exports=function(e){var t=n(e),r=i.f;if(r)for(var a,o=r(e),u=s.f,l=0;o.length>l;)u.call(e,a=o[l++])&&t.push(a);return t}},{"./_object-gops":258,"./_object-keys":261,"./_object-pie":262}],232:[function(e,t,r){var n=e("./_global"),i=e("./_core"),s=e("./_ctx"),a=e("./_hide"),o="prototype",u=function(e,t,r){var l,c,p,h=e&u.F,f=e&u.G,d=e&u.S,m=e&u.P,y=e&u.B,g=e&u.W,b=f?i:i[t]||(i[t]={}),v=b[o],x=f?n:d?n[t]:(n[t]||{})[o];f&&(r=t);for(l in r)(c=!h&&x&&void 0!==x[l])&&l in b||(p=c?x[l]:r[l],b[l]=f&&"function"!=typeof x[l]?r[l]:y&&c?s(p,n):g&&x[l]==p?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t[o]=e[o],t}(p):m&&"function"==typeof p?s(Function.call,p):p,m&&((b.virtual||(b.virtual={}))[l]=p,e&u.R&&v&&!v[l]&&a(v,l,p)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},{"./_core":225,"./_ctx":226,"./_global":235,"./_hide":237}],233:[function(e,t,r){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],234:[function(e,t,r){var n=e("./_ctx"),i=e("./_iter-call"),s=e("./_is-array-iter"),a=e("./_an-object"),o=e("./_to-length"),u=e("./core.get-iterator-method"),l={},c={};(r=t.exports=function(e,t,r,p,h){var f,d,m,y,g=h?function(){return e}:u(e),b=n(r,p,t?2:1),v=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(s(g)){for(f=o(e.length);f>v;v++)if((y=t?b(a(d=e[v])[0],d[1]):b(e[v]))===l||y===c)return y}else for(m=g.call(e);!(d=m.next()).done;)if((y=i(m,b,d.value,t))===l||y===c)return y}).BREAK=l,r.RETURN=c},{"./_an-object":213,"./_ctx":226,"./_is-array-iter":241,"./_iter-call":244,"./_to-length":278,"./core.get-iterator-method":286}],235:[function(e,t,r){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},{}],236:[function(e,t,r){var n={}.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}},{}],237:[function(e,t,r){var n=e("./_object-dp"),i=e("./_property-desc");t.exports=e("./_descriptors")?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},{"./_descriptors":228,"./_object-dp":253,"./_property-desc":264}],238:[function(e,t,r){var n=e("./_global").document;t.exports=n&&n.documentElement},{"./_global":235}],239:[function(e,t,r){t.exports=!e("./_descriptors")&&!e("./_fails")(function(){return 7!=Object.defineProperty(e("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":228,"./_dom-create":229,"./_fails":233}],240:[function(e,t,r){var n=e("./_cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},{"./_cof":220}],241:[function(e,t,r){var n=e("./_iterators"),i=e("./_wks")("iterator"),s=Array.prototype;t.exports=function(e){return void 0!==e&&(n.Array===e||s[i]===e)}},{"./_iterators":248,"./_wks":285}],242:[function(e,t,r){var n=e("./_cof");t.exports=Array.isArray||function(e){return"Array"==n(e)}},{"./_cof":220}],243:[function(e,t,r){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],244:[function(e,t,r){var n=e("./_an-object");t.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(t){var s=e.return;throw void 0!==s&&n(s.call(e)),t}}},{"./_an-object":213}],245:[function(e,t,r){"use strict";var n=e("./_object-create"),i=e("./_property-desc"),s=e("./_set-to-string-tag"),a={};e("./_hide")(a,e("./_wks")("iterator"),function(){return this}),t.exports=function(e,t,r){e.prototype=n(a,{next:i(1,r)}),s(e,t+" Iterator")}},{"./_hide":237,"./_object-create":252,"./_property-desc":264,"./_set-to-string-tag":271,"./_wks":285}],246:[function(e,t,r){"use strict";var n=e("./_library"),i=e("./_export"),s=e("./_redefine"),a=e("./_hide"),o=e("./_has"),u=e("./_iterators"),l=e("./_iter-create"),c=e("./_set-to-string-tag"),p=e("./_object-gpo"),h=e("./_wks")("iterator"),f=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(e,t,r,m,y,g,b){l(r,t,m);var v,x,E,A=function(e){if(!f&&e in _)return _[e];switch(e){case"keys":case"values":return function(){return new r(this,e)}}return function(){return new r(this,e)}},D=t+" Iterator",S="values"==y,C=!1,_=e.prototype,w=_[h]||_["@@iterator"]||y&&_[y],k=!f&&w||A(y),F=y?S?A("entries"):k:void 0,T="Array"==t?_.entries||w:w;if(T&&(E=p(T.call(new e)))!==Object.prototype&&E.next&&(c(E,D,!0),n||o(E,h)||a(E,h,d)),S&&w&&"values"!==w.name&&(C=!0,k=function(){return w.call(this)}),n&&!b||!f&&!C&&_[h]||a(_,h,k),u[t]=k,u[D]=d,y)if(v={values:S?k:A("values"),keys:g?k:A("keys"),entries:F},b)for(x in v)x in _||s(_,x,v[x]);else i(i.P+i.F*(f||C),t,v);return v}},{"./_export":232,"./_has":236,"./_hide":237,"./_iter-create":245,"./_iterators":248,"./_library":249,"./_object-gpo":259,"./_redefine":266,"./_set-to-string-tag":271,"./_wks":285}],247:[function(e,t,r){t.exports=function(e,t){return{value:t,done:!!e}}},{}],248:[function(e,t,r){t.exports={}},{}],249:[function(e,t,r){t.exports=!0},{}],250:[function(e,t,r){var n=e("./_uid")("meta"),i=e("./_is-object"),s=e("./_has"),a=e("./_object-dp").f,o=0,u=Object.isExtensible||function(){return!0},l=!e("./_fails")(function(){return u(Object.preventExtensions({}))}),c=function(e){a(e,n,{value:{i:"O"+ ++o,w:{}}})},p=t.exports={KEY:n,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,n)){if(!u(e))return"F";if(!t)return"E";c(e)}return e[n].i},getWeak:function(e,t){if(!s(e,n)){if(!u(e))return!0;if(!t)return!1;c(e)}return e[n].w},onFreeze:function(e){return l&&p.NEED&&u(e)&&!s(e,n)&&c(e),e}}},{"./_fails":233,"./_has":236,"./_is-object":243,"./_object-dp":253,"./_uid":281}],251:[function(e,t,r){"use strict";var n=e("./_object-keys"),i=e("./_object-gops"),s=e("./_object-pie"),a=e("./_to-object"),o=e("./_iobject"),u=Object.assign;t.exports=!u||e("./_fails")(function(){var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(e){t[e]=e}),7!=u({},e)[r]||Object.keys(u({},t)).join("")!=n})?function(e,t){for(var r=a(e),u=arguments.length,l=1,c=i.f,p=s.f;u>l;)for(var h,f=o(arguments[l++]),d=c?n(f).concat(c(f)):n(f),m=d.length,y=0;m>y;)p.call(f,h=d[y++])&&(r[h]=f[h]);return r}:u},{"./_fails":233,"./_iobject":240,"./_object-gops":258,"./_object-keys":261,"./_object-pie":262,"./_to-object":279}],252:[function(e,t,r){var n=e("./_an-object"),i=e("./_object-dps"),s=e("./_enum-bug-keys"),a=e("./_shared-key")("IE_PROTO"),o=function(){},u=function(){var t,r=e("./_dom-create")("iframe"),n=s.length;for(r.style.display="none",e("./_html").appendChild(r),r.src="javascript:",(t=r.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;n--;)delete u.prototype[s[n]];return u()};t.exports=Object.create||function(e,t){var r;return null!==e?(o.prototype=n(e),r=new o,o.prototype=null,r[a]=e):r=u(),void 0===t?r:i(r,t)}},{"./_an-object":213,"./_dom-create":229,"./_enum-bug-keys":230,"./_html":238,"./_object-dps":254,"./_shared-key":272}],253:[function(e,t,r){var n=e("./_an-object"),i=e("./_ie8-dom-define"),s=e("./_to-primitive"),a=Object.defineProperty;r.f=e("./_descriptors")?Object.defineProperty:function(e,t,r){if(n(e),t=s(t,!0),n(r),i)try{return a(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},{"./_an-object":213,"./_descriptors":228,"./_ie8-dom-define":239,"./_to-primitive":280}],254:[function(e,t,r){var n=e("./_object-dp"),i=e("./_an-object"),s=e("./_object-keys");t.exports=e("./_descriptors")?Object.defineProperties:function(e,t){i(e);for(var r,a=s(t),o=a.length,u=0;o>u;)n.f(e,r=a[u++],t[r]);return e}},{"./_an-object":213,"./_descriptors":228,"./_object-dp":253,"./_object-keys":261}],255:[function(e,t,r){var n=e("./_object-pie"),i=e("./_property-desc"),s=e("./_to-iobject"),a=e("./_to-primitive"),o=e("./_has"),u=e("./_ie8-dom-define"),l=Object.getOwnPropertyDescriptor;r.f=e("./_descriptors")?l:function(e,t){if(e=s(e),t=a(t,!0),u)try{return l(e,t)}catch(e){}if(o(e,t))return i(!n.f.call(e,t),e[t])}},{"./_descriptors":228,"./_has":236,"./_ie8-dom-define":239,"./_object-pie":262,"./_property-desc":264,"./_to-iobject":277,"./_to-primitive":280}],256:[function(e,t,r){var n=e("./_to-iobject"),i=e("./_object-gopn").f,s={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(e){return a&&"[object Window]"==s.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(n(e))}},{"./_object-gopn":257,"./_to-iobject":277}],257:[function(e,t,r){var n=e("./_object-keys-internal"),i=e("./_enum-bug-keys").concat("length","prototype");r.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},{"./_enum-bug-keys":230,"./_object-keys-internal":260}],258:[function(e,t,r){r.f=Object.getOwnPropertySymbols},{}],259:[function(e,t,r){var n=e("./_has"),i=e("./_to-object"),s=e("./_shared-key")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(e){return e=i(e),n(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},{"./_has":236,"./_shared-key":272,"./_to-object":279}],260:[function(e,t,r){var n=e("./_has"),i=e("./_to-iobject"),s=e("./_array-includes")(!1),a=e("./_shared-key")("IE_PROTO");t.exports=function(e,t){var r,o=i(e),u=0,l=[];for(r in o)r!=a&&n(o,r)&&l.push(r);for(;t.length>u;)n(o,r=t[u++])&&(~s(l,r)||l.push(r));return l}},{"./_array-includes":215,"./_has":236,"./_shared-key":272,"./_to-iobject":277}],261:[function(e,t,r){var n=e("./_object-keys-internal"),i=e("./_enum-bug-keys");t.exports=Object.keys||function(e){return n(e,i)}},{"./_enum-bug-keys":230,"./_object-keys-internal":260}],262:[function(e,t,r){r.f={}.propertyIsEnumerable},{}],263:[function(e,t,r){var n=e("./_export"),i=e("./_core"),s=e("./_fails");t.exports=function(e,t){var r=(i.Object||{})[e]||Object[e],a={};a[e]=t(r),n(n.S+n.F*s(function(){r(1)}),"Object",a)}},{"./_core":225,"./_export":232,"./_fails":233}],264:[function(e,t,r){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],265:[function(e,t,r){var n=e("./_hide");t.exports=function(e,t,r){for(var i in t)r&&e[i]?e[i]=t[i]:n(e,i,t[i]);return e}},{"./_hide":237}],266:[function(e,t,r){t.exports=e("./_hide")},{"./_hide":237}],267:[function(e,t,r){"use strict";var n=e("./_export"),i=e("./_a-function"),s=e("./_ctx"),a=e("./_for-of");t.exports=function(e){n(n.S,e,{from:function(e){var t,r,n,o,u=arguments[1];return i(this),(t=void 0!==u)&&i(u),void 0==e?new this:(r=[],t?(n=0,o=s(u,arguments[2],2),a(e,!1,function(e){r.push(o(e,n++))})):a(e,!1,r.push,r),new this(r))}})}},{"./_a-function":210,"./_ctx":226,"./_export":232,"./_for-of":234}],268:[function(e,t,r){"use strict";var n=e("./_export");t.exports=function(e){n(n.S,e,{of:function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];return new this(t)}})}},{"./_export":232}],269:[function(e,t,r){var n=e("./_is-object"),i=e("./_an-object"),s=function(e,t){if(i(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,r,n){try{(n=e("./_ctx")(Function.call,e("./_object-gopd").f(Object.prototype,"__proto__").set,2))(t,[]),r=!(t instanceof Array)}catch(e){r=!0}return function(e,t){return s(e,t),r?e.__proto__=t:n(e,t),e}}({},!1):void 0),check:s}},{"./_an-object":213,"./_ctx":226,"./_is-object":243,"./_object-gopd":255}],270:[function(e,t,r){"use strict";var n=e("./_global"),i=e("./_core"),s=e("./_object-dp"),a=e("./_descriptors"),o=e("./_wks")("species");t.exports=function(e){var t="function"==typeof i[e]?i[e]:n[e];a&&t&&!t[o]&&s.f(t,o,{configurable:!0,get:function(){return this}})}},{"./_core":225,"./_descriptors":228,"./_global":235,"./_object-dp":253,"./_wks":285}],271:[function(e,t,r){var n=e("./_object-dp").f,i=e("./_has"),s=e("./_wks")("toStringTag");t.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,s)&&n(e,s,{configurable:!0,value:t})}},{"./_has":236,"./_object-dp":253,"./_wks":285}],272:[function(e,t,r){var n=e("./_shared")("keys"),i=e("./_uid");t.exports=function(e){return n[e]||(n[e]=i(e))}},{"./_shared":273,"./_uid":281}],273:[function(e,t,r){var n=e("./_global"),i=n["__core-js_shared__"]||(n["__core-js_shared__"]={});t.exports=function(e){return i[e]||(i[e]={})}},{"./_global":235}],274:[function(e,t,r){var n=e("./_to-integer"),i=e("./_defined");t.exports=function(e){return function(t,r){var s,a,o=String(i(t)),u=n(r),l=o.length;return u<0||u>=l?e?"":void 0:(s=o.charCodeAt(u))<55296||s>56319||u+1===l||(a=o.charCodeAt(u+1))<56320||a>57343?e?o.charAt(u):s:e?o.slice(u,u+2):a-56320+(s-55296<<10)+65536}}},{"./_defined":227,"./_to-integer":276}],275:[function(e,t,r){var n=e("./_to-integer"),i=Math.max,s=Math.min;t.exports=function(e,t){return(e=n(e))<0?i(e+t,0):s(e,t)}},{"./_to-integer":276}],276:[function(e,t,r){var n=Math.ceil,i=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},{}],277:[function(e,t,r){var n=e("./_iobject"),i=e("./_defined");t.exports=function(e){return n(i(e))}},{"./_defined":227,"./_iobject":240}],278:[function(e,t,r){var n=e("./_to-integer"),i=Math.min;t.exports=function(e){return e>0?i(n(e),9007199254740991):0}},{"./_to-integer":276}],279:[function(e,t,r){var n=e("./_defined");t.exports=function(e){return Object(n(e))}},{"./_defined":227}],280:[function(e,t,r){var n=e("./_is-object");t.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":243}],281:[function(e,t,r){var n=0,i=Math.random();t.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},{}],282:[function(e,t,r){var n=e("./_is-object");t.exports=function(e,t){if(!n(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},{"./_is-object":243}],283:[function(e,t,r){var n=e("./_global"),i=e("./_core"),s=e("./_library"),a=e("./_wks-ext"),o=e("./_object-dp").f;t.exports=function(e){var t=i.Symbol||(i.Symbol=s?{}:n.Symbol||{});"_"==e.charAt(0)||e in t||o(t,e,{value:a.f(e)})}},{"./_core":225,"./_global":235,"./_library":249,"./_object-dp":253,"./_wks-ext":284}],284:[function(e,t,r){r.f=e("./_wks")},{"./_wks":285}],285:[function(e,t,r){var n=e("./_shared")("wks"),i=e("./_uid"),s=e("./_global").Symbol,a="function"==typeof s;(t.exports=function(e){return n[e]||(n[e]=a&&s[e]||(a?s:i)("Symbol."+e))}).store=n},{"./_global":235,"./_shared":273,"./_uid":281}],286:[function(e,t,r){var n=e("./_classof"),i=e("./_wks")("iterator"),s=e("./_iterators");t.exports=e("./_core").getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||s[n(e)]}},{"./_classof":219,"./_core":225,"./_iterators":248,"./_wks":285}],287:[function(e,t,r){var n=e("./_an-object"),i=e("./core.get-iterator-method");t.exports=e("./_core").getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return n(t.call(e))}},{"./_an-object":213,"./_core":225,"./core.get-iterator-method":286}],288:[function(e,t,r){"use strict";var n=e("./_add-to-unscopables"),i=e("./_iter-step"),s=e("./_iterators"),a=e("./_to-iobject");t.exports=e("./_iter-define")(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?r:"values"==t?e[r]:[r,e[r]])},"values"),s.Arguments=s.Array,n("keys"),n("values"),n("entries")},{"./_add-to-unscopables":211,"./_iter-define":246,"./_iter-step":247,"./_iterators":248,"./_to-iobject":277}],289:[function(e,t,r){"use strict";var n=e("./_collection-strong"),i=e("./_validate-collection");t.exports=e("./_collection")("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=n.getEntry(i(this,"Map"),e);return t&&t.v},set:function(e,t){return n.def(i(this,"Map"),0===e?0:e,t)}},n,!0)},{"./_collection":224,"./_collection-strong":221,"./_validate-collection":282}],290:[function(e,t,r){var n=e("./_export");n(n.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},{"./_export":232}],291:[function(e,t,r){var n=e("./_export");n(n.S+n.F,"Object",{assign:e("./_object-assign")})},{"./_export":232,"./_object-assign":251}],292:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{create:e("./_object-create")})},{"./_export":232,"./_object-create":252}],293:[function(e,t,r){var n=e("./_to-object"),i=e("./_object-keys");e("./_object-sap")("keys",function(){return function(e){return i(n(e))}})},{"./_object-keys":261,"./_object-sap":263,"./_to-object":279}],294:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{setPrototypeOf:e("./_set-proto").set})},{"./_export":232,"./_set-proto":269}],295:[function(e,t,r){arguments[4][192][0].apply(r,arguments)},{dup:192}],296:[function(e,t,r){"use strict";var n=e("./_string-at")(!0);e("./_iter-define")(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})})},{"./_iter-define":246,"./_string-at":274}],297:[function(e,t,r){"use strict";var n=e("./_global"),i=e("./_has"),s=e("./_descriptors"),a=e("./_export"),o=e("./_redefine"),u=e("./_meta").KEY,l=e("./_fails"),c=e("./_shared"),p=e("./_set-to-string-tag"),h=e("./_uid"),f=e("./_wks"),d=e("./_wks-ext"),m=e("./_wks-define"),y=e("./_enum-keys"),g=e("./_is-array"),b=e("./_an-object"),v=e("./_is-object"),x=e("./_to-iobject"),E=e("./_to-primitive"),A=e("./_property-desc"),D=e("./_object-create"),S=e("./_object-gopn-ext"),C=e("./_object-gopd"),_=e("./_object-dp"),w=e("./_object-keys"),k=C.f,F=_.f,T=S.f,P=n.Symbol,B=n.JSON,O=B&&B.stringify,N="prototype",j=f("_hidden"),I=f("toPrimitive"),L={}.propertyIsEnumerable,M=c("symbol-registry"),R=c("symbols"),V=c("op-symbols"),U=Object[N],q="function"==typeof P,G=n.QObject,X=!G||!G[N]||!G[N].findChild,J=s&&l(function(){return 7!=D(F({},"a",{get:function(){return F(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=k(U,t);n&&delete U[t],F(e,t,r),n&&e!==U&&F(U,t,n)}:F,W=function(e){var t=R[e]=D(P[N]);return t._k=e,t},K=q&&"symbol"==typeof P.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof P},z=function(e,t,r){return e===U&&z(V,t,r),b(e),t=E(t,!0),b(r),i(R,t)?(r.enumerable?(i(e,j)&&e[j][t]&&(e[j][t]=!1),r=D(r,{enumerable:A(0,!1)})):(i(e,j)||F(e,j,A(1,{})),e[j][t]=!0),J(e,t,r)):F(e,t,r)},Y=function(e,t){b(e);for(var r,n=y(t=x(t)),i=0,s=n.length;s>i;)z(e,r=n[i++],t[r]);return e},H=function(e){var t=L.call(this,e=E(e,!0));return!(this===U&&i(R,e)&&!i(V,e))&&(!(t||!i(this,e)||!i(R,e)||i(this,j)&&this[j][e])||t)},$=function(e,t){if(e=x(e),t=E(t,!0),e!==U||!i(R,t)||i(V,t)){var r=k(e,t);return!r||!i(R,t)||i(e,j)&&e[j][t]||(r.enumerable=!0),r}},Q=function(e){for(var t,r=T(x(e)),n=[],s=0;r.length>s;)i(R,t=r[s++])||t==j||t==u||n.push(t);return n},Z=function(e){for(var t,r=e===U,n=T(r?V:x(e)),s=[],a=0;n.length>a;)!i(R,t=n[a++])||r&&!i(U,t)||s.push(R[t]);return s};q||(o((P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var e=h(arguments.length>0?arguments[0]:void 0),t=function(r){this===U&&t.call(V,r),i(this,j)&&i(this[j],e)&&(this[j][e]=!1),J(this,e,A(1,r))};return s&&X&&J(U,e,{configurable:!0,set:t}),W(e)})[N],"toString",function(){return this._k}),C.f=$,_.f=z,e("./_object-gopn").f=S.f=Q,e("./_object-pie").f=H,e("./_object-gops").f=Z,s&&!e("./_library")&&o(U,"propertyIsEnumerable",H,!0),d.f=function(e){return W(f(e))}),a(a.G+a.W+a.F*!q,{Symbol:P});for(var ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;ee.length>te;)f(ee[te++]);for(var re=w(f.store),ne=0;re.length>ne;)m(re[ne++]);a(a.S+a.F*!q,"Symbol",{for:function(e){return i(M,e+="")?M[e]:M[e]=P(e)},keyFor:function(e){if(!K(e))throw TypeError(e+" is not a symbol!");for(var t in M)if(M[t]===e)return t},useSetter:function(){X=!0},useSimple:function(){X=!1}}),a(a.S+a.F*!q,"Object",{create:function(e,t){return void 0===t?D(e):Y(D(e),t)},defineProperty:z,defineProperties:Y,getOwnPropertyDescriptor:$,getOwnPropertyNames:Q,getOwnPropertySymbols:Z}),B&&a(a.S+a.F*(!q||l(function(){var e=P();return"[null]"!=O([e])||"{}"!=O({a:e})||"{}"!=O(Object(e))})),"JSON",{stringify:function(e){for(var t,r,n=[e],i=1;arguments.length>i;)n.push(arguments[i++]);if(r=t=n[1],(v(t)||void 0!==e)&&!K(e))return g(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!K(t))return t}),n[1]=t,O.apply(B,n)}}),P[N][I]||e("./_hide")(P[N],I,P[N].valueOf),p(P,"Symbol"),p(Math,"Math",!0),p(n.JSON,"JSON",!0)},{"./_an-object":213,"./_descriptors":228,"./_enum-keys":231,"./_export":232,"./_fails":233,"./_global":235,"./_has":236,"./_hide":237,"./_is-array":242,"./_is-object":243,"./_library":249,"./_meta":250,"./_object-create":252,"./_object-dp":253,"./_object-gopd":255,"./_object-gopn":257,"./_object-gopn-ext":256,"./_object-gops":258,"./_object-keys":261,"./_object-pie":262,"./_property-desc":264,"./_redefine":266,"./_set-to-string-tag":271,"./_shared":273,"./_to-iobject":277,"./_to-primitive":280,"./_uid":281,"./_wks":285,"./_wks-define":283,"./_wks-ext":284}],298:[function(e,t,r){"use strict";var n,i=e("./_array-methods")(0),s=e("./_redefine"),a=e("./_meta"),o=e("./_object-assign"),u=e("./_collection-weak"),l=e("./_is-object"),c=e("./_fails"),p=e("./_validate-collection"),h=a.getWeak,f=Object.isExtensible,d=u.ufstore,m={},y=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},g={get:function(e){if(l(e)){var t=h(e);return!0===t?d(p(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(p(this,"WeakMap"),e,t)}},b=t.exports=e("./_collection")("WeakMap",y,g,u,!0,!0);c(function(){return 7!=(new b).set((Object.freeze||Object)(m),7).get(m)})&&(o((n=u.getConstructor(y,"WeakMap")).prototype,g),a.NEED=!0,i(["delete","has","get","set"],function(e){var t=b.prototype,r=t[e];s(t,e,function(t,i){if(l(t)&&!f(t)){this._f||(this._f=new n);var s=this._f[e](t,i);return"set"==e?this:s}return r.call(this,t,i)})}))},{"./_array-methods":216,"./_collection":224,"./_collection-weak":223,"./_fails":233,"./_is-object":243,"./_meta":250,"./_object-assign":251,"./_redefine":266,"./_validate-collection":282}],299:[function(e,t,r){"use strict";var n=e("./_collection-weak"),i=e("./_validate-collection");e("./_collection")("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return n.def(i(this,"WeakSet"),e,!0)}},n,!1,!0)},{"./_collection":224,"./_collection-weak":223,"./_validate-collection":282}],300:[function(e,t,r){e("./_set-collection-from")("Map")},{"./_set-collection-from":267}],301:[function(e,t,r){e("./_set-collection-of")("Map")},{"./_set-collection-of":268}],302:[function(e,t,r){var n=e("./_export");n(n.P+n.R,"Map",{toJSON:e("./_collection-to-json")("Map")})},{"./_collection-to-json":222,"./_export":232}],303:[function(e,t,r){e("./_wks-define")("asyncIterator")},{"./_wks-define":283}],304:[function(e,t,r){e("./_wks-define")("observable")},{"./_wks-define":283}],305:[function(e,t,r){e("./_set-collection-from")("WeakMap")},{"./_set-collection-from":267}],306:[function(e,t,r){e("./_set-collection-of")("WeakMap")},{"./_set-collection-of":268}],307:[function(e,t,r){e("./_set-collection-from")("WeakSet")},{"./_set-collection-from":267}],308:[function(e,t,r){e("./_set-collection-of")("WeakSet")},{"./_set-collection-of":268}],309:[function(e,t,r){e("./es6.array.iterator");for(var n=e("./_global"),i=e("./_hide"),s=e("./_iterators"),a=e("./_wks")("toStringTag"),o="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<o.length;u++){var l=o[u],c=n[l],p=c&&c.prototype;p&&!p[a]&&i(p,a,l),s[l]=s.Array}},{"./_global":235,"./_hide":237,"./_iterators":248,"./_wks":285,"./es6.array.iterator":288}],310:[function(e,t,r){(function(e){function t(e){return Object.prototype.toString.call(e)}r.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},r.isBoolean=function(e){return"boolean"==typeof e},r.isNull=function(e){return null===e},r.isNullOrUndefined=function(e){return null==e},r.isNumber=function(e){return"number"==typeof e},r.isString=function(e){return"string"==typeof e},r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=function(e){return void 0===e},r.isRegExp=function(e){return"[object RegExp]"===t(e)},r.isObject=function(e){return"object"==typeof e&&null!==e},r.isDate=function(e){return"[object Date]"===t(e)},r.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},r.isFunction=function(e){return"function"==typeof e},r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":319}],311:[function(e,t,r){"use strict";var n=e("repeating"),i=/^(?:( )+|\t+)/;t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");var t,r,s=0,a=0,o=0,u={};e.split(/\n/g).forEach(function(e){if(e){var n,l=e.match(i);l?(n=l[0].length,l[1]?a++:s++):n=0;var c=n-o;o=n,c?(t=u[(r=c>0)?c:-c])?t[0]++:t=u[c]=[1,0]:t&&(t[1]+=Number(r))}});var l,c,p=function(e){var t=0,r=0,n=0;for(var i in e){var s=e[i],a=s[0],o=s[1];(a>r||a===r&&o>n)&&(r=a,n=o,t=Number(i))}return t}(u);return p?a>=s?(l="space",c=n(" ",p)):(l="tab",c=n("\t",p)):(l=null,c=""),{amount:p,type:l,indent:c}}},{repeating:601}],312:[function(e,t,r){"use strict";var n=/[|\\{}()[\]^$+*?.]/g;t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(n,"\\$&")}},{}],313:[function(e,t,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function s(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!function(e){return"number"==typeof e}(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,r,n,o,u,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(r=this._events[e],a(r))return!1;if(i(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),r.apply(this,o)}else if(s(r))for(o=Array.prototype.slice.call(arguments,1),n=(l=r.slice()).length,u=0;u<n;u++)l[u].apply(this,o);return!0},n.prototype.addListener=function(e,t){var r;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]?s(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,s(this._events[e])&&!this._events[e].warned&&(r=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&r>0&&this._events[e].length>r&&(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},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var n=!1;return r.listener=t,this.on(e,r),this},n.prototype.removeListener=function(e,t){var r,n,a,o;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],a=r.length,n=-1,r===t||i(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(r)){for(o=a;o-- >0;)if(r[o]===t||r[o].listener&&r[o].listener===t){n=o;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,r;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(r=this._events[e],i(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},{}],314:[function(e,t,r){"use strict";var n=e("ansi-regex"),i=new RegExp(n().source);t.exports=i.test.bind(i)},{"ansi-regex":315}],315:[function(e,t,r){arguments[4][22][0].apply(r,arguments)},{dup:22}],316:[function(e,t,r){r.read=function(e,t,r,n,i){var s,a,o=8*i-n-1,u=(1<<o)-1,l=u>>1,c=-7,p=r?i-1:0,h=r?-1:1,f=e[t+p];for(p+=h,s=f&(1<<-c)-1,f>>=-c,c+=o;c>0;s=256*s+e[t+p],p+=h,c-=8);for(a=s&(1<<-c)-1,s>>=-c,c+=n;c>0;a=256*a+e[t+p],p+=h,c-=8);if(0===s)s=1-l;else{if(s===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),s-=l}return(f?-1:1)*a*Math.pow(2,s-n)},r.write=function(e,t,r,n,i,s){var a,o,u,l=8*s-i-1,c=(1<<l)-1,p=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:s-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+p>=1?h/u:h*Math.pow(2,1-p))*u>=2&&(a++,u/=2),a+p>=c?(o=0,a=c):a+p>=1?(o=(t*u-1)*Math.pow(2,i),a+=p):(o=t*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;e[r+f]=255&o,f+=d,o/=256,i-=8);for(a=a<<i|o,l+=i;l>0;e[r+f]=255&a,f+=d,a/=256,l-=8);e[r+f-d]|=128*m}},{}],317:[function(e,t,r){"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 r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],318:[function(e,t,r){"use strict";t.exports=function(e,t,r,n,i,s,a,o){if(void 0===t)throw new Error("invariant requires an error message argument");if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,n,i,s,a,o],c=0;(u=new Error(t.replace(/%s/g,function(){return l[c++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}}},{}],319:[function(e,t,r){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}t.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],320:[function(e,t,r){"use strict";var n=e("number-is-nan");t.exports=Number.isFinite||function(e){return!("number"!=typeof e||n(e)||e===1/0||e===-1/0)}},{"number-is-nan":544}],321:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],322:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,r.matchToToken=function(e){var t={type:"invalid",value:e[0]};return e[1]?(t.type="string",t.closed=!(!e[3]&&!e[4])):e[5]?t.type="comment":e[6]?(t.type="comment",t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}},{}],323:[function(e,t,r){(function(e){!function(n){var i="object"==typeof r&&r,s="object"==typeof t&&t&&t.exports==i&&t,a="object"==typeof e&&e;a.global!==a&&a.window!==a||(n=a);var o={},u=o.hasOwnProperty,l=function(e,t){var r;for(r in e)u.call(e,r)&&t(r,e[r])},c=o.toString,p={'"':'\\"',"'":"\\'","\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},h=/["'\\\b\f\n\r\t]/,f=/[0-9]/,d=/[ !#-&\(-\[\]-~]/,m=function(e,t){var r={escapeEverything:!1,escapeEtago:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:"\t",__indent__:"",__inline1__:!1,__inline2__:!1},n=t&&t.json;n&&(r.quotes="double",r.wrap=!0),"single"!=(t=function(e,t){return t?(l(t,function(t,r){e[t]=r}),e):e}(r,t)).quotes&&"double"!=t.quotes&&(t.quotes="single");var i,s="double"==t.quotes?'"':"'",a=t.compact,o=t.indent,u=t.lowercaseHex,y="",g=t.__inline1__,b=t.__inline2__,v=a?"":"\n",x=!0,E="binary"==t.numbers,A="octal"==t.numbers,D="decimal"==t.numbers,S="hexadecimal"==t.numbers;if(n&&e&&function(e){return"function"==typeof e||"[object Function]"==c.call(e)}(e.toJSON)&&(e=e.toJSON()),!function(e){return"string"==typeof e||"[object String]"==c.call(e)}(e)){if(function(e){return"[object Map]"==c.call(e)}(e))return 0==e.size?"new Map()":(a||(t.__inline1__=!0),"new Map("+m(Array.from(e),t)+")");if(function(e){return"[object Set]"==c.call(e)}(e))return 0==e.size?"new Set()":"new Set("+m(Array.from(e),t)+")";if(function(e){return"[object Array]"==c.call(e)}(e))return i=[],t.wrap=!0,g?(t.__inline1__=!1,t.__inline2__=!0):(y=t.__indent__,o+=y,t.__indent__=o),function(e,t){for(var r=e.length,n=-1;++n<r;)t(e[n])}(e,function(e){x=!1,b&&(t.__inline2__=!1),i.push((a||b?"":o)+m(e,t))}),x?"[]":b?"["+i.join(", ")+"]":"["+v+i.join(","+v)+v+(a?"":y)+"]";if(!function(e){return"number"==typeof e||"[object Number]"==c.call(e)}(e))return function(e){return"[object Object]"==c.call(e)}(e)?(i=[],t.wrap=!0,y=t.__indent__,o+=y,t.__indent__=o,l(e,function(e,r){x=!1,i.push((a?"":o)+m(e,t)+":"+(a?"":" ")+m(r,t))}),x?"{}":"{"+v+i.join(","+v)+v+(a?"":y)+"}"):n?JSON.stringify(e)||"null":String(e);if(n)return JSON.stringify(e);if(D)return String(e);if(S){var C=e.toString(16);return u||(C=C.toUpperCase()),"0x"+C}if(E)return"0b"+e.toString(2);if(A)return"0o"+e.toString(8)}var _,w,k=e,F=-1,T=k.length;for(i="";++F<T;){var P=k.charAt(F);if(t.es6&&(_=k.charCodeAt(F))>=55296&&_<=56319&&T>F+1&&(w=k.charCodeAt(F+1))>=56320&&w<=57343){var B=(1024*(_-55296)+w-56320+65536).toString(16);u||(B=B.toUpperCase()),i+="\\u{"+B+"}",F++}else{if(!t.escapeEverything){if(d.test(P)){i+=P;continue}if('"'==P){i+=s==P?'\\"':P;continue}if("'"==P){i+=s==P?"\\'":P;continue}}if("\0"!=P||n||f.test(k.charAt(F+1)))if(h.test(P))i+=p[P];else{B=P.charCodeAt(0).toString(16);u||(B=B.toUpperCase());var O=B.length>2||n,N="\\"+(O?"u":"x")+("0000"+B).slice(O?-4:-2);i+=N}else i+="\\0"}}return t.wrap&&(i=s+i+s),t.escapeEtago?i.replace(/<\/(script|style)/gi,"<\\/$1"):i};m.version="1.3.0","function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return m}):i&&!i.nodeType?s?s.exports=m:i.jsesc=m:n.jsesc=m}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],324:[function(e,t,r){var n="object"==typeof r?r:{};n.parse=function(){"use strict";var e,t,r,n,i,s,a={"'":"'",'"':'"',"\\":"\\","/":"/","\n":"",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},o=[" ","\t","\r","\n","\v","\f"," ","\ufeff"],u=function(e){return""===e?"EOF":"'"+e+"'"},l=function(n){var s=new SyntaxError;throw s.message=n+" at line "+t+" column "+r+" of the JSON5 data. Still to read: "+JSON.stringify(i.substring(e-1,e+19)),s.at=e,s.lineNumber=t,s.columnNumber=r,s},c=function(s){return s&&s!==n&&l("Expected "+u(s)+" instead of "+u(n)),n=i.charAt(e),e++,r++,("\n"===n||"\r"===n&&"\n"!==p())&&(t++,r=0),n},p=function(){return i.charAt(e)},h=function(){var e=n;for("_"!==n&&"$"!==n&&(n<"a"||n>"z")&&(n<"A"||n>"Z")&&l("Bad identifier as unquoted key");c()&&("_"===n||"$"===n||n>="a"&&n<="z"||n>="A"&&n<="Z"||n>="0"&&n<="9");)e+=n;return e},f=function(){var e,t="",r="",i=10;if("-"!==n&&"+"!==n||(t=n,c(n)),"I"===n)return("number"!=typeof(e=g())||isNaN(e))&&l("Unexpected word for number"),"-"===t?-e:e;if("N"===n)return e=g(),isNaN(e)||l("expected word to be NaN"),e;switch("0"===n&&(r+=n,c(),"x"===n||"X"===n?(r+=n,c(),i=16):n>="0"&&n<="9"&&l("Octal literal")),i){case 10:for(;n>="0"&&n<="9";)r+=n,c();if("."===n)for(r+=".";c()&&n>="0"&&n<="9";)r+=n;if("e"===n||"E"===n)for(r+=n,c(),"-"!==n&&"+"!==n||(r+=n,c());n>="0"&&n<="9";)r+=n,c();break;case 16:for(;n>="0"&&n<="9"||n>="A"&&n<="F"||n>="a"&&n<="f";)r+=n,c()}if(e="-"===t?-r:+r,isFinite(e))return e;l("Bad number")},d=function(){var e,t,r,i,s="";if('"'===n||"'"===n)for(r=n;c();){if(n===r)return c(),s;if("\\"===n)if(c(),"u"===n){for(i=0,t=0;t<4&&(e=parseInt(c(),16),isFinite(e));t+=1)i=16*i+e;s+=String.fromCharCode(i)}else if("\r"===n)"\n"===p()&&c();else{if("string"!=typeof a[n])break;s+=a[n]}else{if("\n"===n)break;s+=n}}l("Bad string")},m=function(){"/"!==n&&l("Not a comment"),c("/"),"/"===n?function(){"/"!==n&&l("Not an inline comment");do{if(c(),"\n"===n||"\r"===n)return void c()}while(n)}():"*"===n?function(){"*"!==n&&l("Not a block comment");do{for(c();"*"===n;)if(c("*"),"/"===n)return void c("/")}while(n);l("Unterminated block comment")}():l("Unrecognized comment")},y=function(){for(;n;)if("/"===n)m();else{if(!(o.indexOf(n)>=0))return;c()}},g=function(){switch(n){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;case"I":return c("I"),c("n"),c("f"),c("i"),c("n"),c("i"),c("t"),c("y"),1/0;case"N":return c("N"),c("a"),c("N"),NaN}l("Unexpected "+u(n))};return s=function(){switch(y(),n){case"{":return function(){var e,t={};if("{"===n)for(c("{"),y();n;){if("}"===n)return c("}"),t;if(e='"'===n||"'"===n?d():h(),y(),c(":"),t[e]=s(),y(),","!==n)return c("}"),t;c(","),y()}l("Bad object")}();case"[":return function(){var e=[];if("["===n)for(c("["),y();n;){if("]"===n)return c("]"),e;if(","===n?l("Missing array element"):e.push(s()),y(),","!==n)return c("]"),e;c(","),y()}l("Bad array")}();case'"':case"'":return d();case"-":case"+":case".":return f();default:return n>="0"&&n<="9"?f():g()}},function(a,o){var u;return i=String(a),e=0,t=1,r=1,n=" ",u=s(),y(),n&&l("Syntax error"),"function"==typeof o?function e(t,r){var n,i,s=t[r];if(s&&"object"==typeof s)for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(void 0!==(i=e(s,n))?s[n]=i:delete s[n]);return o.call(t,r,s)}({"":u},""):u}}(),n.stringify=function(e,t,r){function i(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"_"===e||"$"===e}function s(e){if("string"!=typeof e)return!1;if(!function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"_"===e||"$"===e}(e[0]))return!1;for(var t=1,r=e.length;t<r;){if(!i(e[t]))return!1;t++}return!0}function a(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function o(e){for(var t=0;t<f.length;t++)if(f[t]===e)throw new TypeError("Converting circular structure to JSON")}function u(e,t,r){if(!e)return"";e.length>10&&(e=e.substring(0,10));for(var n=r?"":"\n",i=0;i<t;i++)n+=e;return n}function l(e){return d.lastIndex=0,d.test(e)?'"'+e.replace(d,function(e){var t=m[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function c(e,t,r){var n,i,d=p(e,t,r);switch(d&&!function(e){return"[object Date]"===Object.prototype.toString.call(e)}(d)&&(d=d.valueOf()),typeof d){case"boolean":return d.toString();case"number":return isNaN(d)||!isFinite(d)?"null":d.toString();case"string":return l(d.toString());case"object":if(null===d)return"null";if(a(d)){o(d),n="[",f.push(d);for(var m=0;m<d.length;m++)i=c(d,m,!1),n+=u(h,f.length),n+=null===i||void 0===i?"null":i,m<d.length-1?n+=",":h&&(n+="\n");f.pop(),d.length&&(n+=u(h,f.length,!0)),n+="]"}else{o(d),n="{";var y=!1;f.push(d);for(var g in d)if(d.hasOwnProperty(g)){var b=c(d,g,!1);r=!1,void 0!==b&&null!==b&&(n+=u(h,f.length),y=!0,n+=(t=s(g)?g:l(g))+":"+(h?" ":"")+b+",")}f.pop(),n=y?n.substring(0,n.length-1)+u(h,f.length)+"}":"{}"}return n;default:return}}if(t&&"function"!=typeof t&&!a(t))throw new Error("Replacer must be a function or an array");var p=function(e,r,n){var i=e[r];return i&&i.toJSON&&"function"==typeof i.toJSON&&(i=i.toJSON()),"function"==typeof t?t.call(e,r,i):t?n||a(e)||t.indexOf(r)>=0?i:void 0:i};n.isWord=s;var h,f=[];r&&("string"==typeof r?h=r:"number"==typeof r&&r>=0&&(h=u(" ",r,!0)));var d=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},y={"":e};return void 0===e?p(y,"",!0):c(y,"",!0)}},{}],325:[function(e,t,r){var n=e("./_getNative")(e("./_root"),"DataView");t.exports=n},{"./_getNative":429,"./_root":473}],326:[function(e,t,r){function n(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var i=e("./_hashClear"),s=e("./_hashDelete"),a=e("./_hashGet"),o=e("./_hashHas"),u=e("./_hashSet");n.prototype.clear=i,n.prototype.delete=s,n.prototype.get=a,n.prototype.has=o,n.prototype.set=u,t.exports=n},{"./_hashClear":437,"./_hashDelete":438,"./_hashGet":439,"./_hashHas":440,"./_hashSet":441}],327:[function(e,t,r){function n(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var i=e("./_listCacheClear"),s=e("./_listCacheDelete"),a=e("./_listCacheGet"),o=e("./_listCacheHas"),u=e("./_listCacheSet");n.prototype.clear=i,n.prototype.delete=s,n.prototype.get=a,n.prototype.has=o,n.prototype.set=u,t.exports=n},{"./_listCacheClear":453,"./_listCacheDelete":454,"./_listCacheGet":455,"./_listCacheHas":456,"./_listCacheSet":457}],328:[function(e,t,r){var n=e("./_getNative")(e("./_root"),"Map");t.exports=n},{"./_getNative":429,"./_root":473}],329:[function(e,t,r){function n(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var i=e("./_mapCacheClear"),s=e("./_mapCacheDelete"),a=e("./_mapCacheGet"),o=e("./_mapCacheHas"),u=e("./_mapCacheSet");n.prototype.clear=i,n.prototype.delete=s,n.prototype.get=a,n.prototype.has=o,n.prototype.set=u,t.exports=n},{"./_mapCacheClear":458,"./_mapCacheDelete":459,"./_mapCacheGet":460,"./_mapCacheHas":461,"./_mapCacheSet":462}],330:[function(e,t,r){var n=e("./_getNative")(e("./_root"),"Promise");t.exports=n},{"./_getNative":429,"./_root":473}],331:[function(e,t,r){var n=e("./_getNative")(e("./_root"),"Set");t.exports=n},{"./_getNative":429,"./_root":473}],332:[function(e,t,r){function n(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new i;++t<r;)this.add(e[t])}var i=e("./_MapCache"),s=e("./_setCacheAdd"),a=e("./_setCacheHas");n.prototype.add=n.prototype.push=s,n.prototype.has=a,t.exports=n},{"./_MapCache":329,"./_setCacheAdd":474,"./_setCacheHas":475}],333:[function(e,t,r){function n(e){var t=this.__data__=new i(e);this.size=t.size}var i=e("./_ListCache"),s=e("./_stackClear"),a=e("./_stackDelete"),o=e("./_stackGet"),u=e("./_stackHas"),l=e("./_stackSet");n.prototype.clear=s,n.prototype.delete=a,n.prototype.get=o,n.prototype.has=u,n.prototype.set=l,t.exports=n},{"./_ListCache":327,"./_stackClear":479,"./_stackDelete":480,"./_stackGet":481,"./_stackHas":482,"./_stackSet":483}],334:[function(e,t,r){var n=e("./_root").Symbol;t.exports=n},{"./_root":473}],335:[function(e,t,r){var n=e("./_root").Uint8Array;t.exports=n},{"./_root":473}],336:[function(e,t,r){var n=e("./_getNative")(e("./_root"),"WeakMap");t.exports=n},{"./_getNative":429,"./_root":473}],337:[function(e,t,r){t.exports=function(e,t){return e.set(t[0],t[1]),e}},{}],338:[function(e,t,r){t.exports=function(e,t){return e.add(t),e}},{}],339:[function(e,t,r){t.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},{}],340:[function(e,t,r){t.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},{}],341:[function(e,t,r){t.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[i++]=a)}return s}},{}],342:[function(e,t,r){var n=e("./_baseIndexOf");t.exports=function(e,t){return!(null==e||!e.length)&&n(e,t,0)>-1}},{"./_baseIndexOf":368}],343:[function(e,t,r){t.exports=function(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}},{}],344:[function(e,t,r){var n=e("./_baseTimes"),i=e("./isArguments"),s=e("./isArray"),a=e("./isBuffer"),o=e("./_isIndex"),u=e("./isTypedArray"),l=Object.prototype.hasOwnProperty;t.exports=function(e,t){var r=s(e),c=!r&&i(e),p=!r&&!c&&a(e),h=!r&&!c&&!p&&u(e),f=r||c||p||h,d=f?n(e.length,String):[],m=d.length;for(var y in e)!t&&!l.call(e,y)||f&&("length"==y||p&&("offset"==y||"parent"==y)||h&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||o(y,m))||d.push(y);return d}},{"./_baseTimes":392,"./_isIndex":446,"./isArguments":508,"./isArray":509,"./isBuffer":512,"./isTypedArray":522}],345:[function(e,t,r){t.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}},{}],346:[function(e,t,r){t.exports=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}},{}],347:[function(e,t,r){t.exports=function(e,t,r,n){var i=-1,s=null==e?0:e.length;for(n&&s&&(r=e[++i]);++i<s;)r=t(r,e[i],i,e);return r}},{}],348:[function(e,t,r){t.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}},{}],349:[function(e,t,r){var n=e("./_baseAssignValue"),i=e("./eq");t.exports=function(e,t,r){(void 0===r||i(e[t],r))&&(void 0!==r||t in e)||n(e,t,r)}},{"./_baseAssignValue":354,"./eq":496}],350:[function(e,t,r){var n=e("./_baseAssignValue"),i=e("./eq"),s=Object.prototype.hasOwnProperty;t.exports=function(e,t,r){var a=e[t];s.call(e,t)&&i(a,r)&&(void 0!==r||t in e)||n(e,t,r)}},{"./_baseAssignValue":354,"./eq":496}],351:[function(e,t,r){var n=e("./eq");t.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},{"./eq":496}],352:[function(e,t,r){var n=e("./_copyObject"),i=e("./keys");t.exports=function(e,t){return e&&n(t,i(t),e)}},{"./_copyObject":410,"./keys":523}],353:[function(e,t,r){var n=e("./_copyObject"),i=e("./keysIn");t.exports=function(e,t){return e&&n(t,i(t),e)}},{"./_copyObject":410,"./keysIn":524}],354:[function(e,t,r){var n=e("./_defineProperty");t.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},{"./_defineProperty":420}],355:[function(e,t,r){t.exports=function(e,t,r){return e==e&&(void 0!==r&&(e=e<=r?e:r),void 0!==t&&(e=e>=t?e:t)),e}},{}],356:[function(e,t,r){function n(e,t,r,P,B,O){var N,j=t&D,I=t&S,L=t&C;if(r&&(N=B?r(e,P,B,O):r(e)),void 0!==N)return N;if(!E(e))return e;var M=v(e);if(M){if(N=y(e),!j)return c(e,N)}else{var R=m(e),V=R==w||R==k;if(x(e))return l(e,j);if(R==F||R==_||V&&!B){if(N=I||V?{}:b(e),!j)return I?h(e,u(N,e)):p(e,o(N,e))}else{if(!T[R])return B?e:{};N=g(e,R,n,j)}}O||(O=new i);var U=O.get(e);if(U)return U;O.set(e,N);var q=L?I?d:f:I?keysIn:A,G=M?void 0:q(e);return s(G||e,function(i,s){G&&(i=e[s=i]),a(N,s,n(i,t,r,s,e,O))}),N}var i=e("./_Stack"),s=e("./_arrayEach"),a=e("./_assignValue"),o=e("./_baseAssign"),u=e("./_baseAssignIn"),l=e("./_cloneBuffer"),c=e("./_copyArray"),p=e("./_copySymbols"),h=e("./_copySymbolsIn"),f=e("./_getAllKeys"),d=e("./_getAllKeysIn"),m=e("./_getTag"),y=e("./_initCloneArray"),g=e("./_initCloneByTag"),b=e("./_initCloneObject"),v=e("./isArray"),x=e("./isBuffer"),E=e("./isObject"),A=e("./keys"),D=1,S=2,C=4,_="[object Arguments]",w="[object Function]",k="[object GeneratorFunction]",F="[object Object]",T={};T[_]=T["[object Array]"]=T["[object ArrayBuffer]"]=T["[object DataView]"]=T["[object Boolean]"]=T["[object Date]"]=T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Map]"]=T["[object Number]"]=T[F]=T["[object RegExp]"]=T["[object Set]"]=T["[object String]"]=T["[object Symbol]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T["[object Error]"]=T[w]=T["[object WeakMap]"]=!1,t.exports=n},{"./_Stack":333,"./_arrayEach":340,"./_assignValue":350,"./_baseAssign":352,"./_baseAssignIn":353,"./_cloneBuffer":400,"./_copyArray":409,"./_copySymbols":411,"./_copySymbolsIn":412,"./_getAllKeys":425,"./_getAllKeysIn":426,"./_getTag":434,"./_initCloneArray":442,"./_initCloneByTag":443,"./_initCloneObject":444,"./isArray":509,"./isBuffer":512,"./isObject":516,"./keys":523}],357:[function(e,t,r){var n=e("./isObject"),i=Object.create,s=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();t.exports=s},{"./isObject":516}],358:[function(e,t,r){var n=e("./_baseForOwn"),i=e("./_createBaseEach")(n);t.exports=i},{"./_baseForOwn":362,"./_createBaseEach":415}],359:[function(e,t,r){t.exports=function(e,t,r,n){for(var i=e.length,s=r+(n?1:-1);n?s--:++s<i;)if(t(e[s],s,e))return s;return-1}},{}],360:[function(e,t,r){function n(e,t,r,a,o){var u=-1,l=e.length;for(r||(r=s),o||(o=[]);++u<l;){var c=e[u];t>0&&r(c)?t>1?n(c,t-1,r,a,o):i(o,c):a||(o[o.length]=c)}return o}var i=e("./_arrayPush"),s=e("./_isFlattenable");t.exports=n},{"./_arrayPush":346,"./_isFlattenable":445}],361:[function(e,t,r){var n=e("./_createBaseFor")();t.exports=n},{"./_createBaseFor":416}],362:[function(e,t,r){var n=e("./_baseFor"),i=e("./keys");t.exports=function(e,t){return e&&n(e,t,i)}},{"./_baseFor":361,"./keys":523}],363:[function(e,t,r){var n=e("./_castPath"),i=e("./_toKey");t.exports=function(e,t){for(var r=0,s=(t=n(t,e)).length;null!=e&&r<s;)e=e[i(t[r++])];return r&&r==s?e:void 0}},{"./_castPath":398,"./_toKey":486}],364:[function(e,t,r){var n=e("./_arrayPush"),i=e("./isArray");t.exports=function(e,t,r){var s=t(e);return i(e)?s:n(s,r(e))}},{"./_arrayPush":346,"./isArray":509}],365:[function(e,t,r){var n=e("./_Symbol"),i=e("./_getRawTag"),s=e("./_objectToString"),a="[object Null]",o="[object Undefined]",u=n?n.toStringTag:void 0;t.exports=function(e){return null==e?void 0===e?o:a:u&&u in Object(e)?i(e):s(e)}},{"./_Symbol":334,"./_getRawTag":431,"./_objectToString":470}],366:[function(e,t,r){var n=Object.prototype.hasOwnProperty;t.exports=function(e,t){return null!=e&&n.call(e,t)}},{}],367:[function(e,t,r){t.exports=function(e,t){return null!=e&&t in Object(e)}},{}],368:[function(e,t,r){var n=e("./_baseFindIndex"),i=e("./_baseIsNaN"),s=e("./_strictIndexOf");t.exports=function(e,t,r){return t==t?s(e,t,r):n(e,i,r)}},{"./_baseFindIndex":359,"./_baseIsNaN":373,"./_strictIndexOf":484}],369:[function(e,t,r){var n=e("./_baseGetTag"),i=e("./isObjectLike"),s="[object Arguments]";t.exports=function(e){return i(e)&&n(e)==s}},{"./_baseGetTag":365,"./isObjectLike":517}],370:[function(e,t,r){function n(e,t,r,a,o){return e===t||(null==e||null==t||!s(e)&&!s(t)?e!=e&&t!=t:i(e,t,r,a,n,o))}var i=e("./_baseIsEqualDeep"),s=e("./isObjectLike");t.exports=n},{"./_baseIsEqualDeep":371,"./isObjectLike":517}],371:[function(e,t,r){var n=e("./_Stack"),i=e("./_equalArrays"),s=e("./_equalByTag"),a=e("./_equalObjects"),o=e("./_getTag"),u=e("./isArray"),l=e("./isBuffer"),c=e("./isTypedArray"),p=1,h="[object Arguments]",f="[object Array]",d="[object Object]",m=Object.prototype.hasOwnProperty;t.exports=function(e,t,r,y,g,b){var v=u(e),x=u(t),E=v?f:o(e),A=x?f:o(t),D=(E=E==h?d:E)==d,S=(A=A==h?d:A)==d,C=E==A;if(C&&l(e)){if(!l(t))return!1;v=!0,D=!1}if(C&&!D)return b||(b=new n),v||c(e)?i(e,t,r,y,g,b):s(e,t,E,r,y,g,b);if(!(r&p)){var _=D&&m.call(e,"__wrapped__"),w=S&&m.call(t,"__wrapped__");if(_||w){var k=_?e.value():e,F=w?t.value():t;return b||(b=new n),g(k,F,r,y,b)}}return!!C&&(b||(b=new n),a(e,t,r,y,g,b))}},{"./_Stack":333,"./_equalArrays":421,"./_equalByTag":422,"./_equalObjects":423,"./_getTag":434,"./isArray":509,"./isBuffer":512,"./isTypedArray":522}],372:[function(e,t,r){var n=e("./_Stack"),i=e("./_baseIsEqual"),s=1,a=2;t.exports=function(e,t,r,o){var u=r.length,l=u,c=!o;if(null==e)return!l;for(e=Object(e);u--;){var p=r[u];if(c&&p[2]?p[1]!==e[p[0]]:!(p[0]in e))return!1}for(;++u<l;){var h=(p=r[u])[0],f=e[h],d=p[1];if(c&&p[2]){if(void 0===f&&!(h in e))return!1}else{var m=new n;if(o)var y=o(f,d,h,e,t,m);if(!(void 0===y?i(d,f,s|a,o,m):y))return!1}}return!0}},{"./_Stack":333,"./_baseIsEqual":370}],373:[function(e,t,r){t.exports=function(e){return e!=e}},{}],374:[function(e,t,r){var n=e("./isFunction"),i=e("./_isMasked"),s=e("./isObject"),a=e("./_toSource"),o=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,c=u.toString,p=l.hasOwnProperty,h=RegExp("^"+c.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(e){return!(!s(e)||i(e))&&(n(e)?h:o).test(a(e))}},{"./_isMasked":450,"./_toSource":487,"./isFunction":513,"./isObject":516}],375:[function(e,t,r){var n=e("./_baseGetTag"),i=e("./isObjectLike"),s="[object RegExp]";t.exports=function(e){return i(e)&&n(e)==s}},{"./_baseGetTag":365,"./isObjectLike":517}],376:[function(e,t,r){var n=e("./_baseGetTag"),i=e("./isLength"),s=e("./isObjectLike"),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(e){return s(e)&&i(e.length)&&!!a[n(e)]}},{"./_baseGetTag":365,"./isLength":515,"./isObjectLike":517}],377:[function(e,t,r){var n=e("./_baseMatches"),i=e("./_baseMatchesProperty"),s=e("./identity"),a=e("./isArray"),o=e("./property");t.exports=function(e){return"function"==typeof e?e:null==e?s:"object"==typeof e?a(e)?i(e[0],e[1]):n(e):o(e)}},{"./_baseMatches":381,"./_baseMatchesProperty":382,"./identity":506,"./isArray":509,"./property":529}],378:[function(e,t,r){var n=e("./_isPrototype"),i=e("./_nativeKeys"),s=Object.prototype.hasOwnProperty;t.exports=function(e){if(!n(e))return i(e);var t=[];for(var r in Object(e))s.call(e,r)&&"constructor"!=r&&t.push(r);return t}},{"./_isPrototype":451,"./_nativeKeys":467}],379:[function(e,t,r){var n=e("./isObject"),i=e("./_isPrototype"),s=e("./_nativeKeysIn"),a=Object.prototype.hasOwnProperty;t.exports=function(e){if(!n(e))return s(e);var t=i(e),r=[];for(var o in e)("constructor"!=o||!t&&a.call(e,o))&&r.push(o);return r}},{"./_isPrototype":451,"./_nativeKeysIn":468,"./isObject":516}],380:[function(e,t,r){var n=e("./_baseEach"),i=e("./isArrayLike");t.exports=function(e,t){var r=-1,s=i(e)?Array(e.length):[];return n(e,function(e,n,i){s[++r]=t(e,n,i)}),s}},{"./_baseEach":358,"./isArrayLike":510}],381:[function(e,t,r){var n=e("./_baseIsMatch"),i=e("./_getMatchData"),s=e("./_matchesStrictComparable");t.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?s(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}},{"./_baseIsMatch":372,"./_getMatchData":428,"./_matchesStrictComparable":464}],382:[function(e,t,r){var n=e("./_baseIsEqual"),i=e("./get"),s=e("./hasIn"),a=e("./_isKey"),o=e("./_isStrictComparable"),u=e("./_matchesStrictComparable"),l=e("./_toKey"),c=1,p=2;t.exports=function(e,t){return a(e)&&o(t)?u(l(e),t):function(r){var a=i(r,e);return void 0===a&&a===t?s(r,e):n(t,a,c|p)}}},{"./_baseIsEqual":370,"./_isKey":448,"./_isStrictComparable":452,"./_matchesStrictComparable":464,"./_toKey":486,"./get":503,"./hasIn":505}],383:[function(e,t,r){function n(e,t,r,c,p){e!==t&&a(t,function(a,l){if(u(a))p||(p=new i),o(e,t,l,r,n,c,p);else{var h=c?c(e[l],a,l+"",e,t,p):void 0;void 0===h&&(h=a),s(e,l,h)}},l)}var i=e("./_Stack"),s=e("./_assignMergeValue"),a=e("./_baseFor"),o=e("./_baseMergeDeep"),u=e("./isObject"),l=e("./keysIn");t.exports=n},{"./_Stack":333,"./_assignMergeValue":349,"./_baseFor":361,"./_baseMergeDeep":384,"./isObject":516,"./keysIn":524}],384:[function(e,t,r){var n=e("./_assignMergeValue"),i=e("./_cloneBuffer"),s=e("./_cloneTypedArray"),a=e("./_copyArray"),o=e("./_initCloneObject"),u=e("./isArguments"),l=e("./isArray"),c=e("./isArrayLikeObject"),p=e("./isBuffer"),h=e("./isFunction"),f=e("./isObject"),d=e("./isPlainObject"),m=e("./isTypedArray"),y=e("./toPlainObject");t.exports=function(e,t,r,g,b,v,x){var E=e[r],A=t[r],D=x.get(A);if(D)n(e,r,D);else{var S=v?v(E,A,r+"",e,t,x):void 0,C=void 0===S;if(C){var _=l(A),w=!_&&p(A),k=!_&&!w&&m(A);S=A,_||w||k?l(E)?S=E:c(E)?S=a(E):w?(C=!1,S=i(A,!0)):k?(C=!1,S=s(A,!0)):S=[]:d(A)||u(A)?(S=E,u(E)?S=y(E):(!f(E)||g&&h(E))&&(S=o(A))):C=!1}C&&(x.set(A,S),b(S,A,g,v,x),x.delete(A)),n(e,r,S)}}},{"./_assignMergeValue":349,"./_cloneBuffer":400,"./_cloneTypedArray":406,"./_copyArray":409,"./_initCloneObject":444,"./isArguments":508,"./isArray":509,"./isArrayLikeObject":511,"./isBuffer":512,"./isFunction":513,"./isObject":516,"./isPlainObject":518,"./isTypedArray":522,"./toPlainObject":538}],385:[function(e,t,r){var n=e("./_arrayMap"),i=e("./_baseIteratee"),s=e("./_baseMap"),a=e("./_baseSortBy"),o=e("./_baseUnary"),u=e("./_compareMultiple"),l=e("./identity");t.exports=function(e,t,r){var c=-1;t=n(t.length?t:[l],o(i));var p=s(e,function(e,r,i){return{criteria:n(t,function(t){return t(e)}),index:++c,value:e}});return a(p,function(e,t){return u(e,t,r)})}},{"./_arrayMap":345,"./_baseIteratee":377,"./_baseMap":380,"./_baseSortBy":391,"./_baseUnary":394,"./_compareMultiple":408,"./identity":506}],386:[function(e,t,r){t.exports=function(e){return function(t){return null==t?void 0:t[e]}}},{}],387:[function(e,t,r){var n=e("./_baseGet");t.exports=function(e){return function(t){return n(t,e)}}},{"./_baseGet":363}],388:[function(e,t,r){var n=9007199254740991,i=Math.floor;t.exports=function(e,t){var r="";if(!e||t<1||t>n)return r;do{t%2&&(r+=e),(t=i(t/2))&&(e+=e)}while(t);return r}},{}],389:[function(e,t,r){var n=e("./identity"),i=e("./_overRest"),s=e("./_setToString");t.exports=function(e,t){return s(i(e,t,n),e+"")}},{"./_overRest":472,"./_setToString":477,"./identity":506}],390:[function(e,t,r){var n=e("./constant"),i=e("./_defineProperty"),s=e("./identity"),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:s;t.exports=a},{"./_defineProperty":420,"./constant":494,"./identity":506}],391:[function(e,t,r){t.exports=function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}},{}],392:[function(e,t,r){t.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},{}],393:[function(e,t,r){function n(e){if("string"==typeof e)return e;if(a(e))return s(e,n)+"";if(o(e))return c?c.call(e):"";var t=e+"";return"0"==t&&1/e==-u?"-0":t}var i=e("./_Symbol"),s=e("./_arrayMap"),a=e("./isArray"),o=e("./isSymbol"),u=1/0,l=i?i.prototype:void 0,c=l?l.toString:void 0;t.exports=n},{"./_Symbol":334,"./_arrayMap":345,"./isArray":509,"./isSymbol":521}],394:[function(e,t,r){t.exports=function(e){return function(t){return e(t)}}},{}],395:[function(e,t,r){var n=e("./_SetCache"),i=e("./_arrayIncludes"),s=e("./_arrayIncludesWith"),a=e("./_cacheHas"),o=e("./_createSet"),u=e("./_setToArray"),l=200;t.exports=function(e,t,r){var c=-1,p=i,h=e.length,f=!0,d=[],m=d;if(r)f=!1,p=s;else if(h>=l){var y=t?null:o(e);if(y)return u(y);f=!1,p=a,m=new n}else m=t?[]:d;e:for(;++c<h;){var g=e[c],b=t?t(g):g;if(g=r||0!==g?g:0,f&&b==b){for(var v=m.length;v--;)if(m[v]===b)continue e;t&&m.push(b),d.push(g)}else p(m,b,r)||(m!==d&&m.push(b),d.push(g))}return d}},{"./_SetCache":332,"./_arrayIncludes":342,"./_arrayIncludesWith":343,"./_cacheHas":397,"./_createSet":418,"./_setToArray":476}],396:[function(e,t,r){var n=e("./_arrayMap");t.exports=function(e,t){return n(t,function(t){return e[t]})}},{"./_arrayMap":345}],397:[function(e,t,r){t.exports=function(e,t){return e.has(t)}},{}],398:[function(e,t,r){var n=e("./isArray"),i=e("./_isKey"),s=e("./_stringToPath"),a=e("./toString");t.exports=function(e,t){return n(e)?e:i(e,t)?[e]:s(a(e))}},{"./_isKey":448,"./_stringToPath":485,"./isArray":509,"./toString":539}],399:[function(e,t,r){var n=e("./_Uint8Array");t.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},{"./_Uint8Array":335}],400:[function(e,t,r){var n=e("./_root"),i="object"==typeof r&&r&&!r.nodeType&&r,s=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=s&&s.exports===i?n.Buffer:void 0,o=a?a.allocUnsafe:void 0;t.exports=function(e,t){if(t)return e.slice();var r=e.length,n=o?o(r):new e.constructor(r);return e.copy(n),n}},{"./_root":473}],401:[function(e,t,r){var n=e("./_cloneArrayBuffer");t.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}},{"./_cloneArrayBuffer":399}],402:[function(e,t,r){var n=e("./_addMapEntry"),i=e("./_arrayReduce"),s=e("./_mapToArray"),a=1;t.exports=function(e,t,r){var o=t?r(s(e),a):s(e);return i(o,n,new e.constructor)}},{"./_addMapEntry":337,"./_arrayReduce":347,"./_mapToArray":463}],403:[function(e,t,r){var n=/\w*$/;t.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},{}],404:[function(e,t,r){var n=e("./_addSetEntry"),i=e("./_arrayReduce"),s=e("./_setToArray"),a=1;t.exports=function(e,t,r){var o=t?r(s(e),a):s(e);return i(o,n,new e.constructor)}},{"./_addSetEntry":338,"./_arrayReduce":347,"./_setToArray":476}],405:[function(e,t,r){var n=e("./_Symbol"),i=n?n.prototype:void 0,s=i?i.valueOf:void 0;t.exports=function(e){return s?Object(s.call(e)):{}}},{"./_Symbol":334}],406:[function(e,t,r){var n=e("./_cloneArrayBuffer");t.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},{"./_cloneArrayBuffer":399}],407:[function(e,t,r){var n=e("./isSymbol");t.exports=function(e,t){if(e!==t){var r=void 0!==e,i=null===e,s=e==e,a=n(e),o=void 0!==t,u=null===t,l=t==t,c=n(t);if(!u&&!c&&!a&&e>t||a&&o&&l&&!u&&!c||i&&o&&l||!r&&l||!s)return 1;if(!i&&!a&&!c&&e<t||c&&r&&s&&!i&&!a||u&&r&&s||!o&&s||!l)return-1}return 0}},{"./isSymbol":521}],408:[function(e,t,r){var n=e("./_compareAscending");t.exports=function(e,t,r){for(var i=-1,s=e.criteria,a=t.criteria,o=s.length,u=r.length;++i<o;){var l=n(s[i],a[i]);if(l)return i>=u?l:l*("desc"==r[i]?-1:1)}return e.index-t.index}},{"./_compareAscending":407}],409:[function(e,t,r){t.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},{}],410:[function(e,t,r){var n=e("./_assignValue"),i=e("./_baseAssignValue");t.exports=function(e,t,r,s){var a=!r;r||(r={});for(var o=-1,u=t.length;++o<u;){var l=t[o],c=s?s(r[l],e[l],l,r,e):void 0;void 0===c&&(c=e[l]),a?i(r,l,c):n(r,l,c)}return r}},{"./_assignValue":350,"./_baseAssignValue":354}],411:[function(e,t,r){var n=e("./_copyObject"),i=e("./_getSymbols");t.exports=function(e,t){return n(e,i(e),t)}},{"./_copyObject":410,"./_getSymbols":432}],412:[function(e,t,r){var n=e("./_copyObject"),i=e("./_getSymbolsIn");t.exports=function(e,t){return n(e,i(e),t)}},{"./_copyObject":410,"./_getSymbolsIn":433}],413:[function(e,t,r){var n=e("./_root")["__core-js_shared__"];t.exports=n},{"./_root":473}],414:[function(e,t,r){var n=e("./_baseRest"),i=e("./_isIterateeCall");t.exports=function(e){return n(function(t,r){var n=-1,s=r.length,a=s>1?r[s-1]:void 0,o=s>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(s--,a):void 0,o&&i(r[0],r[1],o)&&(a=s<3?void 0:a,s=1),t=Object(t);++n<s;){var u=r[n];u&&e(t,u,n,a)}return t})}},{"./_baseRest":389,"./_isIterateeCall":447}],415:[function(e,t,r){var n=e("./isArrayLike");t.exports=function(e,t){return function(r,i){if(null==r)return r;if(!n(r))return e(r,i);for(var s=r.length,a=t?s:-1,o=Object(r);(t?a--:++a<s)&&!1!==i(o[a],a,o););return r}}},{"./isArrayLike":510}],416:[function(e,t,r){t.exports=function(e){return function(t,r,n){for(var i=-1,s=Object(t),a=n(t),o=a.length;o--;){var u=a[e?o:++i];if(!1===r(s[u],u,s))break}return t}}},{}],417:[function(e,t,r){var n=e("./_baseIteratee"),i=e("./isArrayLike"),s=e("./keys");t.exports=function(e){return function(t,r,a){var o=Object(t);if(!i(t)){var u=n(r,3);t=s(t),r=function(e){return u(o[e],e,o)}}var l=e(t,r,a);return l>-1?o[u?t[l]:l]:void 0}}},{"./_baseIteratee":377,"./isArrayLike":510,"./keys":523}],418:[function(e,t,r){var n=e("./_Set"),i=e("./noop"),s=e("./_setToArray"),a=n&&1/s(new n([,-0]))[1]==1/0?function(e){return new n(e)}:i;t.exports=a},{"./_Set":331,"./_setToArray":476,"./noop":528}],419:[function(e,t,r){var n=e("./eq"),i=Object.prototype,s=i.hasOwnProperty;t.exports=function(e,t,r,a){return void 0===e||n(e,i[r])&&!s.call(a,r)?t:e}},{"./eq":496}],420:[function(e,t,r){var n=e("./_getNative"),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();t.exports=i},{"./_getNative":429}],421:[function(e,t,r){var n=e("./_SetCache"),i=e("./_arraySome"),s=e("./_cacheHas"),a=1,o=2;t.exports=function(e,t,r,u,l,c){var p=r&a,h=e.length,f=t.length;if(h!=f&&!(p&&f>h))return!1;var d=c.get(e);if(d&&c.get(t))return d==t;var m=-1,y=!0,g=r&o?new n:void 0;for(c.set(e,t),c.set(t,e);++m<h;){var b=e[m],v=t[m];if(u)var x=p?u(v,b,m,t,e,c):u(b,v,m,e,t,c);if(void 0!==x){if(x)continue;y=!1;break}if(g){if(!i(t,function(e,t){if(!s(g,t)&&(b===e||l(b,e,r,u,c)))return g.push(t)})){y=!1;break}}else if(b!==v&&!l(b,v,r,u,c)){y=!1;break}}return c.delete(e),c.delete(t),y}},{"./_SetCache":332,"./_arraySome":348,"./_cacheHas":397}],422:[function(e,t,r){var n=e("./_Symbol"),i=e("./_Uint8Array"),s=e("./eq"),a=e("./_equalArrays"),o=e("./_mapToArray"),u=e("./_setToArray"),l=1,c=2,p="[object Boolean]",h="[object Date]",f="[object Error]",d="[object Map]",m="[object Number]",y="[object RegExp]",g="[object Set]",b="[object String]",v="[object Symbol]",x="[object ArrayBuffer]",E="[object DataView]",A=n?n.prototype:void 0,D=A?A.valueOf:void 0;t.exports=function(e,t,r,n,A,S,C){switch(r){case E:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case x:return!(e.byteLength!=t.byteLength||!S(new i(e),new i(t)));case p:case h:case m:return s(+e,+t);case f:return e.name==t.name&&e.message==t.message;case y:case b:return e==t+"";case d:var _=o;case g:var w=n&l;if(_||(_=u),e.size!=t.size&&!w)return!1;var k=C.get(e);if(k)return k==t;n|=c,C.set(e,t);var F=a(_(e),_(t),n,A,S,C);return C.delete(e),F;case v:if(D)return D.call(e)==D.call(t)}return!1}},{"./_Symbol":334,"./_Uint8Array":335,"./_equalArrays":421,"./_mapToArray":463,"./_setToArray":476,"./eq":496}],423:[function(e,t,r){var n=e("./_getAllKeys"),i=1,s=Object.prototype.hasOwnProperty;t.exports=function(e,t,r,a,o,u){var l=r&i,c=n(e),p=c.length;if(p!=n(t).length&&!l)return!1;for(var h=p;h--;){var f=c[h];if(!(l?f in t:s.call(t,f)))return!1}var d=u.get(e);if(d&&u.get(t))return d==t;var m=!0;u.set(e,t),u.set(t,e);for(var y=l;++h<p;){var g=e[f=c[h]],b=t[f];if(a)var v=l?a(b,g,f,t,e,u):a(g,b,f,e,t,u);if(!(void 0===v?g===b||o(g,b,r,a,u):v)){m=!1;break}y||(y="constructor"==f)}if(m&&!y){var x=e.constructor,E=t.constructor;x!=E&&"constructor"in e&&"constructor"in t&&!("function"==typeof x&&x instanceof x&&"function"==typeof E&&E instanceof E)&&(m=!1)}return u.delete(e),u.delete(t),m}},{"./_getAllKeys":425}],424:[function(e,t,r){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],425:[function(e,t,r){var n=e("./_baseGetAllKeys"),i=e("./_getSymbols"),s=e("./keys");t.exports=function(e){return n(e,s,i)}},{"./_baseGetAllKeys":364,"./_getSymbols":432,"./keys":523}],426:[function(e,t,r){var n=e("./_baseGetAllKeys"),i=e("./_getSymbolsIn"),s=e("./keysIn");t.exports=function(e){return n(e,s,i)}},{"./_baseGetAllKeys":364,"./_getSymbolsIn":433,"./keysIn":524}],427:[function(e,t,r){var n=e("./_isKeyable");t.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},{"./_isKeyable":449}],428:[function(e,t,r){var n=e("./_isStrictComparable"),i=e("./keys");t.exports=function(e){for(var t=i(e),r=t.length;r--;){var s=t[r],a=e[s];t[r]=[s,a,n(a)]}return t}},{"./_isStrictComparable":452,"./keys":523}],429:[function(e,t,r){var n=e("./_baseIsNative"),i=e("./_getValue");t.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},{"./_baseIsNative":374,"./_getValue":435}],430:[function(e,t,r){var n=e("./_overArg")(Object.getPrototypeOf,Object);t.exports=n},{"./_overArg":471}],431:[function(e,t,r){var n=e("./_Symbol"),i=Object.prototype,s=i.hasOwnProperty,a=i.toString,o=n?n.toStringTag:void 0;t.exports=function(e){var t=s.call(e,o),r=e[o];try{e[o]=void 0;var n=!0}catch(e){}var i=a.call(e);return n&&(t?e[o]=r:delete e[o]),i}},{"./_Symbol":334}],432:[function(e,t,r){var n=e("./_arrayFilter"),i=e("./stubArray"),s=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,o=a?function(e){return null==e?[]:(e=Object(e),n(a(e),function(t){return s.call(e,t)}))}:i;t.exports=o},{"./_arrayFilter":341,"./stubArray":533}],433:[function(e,t,r){var n=e("./_arrayPush"),i=e("./_getPrototype"),s=e("./_getSymbols"),a=e("./stubArray"),o=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,s(e)),e=i(e);return t}:a;t.exports=o},{"./_arrayPush":346,"./_getPrototype":430,"./_getSymbols":432,"./stubArray":533}],434:[function(e,t,r){var n=e("./_DataView"),i=e("./_Map"),s=e("./_Promise"),a=e("./_Set"),o=e("./_WeakMap"),u=e("./_baseGetTag"),l=e("./_toSource"),c=l(n),p=l(i),h=l(s),f=l(a),d=l(o),m=u;(n&&"[object DataView]"!=m(new n(new ArrayBuffer(1)))||i&&"[object Map]"!=m(new i)||s&&"[object Promise]"!=m(s.resolve())||a&&"[object Set]"!=m(new a)||o&&"[object WeakMap]"!=m(new o))&&(m=function(e){var t=u(e),r="[object Object]"==t?e.constructor:void 0,n=r?l(r):"";if(n)switch(n){case c:return"[object DataView]";case p:return"[object Map]";case h:return"[object Promise]";case f:return"[object Set]";case d:return"[object WeakMap]"}return t}),t.exports=m},{"./_DataView":325,"./_Map":328,"./_Promise":330,"./_Set":331,"./_WeakMap":336,"./_baseGetTag":365,"./_toSource":487}],435:[function(e,t,r){t.exports=function(e,t){return null==e?void 0:e[t]}},{}],436:[function(e,t,r){var n=e("./_castPath"),i=e("./isArguments"),s=e("./isArray"),a=e("./_isIndex"),o=e("./isLength"),u=e("./_toKey");t.exports=function(e,t,r){for(var l=-1,c=(t=n(t,e)).length,p=!1;++l<c;){var h=u(t[l]);if(!(p=null!=e&&r(e,h)))break;e=e[h]}return p||++l!=c?p:!!(c=null==e?0:e.length)&&o(c)&&a(h,c)&&(s(e)||i(e))}},{"./_castPath":398,"./_isIndex":446,"./_toKey":486,"./isArguments":508,"./isArray":509,"./isLength":515}],437:[function(e,t,r){var n=e("./_nativeCreate");t.exports=function(){this.__data__=n?n(null):{},this.size=0}},{"./_nativeCreate":466}],438:[function(e,t,r){t.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},{}],439:[function(e,t,r){var n=e("./_nativeCreate"),i="__lodash_hash_undefined__",s=Object.prototype.hasOwnProperty;t.exports=function(e){var t=this.__data__;if(n){var r=t[e];return r===i?void 0:r}return s.call(t,e)?t[e]:void 0}},{"./_nativeCreate":466}],440:[function(e,t,r){var n=e("./_nativeCreate"),i=Object.prototype.hasOwnProperty;t.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)}},{"./_nativeCreate":466}],441:[function(e,t,r){var n=e("./_nativeCreate"),i="__lodash_hash_undefined__";t.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?i:t,this}},{"./_nativeCreate":466}],442:[function(e,t,r){var n=Object.prototype.hasOwnProperty;t.exports=function(e){var t=e.length,r=e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},{}],443:[function(e,t,r){var n=e("./_cloneArrayBuffer"),i=e("./_cloneDataView"),s=e("./_cloneMap"),a=e("./_cloneRegExp"),o=e("./_cloneSet"),u=e("./_cloneSymbol"),l=e("./_cloneTypedArray"),c="[object Boolean]",p="[object Date]",h="[object Map]",f="[object Number]",d="[object RegExp]",m="[object Set]",y="[object String]",g="[object Symbol]",b="[object ArrayBuffer]",v="[object DataView]",x="[object Float32Array]",E="[object Float64Array]",A="[object Int8Array]",D="[object Int16Array]",S="[object Int32Array]",C="[object Uint8Array]",_="[object Uint8ClampedArray]",w="[object Uint16Array]",k="[object Uint32Array]";t.exports=function(e,t,r,F){var T=e.constructor;switch(t){case b:return n(e);case c:case p:return new T(+e);case v:return i(e,F);case x:case E:case A:case D:case S:case C:case _:case w:case k:return l(e,F);case h:return s(e,F,r);case f:case y:return new T(e);case d:return a(e);case m:return o(e,F,r);case g:return u(e)}}},{"./_cloneArrayBuffer":399,"./_cloneDataView":401,"./_cloneMap":402,"./_cloneRegExp":403,"./_cloneSet":404,"./_cloneSymbol":405,"./_cloneTypedArray":406}],444:[function(e,t,r){var n=e("./_baseCreate"),i=e("./_getPrototype"),s=e("./_isPrototype");t.exports=function(e){return"function"!=typeof e.constructor||s(e)?{}:n(i(e))}},{"./_baseCreate":357,"./_getPrototype":430,"./_isPrototype":451}],445:[function(e,t,r){var n=e("./_Symbol"),i=e("./isArguments"),s=e("./isArray"),a=n?n.isConcatSpreadable:void 0;t.exports=function(e){return s(e)||i(e)||!!(a&&e&&e[a])}},{"./_Symbol":334,"./isArguments":508,"./isArray":509}],446:[function(e,t,r){var n=9007199254740991,i=/^(?:0|[1-9]\d*)$/;t.exports=function(e,t){return!!(t=null==t?n:t)&&("number"==typeof e||i.test(e))&&e>-1&&e%1==0&&e<t}},{}],447:[function(e,t,r){var n=e("./eq"),i=e("./isArrayLike"),s=e("./_isIndex"),a=e("./isObject");t.exports=function(e,t,r){if(!a(r))return!1;var o=typeof t;return!!("number"==o?i(r)&&s(t,r.length):"string"==o&&t in r)&&n(r[t],e)}},{"./_isIndex":446,"./eq":496,"./isArrayLike":510,"./isObject":516}],448:[function(e,t,r){var n=e("./isArray"),i=e("./isSymbol"),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!i(e))||a.test(e)||!s.test(e)||null!=t&&e in Object(t)}},{"./isArray":509,"./isSymbol":521}],449:[function(e,t,r){t.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},{}],450:[function(e,t,r){var n=e("./_coreJsData"),i=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();t.exports=function(e){return!!i&&i in e}},{"./_coreJsData":413}],451:[function(e,t,r){var n=Object.prototype;t.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},{}],452:[function(e,t,r){var n=e("./isObject");t.exports=function(e){return e==e&&!n(e)}},{"./isObject":516}],453:[function(e,t,r){t.exports=function(){this.__data__=[],this.size=0}},{}],454:[function(e,t,r){var n=e("./_assocIndexOf"),i=Array.prototype.splice;t.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0||(r==t.length-1?t.pop():i.call(t,r,1),--this.size,0))}},{"./_assocIndexOf":351}],455:[function(e,t,r){var n=e("./_assocIndexOf");t.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},{"./_assocIndexOf":351}],456:[function(e,t,r){var n=e("./_assocIndexOf");t.exports=function(e){return n(this.__data__,e)>-1}},{"./_assocIndexOf":351}],457:[function(e,t,r){var n=e("./_assocIndexOf");t.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},{"./_assocIndexOf":351}],458:[function(e,t,r){var n=e("./_Hash"),i=e("./_ListCache"),s=e("./_Map");t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(s||i),string:new n}}},{"./_Hash":326,"./_ListCache":327,"./_Map":328}],459:[function(e,t,r){var n=e("./_getMapData");t.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},{"./_getMapData":427}],460:[function(e,t,r){var n=e("./_getMapData");t.exports=function(e){return n(this,e).get(e)}},{"./_getMapData":427}],461:[function(e,t,r){var n=e("./_getMapData");t.exports=function(e){return n(this,e).has(e)}},{"./_getMapData":427}],462:[function(e,t,r){var n=e("./_getMapData");t.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}},{"./_getMapData":427}],463:[function(e,t,r){t.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}},{}],464:[function(e,t,r){t.exports=function(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}}},{}],465:[function(e,t,r){var n=e("./memoize"),i=500;t.exports=function(e){var t=n(e,function(e){return r.size===i&&r.clear(),e}),r=t.cache;return t}},{"./memoize":526}],466:[function(e,t,r){var n=e("./_getNative")(Object,"create");t.exports=n},{"./_getNative":429}],467:[function(e,t,r){var n=e("./_overArg")(Object.keys,Object);t.exports=n},{"./_overArg":471}],468:[function(e,t,r){t.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},{}],469:[function(e,t,r){var n=e("./_freeGlobal"),i="object"==typeof r&&r&&!r.nodeType&&r,s=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=s&&s.exports===i&&n.process,o=function(){try{return a&&a.binding&&a.binding("util")}catch(e){}}();t.exports=o},{"./_freeGlobal":424}],470:[function(e,t,r){var n=Object.prototype.toString;t.exports=function(e){return n.call(e)}},{}],471:[function(e,t,r){t.exports=function(e,t){return function(r){return e(t(r))}}},{}],472:[function(e,t,r){var n=e("./_apply"),i=Math.max;t.exports=function(e,t,r){return t=i(void 0===t?e.length-1:t,0),function(){for(var s=arguments,a=-1,o=i(s.length-t,0),u=Array(o);++a<o;)u[a]=s[t+a];a=-1;for(var l=Array(t+1);++a<t;)l[a]=s[a];return l[t]=r(u),n(e,this,l)}}},{"./_apply":339}],473:[function(e,t,r){var n=e("./_freeGlobal"),i="object"==typeof self&&self&&self.Object===Object&&self,s=n||i||Function("return this")();t.exports=s},{"./_freeGlobal":424}],474:[function(e,t,r){var n="__lodash_hash_undefined__";t.exports=function(e){return this.__data__.set(e,n),this}},{}],475:[function(e,t,r){t.exports=function(e){return this.__data__.has(e)}},{}],476:[function(e,t,r){t.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}},{}],477:[function(e,t,r){var n=e("./_baseSetToString"),i=e("./_shortOut")(n);t.exports=i},{"./_baseSetToString":390,"./_shortOut":478}],478:[function(e,t,r){var n=800,i=16,s=Date.now;t.exports=function(e){var t=0,r=0;return function(){var a=s(),o=i-(a-r);if(r=a,o>0){if(++t>=n)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},{}],479:[function(e,t,r){var n=e("./_ListCache");t.exports=function(){this.__data__=new n,this.size=0}},{"./_ListCache":327}],480:[function(e,t,r){t.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},{}],481:[function(e,t,r){t.exports=function(e){return this.__data__.get(e)}},{}],482:[function(e,t,r){t.exports=function(e){return this.__data__.has(e)}},{}],483:[function(e,t,r){var n=e("./_ListCache"),i=e("./_Map"),s=e("./_MapCache"),a=200;t.exports=function(e,t){var r=this.__data__;if(r instanceof n){var o=r.__data__;if(!i||o.length<a-1)return o.push([e,t]),this.size=++r.size,this;r=this.__data__=new s(o)}return r.set(e,t),this.size=r.size,this}},{"./_ListCache":327,"./_Map":328,"./_MapCache":329}],484:[function(e,t,r){t.exports=function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}},{}],485:[function(e,t,r){var n=/^\./,i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,a=e("./_memoizeCapped")(function(e){var t=[];return n.test(e)&&t.push(""),e.replace(i,function(e,r,n,i){t.push(n?i.replace(s,"$1"):r||e)}),t});t.exports=a},{"./_memoizeCapped":465}],486:[function(e,t,r){var n=e("./isSymbol"),i=1/0;t.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}},{"./isSymbol":521}],487:[function(e,t,r){var n=Function.prototype.toString;t.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},{}],488:[function(e,t,r){var n=e("./_assignValue"),i=e("./_copyObject"),s=e("./_createAssigner"),a=e("./isArrayLike"),o=e("./_isPrototype"),u=e("./keys"),l=Object.prototype.hasOwnProperty,c=s(function(e,t){if(o(t)||a(t))i(t,u(t),e);else for(var r in t)l.call(t,r)&&n(e,r,t[r])});t.exports=c},{"./_assignValue":350,"./_copyObject":410,"./_createAssigner":414,"./_isPrototype":451,"./isArrayLike":510,"./keys":523}],489:[function(e,t,r){var n=e("./_copyObject"),i=e("./_createAssigner"),s=e("./keysIn"),a=i(function(e,t){n(t,s(t),e)});t.exports=a},{"./_copyObject":410,"./_createAssigner":414,"./keysIn":524}],490:[function(e,t,r){var n=e("./_copyObject"),i=e("./_createAssigner"),s=e("./keysIn"),a=i(function(e,t,r,i){n(t,s(t),e,i)});t.exports=a},{"./_copyObject":410,"./_createAssigner":414,"./keysIn":524}],491:[function(e,t,r){var n=e("./_baseClone"),i=4;t.exports=function(e){return n(e,i)}},{"./_baseClone":356}],492:[function(e,t,r){var n=e("./_baseClone"),i=1,s=4;t.exports=function(e){return n(e,i|s)}},{"./_baseClone":356}],493:[function(e,t,r){var n=e("./_baseClone"),i=1,s=4;t.exports=function(e,t){return t="function"==typeof t?t:void 0,n(e,i|s,t)}},{"./_baseClone":356}],494:[function(e,t,r){t.exports=function(e){return function(){return e}}},{}],495:[function(e,t,r){var n=e("./_apply"),i=e("./assignInWith"),s=e("./_baseRest"),a=e("./_customDefaultsAssignIn"),o=s(function(e){return e.push(void 0,a),n(i,void 0,e)});t.exports=o},{"./_apply":339,"./_baseRest":389,"./_customDefaultsAssignIn":419,"./assignInWith":490}],496:[function(e,t,r){t.exports=function(e,t){return e===t||e!=e&&t!=t}},{}],497:[function(e,t,r){var n=e("./toString"),i=/[\\^$.*+?()[\]{}|]/g,s=RegExp(i.source);t.exports=function(e){return(e=n(e))&&s.test(e)?e.replace(i,"\\$&"):e}},{"./toString":539}],498:[function(e,t,r){t.exports=e("./assignIn")},{"./assignIn":489}],499:[function(e,t,r){var n=e("./_createFind")(e("./findIndex"));t.exports=n},{"./_createFind":417,"./findIndex":500}],500:[function(e,t,r){var n=e("./_baseFindIndex"),i=e("./_baseIteratee"),s=e("./toInteger"),a=Math.max;t.exports=function(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var u=null==r?0:s(r);return u<0&&(u=a(o+u,0)),n(e,i(t,3),u)}},{"./_baseFindIndex":359,"./_baseIteratee":377,"./toInteger":536}],501:[function(e,t,r){var n=e("./_createFind")(e("./findLastIndex"));t.exports=n},{"./_createFind":417,"./findLastIndex":502}],502:[function(e,t,r){var n=e("./_baseFindIndex"),i=e("./_baseIteratee"),s=e("./toInteger"),a=Math.max,o=Math.min;t.exports=function(e,t,r){var u=null==e?0:e.length;if(!u)return-1;var l=u-1;return void 0!==r&&(l=s(r),l=r<0?a(u+l,0):o(l,u-1)),n(e,i(t,3),l,!0)}},{"./_baseFindIndex":359,"./_baseIteratee":377,"./toInteger":536}],503:[function(e,t,r){var n=e("./_baseGet");t.exports=function(e,t,r){var i=null==e?void 0:n(e,t);return void 0===i?r:i}},{"./_baseGet":363}],504:[function(e,t,r){var n=e("./_baseHas"),i=e("./_hasPath");t.exports=function(e,t){return null!=e&&i(e,t,n)}},{"./_baseHas":366,"./_hasPath":436}],505:[function(e,t,r){var n=e("./_baseHasIn"),i=e("./_hasPath");t.exports=function(e,t){return null!=e&&i(e,t,n)}},{"./_baseHasIn":367,"./_hasPath":436}],506:[function(e,t,r){t.exports=function(e){return e}},{}],507:[function(e,t,r){var n=e("./_baseIndexOf"),i=e("./isArrayLike"),s=e("./isString"),a=e("./toInteger"),o=e("./values"),u=Math.max;t.exports=function(e,t,r,l){e=i(e)?e:o(e),r=r&&!l?a(r):0;var c=e.length;return r<0&&(r=u(c+r,0)),s(e)?r<=c&&e.indexOf(t,r)>-1:!!c&&n(e,t,r)>-1}},{"./_baseIndexOf":368,"./isArrayLike":510,"./isString":520,"./toInteger":536,"./values":541}],508:[function(e,t,r){var n=e("./_baseIsArguments"),i=e("./isObjectLike"),s=Object.prototype,a=s.hasOwnProperty,o=s.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return i(e)&&a.call(e,"callee")&&!o.call(e,"callee")};t.exports=u},{"./_baseIsArguments":369,"./isObjectLike":517}],509:[function(e,t,r){var n=Array.isArray;t.exports=n},{}],510:[function(e,t,r){var n=e("./isFunction"),i=e("./isLength");t.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},{"./isFunction":513,"./isLength":515}],511:[function(e,t,r){var n=e("./isArrayLike"),i=e("./isObjectLike");t.exports=function(e){return i(e)&&n(e)}},{"./isArrayLike":510,"./isObjectLike":517}],512:[function(e,t,r){var n=e("./_root"),i=e("./stubFalse"),s="object"==typeof r&&r&&!r.nodeType&&r,a=s&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===s?n.Buffer:void 0,u=(o?o.isBuffer:void 0)||i;t.exports=u},{"./_root":473,"./stubFalse":534}],513:[function(e,t,r){var n=e("./_baseGetTag"),i=e("./isObject"),s="[object AsyncFunction]",a="[object Function]",o="[object GeneratorFunction]",u="[object Proxy]";t.exports=function(e){if(!i(e))return!1;var t=n(e);return t==a||t==o||t==s||t==u}},{"./_baseGetTag":365,"./isObject":516}],514:[function(e,t,r){var n=e("./toInteger");t.exports=function(e){return"number"==typeof e&&e==n(e)}},{"./toInteger":536}],515:[function(e,t,r){var n=9007199254740991;t.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}},{}],516:[function(e,t,r){t.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},{}],517:[function(e,t,r){t.exports=function(e){return null!=e&&"object"==typeof e}},{}],518:[function(e,t,r){var n=e("./_baseGetTag"),i=e("./_getPrototype"),s=e("./isObjectLike"),a="[object Object]",o=Function.prototype,u=Object.prototype,l=o.toString,c=u.hasOwnProperty,p=l.call(Object);t.exports=function(e){if(!s(e)||n(e)!=a)return!1;var t=i(e);if(null===t)return!0;var r=c.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&l.call(r)==p}},{"./_baseGetTag":365,"./_getPrototype":430,"./isObjectLike":517}],519:[function(e,t,r){var n=e("./_baseIsRegExp"),i=e("./_baseUnary"),s=e("./_nodeUtil"),a=s&&s.isRegExp,o=a?i(a):n;t.exports=o},{"./_baseIsRegExp":375,"./_baseUnary":394,"./_nodeUtil":469}],520:[function(e,t,r){var n=e("./_baseGetTag"),i=e("./isArray"),s=e("./isObjectLike"),a="[object String]";t.exports=function(e){return"string"==typeof e||!i(e)&&s(e)&&n(e)==a}},{"./_baseGetTag":365,"./isArray":509,"./isObjectLike":517}],521:[function(e,t,r){var n=e("./_baseGetTag"),i=e("./isObjectLike"),s="[object Symbol]";t.exports=function(e){return"symbol"==typeof e||i(e)&&n(e)==s}},{"./_baseGetTag":365,"./isObjectLike":517}],522:[function(e,t,r){var n=e("./_baseIsTypedArray"),i=e("./_baseUnary"),s=e("./_nodeUtil"),a=s&&s.isTypedArray,o=a?i(a):n;t.exports=o},{"./_baseIsTypedArray":376,"./_baseUnary":394,"./_nodeUtil":469}],523:[function(e,t,r){var n=e("./_arrayLikeKeys"),i=e("./_baseKeys"),s=e("./isArrayLike");t.exports=function(e){return s(e)?n(e):i(e)}},{"./_arrayLikeKeys":344,"./_baseKeys":378,"./isArrayLike":510}],524:[function(e,t,r){var n=e("./_arrayLikeKeys"),i=e("./_baseKeysIn"),s=e("./isArrayLike");t.exports=function(e){return s(e)?n(e,!0):i(e)}},{"./_arrayLikeKeys":344,"./_baseKeysIn":379,"./isArrayLike":510}],525:[function(e,t,r){var n=e("./_arrayMap"),i=e("./_baseIteratee"),s=e("./_baseMap"),a=e("./isArray");t.exports=function(e,t){return(a(e)?n:s)(e,i(t,3))}},{"./_arrayMap":345,"./_baseIteratee":377,"./_baseMap":380,"./isArray":509}],526:[function(e,t,r){function n(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(s);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=e.apply(this,n);return r.cache=s.set(i,a)||s,a};return r.cache=new(n.Cache||i),r}var i=e("./_MapCache"),s="Expected a function";n.Cache=i,t.exports=n},{"./_MapCache":329}],527:[function(e,t,r){var n=e("./_baseMerge"),i=e("./_createAssigner")(function(e,t,r,i){n(e,t,r,i)});t.exports=i},{"./_baseMerge":383,"./_createAssigner":414}],528:[function(e,t,r){t.exports=function(){}},{}],529:[function(e,t,r){var n=e("./_baseProperty"),i=e("./_basePropertyDeep"),s=e("./_isKey"),a=e("./_toKey");t.exports=function(e){return s(e)?n(a(e)):i(e)}},{"./_baseProperty":386,"./_basePropertyDeep":387,"./_isKey":448,"./_toKey":486}],530:[function(e,t,r){var n=e("./_baseRepeat"),i=e("./_isIterateeCall"),s=e("./toInteger"),a=e("./toString");t.exports=function(e,t,r){return t=(r?i(e,t,r):void 0===t)?1:s(t),n(a(e),t)}},{"./_baseRepeat":388,"./_isIterateeCall":447,"./toInteger":536,"./toString":539}],531:[function(e,t,r){var n=e("./_baseFlatten"),i=e("./_baseOrderBy"),s=e("./_baseRest"),a=e("./_isIterateeCall"),o=s(function(e,t){if(null==e)return[];var r=t.length;return r>1&&a(e,t[0],t[1])?t=[]:r>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,n(t,1),[])});t.exports=o},{"./_baseFlatten":360,"./_baseOrderBy":385,"./_baseRest":389,"./_isIterateeCall":447}],532:[function(e,t,r){var n=e("./_baseClamp"),i=e("./_baseToString"),s=e("./toInteger"),a=e("./toString");t.exports=function(e,t,r){return e=a(e),r=null==r?0:n(s(r),0,e.length),t=i(t),e.slice(r,r+t.length)==t}},{"./_baseClamp":355,"./_baseToString":393,"./toInteger":536,"./toString":539}],533:[function(e,t,r){t.exports=function(){return[]}},{}],534:[function(e,t,r){t.exports=function(){return!1}},{}],535:[function(e,t,r){var n=e("./toNumber"),i=1/0,s=1.7976931348623157e308;t.exports=function(e){if(!e)return 0===e?e:0;if((e=n(e))===i||e===-i)return(e<0?-1:1)*s;return e==e?e:0}},{"./toNumber":537}],536:[function(e,t,r){var n=e("./toFinite");t.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},{"./toFinite":535}],537:[function(e,t,r){var n=e("./isObject"),i=e("./isSymbol"),s=NaN,a=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;t.exports=function(e){if("number"==typeof e)return e;if(i(e))return s;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var r=u.test(e);return r||l.test(e)?c(e.slice(2),r?2:8):o.test(e)?s:+e}},{"./isObject":516,"./isSymbol":521}],538:[function(e,t,r){var n=e("./_copyObject"),i=e("./keysIn");t.exports=function(e){return n(e,i(e))}},{"./_copyObject":410,"./keysIn":524}],539:[function(e,t,r){var n=e("./_baseToString");t.exports=function(e){return null==e?"":n(e)}},{"./_baseToString":393}],540:[function(e,t,r){var n=e("./_baseUniq");t.exports=function(e){return e&&e.length?n(e):[]}},{"./_baseUniq":395}],541:[function(e,t,r){var n=e("./_baseValues"),i=e("./keys");t.exports=function(e){return null==e?[]:n(e,i(e))}},{"./_baseValues":396,"./keys":523}],542:[function(e,t,r){function n(e,t){e=e||{},t=t||{};var r={};return Object.keys(t).forEach(function(e){r[e]=t[e]}),Object.keys(e).forEach(function(t){r[t]=e[t]}),r}function i(e,t,r){if("string"!=typeof t)throw new TypeError("glob pattern string required");return r||(r={}),!(!r.nocomment&&"#"===t.charAt(0))&&(""===t.trim()?""===e:new s(t,r).match(e))}function s(e,t){if(!(this instanceof s))return new s(e,t);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),"/"!==o.sep&&(e=e.split(o.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function a(e,t){if(t||(t=this instanceof s?this.options:{}),void 0===(e=void 0===e?this.pattern:e))throw new TypeError("undefined pattern");return t.nobrace||!e.match(/\{.*\}/)?[e]:l(e)}t.exports=i,i.Minimatch=s;var o={sep:"/"};try{o=e("path")}catch(e){}var u=i.GLOBSTAR=s.GLOBSTAR={},l=e("brace-expansion"),c={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},p="[^/]",h=p+"*?",f="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",d="(?:(?!(?:\\/|^)\\.).)*?",m=function(e){return e.split("").reduce(function(e,t){return e[t]=!0,e},{})}("().*{}+?[]^$\\!"),y=/\/+/;i.filter=function(e,t){return t=t||{},function(r,n,s){return i(r,e,t)}},i.defaults=function(e){if(!e||!Object.keys(e).length)return i;var t=i,r=function(r,i,s){return t.minimatch(r,i,n(e,s))};return r.Minimatch=function(r,i){return new t.Minimatch(r,n(e,i))},r},s.defaults=function(e){return e&&Object.keys(e).length?i.defaults(e).Minimatch:s},s.prototype.debug=function(){},s.prototype.make=function(){if(!this._made){var e=this.pattern,t=this.options;if(t.nocomment||"#"!==e.charAt(0))if(e){this.parseNegate();var r=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error),this.debug(this.pattern,r),r=this.globParts=r.map(function(e){return e.split(y)}),this.debug(this.pattern,r),r=r.map(function(e,t,r){return e.map(this.parse,this)},this),this.debug(this.pattern,r),r=r.filter(function(e){return-1===e.indexOf(!1)}),this.debug(this.pattern,r),this.set=r}else this.empty=!0;else this.comment=!0}},s.prototype.parseNegate=function(){var e=this.pattern,t=!1,r=0;if(!this.options.nonegate){for(var n=0,i=e.length;n<i&&"!"===e.charAt(n);n++)t=!t,r++;r&&(this.pattern=e.substr(r)),this.negate=t}},i.braceExpand=function(e,t){return a(e,t)},s.prototype.braceExpand=a,s.prototype.parse=function(e,t){function r(){if(i){switch(i){case"*":a+=h,o=!0;break;case"?":a+=p,o=!0;break;default:a+="\\"+i}E.debug("clearStateChar %j %j",i,a),i=!1}}if(e.length>65536)throw new TypeError("pattern is too long");var n=this.options;if(!n.noglobstar&&"**"===e)return u;if(""===e)return"";for(var i,s,a="",o=!!n.nocase,l=!1,f=[],d=[],y=!1,b=-1,v=-1,x="."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",E=this,A=0,D=e.length;A<D&&(s=e.charAt(A));A++)if(this.debug("%s\t%s %s %j",e,A,a,s),l&&m[s])a+="\\"+s,l=!1;else switch(s){case"/":return!1;case"\\":r(),l=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,A,a,s),y){this.debug(" in class"),"!"===s&&A===v+1&&(s="^"),a+=s;continue}E.debug("call clearStateChar %j",i),r(),i=s,n.noext&&r();continue;case"(":if(y){a+="(";continue}if(!i){a+="\\(";continue}f.push({type:i,start:A-1,reStart:a.length,open:c[i].open,close:c[i].close}),a+="!"===i?"(?:(?!(?:":"(?:",this.debug("plType %j %j",i,a),i=!1;continue;case")":if(y||!f.length){a+="\\)";continue}r(),o=!0;var S=f.pop();a+=S.close,"!"===S.type&&d.push(S),S.reEnd=a.length;continue;case"|":if(y||!f.length||l){a+="\\|",l=!1;continue}r(),a+="|";continue;case"[":if(r(),y){a+="\\"+s;continue}y=!0,v=A,b=a.length,a+=s;continue;case"]":if(A===v+1||!y){a+="\\"+s,l=!1;continue}if(y){var C=e.substring(v+1,A);try{RegExp("["+C+"]")}catch(e){var _=this.parse(C,g);a=a.substr(0,b)+"\\["+_[0]+"\\]",o=o||_[1],y=!1;continue}}o=!0,y=!1,a+=s;continue;default:r(),l?l=!1:!m[s]||"^"===s&&y||(a+="\\"),a+=s}for(y&&(C=e.substr(v+1),_=this.parse(C,g),a=a.substr(0,b)+"\\["+_[0],o=o||_[1]),S=f.pop();S;S=f.pop()){var w=a.slice(S.reStart+S.open.length);this.debug("setting tail",a,S),w=w.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(e,t,r){return r||(r="\\"),t+t+r+"|"}),this.debug("tail=%j\n %s",w,w,S,a);var k="*"===S.type?h:"?"===S.type?p:"\\"+S.type;o=!0,a=a.slice(0,S.reStart)+k+"\\("+w}r(),l&&(a+="\\\\");var F=!1;switch(a.charAt(0)){case".":case"[":case"(":F=!0}for(var T=d.length-1;T>-1;T--){var P=d[T],B=a.slice(0,P.reStart),O=a.slice(P.reStart,P.reEnd-8),N=a.slice(P.reEnd-8,P.reEnd),j=a.slice(P.reEnd);N+=j;var I=B.split("(").length-1,L=j;for(A=0;A<I;A++)L=L.replace(/\)[+*?]?/,"");var M="";""===(j=L)&&t!==g&&(M="$"),a=B+O+j+M+N}if(""!==a&&o&&(a="(?=.)"+a),F&&(a=x+a),t===g)return[a,o];if(!o)return function(e){return e.replace(/\\(.)/g,"$1")}(e);var R=n.nocase?"i":"";try{var V=new RegExp("^"+a+"$",R)}catch(e){return new RegExp("$.")}return V._glob=e,V._src=a,V};var g={};i.makeRe=function(e,t){return new s(e,t||{}).makeRe()},s.prototype.makeRe=function(){if(this.regexp||!1===this.regexp)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,r=t.noglobstar?h:t.dot?f:d,n=t.nocase?"i":"",i=e.map(function(e){return e.map(function(e){return e===u?r:"string"==typeof e?function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}(e):e._src}).join("\\/")}).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch(e){this.regexp=!1}return this.regexp},i.match=function(e,t,r){var n=new s(t,r=r||{});return e=e.filter(function(e){return n.match(e)}),n.options.nonull&&!e.length&&e.push(t),e},s.prototype.match=function(e,t){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var r=this.options;"/"!==o.sep&&(e=e.split(o.sep).join("/")),e=e.split(y),this.debug(this.pattern,"split",e);var n=this.set;this.debug(this.pattern,"set",n);var i,s;for(s=e.length-1;s>=0&&!(i=e[s]);s--);for(s=0;s<n.length;s++){var a=n[s],u=e;if(r.matchBase&&1===a.length&&(u=[i]),this.matchOne(u,a,t))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate},s.prototype.matchOne=function(e,t,r){var n=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var i=0,s=0,a=e.length,o=t.length;i<a&&s<o;i++,s++){this.debug("matchOne loop");var l=t[s],c=e[i];if(this.debug(t,l,c),!1===l)return!1;if(l===u){this.debug("GLOBSTAR",[t,l,c]);var p=i,h=s+1;if(h===o){for(this.debug("** at the end");i<a;i++)if("."===e[i]||".."===e[i]||!n.dot&&"."===e[i].charAt(0))return!1;return!0}for(;p<a;){var f=e[p];if(this.debug("\nglobstar while",e,p,t,h,f),this.matchOne(e.slice(p),t.slice(h),r))return this.debug("globstar found match!",p,a,f),!0;if("."===f||".."===f||!n.dot&&"."===f.charAt(0)){this.debug("dot detected!",e,p,t,h);break}this.debug("globstar swallow a segment, and continue"),p++}return!(!r||(this.debug("\n>>> no match, partial?",e,p,t,h),p!==a))}var d;if("string"==typeof l?(d=n.nocase?c.toLowerCase()===l.toLowerCase():c===l,this.debug("string match",l,c,d)):(d=c.match(l),this.debug("pattern match",l,c,d)),!d)return!1}if(i===a&&s===o)return!0;if(i===a)return r;if(s===o){return i===a-1&&""===e[i]}throw new Error("wtf?")}},{"brace-expansion":191,path:546}],543:[function(e,t,r){function n(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}var i=1e3,s=60*i,a=60*s,o=24*a,u=365.25*o;t.exports=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*u;case"days":case"day":case"d":return r*o;case"hours":case"hour":case"hrs":case"hr":case"h":return r*a;case"minutes":case"minute":case"mins":case"min":case"m":return r*s;case"seconds":case"second":case"secs":case"sec":case"s":return r*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}(e);if("number"===r&&!1===isNaN(e))return t.long?function(e){return n(e,o,"day")||n(e,a,"hour")||n(e,s,"minute")||n(e,i,"second")||e+" ms"}(e):function(e){return e>=o?Math.round(e/o)+"d":e>=a?Math.round(e/a)+"h":e>=s?Math.round(e/s)+"m":e>=i?Math.round(e/i)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],544:[function(e,t,r){"use strict";t.exports=Number.isNaN||function(e){return e!=e}},{}],545:[function(e,t,r){r.endianness=function(){return"LE"},r.hostname=function(){return"undefined"!=typeof location?location.hostname:""},r.loadavg=function(){return[]},r.uptime=function(){return 0},r.freemem=function(){return Number.MAX_VALUE},r.totalmem=function(){return Number.MAX_VALUE},r.cpus=function(){return[]},r.type=function(){return"Browser"},r.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},r.networkInterfaces=r.getNetworkInterfaces=function(){return{}},r.arch=function(){return"javascript"},r.platform=function(){return"browser"},r.tmpdir=r.tmpDir=function(){return"/tmp"},r.EOL="\n",r.homedir=function(){return"/"}},{}],546:[function(e,t,r){(function(e){function t(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n<e.length;n++)t(e[n],n,e)&&r.push(e[n]);return r}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,s=function(e){return i.exec(e).slice(1)};r.resolve=function(){for(var r="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var a=s>=0?arguments[s]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(r=a+"/"+r,i="/"===a.charAt(0))}return r=t(n(r.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+r||"."},r.normalize=function(e){var i=r.isAbsolute(e),s="/"===a(e,-1);return(e=t(n(e.split("/"),function(e){return!!e}),!i).join("/"))||i||(e="."),e&&s&&(e+="/"),(i?"/":"")+e},r.isAbsolute=function(e){return"/"===e.charAt(0)},r.join=function(){var e=Array.prototype.slice.call(arguments,0);return r.normalize(n(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},r.relative=function(e,t){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=r.resolve(e).substr(1),t=r.resolve(t).substr(1);for(var i=n(e.split("/")),s=n(t.split("/")),a=Math.min(i.length,s.length),o=a,u=0;u<a;u++)if(i[u]!==s[u]){o=u;break}var l=[];for(u=o;u<i.length;u++)l.push("..");return(l=l.concat(s.slice(o))).join("/")},r.sep="/",r.delimiter=":",r.dirname=function(e){var t=s(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},r.basename=function(e,t){var r=s(e)[2];return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},r.extname=function(e){return s(e)[3]};var a="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,e("_process"))},{_process:550}],547:[function(e,t,r){(function(e){"use strict";function r(e){return"/"===e.charAt(0)}function n(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/.exec(e),r=t[1]||"",n=Boolean(r&&":"!==r.charAt(1));return Boolean(t[2]||n)}t.exports="win32"===e.platform?n:r,t.exports.posix=r,t.exports.win32=n}).call(this,e("_process"))},{_process:550}],548:[function(e,t,r){"use strict";function n(e,t,r){if(u)try{u.call(o,e,t,{value:r})}catch(n){e[t]=r}else e[t]=r}function i(e){return e&&(n(e,"call",e.call),n(e,"apply",e.apply)),e}function s(e){return l?l.call(o,e):(f.prototype=e||null,new f)}function a(){do{var e=function(e){var t={};return t[e]=!0,Object.keys(t)[0]}(h.call(p.call(d(),36),2))}while(c.call(m,e));return m[e]=e}var o=Object,u=Object.defineProperty,l=Object.create;i(u),i(l);var c=i(Object.prototype.hasOwnProperty),p=i(Number.prototype.toString),h=i(String.prototype.slice),f=function(){},d=Math.random,m=s(null);r.makeUniqueKey=a;var y=Object.getOwnPropertyNames;Object.getOwnPropertyNames=function(e){for(var t=y(e),r=0,n=0,i=t.length;r<i;++r)c.call(m,t[r])||(r>n&&(t[n]=t[r]),++n);return t.length=n,t},r.makeAccessor=function(e){function t(t){return c.call(t,r)||function(t){var s;n(t,r,function(r,n){if(r===i)return n?s=null:s||(s=e(t))})}(t),t[r](i)}var r=a(),i=s(null);return e=e||function(e){return s(null)},t.forget=function(e){c.call(e,r)&&e[r](i,!0)},t}},{}],549:[function(e,t,r){(function(e){"use strict";!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports=function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var s,a,o=arguments.length;switch(o){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,i)});default:for(s=new Array(o-1),a=0;a<s.length;)s[a++]=arguments[a];return e.nextTick(function(){t.apply(null,s)})}}:t.exports=e.nextTick}).call(this,e("_process"))},{_process:550}],550:[function(e,t,r){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function a(){m&&f&&(m=!1,f.length?d=f.concat(d):y=-1,d.length&&o())}function o(){if(!m){var e=s(a);m=!0;for(var t=d.length;t;){for(f=d,d=[];++y<t;)f&&f[y].run();y=-1,t=d.length}f=null,m=!1,function(e){if(p===clearTimeout)return clearTimeout(e);if((p===i||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}(e)}}function u(e,t){this.fun=e,this.array=t}function l(){}var c,p,h=t.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(e){c=n}try{p="function"==typeof clearTimeout?clearTimeout:i}catch(e){p=i}}();var f,d=[],m=!1,y=-1;h.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];d.push(new u(e,t)),1!==d.length||m||s(o)},u.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=l,h.addListener=l,h.once=l,h.off=l,h.removeListener=l,h.removeAllListeners=l,h.emit=l,h.prependListener=l,h.prependOnceListener=l,h.listeners=function(e){return[]},h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},{}],551:[function(e,t,r){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":552}],552:[function(e,t,r){"use strict";function n(e){if(!(this instanceof n))return new n(e);l.call(this,e),c.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",i)}function i(){this.allowHalfOpen||this._writableState.ended||a(s,this)}function s(e){e.end()}var a=e("process-nextick-args"),o=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=n;var u=e("core-util-is");u.inherits=e("inherits");var l=e("./_stream_readable"),c=e("./_stream_writable");u.inherits(n,l);for(var p=o(c.prototype),h=0;h<p.length;h++){var f=p[h];n.prototype[f]||(n.prototype[f]=c.prototype[f])}Object.defineProperty(n.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),n.prototype._destroy=function(e,t){this.push(null),this.end(),a(t,e)}},{"./_stream_readable":554,"./_stream_writable":556,"core-util-is":310,inherits:317,"process-nextick-args":549}],553:[function(e,t,r){"use strict";function n(e){if(!(this instanceof n))return new n(e);i.call(this,e)}t.exports=n;var i=e("./_stream_transform"),s=e("core-util-is");s.inherits=e("inherits"),s.inherits(n,i),n.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":555,"core-util-is":310,inherits:317}],554:[function(e,t,r){(function(r,n){"use strict";function i(t,r){E=E||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,r instanceof E&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new P,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.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(T||(T=e("string_decoder/").StringDecoder),this.decoder=new T(t.encoding),this.encoding=t.encoding)}function s(t){if(E=E||e("./_stream_duplex"),!(this instanceof s))return new s(t);this._readableState=new i(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),S.call(this)}function a(e,t,r,n,i){var s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,l(e)}(e,s);else{var a;i||(a=function(e,t){var r;(function(e){return C.isBuffer(e)||e instanceof _})(t)||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));return r}(s,t)),a?e.emit("error",a):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===C.prototype||(t=function(e){return C.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):o(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?o(e,s,t,!1):p(e,s)):o(e,s,t,!1))):n||(s.reading=!1)}return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(s)}function o(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&l(e)),p(e,t)}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=function(e){return e>=N?e=N:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function l(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(F("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?x(c,e):c(e))}function c(e){F("emit readable"),e.emit("readable"),m(e)}function p(e,t){t.readingMore||(t.readingMore=!0,x(h,e,t))}function h(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(F("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function f(e){F("readable nexttick read 0"),e.read(0)}function d(e,t){t.reading||(F("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),m(e),t.flowing&&!t.reading&&e.read(0)}function m(e){var t=e._readableState;for(F("flow",t.flowing);t.flowing&&null!==e.read(););}function y(e,t){if(0===t.length)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data;e-=i.length;for(;r=r.next;){var s=r.data,a=e>s.length?s.length:e;if(a===s.length?i+=s:i+=s.slice(0,e),0===(e-=a)){a===s.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(a));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=C.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var s=n.data,a=e>s.length?s.length:e;if(s.copy(r,r.length-e,0,a),0===(e-=a)){a===s.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(a));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r}function g(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,x(b,t,e))}function b(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function v(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}var x=e("process-nextick-args");t.exports=s;var E,A=e("isarray");s.ReadableState=i;e("events").EventEmitter;var D=function(e,t){return e.listeners(t).length},S=e("./internal/streams/stream"),C=e("safe-buffer").Buffer,_=n.Uint8Array||function(){},w=e("core-util-is");w.inherits=e("inherits");var k=e("util"),F=void 0;F=k&&k.debuglog?k.debuglog("stream"):function(){};var T,P=e("./internal/streams/BufferList"),B=e("./internal/streams/destroy");w.inherits(s,S);var O=["error","close","destroy","pause","resume"];Object.defineProperty(s.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),s.prototype.destroy=B.destroy,s.prototype._undestroy=B.undestroy,s.prototype._destroy=function(e,t){this.push(null),t(e)},s.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=C.from(e,t),t=""),r=!0),a(this,e,t,!1,r)},s.prototype.unshift=function(e){return a(this,e,null,!0,!1)},s.prototype.isPaused=function(){return!1===this._readableState.flowing},s.prototype.setEncoding=function(t){return T||(T=e("string_decoder/").StringDecoder),this._readableState.decoder=new T(t),this._readableState.encoding=t,this};var N=8388608;s.prototype.read=function(e){F("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return F("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?g(this):l(this),null;if(0===(e=u(e,t))&&t.ended)return 0===t.length&&g(this),null;var n=t.needReadable;F("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&F("length less than watermark",n=!0),t.ended||t.reading?F("reading or ended",n=!1):n&&(F("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(r,t)));var i;return null===(i=e>0?y(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&g(this)),null!==i&&this.emit("data",i),i},s.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},s.prototype.pipe=function(e,t){function n(t,r){F("onunpipe"),t===c&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,F("cleanup"),e.removeListener("close",o),e.removeListener("finish",u),e.removeListener("drain",f),e.removeListener("error",a),e.removeListener("unpipe",n),c.removeListener("end",i),c.removeListener("end",l),c.removeListener("data",s),d=!0,!p.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function i(){F("onend"),e.end()}function s(t){F("ondata"),y=!1;!1!==e.write(t)||y||((1===p.pipesCount&&p.pipes===e||p.pipesCount>1&&-1!==v(p.pipes,e))&&!d&&(F("false write response, pause",c._readableState.awaitDrain),c._readableState.awaitDrain++,y=!0),c.pause())}function a(t){F("onerror",t),l(),e.removeListener("error",a),0===D(e,"error")&&e.emit("error",t)}function o(){e.removeListener("finish",u),l()}function u(){F("onfinish"),e.removeListener("close",o),l()}function l(){F("unpipe"),c.unpipe(e)}var c=this,p=this._readableState;switch(p.pipesCount){case 0:p.pipes=e;break;case 1:p.pipes=[p.pipes,e];break;default:p.pipes.push(e)}p.pipesCount+=1,F("pipe count=%d opts=%j",p.pipesCount,t);var h=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?i:l;p.endEmitted?x(h):c.once("end",h),e.on("unpipe",n);var f=function(e){return function(){var t=e._readableState;F("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&D(e,"data")&&(t.flowing=!0,m(e))}}(c);e.on("drain",f);var d=!1,y=!1;return c.on("data",s),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?A(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",a),e.once("close",o),e.once("finish",u),e.emit("pipe",c),p.flowing||(F("pipe resume"),c.resume()),e},s.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};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,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,r);return this}var a=v(t.pipes,e);return-1===a?this:(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)},s.prototype.on=function(e,t){var r=S.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&l(this):x(f,this))}return r},s.prototype.addListener=s.prototype.on,s.prototype.resume=function(){var e=this._readableState;return e.flowing||(F("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,x(d,e,t))}(this,e)),this},s.prototype.pause=function(){return F("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(F("pause"),this._readableState.flowing=!1,this.emit("pause")),this},s.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;e.on("end",function(){if(F("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)}),e.on("data",function(i){if(F("wrapped data"),t.decoder&&(i=t.decoder.write(i)),(!t.objectMode||null!==i&&void 0!==i)&&(t.objectMode||i&&i.length)){n.push(i)||(r=!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));for(var s=0;s<O.length;s++)e.on(O[s],n.emit.bind(n,O[s]));return n._read=function(t){F("wrapped _read",t),r&&(r=!1,e.resume())},n},s._fromList=y}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":552,"./internal/streams/BufferList":557,"./internal/streams/destroy":558,"./internal/streams/stream":559,_process:550,"core-util-is":310,events:313,inherits:317,isarray:321,"process-nextick-args":549,"safe-buffer":602,"string_decoder/":605,util:192}],555:[function(e,t,r){"use strict";function n(e){this.afterTransform=function(t,r){return function(e,t,r){var n=e._transformState;n.transforming=!1;var i=n.writecb;if(!i)return e.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!==r&&void 0!==r&&e.push(r);i(t);var s=e._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&e._read(s.highWaterMark)}(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function i(e){if(!(this instanceof i))return new i(e);a.call(this,e),this._transformState=new n(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,r){s(t,e,r)}):s(t)})}function s(e,t,r){if(t)return e.emit("error",t);null!==r&&void 0!==r&&e.push(r);var n=e._writableState,i=e._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(i.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}t.exports=i;var a=e("./_stream_duplex"),o=e("core-util-is");o.inherits=e("inherits"),o.inherits(i,a),i.prototype.push=function(e,t){return this._transformState.needTransform=!1,a.prototype.push.call(this,e,t)},i.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},i.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},i.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},i.prototype._destroy=function(e,t){var r=this;a.prototype._destroy.call(this,e,function(e){t(e),r.emit("close")})}},{"./_stream_duplex":552,"core-util-is":310,inherits:317}],556:[function(e,t,r){(function(r,n){"use strict";function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}function s(){}function a(t,r){y=y||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,r instanceof y&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,s=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:s,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;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){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(m(i,n),m(d,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),d(e,t))}(e,r,n,t,i);else{var s=h(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||p(e,r),n?g(c,e,r,s,i):c(e,r,s,i)}}(r,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 i(this)}function o(t){if(y=y||e("./_stream_duplex"),!(S.call(o,this)||this instanceof y))return new o(t);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),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),x.call(this)}function u(e,t,r,n,i,s){if(!r){var a=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=E.from(t,r)),t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var o=t.objectMode?1:n.length;t.length+=o;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else l(e,t,!1,o,n,i,s);return u}function l(e,t,r,n,i,s,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function c(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),d(e,t)}function p(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,s=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var o=0,u=!0;r;)s[o]=r,r.isBuf||(u=!1),r=r.next,o+=1;s.allBuffers=u,l(e,t,!0,t.length,s,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new i(t)}else{for(;r;){var c=r.chunk,p=r.encoding,h=r.callback;if(l(e,t,!1,t.objectMode?1:c.length,c,p,h),r=r.next,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=r,t.bufferProcessing=!1}function h(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function f(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),d(e,t)})}function d(e,t){var r=h(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,m(f,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}var m=e("process-nextick-args");t.exports=o;var y,g=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?setImmediate:m;o.WritableState=a;var b=e("core-util-is");b.inherits=e("inherits");var v={deprecate:e("util-deprecate")},x=e("./internal/streams/stream"),E=e("safe-buffer").Buffer,A=n.Uint8Array||function(){},D=e("./internal/streams/destroy");b.inherits(o,x),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:v.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}();var S;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(S=Function.prototype[Symbol.hasInstance],Object.defineProperty(o,Symbol.hasInstance,{value:function(e){return!!S.call(this,e)||e&&e._writableState instanceof a}})):S=function(e){return e instanceof this},o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},o.prototype.write=function(e,t,r){var n=this._writableState,i=!1,a=function(e){return E.isBuffer(e)||e instanceof A}(e)&&!n.objectMode;return a&&!E.isBuffer(e)&&(e=function(e){return E.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof r&&(r=s),n.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),m(t,r)}(this,r):(a||function(e,t,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),m(n,s),i=!1),i}(this,n,e,r))&&(n.pendingcb++,i=u(this,n,a,e,t,r)),i},o.prototype.cork=function(){this._writableState.corked++},o.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||p(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,r){r(new Error("_write() is not implemented"))},o.prototype._writev=null,o.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,d(e,t),r&&(t.finished?m(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(o.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),o.prototype.destroy=D.destroy,o.prototype._undestroy=D.undestroy,o.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":552,"./internal/streams/destroy":558,"./internal/streams/stream":559,_process:550,"core-util-is":310,inherits:317,"process-nextick-args":549,"safe-buffer":602,"util-deprecate":610}],557:[function(e,t,r){"use strict";function n(e,t,r){e.copy(t,r)}var i=e("safe-buffer").Buffer;t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.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},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.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}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.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),r=this.head,s=0;r;)n(r.data,t,s),s+=r.data.length,r=r.next;return t},e}()},{"safe-buffer":602}],558:[function(e,t,r){"use strict";function n(e,t){e.emit("error",t)}var i=e("process-nextick-args");t.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;s||a?t?t(e):!e||this._writableState&&this._writableState.errorEmitted||i(n,this,e):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(i(n,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)}))},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":549}],559:[function(e,t,r){t.exports=e("events").EventEmitter},{events:313}],560:[function(e,t,r){t.exports=e("./readable").PassThrough},{"./readable":561}],561:[function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":552,"./lib/_stream_passthrough.js":553,"./lib/_stream_readable.js":554,"./lib/_stream_transform.js":555,"./lib/_stream_writable.js":556}],562:[function(e,t,r){t.exports=e("./readable").Transform},{"./readable":561}],563:[function(e,t,r){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":556}],564:[function(e,t,r){function n(e,t,r){if(e){if(g.fixFaultyLocations(e,t),r){if(p.Node.check(e)&&p.SourceLocation.check(e.loc)){for(var i=r.length-1;i>=0&&!(b(r[i].loc.end,e.loc.start)<=0);--i);return void r.splice(i+1,0,e)}}else if(e[v])return e[v];var s;if(h.check(e))s=Object.keys(e);else{if(!f.check(e))return;s=c.getFieldNames(e)}r||Object.defineProperty(e,v,{value:r=[],enumerable:!1});i=0;for(var a=s.length;i<a;++i)n(e[s[i]],t,r);return r}}function i(e,t,r){for(var s=n(e,r),a=0,o=s.length;a<o;){var u=a+o>>1,l=s[u];if(b(l.loc.start,t.loc.start)<=0&&b(t.loc.end,l.loc.end)<=0)return void i(t.enclosingNode=l,t,r);if(b(l.loc.end,t.loc.start)<=0){var c=l;a=u+1}else{if(!(b(t.loc.end,l.loc.start)<=0))throw new Error("Comment location overlaps with node location");var p=l;o=u}}c&&(t.precedingNode=c),p&&(t.followingNode=p)}function s(e,t){var r=e.length;if(0!==r){for(var n=e[0].precedingNode,i=e[0].followingNode,s=i.loc.start,a=r;a>0;--a){var c=e[a-1];l.strictEqual(c.precedingNode,n),l.strictEqual(c.followingNode,i);var p=t.sliceString(c.loc.end,s);if(/\S/.test(p))break;s=c.loc.start}for(;a<=r&&(c=e[a])&&("Line"===c.type||"CommentLine"===c.type)&&c.loc.start.column>i.loc.start.column;)++a;e.forEach(function(e,t){t<a?u(n,e):o(i,e)}),e.length=0}}function a(e,t){(e.comments||(e.comments=[])).push(t)}function o(e,t){t.leading=!0,t.trailing=!1,a(e,t)}function u(e,t){t.leading=!1,t.trailing=!0,a(e,t)}var l=e("assert"),c=e("./types"),p=c.namedTypes,h=c.builtInTypes.array,f=c.builtInTypes.object,d=e("./lines"),m=(d.fromString,d.Lines),y=d.concat,g=e("./util"),b=g.comparePos,v=e("private").makeUniqueKey();r.attach=function(e,t,r){if(h.check(e)){var n=[];e.forEach(function(e){e.loc.lines=r,i(t,e,r);var c=e.precedingNode,p=e.enclosingNode,h=e.followingNode;if(c&&h){var f=n.length;if(f>0){var d=n[f-1];l.strictEqual(d.precedingNode===e.precedingNode,d.followingNode===e.followingNode),d.followingNode!==e.followingNode&&s(n,r)}n.push(e)}else if(c)s(n,r),u(c,e);else if(h)s(n,r),o(h,e);else{if(!p)throw new Error("AST contains no nodes at all?");s(n,r),function(e,t){t.leading=!1,t.trailing=!1,a(e,t)}(p,e)}}),s(n,r),e.forEach(function(e){delete e.precedingNode,delete e.enclosingNode,delete e.followingNode})}},r.printComments=function(e,t){var r=e.getValue(),n=t(e),i=p.Node.check(r)&&c.getFieldValue(r,"comments");if(!i||0===i.length)return n;var s=[],a=[n];return e.each(function(e){var n=e.getValue(),i=c.getFieldValue(n,"leading"),o=c.getFieldValue(n,"trailing");i||o&&!p.Statement.check(r)&&"Block"!==n.type&&"CommentBlock"!==n.type?s.push(function(e,t){var r=e.getValue();p.Comment.assert(r);var n=r.loc,i=n&&n.lines,s=[t(e)];if(r.trailing)s.push("\n");else if(i instanceof m){var a=i.slice(n.end,i.skipSpaces(n.end));1===a.length?s.push(a):s.push(new Array(a.length).join("\n"))}else s.push("\n");return y(s)}(e,t)):o&&a.push(function(e,t){var r=e.getValue(e);p.Comment.assert(r);var n=r.loc,i=n&&n.lines,s=[];if(i instanceof m){var a=i.skipSpaces(n.start,!0)||i.firstPos(),o=i.slice(a,n.start);1===o.length?s.push(o):s.push(new Array(o.length).join("\n"))}return s.push(t(e)),y(s)}(e,t))},"comments"),s.push.apply(s,a),y(s)}},{"./lines":566,"./types":572,"./util":573,assert:1,private:548}],565:[function(e,t,r){function n(e){o.ok(this instanceof n),this.stack=[e]}function i(e,t){for(var r=e.stack,n=r.length-1;n>=0;n-=2){var i=r[n];if(l.Node.check(i)&&--t<0)return i}return null}function s(e){return l.BinaryExpression.check(e)||l.LogicalExpression.check(e)}function a(e){return!!l.CallExpression.check(e)||(c.check(e)?e.some(a):!!l.Node.check(e)&&u.someField(e,function(e,t){return a(t)}))}var o=e("assert"),u=e("./types"),l=u.namedTypes,c=(l.Node,u.builtInTypes.array),p=u.builtInTypes.number,h=n.prototype;t.exports=n,n.from=function(e){if(e instanceof n)return e.copy();if(e instanceof u.NodePath){for(var t,r=Object.create(n.prototype),i=[e.value];t=e.parentPath;e=t)i.push(e.name,t.value);return r.stack=i.reverse(),r}return new n(e)},h.copy=function(){var e=Object.create(n.prototype);return e.stack=this.stack.slice(0),e},h.getName=function(){var e=this.stack,t=e.length;return t>1?e[t-2]:null},h.getValue=function(){var e=this.stack;return e[e.length-1]},h.getNode=function(e){return i(this,~~e)},h.getParentNode=function(e){return i(this,1+~~e)},h.getRootValue=function(){var e=this.stack;return e.length%2==0?e[1]:e[0]},h.call=function(e){for(var t=this.stack,r=t.length,n=t[r-1],i=arguments.length,s=1;s<i;++s){var a=arguments[s];n=n[a],t.push(a,n)}var o=e(this);return t.length=r,o},h.each=function(e){for(var t=this.stack,r=t.length,n=t[r-1],i=arguments.length,s=1;s<i;++s){var a=arguments[s];n=n[a],t.push(a,n)}for(s=0;s<n.length;++s)s in n&&(t.push(s,n[s]),e(this),t.length-=2);t.length=r},h.map=function(e){for(var t=this.stack,r=t.length,n=t[r-1],i=arguments.length,s=1;s<i;++s){var a=arguments[s];n=n[a],t.push(a,n)}var o=new Array(n.length);for(s=0;s<n.length;++s)s in n&&(t.push(s,n[s]),o[s]=e(this,s),t.length-=2);return t.length=r,o},h.needsParens=function(e){var t=this.getParentNode();if(!t)return!1;var r=this.getName(),n=this.getNode();if(this.getValue()!==n)return!1;if(l.Statement.check(n))return!1;if("Identifier"===n.type)return!1;if("ParenthesizedExpression"===t.type)return!1;switch(n.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return"MemberExpression"===t.type&&"object"===r&&t.object===n;case"BinaryExpression":case"LogicalExpression":switch(t.type){case"CallExpression":return"callee"===r&&t.callee===n;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return"object"===r&&t.object===n;case"BinaryExpression":case"LogicalExpression":var i=t.operator,u=f[i],c=n.operator,h=f[c];if(u>h)return!0;if(u===h&&"right"===r)return o.strictEqual(t.right,n),!0;default:return!1}case"SequenceExpression":switch(t.type){case"ReturnStatement":case"ForStatement":return!1;case"ExpressionStatement":return"expression"!==r;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"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return"NullableTypeAnnotation"===t.type;case"Literal":return"MemberExpression"===t.type&&p.check(n.value)&&"object"===r&&t.object===n;case"AssignmentExpression":case"ConditionalExpression":switch(t.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return"callee"===r&&t.callee===n;case"ConditionalExpression":return"test"===r&&t.test===n;case"MemberExpression":return"object"===r&&t.object===n;default:return!1}case"ArrowFunctionExpression":return!(!l.CallExpression.check(t)||"callee"!==r)||(!(!l.MemberExpression.check(t)||"object"!==r)||s(t));case"ObjectExpression":if("ArrowFunctionExpression"===t.type&&"body"===r)return!0;default:if("NewExpression"===t.type&&"callee"===r&&t.callee===n)return a(n)}return!(!0===e||this.canBeFirstInStatement()||!this.firstInStatement())};var f={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%","**"]].forEach(function(e,t){e.forEach(function(e){f[e]=t})}),h.canBeFirstInStatement=function(){var e=this.getNode();return!l.FunctionExpression.check(e)&&!l.ObjectExpression.check(e)},h.firstInStatement=function(){for(var e,t,r,n,i=this.stack,a=i.length-1;a>=0;a-=2)if(l.Node.check(i[a])&&(r=e,n=t,e=i[a-1],t=i[a]),t&&n){if(l.BlockStatement.check(t)&&"body"===e&&0===r)return o.strictEqual(t.body[0],n),!0;if(l.ExpressionStatement.check(t)&&"expression"===r)return o.strictEqual(t.expression,n),!0;if(l.SequenceExpression.check(t)&&"expressions"===e&&0===r)o.strictEqual(t.expressions[0],n);else if(l.CallExpression.check(t)&&"callee"===r)o.strictEqual(t.callee,n);else if(l.MemberExpression.check(t)&&"object"===r)o.strictEqual(t.object,n);else if(l.ConditionalExpression.check(t)&&"test"===r)o.strictEqual(t.test,n);else if(s(t)&&"left"===r)o.strictEqual(t.left,n);else{if(!l.UnaryExpression.check(t)||t.prefix||"argument"!==r)return!1;o.strictEqual(t.argument,n)}}return!0}},{"./types":572,assert:1}],566:[function(e,t,r){function n(e){return e[f]}function i(e,t){c.ok(this instanceof i),c.ok(e.length>0),t?d.assert(t):t=null,Object.defineProperty(this,f,{value:{infos:e,mappings:[],name:t,cachedSourceMap:null}}),t&&n(this).mappings.push(new y(this,{start:this.firstPos(),end:this.lastPos()}))}function s(e){return{line:e.line,indent:e.indent,locked:e.locked,sliceStart:e.sliceStart,sliceEnd:e.sliceEnd}}function a(e,t){for(var r=0,n=e.length,i=0;i<n;++i)switch(e.charCodeAt(i)){case 9:c.strictEqual(typeof t,"number"),c.ok(t>0);var s=Math.ceil(r/t)*t;s===r?r+=t:r=s;break;case 11:case 12:case 13:case 65279:break;case 32:default:r+=1}return r}function o(e,t){if(e instanceof i)return e;e+="";var r=t&&t.tabWidth,n=e.indexOf("\t")<0,s=!(!t||!t.locked),o=!t&&n&&e.length<=x;if(c.ok(r||n,"No tab width specified but encountered tabs in string\n"+e),o&&v.call(b,e))return b[e];var u=new i(e.split(A).map(function(e){var t=E.exec(e)[0];return{line:e,indent:a(t,r),locked:s,sliceStart:t.length,sliceEnd:e.length}}),h(t).sourceFileName);return o&&(b[e]=u),u}function u(e){return!/\S/.test(e)}function l(e,t,r){var n=e.sliceStart,i=e.sliceEnd,s=Math.max(e.indent,0),a=s+i-n;return void 0===r&&(r=a),t=Math.max(t,0),r=Math.min(r,a),(r=Math.max(r,t))<s?(s=r,i=n):i-=a-r,a=r,a-=t,t<s?s-=t:(t-=s,s=0,n+=t),c.ok(s>=0),c.ok(n<=i),c.strictEqual(a,s+i-n),e.indent===s&&e.sliceStart===n&&e.sliceEnd===i?e:{line:e.line,indent:s,locked:!1,sliceStart:n,sliceEnd:i}}var c=e("assert"),p=e("source-map"),h=e("./options").normalize,f=e("private").makeUniqueKey(),d=e("./types").builtInTypes.string,m=e("./util").comparePos,y=e("./mapping");r.Lines=i;var g=i.prototype;Object.defineProperties(g,{length:{get:function(){return n(this).infos.length}},name:{get:function(){return n(this).name}}});var b={},v=b.hasOwnProperty,x=10;r.countSpaces=a;var E=/^\s*/,A=/\u000D\u000A|\u000D(?!\u000A)|\u000A|\u2028|\u2029/;r.fromString=o,g.toString=function(e){return this.sliceString(this.firstPos(),this.lastPos(),e)},g.getSourceMap=function(e,t){function r(r){return r=r||{},d.assert(e),r.file=e,t&&(d.assert(t),r.sourceRoot=t),r}if(!e)return null;var i=this,s=n(i);if(s.cachedSourceMap)return r(s.cachedSourceMap.toJSON());var a=new p.SourceMapGenerator(r()),o={};return s.mappings.forEach(function(e){for(var t=e.sourceLines.skipSpaces(e.sourceLoc.start)||e.sourceLines.lastPos(),r=i.skipSpaces(e.targetLoc.start)||i.lastPos();m(t,e.sourceLoc.end)<0&&m(r,e.targetLoc.end)<0;){var n=e.sourceLines.charAt(t),s=i.charAt(r);c.strictEqual(n,s);var u=e.sourceLines.name;if(a.addMapping({source:u,original:{line:t.line,column:t.column},generated:{line:r.line,column:r.column}}),!v.call(o,u)){var l=e.sourceLines.toString();a.setSourceContent(u,l),o[u]=l}i.nextPos(r,!0),e.sourceLines.nextPos(t,!0)}}),s.cachedSourceMap=a,a.toJSON()},g.bootstrapCharAt=function(e){c.strictEqual(typeof e,"object"),c.strictEqual(typeof e.line,"number"),c.strictEqual(typeof e.column,"number");var t=e.line,r=e.column,n=this.toString().split(A),i=n[t-1];return void 0===i?"":r===i.length&&t<n.length?"\n":r>=i.length?"":i.charAt(r)},g.charAt=function(e){c.strictEqual(typeof e,"object"),c.strictEqual(typeof e.line,"number"),c.strictEqual(typeof e.column,"number");var t=e.line,r=e.column,i=n(this).infos[t-1],s=r;if(void 0===i||s<0)return"";var a=this.getIndentAt(t);return s<a?" ":(s+=i.sliceStart-a)===i.sliceEnd&&t<this.length?"\n":s>=i.sliceEnd?"":i.line.charAt(s)},g.stripMargin=function(e,t){if(0===e)return this;if(c.ok(e>0,"negative margin: "+e),t&&1===this.length)return this;var r=n(this),a=new i(r.infos.map(function(r,n){return r.line&&(n>0||!t)&&((r=s(r)).indent=Math.max(0,r.indent-e)),r}));if(r.mappings.length>0){var o=n(a).mappings;c.strictEqual(o.length,0),r.mappings.forEach(function(r){o.push(r.indent(e,t,!0))})}return a},g.indent=function(e){if(0===e)return this;var t=n(this),r=new i(t.infos.map(function(t){return t.line&&!t.locked&&((t=s(t)).indent+=e),t}));if(t.mappings.length>0){var a=n(r).mappings;c.strictEqual(a.length,0),t.mappings.forEach(function(t){a.push(t.indent(e))})}return r},g.indentTail=function(e){if(0===e)return this;if(this.length<2)return this;var t=n(this),r=new i(t.infos.map(function(t,r){return r>0&&t.line&&!t.locked&&((t=s(t)).indent+=e),t}));if(t.mappings.length>0){var a=n(r).mappings;c.strictEqual(a.length,0),t.mappings.forEach(function(t){a.push(t.indent(e,!0))})}return r},g.lockIndentTail=function(){if(this.length<2)return this;return new i(n(this).infos.map(function(e,t){return e=s(e),e.locked=t>0,e}))},g.getIndentAt=function(e){c.ok(e>=1,"no line "+e+" (line numbers start from 1)");var t=n(this).infos[e-1];return Math.max(t.indent,0)},g.guessTabWidth=function(){var e=n(this);if(v.call(e,"cachedTabWidth"))return e.cachedTabWidth;for(var t=[],r=0,i=1,s=this.length;i<=s;++i){var a=e.infos[i-1];if(!u(a.line.slice(a.sliceStart,a.sliceEnd))){var o=Math.abs(a.indent-r);t[o]=1+~~t[o],r=a.indent}}for(var l=-1,c=2,p=1;p<t.length;p+=1)v.call(t,p)&&t[p]>l&&(l=t[p],c=p);return e.cachedTabWidth=c},g.startsWithComment=function(){var e=n(this);if(0===e.infos.length)return!1;var t=e.infos[0],r=t.sliceStart,i=t.sliceEnd,s=t.line.slice(r,i).trim();return 0===s.length||"//"===s.slice(0,2)||"/*"===s.slice(0,2)},g.isOnlyWhitespace=function(){return u(this.toString())},g.isPrecededOnlyByWhitespace=function(e){var t=n(this).infos[e.line-1],r=Math.max(t.indent,0),i=e.column-r;if(i<=0)return!0;var s=t.sliceStart,a=Math.min(s+i,t.sliceEnd);return u(t.line.slice(s,a))},g.getLineLength=function(e){var t=n(this).infos[e-1];return this.getIndentAt(e)+t.sliceEnd-t.sliceStart},g.nextPos=function(e,t){var r=Math.max(e.line,0);return Math.max(e.column,0)<this.getLineLength(r)?(e.column+=1,!t||!!this.skipSpaces(e,!1,!0)):r<this.length&&(e.line+=1,e.column=0,!t||!!this.skipSpaces(e,!1,!0))},g.prevPos=function(e,t){var r=e.line,n=e.column;if(n<1){if((r-=1)<1)return!1;n=this.getLineLength(r)}else n=Math.min(n-1,this.getLineLength(r));return e.line=r,e.column=n,!t||!!this.skipSpaces(e,!0,!0)},g.firstPos=function(){return{line:1,column:0}},g.lastPos=function(){return{line:this.length,column:this.getLineLength(this.length)}},g.skipSpaces=function(e,t,r){if(e=e?r?e:{line:e.line,column:e.column}:t?this.lastPos():this.firstPos(),t){for(;this.prevPos(e);)if(!u(this.charAt(e))&&this.nextPos(e))return e;return null}for(;u(this.charAt(e));)if(!this.nextPos(e))return null;return e},g.trimLeft=function(){var e=this.skipSpaces(this.firstPos(),!1,!0);return e?this.slice(e):D},g.trimRight=function(){var e=this.skipSpaces(this.lastPos(),!0,!0);return e?this.slice(this.firstPos(),e):D},g.trim=function(){var e=this.skipSpaces(this.firstPos(),!1,!0);if(null===e)return D;var t=this.skipSpaces(this.lastPos(),!0,!0);return c.notStrictEqual(t,null),this.slice(e,t)},g.eachPos=function(e,t,r){var n=this.firstPos();if(t&&(n.line=t.line,n.column=t.column),!r||this.skipSpaces(n,!1,!0))do{e.call(this,n)}while(this.nextPos(n,r))},g.bootstrapSlice=function(e,t){var r=this.toString().split(A).slice(e.line-1,t.line);return r.push(r.pop().slice(0,t.column)),r[0]=r[0].slice(e.column),o(r.join("\n"))},g.slice=function(e,t){if(!t){if(!e)return this;t=this.lastPos()}var r=n(this),s=r.infos.slice(e.line-1,t.line);e.line===t.line?s[0]=l(s[0],e.column,t.column):(c.ok(e.line<t.line),s[0]=l(s[0],e.column),s.push(l(s.pop(),0,t.column)));var a=new i(s);if(r.mappings.length>0){var o=n(a).mappings;c.strictEqual(o.length,0),r.mappings.forEach(function(r){var n=r.slice(this,e,t);n&&o.push(n)},this)}return a},g.bootstrapSliceString=function(e,t,r){return this.slice(e,t).toString(r)},g.sliceString=function(e,t,r){if(!t){if(!e)return this;t=this.lastPos()}r=h(r);for(var i=n(this).infos,s=[],o=r.tabWidth,c=e.line;c<=t.line;++c){var p=i[c-1];c===e.line?p=c===t.line?l(p,e.column,t.column):l(p,e.column):c===t.line&&(p=l(p,0,t.column));var f=Math.max(p.indent,0),d=p.line.slice(0,p.sliceStart);if(r.reuseWhitespace&&u(d)&&a(d,r.tabWidth)===f)s.push(p.line.slice(0,p.sliceEnd));else{var m=0,y=f;r.useTabs&&(y-=(m=Math.floor(f/o))*o);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),s.push(g)}}return s.join(r.lineTerminator)},g.isEmpty=function(){return this.length<2&&this.getLineLength(1)<1},g.join=function(e){function t(e){if(null!==e){if(r){var t=e.infos[0],n=new Array(t.indent+1).join(" "),i=u.length,a=Math.max(r.indent,0)+r.sliceEnd-r.sliceStart;r.line=r.line.slice(0,r.sliceEnd)+n+t.line.slice(t.sliceStart,t.sliceEnd),r.locked=r.locked||t.locked,r.sliceEnd=r.line.length,e.mappings.length>0&&e.mappings.forEach(function(e){l.push(e.add(i,a))})}else e.mappings.length>0&&l.push.apply(l,e.mappings);e.infos.forEach(function(e,t){(!r||t>0)&&(r=s(e),u.push(r))})}}var r,a=n(this),u=[],l=[];if(e.map(function(e){var t=o(e);return t.isEmpty()?null:n(t)}).forEach(this.isEmpty()?t:function(e,r){r>0&&t(a),t(e)}),u.length<1)return D;var c=new i(u);return n(c).mappings=l,c},r.concat=function(e){return D.join(e)},g.concat=function(e){var t=arguments,r=[this];return r.push.apply(r,t),c.strictEqual(r.length,t.length+1),D.join(r)};var D=o("")},{"./mapping":567,"./options":568,"./types":572,"./util":573,assert:1,private:548,"source-map":586}],567:[function(e,t,r){function n(e,t,r){a.ok(this instanceof n),a.ok(e instanceof p.Lines),l.assert(t),r?a.ok(u.check(r.start.line)&&u.check(r.start.column)&&u.check(r.end.line)&&u.check(r.end.column)):r=t,Object.defineProperties(this,{sourceLines:{value:e},sourceLoc:{value:t},targetLoc:{value:r}})}function i(e,t,r){return{line:e.line+t-1,column:1===e.line?e.column+r:e.column}}function s(e,t,r){return{line:e.line-t+1,column:e.line===t?e.column-r:e.column}}var a=e("assert"),o=e("./types"),u=(o.builtInTypes.string,o.builtInTypes.number),l=o.namedTypes.SourceLocation,c=o.namedTypes.Position,p=e("./lines"),h=e("./util").comparePos,f=n.prototype;t.exports=n,f.slice=function(e,t,r){function i(n){var i=u[n],s=l[n],f=t;return"end"===n?f=r:a.strictEqual(n,"start"),function(e,t,r,n,i){a.ok(e instanceof p.Lines),a.ok(r instanceof p.Lines),c.assert(t),c.assert(n),c.assert(i);var s=h(n,i);if(0===s)return t;if(s<0){var o=e.skipSpaces(t),u=r.skipSpaces(n),l=i.line-u.line;for(o.line+=l,u.line+=l,l>0?(o.column=0,u.column=0):a.strictEqual(l,0);h(u,i)<0&&r.nextPos(u,!0);)a.ok(e.nextPos(o,!0)),a.strictEqual(e.charAt(o),r.charAt(u))}else for(o=e.skipSpaces(t,!0),u=r.skipSpaces(n,!0),l=i.line-u.line,o.line+=l,u.line+=l,l<0?(o.column=e.getLineLength(o.line),u.column=r.getLineLength(u.line)):a.strictEqual(l,0);h(i,u)<0&&r.prevPos(u,!0);)a.ok(e.prevPos(o,!0)),a.strictEqual(e.charAt(o),r.charAt(u));return o}(o,i,e,s,f)}a.ok(e instanceof p.Lines),c.assert(t),r?c.assert(r):r=e.lastPos();var o=this.sourceLines,u=this.sourceLoc,l=this.targetLoc;if(h(t,l.start)<=0)if(h(l.end,r)<=0)l={start:s(l.start,t.line,t.column),end:s(l.end,t.line,t.column)};else{if(h(r,l.start)<=0)return null;u={start:u.start,end:i("end")},l={start:s(l.start,t.line,t.column),end:s(r,t.line,t.column)}}else{if(h(l.end,t)<=0)return null;h(l.end,r)<=0?(u={start:i("start"),end:u.end},l={start:{line:1,column:0},end:s(l.end,t.line,t.column)}):(u={start:i("start"),end:i("end")},l={start:{line:1,column:0},end:s(r,t.line,t.column)})}return new n(this.sourceLines,u,l)},f.add=function(e,t){return new n(this.sourceLines,this.sourceLoc,{start:i(this.targetLoc.start,e,t),end:i(this.targetLoc.end,e,t)})},f.subtract=function(e,t){return new n(this.sourceLines,this.sourceLoc,{start:s(this.targetLoc.start,e,t),end:s(this.targetLoc.end,e,t)})},f.indent=function(e,t,r){if(0===e)return this;var i=this.targetLoc,s=i.start.line,a=i.end.line;if(t&&1===s&&1===a)return this;if(i={start:i.start,end:i.end},!t||s>1){var o=i.start.column+e;i.start={line:s,column:r?Math.max(0,o):o}}if(!t||a>1){var u=i.end.column+e;i.end={line:a,column:r?Math.max(0,u):u}}return new n(this.sourceLines,this.sourceLoc,i)}},{"./lines":566,"./types":572,"./util":573,assert:1}],568:[function(e,t,r){var n={parser:e("esprima"),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,arrayBracketSpacing:!1,objectCurlySpacing:!0,arrowParensAlways:!1,flowObjectCommas:!0},i=n.hasOwnProperty;r.normalize=function(e){function t(t){return i.call(e,t)?e[t]:n[t]}return e=e||n,{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"),parser:t("esprima")||t("parser"),range:t("range"),tolerant:t("tolerant"),quote:t("quote"),trailingComma:t("trailingComma"),arrayBracketSpacing:t("arrayBracketSpacing"),objectCurlySpacing:t("objectCurlySpacing"),arrowParensAlways:t("arrowParensAlways"),flowObjectCommas:t("flowObjectCommas")}}},{esprima:575,os:545}],569:[function(e,t,r){function n(e){i.ok(this instanceof n),this.lines=e,this.indent=0}var i=e("assert"),s=e("./types"),a=(s.namedTypes,s.builders),o=s.builtInTypes.object,u=s.builtInTypes.array,l=(s.builtInTypes.function,e("./patcher").Patcher,e("./options").normalize),c=e("./lines").fromString,p=e("./comments").attach,h=e("./util");r.parse=function(e,t){t=l(t);var r=c(e,t),i=r.toString({tabWidth:t.tabWidth,reuseWhitespace:!1,useTabs:!1}),s=[],o=t.parser.parse(i,{jsx:!0,loc:!0,locations:!0,range:t.range,comment:!0,onComment:s,tolerant:t.tolerant,ecmaVersion:6,sourceType:"module"});h.fixFaultyLocations(o,r),o.loc=o.loc||{start:r.firstPos(),end:r.lastPos()},o.loc.lines=r,o.loc.indent=0;var u=h.getTrueLoc(o,r);o.loc.start=u.start,o.loc.end=u.end,o.comments&&(s=o.comments,delete o.comments);if("Program"===(f=o).type){var f;(f=a.file(o,t.sourceFileName||null)).loc={lines:r,indent:0,start:r.firstPos(),end:r.lastPos()}}else"File"===f.type&&(o=f.program);return p(s,o.body.length?f.program:f,r),new n(r).copy(f)};n.prototype.copy=function(e){if(u.check(e))return e.map(this.copy,this);if(!o.check(e))return e;h.fixFaultyLocations(e,this.lines);var t=Object.create(Object.getPrototypeOf(e),{original:{value:e,configurable:!1,enumerable:!1,writable:!0}}),r=e.loc,n=this.indent,i=n;r&&(("Block"===e.type||"Line"===e.type||"CommentBlock"===e.type||"CommentLine"===e.type||this.lines.isPrecededOnlyByWhitespace(r.start))&&(i=this.indent=r.start.column),r.lines=this.lines,r.indent=i);for(var s=Object.keys(e),a=s.length,l=0;l<a;++l){var c=s[l];"loc"===c?t[c]=e[c]:"tokens"===c&&"File"===e.type?t[c]=e[c]:t[c]=this.copy(e[c])}return this.indent=n,t}},{"./comments":564,"./lines":566,"./options":568,"./patcher":570,"./types":572,"./util":573,assert:1}],570:[function(e,t,r){function n(e){c.ok(this instanceof n),c.ok(e instanceof p.Lines);var t=[];this.replace=function(e,r){A.check(r)&&(r=p.fromString(r)),t.push({lines:r,start:e.start,end:e.end})},this.get=function(r){function n(t,r){c.ok(b(t,r)<=0),s.push(e.slice(t,r))}var i=(r=r||{start:{line:1,column:0},end:{line:e.length,column:e.getLineLength(e.length)}}).start,s=[];return t.sort(function(e,t){return b(e.start,t.start)}).forEach(function(e){b(i,e.start)>0||(n(i,e.start),s.push(e.lines),i=e.end)}),n(i,r.end),p.concat(s)}}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 s(e,t,r){var n=e.getValue();return n===t.getValue()||(E.check(n)?a(e,t,r):!!x.check(n)&&function(e,t,r){var n=e.getValue();if(x.assert(n),null===n.original)return!1;var i=t.getValue();if(!x.check(i))return!1;if(f.check(n)){if(!f.check(i))return!1;if(n.type===i.type){var s=[];if(l(e,t,s))r.push.apply(r,s);else{if(!i.loc)return!1;r.push({oldPath:t.copy(),newPath:e.copy()})}return!0}return!!(d.check(n)&&d.check(i)&&i.loc)&&(r.push({oldPath:t.copy(),newPath:e.copy()}),!0)}return l(e,t,r)}(e,t,r))}function a(e,t,r){var n=e.getValue(),i=t.getValue();E.assert(n);var a=n.length;if(!E.check(i)||i.length!==a)return!1;for(var o=0;o<a;++o){e.stack.push(o,n[o]),t.stack.push(o,i[o]);var u=s(e,t,r);if(e.stack.length-=2,t.stack.length-=2,!u)return!1}return!0}function o(e){var t=e.getValue().loc,r=t&&t.lines;if(r){var n=C;for(n.line=t.start.line,n.column=t.start.column;r.prevPos(n);){var i=r.charAt(n);if("("===i)return b(e.getRootValue().loc.start,n)<=0;if(_.test(i))return!1}}return!1}function u(e){return o(e)&&function(e){var t=e.getValue().loc,r=t&&t.lines;if(r){var n=C;n.line=t.end.line,n.column=t.end.column;do{var i=r.charAt(n);if(")"===i)return b(n,e.getRootValue().loc.end)<=0;if(_.test(i))return!1}while(r.nextPos(n))}return!1}(e)}function l(e,t,r){var n=e.getValue(),i=t.getValue();if(x.assert(n),x.assert(i),null===n.original)return!1;if(!e.canBeFirstInStatement()&&e.firstInStatement()&&!o(t))return!1;if(e.needsParens(!0)&&!u(t))return!1;var a=g.getUnionOfKeys(i,n);"File"!==i.type&&"File"!==n.type||delete a.tokens,delete a.loc;var l=r.length;for(var c in a){e.stack.push(c,h.getFieldValue(n,c)),t.stack.push(c,h.getFieldValue(i,c));var p=s(e,t,r);if(e.stack.length-=2,t.stack.length-=2,!p)return!1}return!(m.check(e.getNode())&&r.length>l)}var c=e("assert"),p=e("./lines"),h=e("./types"),f=(h.getFieldValue,h.namedTypes.Printable),d=h.namedTypes.Expression,m=h.namedTypes.ReturnStatement,y=h.namedTypes.SourceLocation,g=e("./util"),b=g.comparePos,v=e("./fast-path"),x=h.builtInTypes.object,E=h.builtInTypes.array,A=h.builtInTypes.string,D=/[0-9a-z_$]/i;r.Patcher=n;var S=n.prototype;S.tryToReprintComments=function(e,t,r){var n=this;if(!e.comments&&!t.comments)return!0;var s=v.from(e),o=v.from(t);s.stack.push("comments",i(e)),o.stack.push("comments",i(t));var u=[],l=a(s,o,u);return l&&u.length>0&&u.forEach(function(e){var t=e.oldPath.getValue();c.ok(t.leading||t.trailing),n.replace(t.loc,r(e.newPath).indentTail(t.loc.indent))}),l},S.deleteComments=function(e){if(e.comments){var t=this;e.comments.forEach(function(r){r.leading?t.replace({start:r.loc.start,end:e.loc.lines.skipSpaces(r.loc.end,!1,!1)},""):r.trailing&&t.replace({start:e.loc.lines.skipSpaces(r.loc.start,!0,!1),end:r.loc.end},"")})}},r.getReprinter=function(e){c.ok(e instanceof v);var t=e.getValue();if(f.check(t)){var r=t.original,i=r&&r.loc,s=i&&i.lines,a=[];if(s&&function(e,t){var r=e.getValue();f.assert(r);var n=r.original;if(f.assert(n),c.deepEqual(t,[]),r.type!==n.type)return!1;var i=l(e,new v(n),t);return i||(t.length=0),i}(e,a))return function(e){var t=new n(s);return a.forEach(function(r){var n=r.newPath.getValue(),i=r.oldPath.getValue();y.assert(i.loc,!0);var a=!t.tryToReprintComments(n,i,e);a&&t.deleteComments(i);var o=e(r.newPath,a).indentTail(i.loc.indent),u=function(e,t,r){var n=g.copyPos(t.start),i=e.prevPos(n)&&e.charAt(n),s=r.charAt(r.firstPos());return i&&D.test(i)&&s&&D.test(s)}(s,i.loc,o),l=function(e,t,r){var n=e.charAt(t.end),i=r.lastPos(),s=r.prevPos(i)&&r.charAt(i);return s&&D.test(s)&&n&&D.test(n)}(s,i.loc,o);if(u||l){var c=[];u&&c.push(" "),c.push(o),l&&c.push(" "),o=p.concat(c)}t.replace(i.loc,o)}),t.get(i).indentTail(-r.loc.indent)}}};var C={line:1,column:0},_=/\S/},{"./fast-path":565,"./lines":566,"./types":572,"./util":573,assert:1}],571:[function(e,t,r){function n(e,t){v.ok(this instanceof n),k.assert(e),this.code=e,t&&(F.assert(t),this.map=t)}function i(e){function t(e){return v.ok(e instanceof T),x(e,r)}function r(e,r){if(r)return t(e);if(v.ok(e instanceof T),!l){var n=c.tabWidth,i=e.getNode().loc;if(i&&i.lines&&i.lines.guessTabWidth){c.tabWidth=i.lines.guessTabWidth();var s=a(e);return c.tabWidth=n,s}}return a(e)}function a(e){var t=C(e);return t?function(e,t){return e.needsParens()?D(["(",t,")"]):t}(e,t(r)):o(e)}function o(e,r){return r?x(e,o):s(e,c,t)}function u(e){return s(e,c,u)}v.ok(this instanceof i);var l=e&&e.tabWidth,c=S(e);v.notStrictEqual(c,e),c.sourceFileName=null,this.print=function(e){if(!e)return O;var t=r(T.from(e),!0);return new n(t.toString(c),P.composeSourceMaps(c.inputSourceMap,t.getSourceMap(c.sourceMapName,c.sourceRoot)))},this.printGenerically=function(e){if(!e)return O;var t=T.from(e),r=c.reuseWhitespace;c.reuseWhitespace=!1;var i=new n(u(t).toString(c));return c.reuseWhitespace=r,i}}function s(e,t,r){v.ok(e instanceof T);var n=e.getValue(),i=[],s=!1,m=function(e,t,r){var n=e.getValue();if(!n)return A("");if("string"==typeof n)return A(n,t);w.Printable.assert(n);var i=[];switch(n.type){case"File":return e.call(r,"program");case"Program":return n.directives&&e.each(function(e){i.push(r(e),";\n")},"directives"),i.push(e.call(function(e){return a(e,t,r)},"body")),D(i);case"Noop":case"EmptyStatement":return A("");case"ExpressionStatement":return D([e.call(r,"expression"),";"]);case"ParenthesizedExpression":return D(["(",e.call(r,"expression"),")"]);case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":return A(" ").join([e.call(r,"left"),n.operator,e.call(r,"right")]);case"AssignmentPattern":return D([e.call(r,"left")," = ",e.call(r,"right")]);case"MemberExpression":i.push(e.call(r,"object"));var s=e.call(r,"property");return n.computed?i.push("[",s,"]"):i.push(".",s),D(i);case"MetaProperty":return D([e.call(r,"meta"),".",e.call(r,"property")]);case"BindExpression":return n.object&&i.push(e.call(r,"object")),i.push("::",e.call(r,"callee")),D(i);case"Path":return A(".").join(n.body);case"Identifier":return D([A(n.name,t),e.call(r,"typeAnnotation")]);case"SpreadElement":case"SpreadElementPattern":case"RestProperty":case"SpreadProperty":case"SpreadPropertyPattern":case"RestElement":return D(["...",e.call(r,"argument")]);case"FunctionDeclaration":case"FunctionExpression":return n.async&&i.push("async "),i.push("function"),n.generator&&i.push("*"),n.id&&i.push(" ",e.call(r,"id"),e.call(r,"typeParameters")),i.push("(",l(e,t,r),")",e.call(r,"returnType")," ",e.call(r,"body")),D(i);case"ArrowFunctionExpression":return n.async&&i.push("async "),n.typeParameters&&i.push(e.call(r,"typeParameters")),t.arrowParensAlways||1!==n.params.length||n.rest||"Identifier"!==n.params[0].type||n.params[0].typeAnnotation||n.returnType?i.push("(",l(e,t,r),")",e.call(r,"returnType")):i.push(e.call(r,"params",0)),i.push(" => ",e.call(r,"body")),D(i);case"MethodDefinition":return n.static&&i.push("static "),i.push(o(e,t,r)),D(i);case"YieldExpression":return i.push("yield"),n.delegate&&i.push("*"),n.argument&&i.push(" ",e.call(r,"argument")),D(i);case"AwaitExpression":return i.push("await"),n.all&&i.push("*"),n.argument&&i.push(" ",e.call(r,"argument")),D(i);case"ModuleDeclaration":return i.push("module",e.call(r,"id")),n.source?(v.ok(!n.body),i.push("from",e.call(r,"source"))):i.push(e.call(r,"body")),A(" ").join(i);case"ImportSpecifier":return n.imported?(i.push(e.call(r,"imported")),n.local&&n.local.name!==n.imported.name&&i.push(" as ",e.call(r,"local"))):n.id&&(i.push(e.call(r,"id")),n.name&&i.push(" as ",e.call(r,"name"))),D(i);case"ExportSpecifier":return n.local?(i.push(e.call(r,"local")),n.exported&&n.exported.name!==n.local.name&&i.push(" as ",e.call(r,"exported"))):n.id&&(i.push(e.call(r,"id")),n.name&&i.push(" as ",e.call(r,"name"))),D(i);case"ExportBatchSpecifier":return A("*");case"ImportNamespaceSpecifier":return i.push("* as "),n.local?i.push(e.call(r,"local")):n.id&&i.push(e.call(r,"id")),D(i);case"ImportDefaultSpecifier":return n.local?e.call(r,"local"):e.call(r,"id");case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":return h(e,t,r);case"ExportAllDeclaration":return i.push("export *"),n.exported&&i.push(" as ",e.call(r,"exported")),i.push(" from ",e.call(r,"source")),D(i);case"ExportNamespaceSpecifier":return D(["* as ",e.call(r,"exported")]);case"ExportDefaultSpecifier":return e.call(r,"exported");case"Import":return A("import",t);case"ImportDeclaration":if(i.push("import "),n.importKind&&"value"!==n.importKind&&i.push(n.importKind+" "),n.specifiers&&n.specifiers.length>0){var m=!1;e.each(function(e){var n=e.getName();n>0&&i.push(", ");var s=e.getValue();w.ImportDefaultSpecifier.check(s)||w.ImportNamespaceSpecifier.check(s)?v.strictEqual(m,!1):(w.ImportSpecifier.assert(s),m||(m=!0,i.push(t.objectCurlySpacing?"{ ":"{"))),i.push(r(e))},"specifiers"),m&&i.push(t.objectCurlySpacing?" }":"}"),i.push(" from ")}return i.push(e.call(r,"source"),";"),D(i);case"BlockStatement":var g=e.call(function(e){return a(e,t,r)},"body");return!g.isEmpty()||n.directives&&0!==n.directives.length?(i.push("{\n"),n.directives&&e.each(function(e){i.push(r(e).indent(t.tabWidth),";",n.directives.length>1||!g.isEmpty()?"\n":"")},"directives"),i.push(g.indent(t.tabWidth)),i.push("\n}"),D(i)):A("{}");case"ReturnStatement":if(i.push("return"),n.argument){var x=e.call(r,"argument");x.startsWithComment()||x.length>1&&w.JSXElement&&w.JSXElement.check(n.argument)?i.push(" (\n",x.indent(t.tabWidth),"\n)"):i.push(" ",x)}return i.push(";"),D(i);case"CallExpression":return D([e.call(r,"callee"),u(e,t,r)]);case"ObjectExpression":case"ObjectPattern":case"ObjectTypeAnnotation":var E=!1,S="ObjectTypeAnnotation"===n.type,C=t.flowObjectCommas?",":S?";":",",_=[];S&&_.push("indexers","callProperties"),_.push("properties");var k=0;_.forEach(function(e){k+=n[e].length});var F=S&&1===k||0===k,T=n.exact?"{|":"{",B=n.exact?"|}":"}";i.push(F?T:T+"\n");var O=i.length-1,N=0;return _.forEach(function(n){e.each(function(e){var n=r(e);F||(n=n.indent(t.tabWidth));var s=!S&&n.length>1;s&&E&&i.push("\n"),i.push(n),N<k-1?(i.push(C+(s?"\n\n":"\n")),E=!s):1!==k&&S?i.push(C):!F&&P.isTrailingCommaEnabled(t,"objects")&&i.push(C),N++},n)}),i.push(F?B:"\n"+B),0!==N&&F&&t.objectCurlySpacing&&(i[O]=T+" ",i[i.length-1]=" "+B),D(i);case"PropertyPattern":return D([e.call(r,"key"),": ",e.call(r,"pattern")]);case"ObjectProperty":case"Property":if(n.method||"get"===n.kind||"set"===n.kind)return o(e,t,r);var j=e.call(r,"key");return n.computed?i.push("[",j,"]"):i.push(j),n.shorthand||i.push(": ",e.call(r,"value")),D(i);case"ClassMethod":return n.static&&i.push("static "),D([i,c(e,t,r)]);case"ObjectMethod":return c(e,t,r);case"Decorator":return D(["@",e.call(r,"expression")]);case"ArrayExpression":case"ArrayPattern":var I=n.elements,k=I.length,L=e.map(r,"elements"),M=A(", ").join(L),F=M.getLineLength(1)<=t.wrapColumn;return F?t.arrayBracketSpacing?i.push("[ "):i.push("["):i.push("[\n"),e.each(function(e){var r=e.getName(),n=e.getValue();if(n){var s=L[r];F?r>0&&i.push(" "):s=s.indent(t.tabWidth),i.push(s),(r<k-1||!F&&P.isTrailingCommaEnabled(t,"arrays"))&&i.push(","),F||i.push("\n")}else i.push(",")},"elements"),F&&t.arrayBracketSpacing?i.push(" ]"):i.push("]"),D(i);case"SequenceExpression":return A(", ").join(e.map(r,"expressions"));case"ThisExpression":return A("this");case"Super":return A("super");case"NullLiteral":return A("null");case"RegExpLiteral":return A(n.extra.raw);case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"Literal":return"string"!=typeof n.value?A(n.value,t):A(b(n.value,t),t);case"Directive":return e.call(r,"value");case"DirectiveLiteral":return A(b(n.value,t));case"ModuleSpecifier":if(n.local)throw new Error("The ESTree ModuleSpecifier type should be abstract");return A(b(n.value,t),t);case"UnaryExpression":return i.push(n.operator),/[a-z]$/.test(n.operator)&&i.push(" "),i.push(e.call(r,"argument")),D(i);case"UpdateExpression":return i.push(e.call(r,"argument"),n.operator),n.prefix&&i.reverse(),D(i);case"ConditionalExpression":return D(["(",e.call(r,"test")," ? ",e.call(r,"consequent")," : ",e.call(r,"alternate"),")"]);case"NewExpression":i.push("new ",e.call(r,"callee"));var R=n.arguments;return R&&i.push(u(e,t,r)),D(i);case"VariableDeclaration":i.push(n.kind," ");var V=0,L=e.map(function(e){var t=r(e);return V=Math.max(t.length,V),t},"declarations");1===V?i.push(A(", ").join(L)):L.length>1?i.push(A(",\n").join(L).indentTail(n.kind.length+1)):i.push(L[0]);var U=e.getParentNode();return w.ForStatement.check(U)||w.ForInStatement.check(U)||w.ForOfStatement&&w.ForOfStatement.check(U)||w.ForAwaitStatement&&w.ForAwaitStatement.check(U)||i.push(";"),D(i);case"VariableDeclarator":return n.init?A(" = ").join([e.call(r,"id"),e.call(r,"init")]):e.call(r,"id");case"WithStatement":return D(["with (",e.call(r,"object"),") ",e.call(r,"body")]);case"IfStatement":var q=d(e.call(r,"consequent"),t),i=["if (",e.call(r,"test"),")",q];return n.alternate&&i.push(y(q)?" else":"\nelse",d(e.call(r,"alternate"),t)),D(i);case"ForStatement":var G=e.call(r,"init"),X=G.length>1?";\n":"; ",J=A(X).join([G,e.call(r,"test"),e.call(r,"update")]).indentTail("for (".length),W=D(["for (",J,")"]),K=d(e.call(r,"body"),t),i=[W];return W.length>1&&(i.push("\n"),K=K.trimLeft()),i.push(K),D(i);case"WhileStatement":return D(["while (",e.call(r,"test"),")",d(e.call(r,"body"),t)]);case"ForInStatement":return D([n.each?"for each (":"for (",e.call(r,"left")," in ",e.call(r,"right"),")",d(e.call(r,"body"),t)]);case"ForOfStatement":return D(["for (",e.call(r,"left")," of ",e.call(r,"right"),")",d(e.call(r,"body"),t)]);case"ForAwaitStatement":return D(["for await (",e.call(r,"left")," of ",e.call(r,"right"),")",d(e.call(r,"body"),t)]);case"DoWhileStatement":var z=D(["do",d(e.call(r,"body"),t)]),i=[z];return y(z)?i.push(" while"):i.push("\nwhile"),i.push(" (",e.call(r,"test"),");"),D(i);case"DoExpression":var Y=e.call(function(e){return a(e,t,r)},"body");return D(["do {\n",Y.indent(t.tabWidth),"\n}"]);case"BreakStatement":return i.push("break"),n.label&&i.push(" ",e.call(r,"label")),i.push(";"),D(i);case"ContinueStatement":return i.push("continue"),n.label&&i.push(" ",e.call(r,"label")),i.push(";"),D(i);case"LabeledStatement":return D([e.call(r,"label"),":\n",e.call(r,"body")]);case"TryStatement":return i.push("try ",e.call(r,"block")),n.handler?i.push(" ",e.call(r,"handler")):n.handlers&&e.each(function(e){i.push(" ",r(e))},"handlers"),n.finalizer&&i.push(" finally ",e.call(r,"finalizer")),D(i);case"CatchClause":return i.push("catch (",e.call(r,"param")),n.guard&&i.push(" if ",e.call(r,"guard")),i.push(") ",e.call(r,"body")),D(i);case"ThrowStatement":return D(["throw ",e.call(r,"argument"),";"]);case"SwitchStatement":return D(["switch (",e.call(r,"discriminant"),") {\n",A("\n").join(e.map(r,"cases")),"\n}"]);case"SwitchCase":return n.test?i.push("case ",e.call(r,"test"),":"):i.push("default:"),n.consequent.length>0&&i.push("\n",e.call(function(e){return a(e,t,r)},"consequent").indent(t.tabWidth)),D(i);case"DebuggerStatement":return A("debugger;");case"JSXAttribute":return i.push(e.call(r,"name")),n.value&&i.push("=",e.call(r,"value")),D(i);case"JSXIdentifier":return A(n.name,t);case"JSXNamespacedName":return A(":").join([e.call(r,"namespace"),e.call(r,"name")]);case"JSXMemberExpression":return A(".").join([e.call(r,"object"),e.call(r,"property")]);case"JSXSpreadAttribute":return D(["{...",e.call(r,"argument"),"}"]);case"JSXExpressionContainer":return D(["{",e.call(r,"expression"),"}"]);case"JSXElement":var H=e.call(r,"openingElement");if(n.openingElement.selfClosing)return v.ok(!n.closingElement),H;var $=D(e.map(function(e){var t=e.getValue();if(w.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 r(e)},"children")).indentTail(t.tabWidth),Q=e.call(r,"closingElement");return D([H,$,Q]);case"JSXOpeningElement":i.push("<",e.call(r,"name"));var Z=[];e.each(function(e){Z.push(" ",r(e))},"attributes");var ee=D(Z),te=ee.length>1||ee.getLineLength(1)>t.wrapColumn;return te&&(Z.forEach(function(e,t){" "===e&&(v.strictEqual(t%2,0),Z[t]="\n")}),ee=D(Z).indentTail(t.tabWidth)),i.push(ee,n.selfClosing?" />":">"),D(i);case"JSXClosingElement":return D(["</",e.call(r,"name"),">"]);case"JSXText":return A(n.value,t);case"JSXEmptyExpression":return A("");case"TypeAnnotatedIdentifier":return D([e.call(r,"annotation")," ",e.call(r,"identifier")]);case"ClassBody":return 0===n.body.length?A("{}"):D(["{\n",e.call(function(e){return a(e,t,r)},"body").indent(t.tabWidth),"\n}"]);case"ClassPropertyDefinition":return i.push("static ",e.call(r,"definition")),w.MethodDefinition.check(n.definition)||i.push(";"),D(i);case"ClassProperty":n.static&&i.push("static ");var j=e.call(r,"key");return n.computed?j=D(["[",j,"]"]):"plus"===n.variance?j=D(["+",j]):"minus"===n.variance&&(j=D(["-",j])),i.push(j),n.typeAnnotation&&i.push(e.call(r,"typeAnnotation")),n.value&&i.push(" = ",e.call(r,"value")),i.push(";"),D(i);case"ClassDeclaration":case"ClassExpression":return i.push("class"),n.id&&i.push(" ",e.call(r,"id"),e.call(r,"typeParameters")),n.superClass&&i.push(" extends ",e.call(r,"superClass"),e.call(r,"superTypeParameters")),n.implements&&n.implements.length>0&&i.push(" implements ",A(", ").join(e.map(r,"implements"))),i.push(" ",e.call(r,"body")),D(i);case"TemplateElement":return A(n.value.raw,t).lockIndentTail();case"TemplateLiteral":var re=e.map(r,"expressions");return i.push("`"),e.each(function(e){var t=e.getName();i.push(r(e)),t<re.length&&i.push("${",re[t],"}")},"quasis"),i.push("`"),D(i).lockIndentTail();case"TaggedTemplateExpression":return D([e.call(r,"tag"),e.call(r,"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(n.type));case"CommentBlock":case"Block":return D(["/*",A(n.value,t),"*/"]);case"CommentLine":case"Line":return D(["//",A(n.value,t)]);case"TypeAnnotation":return n.typeAnnotation?("FunctionTypeAnnotation"!==n.typeAnnotation.type&&i.push(": "),i.push(e.call(r,"typeAnnotation")),D(i)):A("");case"ExistentialTypeParam":case"ExistsTypeAnnotation":return A("*",t);case"EmptyTypeAnnotation":return A("empty",t);case"AnyTypeAnnotation":return A("any",t);case"MixedTypeAnnotation":return A("mixed",t);case"ArrayTypeAnnotation":return D([e.call(r,"elementType"),"[]"]);case"BooleanTypeAnnotation":return A("boolean",t);case"BooleanLiteralTypeAnnotation":return v.strictEqual(typeof n.value,"boolean"),A(""+n.value,t);case"DeclareClass":return f(e,["class ",e.call(r,"id")," ",e.call(r,"body")]);case"DeclareFunction":return f(e,["function ",e.call(r,"id"),";"]);case"DeclareModule":return f(e,["module ",e.call(r,"id")," ",e.call(r,"body")]);case"DeclareModuleExports":return f(e,["module.exports",e.call(r,"typeAnnotation")]);case"DeclareVariable":return f(e,["var ",e.call(r,"id"),";"]);case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return D(["declare ",h(e,t,r)]);case"FunctionTypeAnnotation":var ne=e.getParentNode(0),ie=!(w.ObjectTypeCallProperty.check(ne)||w.DeclareFunction.check(e.getParentNode(2))),se=ie&&!w.FunctionTypeParam.check(ne);return se&&i.push(": "),i.push("(",A(", ").join(e.map(r,"params")),")"),n.returnType&&i.push(ie?" => ":": ",e.call(r,"returnType")),D(i);case"FunctionTypeParam":return D([e.call(r,"name"),n.optional?"?":"",": ",e.call(r,"typeAnnotation")]);case"GenericTypeAnnotation":return D([e.call(r,"id"),e.call(r,"typeParameters")]);case"DeclareInterface":i.push("declare ");case"InterfaceDeclaration":return i.push(A("interface ",t),e.call(r,"id"),e.call(r,"typeParameters")," "),n.extends&&i.push("extends ",A(", ").join(e.map(r,"extends"))),i.push(" ",e.call(r,"body")),D(i);case"ClassImplements":case"InterfaceExtends":return D([e.call(r,"id"),e.call(r,"typeParameters")]);case"IntersectionTypeAnnotation":return A(" & ").join(e.map(r,"types"));case"NullableTypeAnnotation":return D(["?",e.call(r,"typeAnnotation")]);case"NullLiteralTypeAnnotation":return A("null",t);case"ThisTypeAnnotation":return A("this",t);case"NumberTypeAnnotation":return A("number",t);case"ObjectTypeCallProperty":return e.call(r,"value");case"ObjectTypeIndexer":var ae="plus"===n.variance?"+":"minus"===n.variance?"-":"";return D([ae,"[",e.call(r,"id"),": ",e.call(r,"key"),"]: ",e.call(r,"value")]);case"ObjectTypeProperty":var ae="plus"===n.variance?"+":"minus"===n.variance?"-":"";return D([ae,e.call(r,"key"),n.optional?"?":"",": ",e.call(r,"value")]);case"QualifiedTypeIdentifier":return D([e.call(r,"qualification"),".",e.call(r,"id")]);case"StringLiteralTypeAnnotation":return A(b(n.value,t),t);case"NumberLiteralTypeAnnotation":case"NumericLiteralTypeAnnotation":return v.strictEqual(typeof n.value,"number"),A(JSON.stringify(n.value),t);case"StringTypeAnnotation":return A("string",t);case"DeclareTypeAlias":i.push("declare ");case"TypeAlias":return D(["type ",e.call(r,"id"),e.call(r,"typeParameters")," = ",e.call(r,"right"),";"]);case"TypeCastExpression":return D(["(",e.call(r,"expression"),e.call(r,"typeAnnotation"),")"]);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return D(["<",A(", ").join(e.map(r,"params")),">"]);case"TypeParameter":switch(n.variance){case"plus":i.push("+");break;case"minus":i.push("-")}return i.push(e.call(r,"name")),n.bound&&i.push(e.call(r,"bound")),n.default&&i.push("=",e.call(r,"default")),D(i);case"TypeofTypeAnnotation":return D([A("typeof ",t),e.call(r,"argument")]);case"UnionTypeAnnotation":return A(" | ").join(e.map(r,"types"));case"VoidTypeAnnotation":return A("void",t);case"NullTypeAnnotation":return A("null",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(n.type))}return p}(e,t,r);return!n||m.isEmpty()?m:(n.decorators&&n.decorators.length>0&&!P.getParentExportDeclaration(e)?e.each(function(e){i.push(r(e),"\n")},"decorators"):P.isExportDeclaration(n)&&n.declaration&&n.declaration.decorators?e.each(function(e){i.push(r(e),"\n")},"declaration","decorators"):s=e.needsParens(),s&&i.unshift("("),i.push(m),s&&i.push(")"),D(i))}function a(e,t,r){w.ClassBody&&w.ClassBody.check(e.getParentNode());var n=[],i=!1,s=!1;e.each(function(e){e.getName();var t=e.getValue();t&&"EmptyStatement"!==t.type&&(w.Comment.check(t)?i=!0:w.Statement.check(t)?s=!0:k.assert(t),n.push({node:t,printed:r(e)}))}),i&&v.strictEqual(s,!1,"Comments may appear as statements in otherwise empty statement lists, but may not coexist with non-Comment nodes.");var a=null,o=n.length,u=[];return n.forEach(function(e,r){var n,i,s=e.printed,l=e.node,c=s.length>1,p=r>0,h=r<o-1,f=l&&l.loc&&l.loc.lines,d=f&&t.reuseWhitespace&&P.getTrueLoc(l,f);if(p)if(d){var m=f.skipSpaces(d.start,!0),y=m?m.line:1,g=d.start.line-y;n=Array(g+1).join("\n")}else n=c?"\n\n":"\n";else n="";if(h)if(d){var b=f.skipSpaces(d.end),v=(b?b.line:f.length)-d.end.line;i=Array(v+1).join("\n")}else i=c?"\n\n":"\n";else i="";u.push(function(e,t){if(!e&&!t)return A("");if(!e)return A(t);if(!t)return A(e);var r=A(e),n=A(t);if(n.length>r.length)return n;return r}(a,n),s),h?a=i:i&&u.push(i)}),D(u)}function o(e,t,r){var n=e.getNode(),i=n.kind,s=[];"ObjectMethod"===n.type||"ClassMethod"===n.type?n.value=n:w.FunctionExpression.assert(n.value),n.value.async&&s.push("async "),i&&"init"!==i&&"method"!==i&&"constructor"!==i?(v.ok("get"===i||"set"===i),s.push(i," ")):n.value.generator&&s.push("*");var a=e.call(r,"key");return n.computed&&(a=D(["[",a,"]"])),s.push(a,e.call(r,"value","typeParameters"),"(",e.call(function(e){return l(e,t,r)},"value"),")",e.call(r,"value","returnType")," ",e.call(r,"value","body")),D(s)}function u(e,t,r){var n=e.map(r,"arguments"),i=P.isTrailingCommaEnabled(t,"parameters"),s=A(", ").join(n);return s.getLineLength(1)>t.wrapColumn?(s=A(",\n").join(n),D(["(\n",s.indent(t.tabWidth),i?",\n)":"\n)"])):D(["(",s,")"])}function l(e,t,r){var n=e.getValue();w.Function.assert(n);var i=e.map(r,"params");n.defaults&&e.each(function(e){var t=e.getName(),n=i[t];n&&e.getValue()&&(i[t]=D([n," = ",r(e)]))},"defaults"),n.rest&&i.push(D(["...",e.call(r,"rest")]));var s=A(", ").join(i);return s.length>1||s.getLineLength(1)>t.wrapColumn?(s=A(",\n").join(i),s=P.isTrailingCommaEnabled(t,"parameters")&&!n.rest&&"RestElement"!==n.params[n.params.length-1].type?D([s,",\n"]):D([s,"\n"]),D(["\n",s.indent(t.tabWidth)])):s}function c(e,t,r){var n=e.getValue(),i=[];if(n.async&&i.push("async "),n.generator&&i.push("*"),n.method||"get"===n.kind||"set"===n.kind)return o(e,t,r);var s=e.call(r,"key");return n.computed?i.push("[",s,"]"):i.push(s),i.push("(",l(e,t,r),")",e.call(r,"returnType")," ",e.call(r,"body")),D(i)}function h(e,t,r){var n=e.getValue(),i=["export "],s=t.objectCurlySpacing;w.Declaration.assert(n),(n.default||"ExportDefaultDeclaration"===n.type)&&i.push("default "),n.declaration?i.push(e.call(r,"declaration")):n.specifiers&&n.specifiers.length>0&&(1===n.specifiers.length&&"ExportBatchSpecifier"===n.specifiers[0].type?i.push("*"):i.push(s?"{ ":"{",A(", ").join(e.map(r,"specifiers")),s?" }":"}"),n.source&&i.push(" from ",e.call(r,"source")));var a=D(i);return";"===m(a)||n.declaration&&("FunctionDeclaration"===n.declaration.type||"ClassDeclaration"===n.declaration.type)||(a=D([a,";"])),a}function f(e,t){var r=P.getParentExportDeclaration(e);return r?v.strictEqual(r.type,"DeclareExportDeclaration"):t.unshift("declare "),D(t)}function d(e,t){return e.length>1?D([" ",e]):D(["\n",function(e){var t=m(e);return!t||"\n};".indexOf(t)<0?D([e,";"]):e}(e).indent(t.tabWidth)])}function m(e){var t=e.lastPos();do{var r=e.charAt(t);if(/\S/.test(r))return r}while(e.prevPos(t))}function y(e){return"}"===m(e)}function g(e){return e.replace(/['"]/g,function(e){return'"'===e?"'":'"'})}function b(e,t){switch(k.assert(e),t.quote){case"auto":var r=JSON.stringify(e),n=g(JSON.stringify(g(e)));return r.length>n.length?n:r;case"single":return g(JSON.stringify(g(e)));case"double":default:return JSON.stringify(e)}}var v=e("assert"),x=(e("source-map"),e("./comments").printComments),E=e("./lines"),A=E.fromString,D=E.concat,S=e("./options").normalize,C=e("./patcher").getReprinter,_=e("./types"),w=_.namedTypes,k=_.builtInTypes.string,F=_.builtInTypes.object,T=e("./fast-path"),P=e("./util"),B=!1;n.prototype.toString=function(){return B||(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."),B=!0),this.code};var O=new n("");r.Printer=i},{"./comments":564,"./fast-path":565,"./lines":566,"./options":568,"./patcher":570,"./types":572,"./util":573,assert:1,"source-map":586}],572:[function(e,t,r){t.exports=e("ast-types")},{"ast-types":20}],573:[function(e,t,r){function n(e,t){return e.line-t.line||e.column-t.column}function i(e){return{line:e.line,column:e.column}}function s(e,t){e&&t&&(n(t.start,e.start)<0&&(e.start=t.start),n(e.end,t.end)<0&&(e.end=t.end))}var a=e("assert"),o=e("./types"),u=(o.getFieldValue,o.namedTypes),l=e("source-map"),c=l.SourceMapConsumer,p=l.SourceMapGenerator,h=Object.prototype.hasOwnProperty,f=r;f.getUnionOfKeys=function(){for(var e={},t=arguments.length,r=0;r<t;++r)for(var n=Object.keys(arguments[r]),i=n.length,s=0;s<i;++s)e[n[s]]=!0;return e},f.comparePos=n,f.copyPos=i,f.composeSourceMaps=function(e,t){if(!e)return t||null;if(!t)return e;var r=new c(e),n=new c(t),s=new p({file:t.file,sourceRoot:t.sourceRoot}),a={};return n.eachMapping(function(e){var t=r.originalPositionFor({line:e.originalLine,column:e.originalColumn}),n=t.source;if(null!==n){s.addMapping({source:n,original:i(t),generated:{line:e.generatedLine,column:e.generatedColumn},name:e.name});var o=r.sourceContentFor(n);o&&!h.call(a,n)&&(a[n]=o,s.setSourceContent(n,o))}}),s.toJSON()},f.getTrueLoc=function(e,t){function r(e){s(a,e.loc)}if(!e.loc)return null;var a={start:e.loc.start,end:e.loc.end};return e.comments&&e.comments.forEach(r),e.declaration&&f.isExportDeclaration(e)&&e.declaration.decorators&&e.declaration.decorators.forEach(r),n(a.start,a.end)<0&&(a.start=i(a.start),t.skipSpaces(a.start,!1,!0),n(a.start,a.end)<0&&(a.end=i(a.end),t.skipSpaces(a.end,!0,!0))),a},f.fixFaultyLocations=function(e,t){if((o=e.loc)&&(o.start.line<1&&(o.start.line=1),o.end.line<1&&(o.end.line=1)),"File"===e.type&&(o.start=t.firstPos(),o.end=t.lastPos()),"TemplateLiteral"===e.type)!function(e,t){if(a.strictEqual(e.type,"TemplateLiteral"),0!==e.quasis.length){var r=i(e.loc.start);a.strictEqual(t.charAt(r),"`"),a.ok(t.nextPos(r));var s=e.quasis[0];n(s.loc.start,r)<0&&(s.loc.start=r);var o=i(e.loc.end);a.ok(t.prevPos(o)),a.strictEqual(t.charAt(o),"`");var u=e.quasis[e.quasis.length-1];n(o,u.loc.end)<0&&(u.loc.end=o),e.expressions.forEach(function(r,i){var s=t.skipSpaces(r.loc.start,!0,!1);if(t.prevPos(s)&&"{"===t.charAt(s)&&t.prevPos(s)&&"$"===t.charAt(s)){var o=e.quasis[i];n(s,o.loc.end)<0&&(o.loc.end=s)}var u=t.skipSpaces(r.loc.end,!1,!1);if("}"===t.charAt(u)){a.ok(t.nextPos(u));var l=e.quasis[i+1];n(l.loc.start,u)<0&&(l.loc.start=u)}})}}(e,t);else if(o&&e.decorators)e.decorators.forEach(function(e){s(o,e.loc)});else if(e.declaration&&f.isExportDeclaration(e)){e.declaration.loc=null;var r=e.declaration.decorators;r&&r.forEach(function(e){s(o,e.loc)})}else if(u.MethodDefinition&&u.MethodDefinition.check(e)||u.Property.check(e)&&(e.method||e.shorthand))e.value.loc=null,u.FunctionExpression.check(e.value)&&(e.value.id=null);else if("ObjectTypeProperty"===e.type){var o,l=(o=e.loc)&&o.end;l&&(l=i(l),t.prevPos(l)&&","===t.charAt(l)&&(l=t.skipSpaces(l,!0,!0))&&(o.end=l))}},f.isExportDeclaration=function(e){if(e)switch(e.type){case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1},f.getParentExportDeclaration=function(e){var t=e.getParentNode();return"declaration"===e.getName()&&f.isExportDeclaration(t)?t:null},f.isTrailingCommaEnabled=function(e,t){var r=e.trailingComma;return"object"==typeof r?!!r[t]:!!r}},{"./types":572,assert:1,"source-map":586}],574:[function(e,t,r){(function(t){function n(e,t){return new a(t).print(e)}var i=e("./lib/types"),s=e("./lib/parser").parse,a=e("./lib/printer").Printer;Object.defineProperties(r,{parse:{enumerable:!0,value:s},visit:{enumerable:!0,value:i.visit},print:{enumerable:!0,value:n},prettyPrint:{enumerable:!1,value:function(e,t){return new a(t).printGenerically(e)}},types:{enumerable:!1,value:i},run:{enumerable:!1,value:function(r,i){return function(r,i,a){e("fs").readFile(r,"utf-8",function(e,r){e?console.error(e):function(e,r,i){var a=i&&i.writeback||function(e){t.stdout.write(e)};r(s(e,i),function(e){a(n(e,i).code)})}(r,i,a)})}(t.argv[2],r,i)}}})}).call(this,e("_process"))},{"./lib/parser":569,"./lib/printer":571,"./lib/types":572,_process:550,fs:192}],575:[function(e,t,r){!function(e,n){"object"==typeof r&&"object"==typeof t?t.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof r?r.esprima=n():e.esprima=n()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";var n=r(1),i=r(3),s=r(11),a=r(15);t.parse=function(e,t,r){var a=null,o=function(e,t){r&&r(e,t),a&&a.visit(e,t)},u="function"==typeof r?o:null,l=!1;if(t){l="boolean"==typeof t.comment&&t.comment;var c="boolean"==typeof t.attachComment&&t.attachComment;(l||c)&&((a=new n.CommentHandler).attach=c,t.comment=!0,u=o)}var p,h=(p=t&&"boolean"==typeof t.jsx&&t.jsx?new s.JSXParser(e,t,u):new i.Parser(e,t,u)).parseProgram();return l&&(h.comments=a.comments),p.config.tokens&&(h.tokens=p.tokens),p.config.tolerant&&(h.errors=p.errorHandler.errors),h},t.tokenize=function(e,t,r){var n,i=new a.Tokenizer(e,t);n=[];try{for(;;){var s=i.getNextToken();if(!s)break;r&&(s=r(s)),n.push(s)}}catch(e){i.errorHandler.tolerate(e)}return i.errorHandler.tolerant&&(n.errors=i.errors()),n};var o=r(2);t.Syntax=o.Syntax,t.version="3.1.3"},function(e,t,r){"use strict";var n=r(2),i=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===n.Syntax.BlockStatement&&0===e.body.length){for(var r=[],i=this.leading.length-1;i>=0;--i){var s=this.leading[i];t.end.offset>=s.start&&(r.unshift(s.comment),this.leading.splice(i,1),this.trailing.splice(i,1))}r.length&&(e.innerComments=r)}},e.prototype.findTrailingComments=function(e,t){var r=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var i=this.trailing[n];i.start>=t.end.offset&&r.unshift(i.comment)}return this.trailing.length=0,r}var s=this.stack[this.stack.length-1];if(s&&s.node.trailingComments){var a=s.node.trailingComments[0];a&&a.range[0]>=t.end.offset&&(r=s.node.trailingComments,delete s.node.trailingComments)}return r},e.prototype.findLeadingComments=function(e,t){for(var r,n=[];this.stack.length>0;){if(!((a=this.stack[this.stack.length-1])&&a.start>=t.start.offset))break;r=this.stack.pop().node}if(r){for(var i=(r.leadingComments?r.leadingComments.length:0)-1;i>=0;--i){var s=r.leadingComments[i];s.range[1]<=t.start.offset&&(n.unshift(s),r.leadingComments.splice(i,1))}return r.leadingComments&&0===r.leadingComments.length&&delete r.leadingComments,n}for(i=this.leading.length-1;i>=0;--i){var a;(a=this.leading[i]).start<=t.start.offset&&(n.unshift(a.comment),this.leading.splice(i,1))}return n},e.prototype.visitNode=function(e,t){if(!(e.type===n.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var r=this.findTrailingComments(e,t),i=this.findLeadingComments(e,t);i.length>0&&(e.leadingComments=i),r.length>0&&(e.trailingComments=r),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var r="L"===e.type[0]?"Line":"Block",n={type:r,value:e.value};if(e.range&&(n.range=e.range),e.loc&&(n.loc=e.loc),this.comments.push(n),this.attach){var i={comment:{type:r,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(i.comment.loc=e.loc),e.type=r,this.leading.push(i),this.trailing.push(i)}},e.prototype.visit=function(e,t){"LineComment"===e.type?this.visitComment(e,t):"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=i},function(e,t){"use strict";t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,r){"use strict";var n=r(4),i=r(5),s=r(6),a=r(7),o=r(8),u=r(2),l=r(10),c="ArrowParameterPlaceHolder",p=function(){function e(e,t,r){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=r,this.errorHandler=new s.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new o.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.sourceType=t&&"module"===t.sourceType?"module":"script",this.lookahead=null,this.hasLineTerminator=!1,this.context={allowIn:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:"module"===this.sourceType},this.tokens=[],this.startMarker={index:0,lineNumber:this.scanner.lineNumber,lineStart:0},this.lastMarker={index:0,lineNumber:this.scanner.lineNumber,lineStart:0},this.nextToken(),this.lastMarker={index:this.scanner.index,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.prototype.slice.call(arguments,1),s=e.replace(/%(\d)/g,function(e,t){return n.assert(t<i.length,"Message reference must be in range"),i[t]}),a=this.lastMarker.index,o=this.lastMarker.lineNumber,u=this.lastMarker.index-this.lastMarker.lineStart+1;throw this.errorHandler.createError(a,o,u,s)},e.prototype.tolerateError=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.prototype.slice.call(arguments,1),s=e.replace(/%(\d)/g,function(e,t){return n.assert(t<i.length,"Message reference must be in range"),i[t]}),a=this.lastMarker.index,o=this.scanner.lineNumber,u=this.lastMarker.index-this.lastMarker.lineStart+1;this.errorHandler.tolerateError(a,o,u,s)},e.prototype.unexpectedTokenError=function(e,t){var r,n=t||i.Messages.UnexpectedToken;if(e?(t||(n=e.type===a.Token.EOF?i.Messages.UnexpectedEOS:e.type===a.Token.Identifier?i.Messages.UnexpectedIdentifier:e.type===a.Token.NumericLiteral?i.Messages.UnexpectedNumber:e.type===a.Token.StringLiteral?i.Messages.UnexpectedString:e.type===a.Token.Template?i.Messages.UnexpectedTemplate:i.Messages.UnexpectedToken,e.type===a.Token.Keyword&&(this.scanner.isFutureReservedWord(e.value)?n=i.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(e.value)&&(n=i.Messages.StrictReservedWord))),r=e.type===a.Token.Template?e.value.raw:e.value):r="ILLEGAL",n=n.replace("%0",r),e&&"number"==typeof e.lineNumber){var s=e.start,o=e.lineNumber,u=e.start-this.lastMarker.lineStart+1;return this.errorHandler.createError(s,o,u,n)}s=this.lastMarker.index,o=this.lastMarker.lineNumber,u=s-this.lastMarker.lineStart+1;return this.errorHandler.createError(s,o,u,n)},e.prototype.throwUnexpectedToken=function(e,t){throw this.unexpectedTokenError(e,t)},e.prototype.tolerateUnexpectedToken=function(e,t){this.errorHandler.tolerate(this.unexpectedTokenError(e,t))},e.prototype.collectComments=function(){if(this.config.comment){var e=this.scanner.scanComments();if(e.length>0&&this.delegate)for(var t=0;t<e.length;++t){var r=e[t],n=void 0;n={type:r.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(r.slice[0],r.slice[1])},this.config.range&&(n.range=r.range),this.config.loc&&(n.loc=r.loc);var i={start:{line:r.loc.start.line,column:r.loc.start.column,offset:r.range[0]},end:{line:r.loc.end.line,column:r.loc.end.column,offset:r.range[1]}};this.delegate(n,i)}}else this.scanner.scanComments()},e.prototype.getTokenRaw=function(e){return this.scanner.source.slice(e.start,e.end)},e.prototype.convertToken=function(e){var t;return t={type:a.TokenName[e.type],value:this.getTokenRaw(e)},this.config.range&&(t.range=[e.start,e.end]),this.config.loc&&(t.loc={start:{line:this.startMarker.lineNumber,column:this.startMarker.index-this.startMarker.lineStart},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),e.regex&&(t.regex=e.regex),t},e.prototype.nextToken=function(){var e=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;var t;return t=this.scanner.lex(),this.hasLineTerminator=!(!e||!t)&&e.lineNumber!==t.lineNumber,t&&this.context.strict&&t.type===a.Token.Identifier&&this.scanner.isStrictModeReservedWord(t.value)&&(t.type=a.Token.Keyword),this.lookahead=t,this.config.tokens&&t.type!==a.Token.EOF&&this.tokens.push(this.convertToken(t)),e},e.prototype.nextRegexToken=function(){this.collectComments();var e=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(e))),this.lookahead=e,this.nextToken(),e},e.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.lineNumber,column:this.startMarker.index-this.startMarker.lineStart}},e.prototype.startNode=function(e){return{index:e.start,line:e.lineNumber,column:e.start-e.lineStart}},e.prototype.finalize=function(e,t){if(this.config.range&&(t.range=[e.index,this.lastMarker.index]),this.config.loc&&(t.loc={start:{line:e.line,column:e.column},end:{line:this.lastMarker.lineNumber,column:this.lastMarker.index-this.lastMarker.lineStart}},this.config.source&&(t.loc.source=this.config.source)),this.delegate){var r={start:{line:e.line,column:e.column,offset:e.index},end:{line:this.lastMarker.lineNumber,column:this.lastMarker.index-this.lastMarker.lineStart,offset:this.lastMarker.index}};this.delegate(t,r)}return t},e.prototype.expect=function(e){var t=this.nextToken();t.type===a.Token.Punctuator&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var e=this.lookahead;e.type===a.Token.Punctuator&&","===e.value?this.nextToken():e.type===a.Token.Punctuator&&";"===e.value?(this.nextToken(),this.tolerateUnexpectedToken(e)):this.tolerateUnexpectedToken(e,i.Messages.UnexpectedToken)}else this.expect(",")},e.prototype.expectKeyword=function(e){var t=this.nextToken();t.type===a.Token.Keyword&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.match=function(e){return this.lookahead.type===a.Token.Punctuator&&this.lookahead.value===e},e.prototype.matchKeyword=function(e){return this.lookahead.type===a.Token.Keyword&&this.lookahead.value===e},e.prototype.matchContextualKeyword=function(e){return this.lookahead.type===a.Token.Identifier&&this.lookahead.value===e},e.prototype.matchAssign=function(){if(this.lookahead.type!==a.Token.Punctuator)return!1;var e=this.lookahead.value;return"="===e||"*="===e||"**="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,r=this.context.isAssignmentTarget,n=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=r,this.context.firstCoverInitializedNameError=n,i},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,r=this.context.isAssignmentTarget,n=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&r,this.context.firstCoverInitializedNameError=n||this.context.firstCoverInitializedNameError,i},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type===a.Token.EOF||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.lineNumber=this.startMarker.lineNumber,this.lastMarker.lineStart=this.startMarker.lineStart)},e.prototype.parsePrimaryExpression=function(){var e,t,r,n=this.createNode();switch(this.lookahead.type){case a.Token.Identifier:"module"===this.sourceType&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.finalize(n,new l.Identifier(this.nextToken().value));break;case a.Token.NumericLiteral:case a.Token.StringLiteral:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,i.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),r=this.getTokenRaw(t),e=this.finalize(n,new l.Literal(t.value,r));break;case a.Token.BooleanLiteral:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,(t=this.nextToken()).value="true"===t.value,r=this.getTokenRaw(t),e=this.finalize(n,new l.Literal(t.value,r));break;case a.Token.NullLiteral:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,(t=this.nextToken()).value=null,r=this.getTokenRaw(t),e=this.finalize(n,new l.Literal(t.value,r));break;case a.Token.Template:e=this.parseTemplateLiteral();break;case a.Token.Punctuator:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),r=this.getTokenRaw(t),e=this.finalize(n,new l.RegexLiteral(t.value,r,t.regex));break;default:this.throwUnexpectedToken(this.nextToken())}break;case a.Token.Keyword:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(n,new l.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(n,new l.ThisExpression)):this.matchKeyword("class")?e=this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new l.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var r=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(r)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new l.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,r=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,r},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!1;var r=this.parseFormalParameters(),n=this.parsePropertyMethod(r);return this.context.allowYield=t,this.finalize(e,new l.FunctionExpression(null,r.params,n,!1))},e.prototype.parseObjectPropertyKey=function(){var e=this.createNode(),t=this.nextToken(),r=null;switch(t.type){case a.Token.StringLiteral:case a.Token.NumericLiteral:this.context.strict&&t.octal&&this.tolerateUnexpectedToken(t,i.Messages.StrictOctalLiteral);var n=this.getTokenRaw(t);r=this.finalize(e,new l.Literal(t.value,n));break;case a.Token.Identifier:case a.Token.BooleanLiteral:case a.Token.NullLiteral:case a.Token.Keyword:r=this.finalize(e,new l.Identifier(t.value));break;case a.Token.Punctuator:"["===t.value?(r=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):this.throwUnexpectedToken(t);break;default:this.throwUnexpectedToken(t)}return r},e.prototype.isPropertyKey=function(e,t){return e.type===u.Syntax.Identifier&&e.name===t||e.type===u.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,r,n,s=this.createNode(),o=this.lookahead,u=!1,c=!1,p=!1;o.type===a.Token.Identifier?(this.nextToken(),r=this.finalize(s,new l.Identifier(o.value))):this.match("*")?this.nextToken():(u=this.match("["),r=this.parseObjectPropertyKey());var h=this.qualifiedPropertyName(this.lookahead);if(o.type===a.Token.Identifier&&"get"===o.value&&h)t="get",u=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,n=this.parseGetterMethod();else if(o.type===a.Token.Identifier&&"set"===o.value&&h)t="set",u=this.match("["),r=this.parseObjectPropertyKey(),n=this.parseSetterMethod();else if(o.type===a.Token.Punctuator&&"*"===o.value&&h)t="init",u=this.match("["),r=this.parseObjectPropertyKey(),n=this.parseGeneratorMethod(),c=!0;else if(r||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":"))!u&&this.isPropertyKey(r,"__proto__")&&(e.value&&this.tolerateError(i.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),n=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))n=this.parsePropertyMethodFunction(),c=!0;else if(o.type===a.Token.Identifier){var f=this.finalize(s,new l.Identifier(o.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),p=!0;var d=this.isolateCoverGrammar(this.parseAssignmentExpression);n=this.finalize(s,new l.AssignmentPattern(f,d))}else p=!0,n=f}else this.throwUnexpectedToken(this.nextToken());return this.finalize(s,new l.Property(t,r,u,n,c,p))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],r={value:!1};!this.match("}");)t.push(this.parseObjectProperty(r)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new l.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){n.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),r={raw:t.value.raw,cooked:t.value.cooked};return this.finalize(e,new l.TemplateElement(r,t.tail))},e.prototype.parseTemplateElement=function(){this.lookahead.type!==a.Token.Template&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),r={raw:t.value.raw,cooked:t.value.cooked};return this.finalize(e,new l.TemplateElement(r,t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],r=[],n=this.parseTemplateHead();for(r.push(n);!n.tail;)t.push(this.parseExpression()),n=this.parseTemplateElement(),r.push(n);return this.finalize(e,new l.TemplateLiteral(r,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case u.Syntax.Identifier:case u.Syntax.MemberExpression:case u.Syntax.RestElement:case u.Syntax.AssignmentPattern:break;case u.Syntax.SpreadElement:e.type=u.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case u.Syntax.ArrayExpression:e.type=u.Syntax.ArrayPattern;for(var t=0;t<e.elements.length;t++)null!==e.elements[t]&&this.reinterpretExpressionAsPattern(e.elements[t]);break;case u.Syntax.ObjectExpression:e.type=u.Syntax.ObjectPattern;for(t=0;t<e.properties.length;t++)this.reinterpretExpressionAsPattern(e.properties[t].value);break;case u.Syntax.AssignmentExpression:e.type=u.Syntax.AssignmentPattern,delete e.operator,this.reinterpretExpressionAsPattern(e.left)}},e.prototype.parseGroupExpression=function(){var e;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),e={type:c,params:[]};else{var t=this.lookahead,r=[];if(this.match("..."))e=this.parseRestElement(r),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:c,params:[e]};else{var n=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var i=[];for(this.context.isAssignmentTarget=!1,i.push(e);this.startMarker.index<this.scanner.length&&this.match(",");){if(this.nextToken(),this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),i.push(this.parseRestElement(r)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(var s=0;s<i.length;s++)this.reinterpretExpressionAsPattern(i[s]);n=!0,e={type:c,params:i}}else i.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(n)break}n||(e=this.finalize(this.startNode(t),new l.SequenceExpression(i)))}if(!n){if(this.expect(")"),this.match("=>")&&(e.type===u.Syntax.Identifier&&"yield"===e.name&&(n=!0,e={type:c,params:[e]}),!n)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===u.Syntax.SequenceExpression)for(s=0;s<e.expressions.length;s++)this.reinterpretExpressionAsPattern(e.expressions[s]);else this.reinterpretExpressionAsPattern(e);var a=e.type===u.Syntax.SequenceExpression?e.expressions:[e];e={type:c,params:a}}this.context.isBindingElement=!1}}}return e},e.prototype.parseArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(e.push(t),this.match(")"))break;this.expectCommaSeparator()}return this.expect(")"),e},e.prototype.isIdentifierName=function(e){return e.type===a.Token.Identifier||e.type===a.Token.Keyword||e.type===a.Token.BooleanLiteral||e.type===a.Token.NullLiteral},e.prototype.parseIdentifierName=function(){var e=this.createNode(),t=this.nextToken();return this.isIdentifierName(t)||this.throwUnexpectedToken(t),this.finalize(e,new l.Identifier(t.value))},e.prototype.parseNewExpression=function(){var e=this.createNode(),t=this.parseIdentifierName();n.assert("new"===t.name,"New expression must start with `new`");var r;if(this.match("."))if(this.nextToken(),this.lookahead.type===a.Token.Identifier&&this.context.inFunctionBody&&"target"===this.lookahead.value){var i=this.parseIdentifierName();r=new l.MetaProperty(t,i)}else this.throwUnexpectedToken(this.lookahead);else{var s=this.isolateCoverGrammar(this.parseLeftHandSideExpression),o=this.match("(")?this.parseArguments():[];r=new l.NewExpression(s,o),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(e,r)},e.prototype.parseLeftHandSideExpressionAllowCall=function(){var e=this.lookahead,t=this.context.allowIn;this.context.allowIn=!0;var r;for(this.matchKeyword("super")&&this.context.inFunctionBody?(r=this.createNode(),this.nextToken(),r=this.finalize(r,new l.Super),this.match("(")||this.match(".")||this.match("[")||this.throwUnexpectedToken(this.lookahead)):r=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var n=this.parseIdentifierName();r=this.finalize(this.startNode(e),new l.StaticMemberExpression(r,n))}else if(this.match("(")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var i=this.parseArguments();r=this.finalize(this.startNode(e),new l.CallExpression(r,i))}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");n=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),r=this.finalize(this.startNode(e),new l.ComputedMemberExpression(r,n))}else{if(this.lookahead.type!==a.Token.Template||!this.lookahead.head)break;var s=this.parseTemplateLiteral();r=this.finalize(this.startNode(e),new l.TaggedTemplateExpression(r,s))}return this.context.allowIn=t,r},e.prototype.parseSuper=function(){var e=this.createNode();return this.expectKeyword("super"),this.match("[")||this.match(".")||this.throwUnexpectedToken(this.lookahead),this.finalize(e,new l.Super)},e.prototype.parseLeftHandSideExpression=function(){n.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var e=this.startNode(this.lookahead),t=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var r=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),t=this.finalize(e,new l.ComputedMemberExpression(t,r))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");r=this.parseIdentifierName();t=this.finalize(e,new l.StaticMemberExpression(t,r))}else{if(this.lookahead.type!==a.Token.Template||!this.lookahead.head)break;var i=this.parseTemplateLiteral();t=this.finalize(e,new l.TaggedTemplateExpression(t,i))}return t},e.prototype.parseUpdateExpression=function(){var e,t=this.lookahead;if(this.match("++")||this.match("--")){var r=this.startNode(t),n=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&e.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(i.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(i.Messages.InvalidLHSInAssignment);var s=!0;e=this.finalize(r,new l.UpdateExpression(n.value,e,s)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(e=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&this.lookahead.type===a.Token.Punctuator&&(this.match("++")||this.match("--"))){this.context.strict&&e.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(i.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(i.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var o=this.nextToken().value;s=!1;e=this.finalize(this.startNode(t),new l.UpdateExpression(o,e,s))}return e},e.prototype.parseUnaryExpression=function(){var e;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var t=this.startNode(this.lookahead),r=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),e=this.finalize(t,new l.UnaryExpression(r.value,e)),this.context.strict&&"delete"===e.operator&&e.argument.type===u.Syntax.Identifier&&this.tolerateError(i.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else e=this.parseUpdateExpression();return e},e.prototype.parseExponentiationExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseUnaryExpression);if(t.type!==u.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=t,n=this.isolateCoverGrammar(this.parseExponentiationExpression);t=this.finalize(this.startNode(e),new l.BinaryExpression("**",r,n))}return t},e.prototype.binaryPrecedence=function(e){var t=e.value;return e.type===a.Token.Punctuator?this.operatorPrecedence[t]||0:e.type===a.Token.Keyword&&("instanceof"===t||this.context.allowIn&&"in"===t)?7:0},e.prototype.parseBinaryExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseExponentiationExpression),r=this.lookahead,n=this.binaryPrecedence(r);if(n>0){this.nextToken(),r.prec=n,this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var i=[e,this.lookahead],s=t,a=this.isolateCoverGrammar(this.parseExponentiationExpression),o=[s,r,a];!((n=this.binaryPrecedence(this.lookahead))<=0);){for(;o.length>2&&n<=o[o.length-2].prec;){a=o.pop();var u=o.pop().value;s=o.pop(),i.pop();var c=this.startNode(i[i.length-1]);o.push(this.finalize(c,new l.BinaryExpression(u,s,a)))}(r=this.nextToken()).prec=n,o.push(r),i.push(this.lookahead),o.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var p=o.length-1;for(t=o[p],i.pop();p>1;){c=this.startNode(i.pop());t=this.finalize(c,new l.BinaryExpression(o[p-1].value,o[p-2],t)),p-=2}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var r=this.context.allowIn;this.context.allowIn=!0;var n=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=r,this.expect(":");var i=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new l.ConditionalExpression(t,n,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case u.Syntax.Identifier:this.validateParam(e,t,t.name);break;case u.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case u.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case u.Syntax.ArrayPattern:for(var r=0;r<t.elements.length;r++)null!==t.elements[r]&&this.checkPatternParam(e,t.elements[r]);break;case u.Syntax.YieldExpression:break;default:n.assert(t.type===u.Syntax.ObjectPattern,"Invalid type");for(r=0;r<t.properties.length;r++)this.checkPatternParam(e,t.properties[r].value)}},e.prototype.reinterpretAsCoverFormalsList=function(e){var t,r=[e];switch(e.type){case u.Syntax.Identifier:break;case c:r=e.params;break;default:return null}t={paramSet:{}};for(var n=0;n<r.length;++n){(s=r[n]).type===u.Syntax.AssignmentPattern&&s.right.type===u.Syntax.YieldExpression&&(s.right.argument&&this.throwUnexpectedToken(this.lookahead),s.right.type=u.Syntax.Identifier,s.right.name="yield",delete s.right.argument,delete s.right.delegate),this.checkPatternParam(t,s),r[n]=s}if(this.context.strict||!this.context.allowYield)for(n=0;n<r.length;++n){var s;(s=r[n]).type===u.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(t.message===i.Messages.StrictParamDupe){var a=this.context.strict?t.stricted:t.firstRestricted;this.throwUnexpectedToken(a,t.message)}return{params:r,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.parseAssignmentExpression=function(){var e;if(!this.context.allowYield&&this.matchKeyword("yield"))e=this.parseYieldExpression();else{var t=this.lookahead,r=t;if((e=this.parseConditionalExpression()).type===c||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var n=this.reinterpretAsCoverFormalsList(e);if(n){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var s=this.context.strict,a=this.context.allowYield;this.context.allowYield=!0;var o=this.startNode(t);this.expect("=>");var p=this.match("{")?this.parseFunctionSourceElements():this.isolateCoverGrammar(this.parseAssignmentExpression),h=p.type!==u.Syntax.BlockStatement;this.context.strict&&n.firstRestricted&&this.throwUnexpectedToken(n.firstRestricted,n.message),this.context.strict&&n.stricted&&this.tolerateUnexpectedToken(n.stricted,n.message),e=this.finalize(o,new l.ArrowFunctionExpression(n.params,p,h)),this.context.strict=s,this.context.allowYield=a}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(i.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===u.Syntax.Identifier){var f=e;this.scanner.isRestrictedWord(f.name)&&this.tolerateUnexpectedToken(r,i.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(f.name)&&this.tolerateUnexpectedToken(r,i.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),r=this.nextToken();var d=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new l.AssignmentExpression(r.value,e,d)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var r=[];for(r.push(t);this.startMarker.index<this.scanner.length&&this.match(",");)this.nextToken(),r.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new l.SequenceExpression(r))}return t},e.prototype.parseStatementListItem=function(){var e=null;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,this.lookahead.type===a.Token.Keyword)switch(this.lookahead.value){case"export":"module"!==this.sourceType&&this.tolerateUnexpectedToken(this.lookahead,i.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":"module"!==this.sourceType&&this.tolerateUnexpectedToken(this.lookahead,i.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new l.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var r=this.createNode(),n=this.parsePattern([],e);this.context.strict&&n.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(i.Messages.StrictVarName);var s=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.expect("="),s=this.isolateCoverGrammar(this.parseAssignmentExpression)):(!t.inFor&&n.type!==u.Syntax.Identifier||this.match("="))&&(this.expect("="),s=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(r,new l.VariableDeclarator(n,s))},e.prototype.parseBindingList=function(e,t){for(var r=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),r.push(this.parseLexicalBinding(e,t));return r},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.index,t=this.scanner.lineNumber,r=this.scanner.lineStart;this.collectComments();var n=this.scanner.lex();return this.scanner.index=e,this.scanner.lineNumber=t,this.scanner.lineStart=r,n.type===a.Token.Identifier||n.type===a.Token.Punctuator&&"["===n.value||n.type===a.Token.Punctuator&&"{"===n.value||n.type===a.Token.Keyword&&"let"===n.value||n.type===a.Token.Keyword&&"yield"===n.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),r=this.nextToken().value;n.assert("let"===r||"const"===r,"Lexical declaration must be either let or const");var i=this.parseBindingList(r,e);return this.consumeSemicolon(),this.finalize(t,new l.VariableDeclaration(i,r))},e.prototype.parseBindingRestElement=function(e,t){var r=this.createNode();this.expect("...");var n=this.parsePattern(e,t);return this.finalize(r,new l.RestElement(n))},e.prototype.parseArrayPattern=function(e,t){var r=this.createNode();this.expect("[");for(var n=[];!this.match("]");)if(this.match(","))this.nextToken(),n.push(null);else{if(this.match("...")){n.push(this.parseBindingRestElement(e,t));break}n.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(r,new l.ArrayPattern(n))},e.prototype.parsePropertyPattern=function(e,t){var r,n,i=this.createNode(),s=!1,o=!1;if(this.lookahead.type===a.Token.Identifier){var u=this.lookahead;r=this.parseVariableIdentifier();var c=this.finalize(i,new l.Identifier(u.value));if(this.match("=")){e.push(u),o=!0,this.nextToken();var p=this.parseAssignmentExpression();n=this.finalize(this.startNode(u),new l.AssignmentPattern(c,p))}else this.match(":")?(this.expect(":"),n=this.parsePatternWithDefault(e,t)):(e.push(u),o=!0,n=c)}else s=this.match("["),r=this.parseObjectPropertyKey(),this.expect(":"),n=this.parsePatternWithDefault(e,t);return this.finalize(i,new l.Property("init",r,s,n,!1,o))},e.prototype.parseObjectPattern=function(e,t){var r=this.createNode(),n=[];for(this.expect("{");!this.match("}");)n.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(r,new l.ObjectPattern(n))},e.prototype.parsePattern=function(e,t){var r;return this.match("[")?r=this.parseArrayPattern(e,t):this.match("{")?r=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,i.Messages.UnexpectedToken),e.push(this.lookahead),r=this.parseVariableIdentifier(t)),r},e.prototype.parsePatternWithDefault=function(e,t){var r=this.lookahead,n=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var i=this.context.allowYield;this.context.allowYield=!0;var s=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=i,n=this.finalize(this.startNode(r),new l.AssignmentPattern(n,s))}return n},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),r=this.nextToken();return r.type===a.Token.Keyword&&"yield"===r.value?(this.context.strict&&this.tolerateUnexpectedToken(r,i.Messages.StrictReservedWord),this.context.allowYield||this.throwUnexpectedToken(r)):r.type!==a.Token.Identifier?this.context.strict&&r.type===a.Token.Keyword&&this.scanner.isStrictModeReservedWord(r.value)?this.tolerateUnexpectedToken(r,i.Messages.StrictReservedWord):(this.context.strict||"let"!==r.value||"var"!==e)&&this.throwUnexpectedToken(r):"module"===this.sourceType&&r.type===a.Token.Identifier&&"await"===r.value&&this.tolerateUnexpectedToken(r),this.finalize(t,new l.Identifier(r.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),r=this.parsePattern([],"var");this.context.strict&&r.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(r.name)&&this.tolerateError(i.Messages.StrictVarName);var n=null;return this.match("=")?(this.nextToken(),n=this.isolateCoverGrammar(this.parseAssignmentExpression)):r.type===u.Syntax.Identifier||e.inFor||this.expect("="),this.finalize(t,new l.VariableDeclarator(r,n))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},r=[];for(r.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),r.push(this.parseVariableDeclaration(t));return r},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new l.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new l.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new l.ExpressionStatement(t))},e.prototype.parseIfStatement=function(){var e,t=this.createNode(),r=null;this.expectKeyword("if"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new l.EmptyStatement)):(this.expect(")"),e=this.parseStatement(),this.matchKeyword("else")&&(this.nextToken(),r=this.parseStatement())),this.finalize(t,new l.IfStatement(n,e,r))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var r=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();return this.expect(")"),this.match(";")&&this.nextToken(),this.finalize(e,new l.DoWhileStatement(r,n))},e.prototype.parseWhileStatement=function(){var e,t=this.createNode();this.expectKeyword("while"),this.expect("(");var r=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new l.EmptyStatement);else{this.expect(")");var n=this.context.inIteration;this.context.inIteration=!0,e=this.parseStatement(),this.context.inIteration=n}return this.finalize(t,new l.WhileStatement(r,e))},e.prototype.parseForStatement=function(){var e,t,r=null,n=null,s=null,a=!0,o=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){r=this.createNode(),this.nextToken();var c=this.context.allowIn;this.context.allowIn=!1;var p=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=c,1===p.length&&this.matchKeyword("in")){var h=p[0];h.init&&(h.id.type===u.Syntax.ArrayPattern||h.id.type===u.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(i.Messages.ForInOfLoopInitializer,"for-in"),r=this.finalize(r,new l.VariableDeclaration(p,"var")),this.nextToken(),e=r,t=this.parseExpression(),r=null}else 1===p.length&&null===p[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new l.VariableDeclaration(p,"var")),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,a=!1):(r=this.finalize(r,new l.VariableDeclaration(p,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){r=this.createNode();var f=this.nextToken().value;if(this.context.strict||"in"!==this.lookahead.value){c=this.context.allowIn;this.context.allowIn=!1;p=this.parseBindingList(f,{inFor:!0});this.context.allowIn=c,1===p.length&&null===p[0].init&&this.matchKeyword("in")?(r=this.finalize(r,new l.VariableDeclaration(p,f)),this.nextToken(),e=r,t=this.parseExpression(),r=null):1===p.length&&null===p[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new l.VariableDeclaration(p,f)),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,a=!1):(this.consumeSemicolon(),r=this.finalize(r,new l.VariableDeclaration(p,f)))}else r=this.finalize(r,new l.Identifier(f)),this.nextToken(),e=r,t=this.parseExpression(),r=null}else{var d=this.lookahead;c=this.context.allowIn;if(this.context.allowIn=!1,r=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=c,this.matchKeyword("in"))this.context.isAssignmentTarget&&r.type!==u.Syntax.AssignmentExpression||this.tolerateError(i.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseExpression(),r=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&r.type!==u.Syntax.AssignmentExpression||this.tolerateError(i.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseAssignmentExpression(),r=null,a=!1;else{if(this.match(",")){for(var m=[r];this.match(",");)this.nextToken(),m.push(this.isolateCoverGrammar(this.parseAssignmentExpression));r=this.finalize(this.startNode(d),new l.SequenceExpression(m))}this.expect(";")}}void 0===e&&(this.match(";")||(n=this.parseExpression()),this.expect(";"),this.match(")")||(s=this.parseExpression()));var y;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),y=this.finalize(this.createNode(),new l.EmptyStatement);else{this.expect(")");var g=this.context.inIteration;this.context.inIteration=!0,y=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=g}return void 0===e?this.finalize(o,new l.ForStatement(r,n,s,y)):a?this.finalize(o,new l.ForInStatement(e,t,y)):this.finalize(o,new l.ForOfStatement(e,t,y))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(this.lookahead.type===a.Token.Identifier&&!this.hasLineTerminator){var r="$"+(t=this.parseVariableIdentifier()).name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(i.Messages.UnknownLabel,t.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(i.Messages.IllegalContinue),this.finalize(e,new l.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(this.lookahead.type===a.Token.Identifier&&!this.hasLineTerminator){var r="$"+(t=this.parseVariableIdentifier()).name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(i.Messages.UnknownLabel,t.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(i.Messages.IllegalBreak),this.finalize(e,new l.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(i.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==a.Token.EOF?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(e,new l.ReturnStatement(t))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(i.Messages.StrictModeWith);var e=this.createNode();this.expectKeyword("with"),this.expect("(");var t=this.parseExpression();this.expect(")");var r=this.parseStatement();return this.finalize(e,new l.WithStatement(t,r))},e.prototype.parseSwitchCase=function(){var e,t=this.createNode();this.matchKeyword("default")?(this.nextToken(),e=null):(this.expectKeyword("case"),e=this.parseExpression()),this.expect(":");for(var r=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)r.push(this.parseStatementListItem());return this.finalize(t,new l.SwitchCase(e,r))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var r=this.context.inSwitch;this.context.inSwitch=!0;var n=[],s=!1;for(this.expect("{");!this.match("}");){var a=this.parseSwitchCase();null===a.test&&(s&&this.throwError(i.Messages.MultipleDefaultsInSwitch),s=!0),n.push(a)}return this.expect("}"),this.context.inSwitch=r,this.finalize(e,new l.SwitchStatement(t,n))},e.prototype.parseLabelledStatement=function(){var e,t=this.createNode(),r=this.parseExpression();if(r.type===u.Syntax.Identifier&&this.match(":")){this.nextToken();var n=r,s="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,s)&&this.throwError(i.Messages.Redeclaration,"Label",n.name),this.context.labelSet[s]=!0;var a=this.parseStatement();delete this.context.labelSet[s],e=new l.LabeledStatement(n,a)}else this.consumeSemicolon(),e=new l.ExpressionStatement(r);return this.finalize(t,e)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(i.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new l.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],r=this.parsePattern(t),n={},s=0;s<t.length;s++){var a="$"+t[s].value;Object.prototype.hasOwnProperty.call(n,a)&&this.tolerateError(i.Messages.DuplicateBinding,t[s].value),n[a]=!0}this.context.strict&&r.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(r.name)&&this.tolerateError(i.Messages.StrictCatchVariable),this.expect(")");var o=this.parseBlock();return this.finalize(e,new l.CatchClause(r,o))},e.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},e.prototype.parseTryStatement=function(){var e=this.createNode();this.expectKeyword("try");var t=this.parseBlock(),r=this.matchKeyword("catch")?this.parseCatchClause():null,n=this.matchKeyword("finally")?this.parseFinallyClause():null;return r||n||this.throwError(i.Messages.NoCatchOrFinally),this.finalize(e,new l.TryStatement(t,r,n))},e.prototype.parseDebuggerStatement=function(){var e=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(e,new l.DebuggerStatement)},e.prototype.parseStatement=function(){var e=null;switch(this.lookahead.type){case a.Token.BooleanLiteral:case a.Token.NullLiteral:case a.Token.NumericLiteral:case a.Token.StringLiteral:case a.Token.Template:case a.Token.RegularExpression:e=this.parseExpressionStatement();break;case a.Token.Punctuator:var t=this.lookahead.value;e="{"===t?this.parseBlock():"("===t?this.parseExpressionStatement():";"===t?this.parseEmptyStatement():this.parseExpressionStatement();break;case a.Token.Identifier:e=this.parseLabelledStatement();break;case a.Token.Keyword:switch(this.lookahead.value){case"break":e=this.parseBreakStatement();break;case"continue":e=this.parseContinueStatement();break;case"debugger":e=this.parseDebuggerStatement();break;case"do":e=this.parseDoWhileStatement();break;case"for":e=this.parseForStatement();break;case"function":e=this.parseFunctionDeclaration();break;case"if":e=this.parseIfStatement();break;case"return":e=this.parseReturnStatement();break;case"switch":e=this.parseSwitchStatement();break;case"throw":e=this.parseThrowStatement();break;case"try":e=this.parseTryStatement();break;case"var":e=this.parseVariableStatement();break;case"while":e=this.parseWhileStatement();break;case"with":e=this.parseWithStatement();break;default:e=this.parseExpressionStatement()}break;default:this.throwUnexpectedToken(this.lookahead)}return e},e.prototype.parseFunctionSourceElements=function(){var e=this.createNode();this.expect("{");var t=this.parseDirectivePrologues(),r=this.context.labelSet,n=this.context.inIteration,i=this.context.inSwitch,s=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;this.startMarker.index<this.scanner.length&&!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=r,this.context.inIteration=n,this.context.inSwitch=i,this.context.inFunctionBody=s,this.finalize(e,new l.BlockStatement(t))},e.prototype.validateParam=function(e,t,r){var n="$"+r;this.context.strict?(this.scanner.isRestrictedWord(r)&&(e.stricted=t,e.message=i.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(e.paramSet,n)&&(e.stricted=t,e.message=i.Messages.StrictParamDupe)):e.firstRestricted||(this.scanner.isRestrictedWord(r)?(e.firstRestricted=t,e.message=i.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(r)?(e.firstRestricted=t,e.message=i.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(e.paramSet,n)&&(e.stricted=t,e.message=i.Messages.StrictParamDupe)),"function"==typeof Object.defineProperty?Object.defineProperty(e.paramSet,n,{value:!0,enumerable:!0,writable:!0,configurable:!0}):e.paramSet[n]=!0},e.prototype.parseRestElement=function(e){var t=this.createNode();this.expect("...");var r=this.parsePattern(e);return this.match("=")&&this.throwError(i.Messages.DefaultRestParameter),this.match(")")||this.throwError(i.Messages.ParameterAfterRestParameter),this.finalize(t,new l.RestElement(r))},e.prototype.parseFormalParameter=function(e){for(var t=[],r=this.match("...")?this.parseRestElement(t):this.parsePatternWithDefault(t),n=0;n<t.length;n++)this.validateParam(e,t[n],t[n].value);return e.params.push(r),!this.match(")")},e.prototype.parseFormalParameters=function(e){var t;if(t={params:[],firstRestricted:e},this.expect("("),!this.match(")"))for(t.paramSet={};this.startMarker.index<this.scanner.length&&this.parseFormalParameter(t);)this.expect(",");return this.expect(")"),{params:t.params,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.parseFunctionDeclaration=function(e){var t=this.createNode();this.expectKeyword("function");var r=this.match("*");r&&this.nextToken();var n,s=null,a=null;if(!e||!this.match("(")){var o=this.lookahead;s=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(o.value)&&this.tolerateUnexpectedToken(o,i.Messages.StrictFunctionName):this.scanner.isRestrictedWord(o.value)?(a=o,n=i.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(o.value)&&(a=o,n=i.Messages.StrictReservedWord)}var u=this.context.allowYield;this.context.allowYield=!r;var c=this.parseFormalParameters(a),p=c.params,h=c.stricted;a=c.firstRestricted,c.message&&(n=c.message);var f=this.context.strict,d=this.parseFunctionSourceElements();return this.context.strict&&a&&this.throwUnexpectedToken(a,n),this.context.strict&&h&&this.tolerateUnexpectedToken(h,n),this.context.strict=f,this.context.allowYield=u,this.finalize(t,new l.FunctionDeclaration(s,p,d,r))},e.prototype.parseFunctionExpression=function(){var e=this.createNode();this.expectKeyword("function");var t=this.match("*");t&&this.nextToken();var r,n,s=null,a=this.context.allowYield;if(this.context.allowYield=!t,!this.match("(")){var o=this.lookahead;s=this.context.strict||t||!this.matchKeyword("yield")?this.parseVariableIdentifier():this.parseIdentifierName(),this.context.strict?this.scanner.isRestrictedWord(o.value)&&this.tolerateUnexpectedToken(o,i.Messages.StrictFunctionName):this.scanner.isRestrictedWord(o.value)?(n=o,r=i.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(o.value)&&(n=o,r=i.Messages.StrictReservedWord)}var u=this.parseFormalParameters(n),c=u.params,p=u.stricted;n=u.firstRestricted,u.message&&(r=u.message);var h=this.context.strict,f=this.parseFunctionSourceElements();return this.context.strict&&n&&this.throwUnexpectedToken(n,r),this.context.strict&&p&&this.tolerateUnexpectedToken(p,r),this.context.strict=h,this.context.allowYield=a,this.finalize(e,new l.FunctionExpression(s,c,f,t))},e.prototype.parseDirective=function(){var e=this.lookahead,t=null,r=this.createNode(),n=this.parseExpression();return n.type===u.Syntax.Literal&&(t=this.getTokenRaw(e).slice(1,-1)),this.consumeSemicolon(),this.finalize(r,t?new l.Directive(n,t):new l.ExpressionStatement(n))},e.prototype.parseDirectivePrologues=function(){for(var e=null,t=[];;){var r=this.lookahead;if(r.type!==a.Token.StringLiteral)break;var n=this.parseDirective();t.push(n);var s=n.directive;if("string"!=typeof s)break;"use strict"===s?(this.context.strict=!0,e&&this.tolerateUnexpectedToken(e,i.Messages.StrictOctalLiteral)):!e&&r.octal&&(e=r)}return t},e.prototype.qualifiedPropertyName=function(e){switch(e.type){case a.Token.Identifier:case a.Token.StringLiteral:case a.Token.BooleanLiteral:case a.Token.NullLiteral:case a.Token.NumericLiteral:case a.Token.Keyword:return!0;case a.Token.Punctuator:return"["===e.value}return!1},e.prototype.parseGetterMethod=function(){var e=this.createNode();this.expect("("),this.expect(")");var t={params:[],stricted:null,firstRestricted:null,message:null},r=this.context.allowYield;this.context.allowYield=!1;var n=this.parsePropertyMethod(t);return this.context.allowYield=r,this.finalize(e,new l.FunctionExpression(null,t.params,n,!1))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t={params:[],firstRestricted:null,paramSet:{}},r=this.context.allowYield;this.context.allowYield=!1,this.expect("("),this.match(")")?this.tolerateUnexpectedToken(this.lookahead):this.parseFormalParameter(t),this.expect(")");var n=this.parsePropertyMethod(t);return this.context.allowYield=r,this.finalize(e,new l.FunctionExpression(null,t.params,n,!1))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var r=this.parseFormalParameters();this.context.allowYield=!1;var n=this.parsePropertyMethod(r);return this.context.allowYield=t,this.finalize(e,new l.FunctionExpression(null,r.params,n,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case a.Token.Punctuator:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case a.Token.Keyword:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,r=!1;if(!this.hasLineTerminator){var n=this.context.allowYield;this.context.allowYield=!1,(r=this.match("*"))?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=n}return this.finalize(e,new l.YieldExpression(t,r))},e.prototype.parseClassElement=function(e){var t,r,n,s=this.lookahead,o=this.createNode(),u=!1,c=!1,p=!1;if(this.match("*"))this.nextToken();else{u=this.match("[");"static"===(r=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(s=this.lookahead,p=!0,u=this.match("["),this.match("*")?this.nextToken():r=this.parseObjectPropertyKey())}var h=this.qualifiedPropertyName(this.lookahead);return s.type===a.Token.Identifier?"get"===s.value&&h?(t="get",u=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,n=this.parseGetterMethod()):"set"===s.value&&h&&(t="set",u=this.match("["),r=this.parseObjectPropertyKey(),n=this.parseSetterMethod()):s.type===a.Token.Punctuator&&"*"===s.value&&h&&(t="init",u=this.match("["),r=this.parseObjectPropertyKey(),n=this.parseGeneratorMethod(),c=!0),!t&&r&&this.match("(")&&(t="init",n=this.parsePropertyMethodFunction(),c=!0),t||this.throwUnexpectedToken(this.lookahead),"init"===t&&(t="method"),u||(p&&this.isPropertyKey(r,"prototype")&&this.throwUnexpectedToken(s,i.Messages.StaticPrototype),!p&&this.isPropertyKey(r,"constructor")&&("method"===t&&c&&!n.generator||this.throwUnexpectedToken(s,i.Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(s,i.Messages.DuplicateConstructor):e.value=!0,t="constructor")),this.finalize(o,new l.MethodDefinition(r,u,n,t,p))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new l.ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),r=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=e&&this.lookahead.type!==a.Token.Identifier?null:this.parseVariableIdentifier(),i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var s=this.parseClassBody();return this.context.strict=r,this.finalize(t,new l.ClassDeclaration(n,i,s))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var r=this.lookahead.type===a.Token.Identifier?this.parseVariableIdentifier():null,n=null;this.matchKeyword("extends")&&(this.nextToken(),n=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var i=this.parseClassBody();return this.context.strict=t,this.finalize(e,new l.ClassExpression(r,n,i))},e.prototype.parseProgram=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();this.startMarker.index<this.scanner.length;)t.push(this.parseStatementListItem());return this.finalize(e,new l.Program(t,this.sourceType))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();this.lookahead.type!==a.Token.StringLiteral&&this.throwError(i.Messages.InvalidModuleSpecifier);var t=this.nextToken(),r=this.getTokenRaw(t);return this.finalize(e,new l.Literal(t.value,r))},e.prototype.parseImportSpecifier=function(){var e,t,r=this.createNode();return this.lookahead.type===a.Token.Identifier?(t=e=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),t=this.parseVariableIdentifier())):(t=e=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),t=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(r,new l.ImportSpecifier(t,e))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new l.ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(i.Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new l.ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(i.Messages.IllegalImportDeclaration);var e=this.createNode();this.expectKeyword("import");var t,r=[];if(this.lookahead.type===a.Token.StringLiteral)t=this.parseModuleSpecifier();else{if(this.match("{")?r=r.concat(this.parseNamedImports()):this.match("*")?r.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(r.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?r.push(this.parseImportNamespaceSpecifier()):this.match("{")?r=r.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var n=this.lookahead.value?i.Messages.UnexpectedToken:i.Messages.MissingFromClause;this.throwError(n,this.lookahead.value)}this.nextToken(),t=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(e,new l.ImportDeclaration(r,t))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),r=t;return this.matchContextualKeyword("as")&&(this.nextToken(),r=this.parseIdentifierName()),this.finalize(e,new l.ExportSpecifier(t,r))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(i.Messages.IllegalExportDeclaration);var e=this.createNode();this.expectKeyword("export");var t;if(this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var r=this.parseFunctionDeclaration(!0);t=this.finalize(e,new l.ExportDefaultDeclaration(r))}else if(this.matchKeyword("class")){r=this.parseClassDeclaration(!0);t=this.finalize(e,new l.ExportDefaultDeclaration(r))}else{this.matchContextualKeyword("from")&&this.throwError(i.Messages.UnexpectedToken,this.lookahead.value);r=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),t=this.finalize(e,new l.ExportDefaultDeclaration(r))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var n=this.lookahead.value?i.Messages.UnexpectedToken:i.Messages.MissingFromClause;this.throwError(n,this.lookahead.value)}this.nextToken();var s=this.parseModuleSpecifier();this.consumeSemicolon(),t=this.finalize(e,new l.ExportAllDeclaration(s))}else if(this.lookahead.type===a.Token.Keyword){r=void 0;switch(this.lookahead.value){case"let":case"const":r=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":r=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}t=this.finalize(e,new l.ExportNamedDeclaration(r,[],null))}else{var o=[],u=null,c=!1;for(this.expect("{");!this.match("}");)c=c||this.matchKeyword("default"),o.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),u=this.parseModuleSpecifier(),this.consumeSemicolon();else if(c){n=this.lookahead.value?i.Messages.UnexpectedToken:i.Messages.MissingFromClause;this.throwError(n,this.lookahead.value)}else this.consumeSemicolon();t=this.finalize(e,new l.ExportNamedDeclaration(null,o,u))}return t},e}();t.Parser=p},function(e,t){"use strict";t.assert=function(e,t){if(!e)throw new Error("ASSERT: "+t)}},function(e,t){"use strict";t.Messages={UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",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",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",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",IllegalReturn:"Illegal return statement",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",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.",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",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",DefaultRestParameter:"Unexpected token =",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ConstructorSpecialMethod:"Class constructor may not be an accessor",DuplicateConstructor:"A class may only have one constructor",StaticPrototype:"Classes may not have static property named prototype",MissingFromClause:"Unexpected token",NoAsAfterImportNamespace:"Unexpected token",InvalidModuleSpecifier:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalExportDeclaration:"Unexpected token",DuplicateBinding:"Duplicate binding %0",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer"}},function(e,t){"use strict";var r=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.tolerate=function(e){if(!this.tolerant)throw e;this.recordError(e)},e.prototype.constructError=function(e,t){var r=new Error(e);try{throw r}catch(e){Object.create&&Object.defineProperty&&(r=Object.create(e),Object.defineProperty(r,"column",{value:t}))}finally{return r}},e.prototype.createError=function(e,t,r,n){var i="Line "+t+": "+n,s=this.constructError(i,r);return s.index=e,s.lineNumber=t,s.description=n,s},e.prototype.throwError=function(e,t,r,n){throw this.createError(e,t,r,n)},e.prototype.tolerateError=function(e,t,r,n){var i=this.createError(e,t,r,n);if(!this.tolerant)throw i;this.recordError(i)},e}();t.ErrorHandler=r},function(e,t){"use strict";!function(e){e[e.BooleanLiteral=1]="BooleanLiteral",e[e.EOF=2]="EOF",e[e.Identifier=3]="Identifier",e[e.Keyword=4]="Keyword",e[e.NullLiteral=5]="NullLiteral",e[e.NumericLiteral=6]="NumericLiteral",e[e.Punctuator=7]="Punctuator",e[e.StringLiteral=8]="StringLiteral",e[e.RegularExpression=9]="RegularExpression",e[e.Template=10]="Template"}(t.Token||(t.Token={}));var r=t.Token;t.TokenName={},t.TokenName[r.BooleanLiteral]="Boolean",t.TokenName[r.EOF]="<end>",t.TokenName[r.Identifier]="Identifier",t.TokenName[r.Keyword]="Keyword",t.TokenName[r.NullLiteral]="Null",t.TokenName[r.NumericLiteral]="Numeric",t.TokenName[r.Punctuator]="Punctuator",t.TokenName[r.StringLiteral]="String",t.TokenName[r.RegularExpression]="RegularExpression",t.TokenName[r.Template]="Template"},function(e,t,r){"use strict";function n(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function i(e){return"01234567".indexOf(e)}var s=r(4),a=r(5),o=r(9),u=r(7),l=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){void 0===e&&(e=a.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(){this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,a.Messages.UnexpectedTokenIllegal)},e.prototype.skipSingleLineComment=function(e){var t,r,n;for(this.trackComment&&(t=[],r=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(++this.index,o.Character.isLineTerminator(i)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var s={multiLine:!1,slice:[r+e,this.index-1],range:[r,this.index-1],loc:n};t.push(s)}return 13===i&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t}}if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};s={multiLine:!1,slice:[r+e,this.index],range:[r,this.index],loc:n};t.push(s)}return t},e.prototype.skipMultiLineComment=function(){var e,t,r;for(this.trackComment&&(e=[],t=this.index-2,r={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var n=this.source.charCodeAt(this.index);if(o.Character.isLineTerminator(n))13===n&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===n){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:r};e.push(i)}return e}++this.index}else++this.index}if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};i={multiLine:!0,slice:[t+2,this.index],range:[t,this.index],loc:r};e.push(i)}return this.tolerateUnexpectedToken(),e},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var r=this.source.charCodeAt(this.index);if(o.Character.isWhiteSpace(r))++this.index;else if(o.Character.isLineTerminator(r))++this.index,13===r&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===r)if(47===(r=this.source.charCodeAt(this.index+1))){this.index+=2;var n=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(n)),t=!0}else{if(42!==r)break;this.index+=2;n=this.skipMultiLineComment();this.trackComment&&(e=e.concat(n))}else if(t&&45===r){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3;n=this.skipSingleLineComment(3);this.trackComment&&(e=e.concat(n))}else{if(60!==r)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4;n=this.skipSingleLineComment(4);this.trackComment&&(e=e.concat(n))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(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}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){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||"yield"===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}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var r=this.source.charCodeAt(e+1);if(r>=56320&&r<=57343){t=1024*(t-55296)+r-56320+65536}}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,r=0,i=0;i<t;++i){if(this.eof()||!o.Character.isHexDigit(this.source.charCodeAt(this.index)))return"";r=16*r+n(this.source[this.index++])}return String.fromCharCode(r)},e.prototype.scanUnicodeCodePointEscape=function(){var e=this.source[this.index],t=0;for("}"===e&&this.throwUnexpectedToken();!this.eof()&&(e=this.source[this.index++],o.Character.isHexDigit(e.charCodeAt(0)));)t=16*t+n(e);return(t>1114111||"}"!==e)&&this.throwUnexpectedToken(),o.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!o.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e=this.codePointAt(this.index),t=o.Character.fromCodePoint(e);this.index+=t.length;var r;for(92===e&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,r=this.scanUnicodeCodePointEscape()):(e=(r=this.scanHexEscape("u")).charCodeAt(0),r&&"\\"!==r&&o.Character.isIdentifierStart(e)||this.throwUnexpectedToken()),t=r);!this.eof()&&(e=this.codePointAt(this.index),o.Character.isIdentifierPart(e));)t+=r=o.Character.fromCodePoint(e),this.index+=r.length,92===e&&(t=t.substr(0,t.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,r=this.scanUnicodeCodePointEscape()):(e=(r=this.scanHexEscape("u")).charCodeAt(0),r&&"\\"!==r&&o.Character.isIdentifierPart(e)||this.throwUnexpectedToken()),t+=r);return t},e.prototype.octalToDecimal=function(e){var t="0"!==e,r=i(e);return!this.eof()&&o.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,r=8*r+i(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&o.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(r=8*r+i(this.source[this.index++]))),{code:r,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,r=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();return e=1===r.length?u.Token.Identifier:this.isKeyword(r)?u.Token.Keyword:"null"===r?u.Token.NullLiteral:"true"===r||"false"===r?u.Token.BooleanLiteral:u.Token.Identifier,{type:e,value:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e={type:u.Token.Punctuator,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index},t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(t=this.source.substr(this.index,4))?this.index+=4:"==="===(t=t.substr(0,3))||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:"&&"===(t=t.substr(0,2))||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)}return this.index===e.start&&this.throwUnexpectedToken(),e.end=this.index,e.value=t,e},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&o.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),o.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,r="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)r+=this.source[this.index++];return 0===r.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(o.Character.isIdentifierStart(t)||o.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:u.Token.NumericLiteral,value:parseInt(r,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var r="",n=!1;for(o.Character.isOctalDigit(e.charCodeAt(0))?(n=!0,r="0"+this.source[this.index++]):++this.index;!this.eof()&&o.Character.isOctalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index++];return n||0!==r.length||this.throwUnexpectedToken(),(o.Character.isIdentifierStart(this.source.charCodeAt(this.index))||o.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseInt(r,8),octal:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e<this.length;++e){var t=this.source[e];if("8"===t||"9"===t)return!1;if(!o.Character.isOctalDigit(t.charCodeAt(0)))return!0}return!0},e.prototype.scanNumericLiteral=function(){var e=this.index,t=this.source[e];s.assert(o.Character.isDecimalDigit(t.charCodeAt(0))||"."===t,"Numeric literal must start with a decimal digit or a decimal point");var r="";if("."!==t){if(r=this.source[this.index++],t=this.source[this.index],"0"===r){if("x"===t||"X"===t)return++this.index,this.scanHexLiteral(e);if("b"===t||"B"===t)return++this.index,this.scanBinaryLiteral(e);if("o"===t||"O"===t)return this.scanOctalLiteral(t,e);if(t&&o.Character.isOctalDigit(t.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(t,e)}for(;o.Character.isDecimalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index++];t=this.source[this.index]}if("."===t){for(r+=this.source[this.index++];o.Character.isDecimalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index++];t=this.source[this.index]}if("e"===t||"E"===t)if(r+=this.source[this.index++],"+"!==(t=this.source[this.index])&&"-"!==t||(r+=this.source[this.index++]),o.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;o.Character.isDecimalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index++];else this.throwUnexpectedToken();return o.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseFloat(r),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanStringLiteral=function(){var e=this.index,t=this.source[e];s.assert("'"===t||'"'===t,"String literal must starts with a quote"),++this.index;for(var r=!1,n="";!this.eof();){var i=this.source[this.index++];if(i===t){t="";break}if("\\"===i)if((i=this.source[this.index++])&&o.Character.isLineTerminator(i.charCodeAt(0)))++this.lineNumber,"\r"===i&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(i){case"u":case"x":if("{"===this.source[this.index])++this.index,n+=this.scanUnicodeCodePointEscape();else{var a=this.scanHexEscape(i);a||this.throwUnexpectedToken(),n+=a}break;case"n":n+="\n";break;case"r":n+="\r";break;case"t":n+="\t";break;case"b":n+="\b";break;case"f":n+="\f";break;case"v":n+="\v";break;case"8":case"9":n+=i,this.tolerateUnexpectedToken();break;default:if(i&&o.Character.isOctalDigit(i.charCodeAt(0))){var l=this.octalToDecimal(i);r=l.octal||r,n+=String.fromCharCode(l.code)}else n+=i}else{if(o.Character.isLineTerminator(i.charCodeAt(0)))break;n+=i}}return""!==t&&(this.index=e,this.throwUnexpectedToken()),{type:u.Token.StringLiteral,value:n,octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanTemplate=function(){var e="",t=!1,r=this.index,n="`"===this.source[r],i=!1,s=2;for(++this.index;!this.eof();){var l=this.source[this.index++];if("`"===l){s=1,i=!0,t=!0;break}if("$"===l){if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,t=!0;break}e+=l}else if("\\"===l)if(l=this.source[this.index++],o.Character.isLineTerminator(l.charCodeAt(0)))++this.lineNumber,"\r"===l&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(l){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"u":case"x":if("{"===this.source[this.index])++this.index,e+=this.scanUnicodeCodePointEscape();else{var c=this.index,p=this.scanHexEscape(l);p?e+=p:(this.index=c,e+=l)}break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:"0"===l?(o.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(a.Messages.TemplateOctalLiteral),e+="\0"):o.Character.isOctalDigit(l.charCodeAt(0))?this.throwUnexpectedToken(a.Messages.TemplateOctalLiteral):e+=l}else o.Character.isLineTerminator(l.charCodeAt(0))?(++this.lineNumber,"\r"===l&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,e+="\n"):e+=l}return t||this.throwUnexpectedToken(),n||this.curlyStack.pop(),{type:u.Token.Template,value:{cooked:e,raw:this.source.slice(r+1,this.index-s)},head:n,tail:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:r,end:this.index}},e.prototype.testRegExp=function(e,t){var r=e,n=this;t.indexOf("u")>=0&&(r=r.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,r){var i=parseInt(t||r,16);return i>1114111&&n.throwUnexpectedToken(a.Messages.InvalidRegExp),i<=65535?String.fromCharCode(i):"￿"}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"￿"));try{RegExp(r)}catch(e){this.throwUnexpectedToken(a.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];s.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],r=!1,n=!1;!this.eof();)if(e=this.source[this.index++],t+=e,"\\"===e)e=this.source[this.index++],o.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(a.Messages.UnterminatedRegExp),t+=e;else if(o.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(a.Messages.UnterminatedRegExp);else if(r)"]"===e&&(r=!1);else{if("/"===e){n=!0;break}"["===e&&(r=!0)}n||this.throwUnexpectedToken(a.Messages.UnterminatedRegExp);return{value:t.substr(1,t.length-2),literal:t}},e.prototype.scanRegExpFlags=function(){for(var e="",t="";!this.eof();){var r=this.source[this.index];if(!o.Character.isIdentifierPart(r.charCodeAt(0)))break;if(++this.index,"\\"!==r||this.eof())t+=r,e+=r;else if("u"===(r=this.source[this.index])){++this.index;var n=this.index;if(r=this.scanHexEscape("u"))for(t+=r,e+="\\u";n<this.index;++n)e+=this.source[n];else this.index=n,t+="u",e+="\\u";this.tolerateUnexpectedToken()}else e+="\\",this.tolerateUnexpectedToken()}return{value:t,literal:e}},e.prototype.scanRegExp=function(){var e=this.index,t=this.scanRegExpBody(),r=this.scanRegExpFlags(),n=this.testRegExp(t.value,r.value);return{type:u.Token.RegularExpression,value:n,literal:t.literal+r.literal,regex:{pattern:t.value,flags:r.value},lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.lex=function(){if(this.eof())return{type:u.Token.EOF,lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var e=this.source.charCodeAt(this.index);return o.Character.isIdentifierStart(e)?this.scanIdentifier():40===e||41===e||59===e?this.scanPunctuator():39===e||34===e?this.scanStringLiteral():46===e?o.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():o.Character.isDecimalDigit(e)?this.scanNumericLiteral():96===e||125===e&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():e>=55296&&e<57343&&o.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=l},function(e,t){"use strict";var r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&r.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&r.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,r){"use strict";var n=r(2),i=function(){return function(e){this.type=n.Syntax.ArrayExpression,this.elements=e}}();t.ArrayExpression=i;var s=function(){return function(e){this.type=n.Syntax.ArrayPattern,this.elements=e}}();t.ArrayPattern=s;var a=function(){return function(e,t,r){this.type=n.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=r}}();t.ArrowFunctionExpression=a;var o=function(){return function(e,t,r){this.type=n.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=r}}();t.AssignmentExpression=o;var u=function(){return function(e,t){this.type=n.Syntax.AssignmentPattern,this.left=e,this.right=t}}();t.AssignmentPattern=u;var l=function(){return function(e,t,r){var i="||"===e||"&&"===e;this.type=i?n.Syntax.LogicalExpression:n.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=r}}();t.BinaryExpression=l;var c=function(){return function(e){this.type=n.Syntax.BlockStatement,this.body=e}}();t.BlockStatement=c;var p=function(){return function(e){this.type=n.Syntax.BreakStatement,this.label=e}}();t.BreakStatement=p;var h=function(){return function(e,t){this.type=n.Syntax.CallExpression,this.callee=e,this.arguments=t}}();t.CallExpression=h;var f=function(){return function(e,t){this.type=n.Syntax.CatchClause,this.param=e,this.body=t}}();t.CatchClause=f;var d=function(){return function(e){this.type=n.Syntax.ClassBody,this.body=e}}();t.ClassBody=d;var m=function(){return function(e,t,r){this.type=n.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=r}}();t.ClassDeclaration=m;var y=function(){return function(e,t,r){this.type=n.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=r}}();t.ClassExpression=y;var g=function(){return function(e,t){this.type=n.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t}}();t.ComputedMemberExpression=g;var b=function(){return function(e,t,r){this.type=n.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=r}}();t.ConditionalExpression=b;var v=function(){return function(e){this.type=n.Syntax.ContinueStatement,this.label=e}}();t.ContinueStatement=v;var x=function(){return function(){this.type=n.Syntax.DebuggerStatement}}();t.DebuggerStatement=x;var E=function(){return function(e,t){this.type=n.Syntax.ExpressionStatement,this.expression=e,this.directive=t}}();t.Directive=E;var A=function(){return function(e,t){this.type=n.Syntax.DoWhileStatement,this.body=e,this.test=t}}();t.DoWhileStatement=A;var D=function(){return function(){this.type=n.Syntax.EmptyStatement}}();t.EmptyStatement=D;var S=function(){return function(e){this.type=n.Syntax.ExportAllDeclaration,this.source=e}}();t.ExportAllDeclaration=S;var C=function(){return function(e){this.type=n.Syntax.ExportDefaultDeclaration,this.declaration=e}}();t.ExportDefaultDeclaration=C;var _=function(){return function(e,t,r){this.type=n.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=r}}();t.ExportNamedDeclaration=_;var w=function(){return function(e,t){this.type=n.Syntax.ExportSpecifier,this.exported=t,this.local=e}}();t.ExportSpecifier=w;var k=function(){return function(e){this.type=n.Syntax.ExpressionStatement,this.expression=e}}();t.ExpressionStatement=k;var F=function(){return function(e,t,r){this.type=n.Syntax.ForInStatement,this.left=e,this.right=t,this.body=r,this.each=!1}}();t.ForInStatement=F;var T=function(){return function(e,t,r){this.type=n.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=r}}();t.ForOfStatement=T;var P=function(){return function(e,t,r,i){this.type=n.Syntax.ForStatement,this.init=e,this.test=t,this.update=r,this.body=i}}();t.ForStatement=P;var B=function(){return function(e,t,r,i){this.type=n.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=r,this.generator=i,this.expression=!1}}();t.FunctionDeclaration=B;var O=function(){return function(e,t,r,i){this.type=n.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=r,this.generator=i,this.expression=!1}}();t.FunctionExpression=O;var N=function(){return function(e){this.type=n.Syntax.Identifier,this.name=e}}();t.Identifier=N;var j=function(){return function(e,t,r){this.type=n.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=r}}();t.IfStatement=j;var I=function(){return function(e,t){this.type=n.Syntax.ImportDeclaration,this.specifiers=e,this.source=t}}();t.ImportDeclaration=I;var L=function(){return function(e){this.type=n.Syntax.ImportDefaultSpecifier,this.local=e}}();t.ImportDefaultSpecifier=L;var M=function(){return function(e){this.type=n.Syntax.ImportNamespaceSpecifier,this.local=e}}();t.ImportNamespaceSpecifier=M;var R=function(){return function(e,t){this.type=n.Syntax.ImportSpecifier,this.local=e,this.imported=t}}();t.ImportSpecifier=R;var V=function(){return function(e,t){this.type=n.Syntax.LabeledStatement,this.label=e,this.body=t}}();t.LabeledStatement=V;var U=function(){return function(e,t){this.type=n.Syntax.Literal,this.value=e,this.raw=t}}();t.Literal=U;var q=function(){return function(e,t){this.type=n.Syntax.MetaProperty,this.meta=e,this.property=t}}();t.MetaProperty=q;var G=function(){return function(e,t,r,i,s){this.type=n.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=r,this.kind=i,this.static=s}}();t.MethodDefinition=G;var X=function(){return function(e,t){this.type=n.Syntax.NewExpression,this.callee=e,this.arguments=t}}();t.NewExpression=X;var J=function(){return function(e){this.type=n.Syntax.ObjectExpression,this.properties=e}}();t.ObjectExpression=J;var W=function(){return function(e){this.type=n.Syntax.ObjectPattern,this.properties=e}}();t.ObjectPattern=W;var K=function(){return function(e,t){this.type=n.Syntax.Program,this.body=e,this.sourceType=t}}();t.Program=K;var z=function(){return function(e,t,r,i,s,a){this.type=n.Syntax.Property,this.key=t,this.computed=r,this.value=i,this.kind=e,this.method=s,this.shorthand=a}}();t.Property=z;var Y=function(){return function(e,t,r){this.type=n.Syntax.Literal,this.value=e,this.raw=t,this.regex=r}}();t.RegexLiteral=Y;var H=function(){return function(e){this.type=n.Syntax.RestElement,this.argument=e}}();t.RestElement=H;var $=function(){return function(e){this.type=n.Syntax.ReturnStatement,this.argument=e}}();t.ReturnStatement=$;var Q=function(){return function(e){this.type=n.Syntax.SequenceExpression,this.expressions=e}}();t.SequenceExpression=Q;var Z=function(){return function(e){this.type=n.Syntax.SpreadElement,this.argument=e}}();t.SpreadElement=Z;var ee=function(){return function(e,t){this.type=n.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t}}();t.StaticMemberExpression=ee;var te=function(){return function(){this.type=n.Syntax.Super}}();t.Super=te;var re=function(){return function(e,t){this.type=n.Syntax.SwitchCase,this.test=e,this.consequent=t}}();t.SwitchCase=re;var ne=function(){return function(e,t){this.type=n.Syntax.SwitchStatement,this.discriminant=e,this.cases=t}}();t.SwitchStatement=ne;var ie=function(){return function(e,t){this.type=n.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t}}();t.TaggedTemplateExpression=ie;var se=function(){return function(e,t){this.type=n.Syntax.TemplateElement,this.value=e,this.tail=t}}();t.TemplateElement=se;var ae=function(){return function(e,t){this.type=n.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t}}();t.TemplateLiteral=ae;var oe=function(){return function(){this.type=n.Syntax.ThisExpression}}();t.ThisExpression=oe;var ue=function(){return function(e){this.type=n.Syntax.ThrowStatement,this.argument=e}}();t.ThrowStatement=ue;var le=function(){return function(e,t,r){this.type=n.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=r}}();t.TryStatement=le;var ce=function(){return function(e,t){this.type=n.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0}}();t.UnaryExpression=ce;var pe=function(){return function(e,t,r){this.type=n.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=r}}();t.UpdateExpression=pe;var he=function(){return function(e,t){this.type=n.Syntax.VariableDeclaration,this.declarations=e,this.kind=t}}();t.VariableDeclaration=he;var fe=function(){return function(e,t){this.type=n.Syntax.VariableDeclarator,this.id=e,this.init=t}}();t.VariableDeclarator=fe;var de=function(){return function(e,t){this.type=n.Syntax.WhileStatement,this.test=e,this.body=t}}();t.WhileStatement=de;var me=function(){return function(e,t){this.type=n.Syntax.WithStatement,this.object=e,this.body=t}}();t.WithStatement=me;var ye=function(){return function(e,t){this.type=n.Syntax.YieldExpression,this.argument=e,this.delegate=t}}();t.YieldExpression=ye},function(e,t,r){"use strict";function n(e){var t;switch(e.type){case c.JSXSyntax.JSXIdentifier:t=e.name;break;case c.JSXSyntax.JSXNamespacedName:var r=e;t=n(r.namespace)+":"+n(r.name);break;case c.JSXSyntax.JSXMemberExpression:var i=e;t=n(i.object)+"."+n(i.property)}return t}var i,s=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},a=r(9),o=r(7),u=r(3),l=r(12),c=r(13),p=r(10),h=r(14);!function(e){e[e.Identifier=100]="Identifier",e[e.Text=101]="Text"}(i||(i={})),o.TokenName[i.Identifier]="JSXIdentifier",o.TokenName[i.Text]="JSXText";var f=function(e){function t(t,r,n){e.call(this,t,r,n)}return s(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.lineNumber,this.scanner.lineStart=this.startMarker.lineStart},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",r=!0,n=!1,i=!1,s=!1;!this.scanner.eof()&&r&&!n;){var o=this.scanner.source[this.scanner.index];if(o===e)break;if(n=";"===o,t+=o,++this.scanner.index,!n)switch(t.length){case 2:i="#"===o;break;case 3:i&&(r=(s="x"===o)||a.Character.isDecimalDigit(o.charCodeAt(0)),i=i&&!s);break;default:r=(r=r&&!(i&&!a.Character.isDecimalDigit(o.charCodeAt(0))))&&!(s&&!a.Character.isHexDigit(o.charCodeAt(0)))}}if(r&&n&&t.length>2){var u=t.substr(1,t.length-2);i&&u.length>1?t=String.fromCharCode(parseInt(u.substr(1),10)):s&&u.length>2?t=String.fromCharCode(parseInt("0"+u.substr(1),16)):i||s||!l.XHTMLEntities[u]||(t=l.XHTMLEntities[u])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e){var t=this.scanner.source[this.scanner.index++];return{type:o.Token.Punctuator,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(34===e||39===e){for(var r=this.scanner.index,n=this.scanner.source[this.scanner.index++],s="";!this.scanner.eof();){if((c=this.scanner.source[this.scanner.index++])===n)break;s+="&"===c?this.scanXHTMLEntity(n):c}return{type:o.Token.StringLiteral,value:s,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(46===e){var u=this.scanner.source.charCodeAt(this.scanner.index+1),l=this.scanner.source.charCodeAt(this.scanner.index+2);t=46===u&&46===l?"...":".",r=this.scanner.index;return this.scanner.index+=t.length,{type:o.Token.Punctuator,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(96===e)return{type:o.Token.Template,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(a.Character.isIdentifierStart(e)&&92!==e){r=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var c=this.scanner.source.charCodeAt(this.scanner.index);if(a.Character.isIdentifierPart(c)&&92!==c)++this.scanner.index;else{if(45!==c)break;++this.scanner.index}}var p=this.scanner.source.slice(r,this.scanner.index);return{type:i.Identifier,value:p,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}this.scanner.throwUnexpectedToken()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var r=this.scanner.source[this.scanner.index];if("{"===r||"<"===r)break;++this.scanner.index,t+=r,a.Character.isLineTerminator(r.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===r&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart;var n={type:i.Text,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(n)),n},t.prototype.peekJSXToken=function(){var e=this.scanner.index,t=this.scanner.lineNumber,r=this.scanner.lineStart;this.scanner.scanComments();var n=this.lexJSX();return this.scanner.index=e,this.scanner.lineNumber=t,this.scanner.lineStart=r,n},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();t.type===o.Token.Punctuator&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return t.type===o.Token.Punctuator&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return t.type!==i.Identifier&&this.throwUnexpectedToken(t),this.finalize(e,new h.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=t;this.expectJSX(":");var n=this.parseJSXIdentifier();t=this.finalize(e,new h.JSXNamespacedName(r,n))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var i=t;this.expectJSX(".");var s=this.parseJSXIdentifier();t=this.finalize(e,new h.JSXMemberExpression(i,s))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),r=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=r;this.expectJSX(":");var i=this.parseJSXIdentifier();e=this.finalize(t,new h.JSXNamespacedName(n,i))}else e=r;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();t.type!==o.Token.StringLiteral&&this.throwUnexpectedToken(t);var r=this.getTokenRaw(t);return this.finalize(e,new p.Literal(t.value,r))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new h.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),r=null;return this.matchJSX("=")&&(this.expectJSX("="),r=this.parseJSXAttributeValue()),this.finalize(e,new h.JSXAttribute(t,r))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new h.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),r=this.parseJSXAttributes(),n=this.matchJSX("/");return n&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new h.JSXOpeningElement(t,n,r))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new h.JSXClosingElement(t))}var r=this.parseJSXElementName(),n=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new h.JSXOpeningElement(r,i,n))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.finalize(e,new h.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e=this.createJSXNode();this.expectJSX("{");var t;return this.matchJSX("}")?(t=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),t=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(e,new h.JSXExpressionContainer(t))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),r=this.nextJSXText();if(r.start<r.end){var n=this.getTokenRaw(r),i=this.finalize(t,new h.JSXText(r.value,n));e.push(i)}if("{"!==this.scanner.source[this.scanner.index])break;var s=this.parseJSXExpressionContainer();e.push(s)}return e},t.prototype.parseComplexJSXElement=function(e){for(var t=[];!this.scanner.eof();){e.children=e.children.concat(this.parseJSXChildren());var r=this.createJSXChildNode(),i=this.parseJSXBoundaryElement();if(i.type===c.JSXSyntax.JSXOpeningElement){var s=i;if(s.selfClosing){var a=this.finalize(r,new h.JSXElement(s,[],null));e.children.push(a)}else t.push(e),e={node:r,opening:s,closing:null,children:[]}}if(i.type===c.JSXSyntax.JSXClosingElement){e.closing=i;var o=n(e.opening.name);if(o!==n(e.closing.name)&&this.tolerateError("Expected corresponding JSX closing tag for %0",o),!(t.length>0))break;a=this.finalize(e.node,new h.JSXElement(e.opening,e.children,e.closing));(e=t.pop()).children.push(a)}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),r=[],n=null;if(!t.selfClosing){var i=this.parseComplexJSXElement({node:e,opening:t,closing:n,children:r});r=i.children,n=i.closing}return this.finalize(e,new h.JSXElement(t,r,n))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t}(u.Parser);t.JSXParser=f},function(e,t){"use strict";t.XHTMLEntities={quot:'"',amp:"&",apos:"'",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:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t){"use strict";t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,r){"use strict";var n=r(13),i=function(){return function(e){this.type=n.JSXSyntax.JSXClosingElement,this.name=e}}();t.JSXClosingElement=i;var s=function(){return function(e,t,r){this.type=n.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=r}}();t.JSXElement=s;var a=function(){return function(){this.type=n.JSXSyntax.JSXEmptyExpression}}();t.JSXEmptyExpression=a;var o=function(){return function(e){this.type=n.JSXSyntax.JSXExpressionContainer,this.expression=e}}();t.JSXExpressionContainer=o;var u=function(){return function(e){this.type=n.JSXSyntax.JSXIdentifier,this.name=e}}();t.JSXIdentifier=u;var l=function(){return function(e,t){this.type=n.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t}}();t.JSXMemberExpression=l;var c=function(){return function(e,t){this.type=n.JSXSyntax.JSXAttribute,this.name=e,this.value=t}}();t.JSXAttribute=c;var p=function(){return function(e,t){this.type=n.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t}}();t.JSXNamespacedName=p;var h=function(){return function(e,t,r){this.type=n.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=r}}();t.JSXOpeningElement=h;var f=function(){return function(e){this.type=n.JSXSyntax.JSXSpreadAttribute,this.argument=e}}();t.JSXSpreadAttribute=f;var d=function(){return function(e,t){this.type=n.JSXSyntax.JSXText,this.value=e,this.raw=t}}();t.JSXText=d},function(e,t,r){"use strict";var n=r(8),i=r(6),s=r(7),a=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var r=this.values[this.paren-1];t="if"===r||"while"===r||"for"===r||"with"===r;break;case"}":if(t=!1,"function"===this.values[this.curly-3]){var n=this.values[this.curly-4];t=!!n&&!this.beforeFunctionExpression(n)}else if("function"===this.values[this.curly-4]){var i=this.values[this.curly-5];t=!i||!this.beforeFunctionExpression(i)}}return t},e.prototype.push=function(e){e.type===s.Token.Punctuator||e.type===s.Token.Keyword?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),o=function(){function e(e,t){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=!!t&&("boolean"==typeof t.tolerant&&t.tolerant),this.scanner=new n.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&("boolean"==typeof t.comment&&t.comment),this.trackRange=!!t&&("boolean"==typeof t.range&&t.range),this.trackLoc=!!t&&("boolean"==typeof t.loc&&t.loc),this.buffer=[],this.reader=new a}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;t<e.length;++t){var r=e[t],n=void 0,i=this.scanner.source.slice(r.slice[0],r.slice[1]);n={type:r.multiLine?"BlockComment":"LineComment",value:i},this.trackRange&&(n.range=r.range),this.trackLoc&&(n.loc=r.loc),this.buffer.push(n)}if(!this.scanner.eof()){var a=void 0;this.trackLoc&&(a={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var o=void 0;o="/"===this.scanner.source[this.scanner.index]?this.reader.isRegexStart()?this.scanner.scanRegExp():this.scanner.scanPunctuator():this.scanner.lex(),this.reader.push(o);var u=void 0;u={type:s.TokenName[o.type],value:this.scanner.source.slice(o.start,o.end)},this.trackRange&&(u.range=[o.start,o.end]),this.trackLoc&&(a.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},u.loc=a),o.regex&&(u.regex=o.regex),this.buffer.push(u)}}return this.buffer.shift()},e}();t.Tokenizer=o}])})},{}],576:[function(e,t,r){arguments[4][62][0].apply(r,arguments)},{"./util":585,dup:62}],577:[function(e,t,r){arguments[4][63][0].apply(r,arguments)},{"./base64":578,dup:63}],578:[function(e,t,r){arguments[4][64][0].apply(r,arguments)},{dup:64}],579:[function(e,t,r){arguments[4][65][0].apply(r,arguments)},{dup:65}],580:[function(e,t,r){arguments[4][66][0].apply(r,arguments)},{"./util":585,dup:66}],581:[function(e,t,r){arguments[4][67][0].apply(r,arguments)},{dup:67}],582:[function(e,t,r){arguments[4][68][0].apply(r,arguments)},{"./array-set":576,"./base64-vlq":577,"./binary-search":579,"./quick-sort":581,"./util":585,dup:68}],583:[function(e,t,r){arguments[4][69][0].apply(r,arguments)},{"./array-set":576,"./base64-vlq":577,"./mapping-list":580,"./util":585,dup:69}],584:[function(e,t,r){arguments[4][70][0].apply(r,arguments)},{"./source-map-generator":583,"./util":585,dup:70}],585:[function(e,t,r){arguments[4][71][0].apply(r,arguments)},{dup:71}],586:[function(e,t,r){arguments[4][72][0].apply(r,arguments)},{"./lib/source-map-consumer":582,"./lib/source-map-generator":583,"./lib/source-node":584,dup:72}],587:[function(e,t,r){t.exports={plugins:[e("babel-plugin-syntax-async-functions"),e("babel-plugin-syntax-async-generators"),e("babel-plugin-transform-es2015-classes"),e("babel-plugin-transform-es2015-arrow-functions"),e("babel-plugin-transform-es2015-block-scoping"),e("babel-plugin-transform-es2015-for-of"),e("regenerator-transform").default]}},{"babel-plugin-syntax-async-functions":111,"babel-plugin-syntax-async-generators":112,"babel-plugin-transform-es2015-arrow-functions":113,"babel-plugin-transform-es2015-block-scoping":114,"babel-plugin-transform-es2015-classes":116,"babel-plugin-transform-es2015-for-of":119,"regenerator-transform":593}],588:[function(e,t,r){(function(t){r.path=e("path").join(t,"runtime.js")}).call(this,"/node_modules/regenerator-runtime")},{path:546}],589:[function(e,t,r){var n=function(){return this}()||Function("return this")(),i=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,s=i&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=e("./runtime"),i)n.regeneratorRuntime=s;else try{delete n.regeneratorRuntime}catch(e){n.regeneratorRuntime=void 0}},{"./runtime":590}],590:[function(e,t,r){!function(e){"use strict";function r(e,t,r,s){var a=t&&t.prototype instanceof i?t:i,o=Object.create(a.prototype),u=new h(s||[]);return o._invoke=function(e,t,r){var i=S;return function(s,a){if(i===_)throw new Error("Generator is already running");if(i===w){if("throw"===s)throw a;return d()}for(r.method=s,r.arg=a;;){var o=r.delegate;if(o){var u=l(o,r);if(u){if(u===k)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===S)throw i=w,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=_;var c=n(e,t,r);if("normal"===c.type){if(i=r.done?w:C,c.arg===k)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=w,r.method="throw",r.arg=c.arg)}}}(e,r,u),o}function n(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function i(){}function s(){}function a(){}function o(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function u(e){function t(r,i,s,a){var o=n(e[r],e,i);if("throw"!==o.type){var u=o.arg,l=u.value;return l&&"object"==typeof l&&g.call(l,"__await")?Promise.resolve(l.__await).then(function(e){t("next",e,s,a)},function(e){t("throw",e,s,a)}):Promise.resolve(l).then(function(e){u.value=e,s(u)},a)}a(o.arg)}var r;this._invoke=function(e,n){function i(){return new Promise(function(r,i){t(e,n,r,i)})}return r=r?r.then(i,i):i()}}function l(e,t){var r=e.iterator[t.method];if(r===m){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=m,l(e,t),"throw"===t.method))return k;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return k}var i=n(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,k;var s=i.arg;return s?s.done?(t[e.resultName]=s.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=m),t.delegate=null,k):s:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,k)}function c(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 p(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function h(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(c,this),this.reset(!0)}function f(e){if(e){var t=e[v];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(g.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=m,t.done=!0,t};return n.next=n}}return{next:d}}function d(){return{value:m,done:!0}}var m,y=Object.prototype,g=y.hasOwnProperty,b="function"==typeof Symbol?Symbol:{},v=b.iterator||"@@iterator",x=b.asyncIterator||"@@asyncIterator",E=b.toStringTag||"@@toStringTag",A="object"==typeof t,D=e.regeneratorRuntime;if(D)A&&(t.exports=D);else{(D=e.regeneratorRuntime=A?t.exports:{}).wrap=r;var S="suspendedStart",C="suspendedYield",_="executing",w="completed",k={},F={};F[v]=function(){return this};var T=Object.getPrototypeOf,P=T&&T(T(f([])));P&&P!==y&&g.call(P,v)&&(F=P);var B=a.prototype=i.prototype=Object.create(F);s.prototype=B.constructor=a,a.constructor=s,a[E]=s.displayName="GeneratorFunction",D.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===s||"GeneratorFunction"===(t.displayName||t.name))},D.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,a):(e.__proto__=a,E in e||(e[E]="GeneratorFunction")),e.prototype=Object.create(B),e},D.awrap=function(e){return{__await:e}},o(u.prototype),u.prototype[x]=function(){return this},D.AsyncIterator=u,D.async=function(e,t,n,i){var s=new u(r(e,t,n,i));return D.isGeneratorFunction(t)?s:s.next().then(function(e){return e.done?e.value:s.next()})},o(B),B[E]="Generator",B[v]=function(){return this},B.toString=function(){return"[object Generator]"},D.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},D.values=f,h.prototype={constructor:h,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=m,this.done=!1,this.delegate=null,this.method="next",this.arg=m,this.tryEntries.forEach(p),!e)for(var t in this)"t"===t.charAt(0)&&g.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=m)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){function t(t,n){return s.type="throw",s.arg=e,r.next=t,n&&(r.method="next",r.arg=m),!!n}if(this.done)throw e;for(var r=this,n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],s=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=g.call(i,"catchLoc"),o=g.call(i,"finallyLoc");if(a&&o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!o)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&g.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=e,s.arg=t,i?(this.method="next",this.next=i.finallyLoc,k):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),k},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),p(r),k}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;p(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:f(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=m),k}}}}(function(){return this}()||Function("return this")())},{}],591:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){o.default.ok(this instanceof i),c.getTypes().assertIdentifier(e),this.nextTempId=0,this.contextId=e,this.listing=[],this.marked=[!0],this.finalLoc=s(),this.tryEntries=[],this.leapManager=new u.LeapManager(this)}function s(){return c.getTypes().numericLiteral(-1)}function a(e){return new Error("all declarations should have been transformed into assignments before the Exploder began its work: "+JSON.stringify(e))}var o=function(e){return e&&e.__esModule?e:{default:e}}(e("assert")),u=n(e("./leap")),l=n(e("./meta")),c=n(e("./util")),p=Object.prototype.hasOwnProperty,h=i.prototype;r.Emitter=i,h.mark=function(e){c.getTypes().assertLiteral(e);var t=this.listing.length;return-1===e.value?e.value=t:o.default.strictEqual(e.value,t),this.marked[t]=!0,e},h.emit=function(e){var t=c.getTypes();t.isExpression(e)&&(e=t.expressionStatement(e)),t.assertStatement(e),this.listing.push(e)},h.emitAssign=function(e,t){return this.emit(this.assign(e,t)),e},h.assign=function(e,t){var r=c.getTypes();return r.expressionStatement(r.assignmentExpression("=",e,t))},h.contextProperty=function(e,t){var r=c.getTypes();return r.memberExpression(this.contextId,t?r.stringLiteral(e):r.identifier(e),!!t)},h.stop=function(e){e&&this.setReturnValue(e),this.jump(this.finalLoc)},h.setReturnValue=function(e){c.getTypes().assertExpression(e.value),this.emitAssign(this.contextProperty("rval"),this.explodeExpression(e))},h.clearPendingException=function(e,t){var r=c.getTypes();r.assertLiteral(e);var n=r.callExpression(this.contextProperty("catch",!0),[e]);t?this.emitAssign(t,n):this.emit(n)},h.jump=function(e){this.emitAssign(this.contextProperty("next"),e),this.emit(c.getTypes().breakStatement())},h.jumpIf=function(e,t){var r=c.getTypes();r.assertExpression(e),r.assertLiteral(t),this.emit(r.ifStatement(e,r.blockStatement([this.assign(this.contextProperty("next"),t),r.breakStatement()])))},h.jumpIfNot=function(e,t){var r=c.getTypes();r.assertExpression(e),r.assertLiteral(t);var n=void 0;n=r.isUnaryExpression(e)&&"!"===e.operator?e.argument:r.unaryExpression("!",e),this.emit(r.ifStatement(n,r.blockStatement([this.assign(this.contextProperty("next"),t),r.breakStatement()])))},h.makeTempVar=function(){return this.contextProperty("t"+this.nextTempId++)},h.getContextFunction=function(e){var t=c.getTypes();return t.functionExpression(e||null,[this.contextId],t.blockStatement([this.getDispatchLoop()]),!1,!1)},h.getDispatchLoop=function(){var e=this,t=c.getTypes(),r=[],n=void 0,i=!1;return e.listing.forEach(function(s,a){e.marked.hasOwnProperty(a)&&(r.push(t.switchCase(t.numericLiteral(a),n=[])),i=!1),i||(n.push(s),t.isCompletionStatement(s)&&(i=!0))}),this.finalLoc.value=this.listing.length,r.push(t.switchCase(this.finalLoc,[]),t.switchCase(t.stringLiteral("end"),[t.returnStatement(t.callExpression(this.contextProperty("stop"),[]))])),t.whileStatement(t.numericLiteral(1),t.switchStatement(t.assignmentExpression("=",this.contextProperty("prev"),this.contextProperty("next")),r))},h.getTryLocsList=function(){if(0===this.tryEntries.length)return null;var e=c.getTypes(),t=0;return e.arrayExpression(this.tryEntries.map(function(r){var n=r.firstLoc.value;o.default.ok(n>=t,"try entries out of order"),t=n;var i=r.catchEntry,s=r.finallyEntry,a=[r.firstLoc,i?i.firstLoc:null];return s&&(a[2]=s.firstLoc,a[3]=s.afterLoc),e.arrayExpression(a)}))},h.explode=function(e,t){var r=c.getTypes(),n=e.node;if(r.assertNode(n),r.isDeclaration(n))throw a(n);if(r.isStatement(n))return this.explodeStatement(e);if(r.isExpression(n))return this.explodeExpression(e,t);switch(n.type){case"Program":return e.get("body").map(this.explodeStatement,this);case"VariableDeclarator":throw a(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))}},h.explodeStatement=function(e,t){var r=c.getTypes(),n=e.node,i=this,a=void 0,p=void 0,h=void 0;if(r.assertStatement(n),t?r.assertIdentifier(t):t=null,r.isBlockStatement(n))e.get("body").forEach(function(e){i.explodeStatement(e)});else if(l.containsLeap(n))switch(n.type){case"ExpressionStatement":i.explodeExpression(e.get("expression"),!0);break;case"LabeledStatement":p=s(),i.leapManager.withEntry(new u.LabeledEntry(p,n.label),function(){i.explodeStatement(e.get("body"),n.label)}),i.mark(p);break;case"WhileStatement":a=s(),p=s(),i.mark(a),i.jumpIfNot(i.explodeExpression(e.get("test")),p),i.leapManager.withEntry(new u.LoopEntry(p,a,t),function(){i.explodeStatement(e.get("body"))}),i.jump(a),i.mark(p);break;case"DoWhileStatement":var d=s(),m=s();p=s(),i.mark(d),i.leapManager.withEntry(new u.LoopEntry(p,m,t),function(){i.explode(e.get("body"))}),i.mark(m),i.jumpIf(i.explodeExpression(e.get("test")),d),i.mark(p);break;case"ForStatement":h=s();var y=s();p=s(),n.init&&i.explode(e.get("init"),!0),i.mark(h),n.test&&i.jumpIfNot(i.explodeExpression(e.get("test")),p),i.leapManager.withEntry(new u.LoopEntry(p,y,t),function(){i.explodeStatement(e.get("body"))}),i.mark(y),n.update&&i.explode(e.get("update"),!0),i.jump(h),i.mark(p);break;case"TypeCastExpression":return i.explodeExpression(e.get("expression"));case"ForInStatement":h=s(),p=s();var g=i.makeTempVar();i.emitAssign(g,r.callExpression(c.runtimeProperty("keys"),[i.explodeExpression(e.get("right"))])),i.mark(h);var b=i.makeTempVar();i.jumpIf(r.memberExpression(r.assignmentExpression("=",b,r.callExpression(g,[])),r.identifier("done"),!1),p),i.emitAssign(n.left,r.memberExpression(b,r.identifier("value"),!1)),i.leapManager.withEntry(new u.LoopEntry(p,h,t),function(){i.explodeStatement(e.get("body"))}),i.jump(h),i.mark(p);break;case"BreakStatement":i.emitAbruptCompletion({type:"break",target:i.leapManager.getBreakLoc(n.label)});break;case"ContinueStatement":i.emitAbruptCompletion({type:"continue",target:i.leapManager.getContinueLoc(n.label)});break;case"SwitchStatement":var v=i.emitAssign(i.makeTempVar(),i.explodeExpression(e.get("discriminant")));p=s();for(var x=s(),E=x,A=[],D=n.cases||[],S=D.length-1;S>=0;--S){var C=D[S];r.assertSwitchCase(C),C.test?E=r.conditionalExpression(r.binaryExpression("===",v,C.test),A[S]=s(),E):A[S]=x}var _=e.get("discriminant");c.replaceWithOrRemove(_,E),i.jump(i.explodeExpression(_)),i.leapManager.withEntry(new u.SwitchEntry(p),function(){e.get("cases").forEach(function(e){var t=e.key;i.mark(A[t]),e.get("consequent").forEach(function(e){i.explodeStatement(e)})})}),i.mark(p),-1===x.value&&(i.mark(x),o.default.strictEqual(p.value,x.value));break;case"IfStatement":var w=n.alternate&&s();p=s(),i.jumpIfNot(i.explodeExpression(e.get("test")),w||p),i.explodeStatement(e.get("consequent")),w&&(i.jump(p),i.mark(w),i.explodeStatement(e.get("alternate"))),i.mark(p);break;case"ReturnStatement":i.emitAbruptCompletion({type:"return",value:i.explodeExpression(e.get("argument"))});break;case"WithStatement":throw new Error("WithStatement not supported in generator functions.");case"TryStatement":p=s();var k=n.handler,F=k&&s(),T=F&&new u.CatchEntry(F,k.param),P=n.finalizer&&s(),B=P&&new u.FinallyEntry(P,p),O=new u.TryEntry(i.getUnmarkedCurrentLoc(),T,B);i.tryEntries.push(O),i.updateContextPrevLoc(O.firstLoc),i.leapManager.withEntry(O,function(){if(i.explodeStatement(e.get("block")),F){P?i.jump(P):i.jump(p),i.updateContextPrevLoc(i.mark(F));var t=e.get("handler.body"),n=i.makeTempVar();i.clearPendingException(O.firstLoc,n),t.traverse(f,{safeParam:n,catchParamName:k.param.name}),i.leapManager.withEntry(T,function(){i.explodeStatement(t)})}P&&(i.updateContextPrevLoc(i.mark(P)),i.leapManager.withEntry(B,function(){i.explodeStatement(e.get("finalizer"))}),i.emit(r.returnStatement(r.callExpression(i.contextProperty("finish"),[B.firstLoc]))))}),i.mark(p);break;case"ThrowStatement":i.emit(r.throwStatement(i.explodeExpression(e.get("argument"))));break;default:throw new Error("unknown Statement of type "+JSON.stringify(n.type))}else i.emit(n)};var f={Identifier:function(e,t){e.node.name===t.catchParamName&&c.isReference(e)&&c.replaceWithOrRemove(e,t.safeParam)},Scope:function(e,t){e.scope.hasOwnBinding(t.catchParamName)&&e.skip()}};h.emitAbruptCompletion=function(e){(function(e){var t=e.type;return"normal"===t?!p.call(e,"target"):"break"===t||"continue"===t?!p.call(e,"value")&&c.getTypes().isLiteral(e.target):("return"===t||"throw"===t)&&p.call(e,"value")&&!p.call(e,"target")})(e)||o.default.ok(!1,"invalid completion record: "+JSON.stringify(e)),o.default.notStrictEqual(e.type,"normal","normal completions are not abrupt");var t=c.getTypes(),r=[t.stringLiteral(e.type)];"break"===e.type||"continue"===e.type?(t.assertLiteral(e.target),r[1]=e.target):"return"!==e.type&&"throw"!==e.type||e.value&&(t.assertExpression(e.value),r[1]=e.value),this.emit(t.returnStatement(t.callExpression(this.contextProperty("abrupt"),r)))},h.getUnmarkedCurrentLoc=function(){return c.getTypes().numericLiteral(this.listing.length)},h.updateContextPrevLoc=function(e){e?(c.getTypes().assertLiteral(e),-1===e.value?e.value=this.listing.length:o.default.strictEqual(e.value,this.listing.length)):e=this.getUnmarkedCurrentLoc(),this.emitAssign(this.contextProperty("prev"),e)},h.explodeExpression=function(e,t){function r(e){if(i.assertExpression(e),!t)return e;u.emit(e)}function n(e,t,r){o.default.ok(!r||!e,"Ignoring the result of a child expression but forcing it to be assigned to a temporary variable?");var n=u.explodeExpression(t,r);return r||(e||f&&!i.isLiteral(n))&&(n=u.emitAssign(e||u.makeTempVar(),n)),n}var i=c.getTypes(),a=e.node;if(!a)return a;i.assertExpression(a);var u=this,p=void 0,h=void 0;if(!l.containsLeap(a))return r(a);var f=l.containsLeap.onlyChildren(a);switch(a.type){case"MemberExpression":return r(i.memberExpression(u.explodeExpression(e.get("object")),a.computed?n(null,e.get("property")):a.property,a.computed));case"CallExpression":var d=e.get("callee"),m=e.get("arguments"),y=void 0,g=[],b=!1;if(m.forEach(function(e){b=b||l.containsLeap(e.node)}),i.isMemberExpression(d.node))if(b){var v=n(u.makeTempVar(),d.get("object")),x=d.node.computed?n(null,d.get("property")):d.node.property;g.unshift(v),y=i.memberExpression(i.memberExpression(v,x,d.node.computed),i.identifier("call"),!1)}else y=u.explodeExpression(d);else y=n(null,d),i.isMemberExpression(y)&&(y=i.sequenceExpression([i.numericLiteral(0),y]));return m.forEach(function(e){g.push(n(null,e))}),r(i.callExpression(y,g));case"NewExpression":return r(i.newExpression(n(null,e.get("callee")),e.get("arguments").map(function(e){return n(null,e)})));case"ObjectExpression":return r(i.objectExpression(e.get("properties").map(function(e){return e.isObjectProperty()?i.objectProperty(e.node.key,n(null,e.get("value")),e.node.computed):e.node})));case"ArrayExpression":return r(i.arrayExpression(e.get("elements").map(function(e){return n(null,e)})));case"SequenceExpression":var E=a.expressions.length-1;return e.get("expressions").forEach(function(e){e.key===E?p=u.explodeExpression(e,t):u.explodeExpression(e,!0)}),p;case"LogicalExpression":h=s(),t||(p=u.makeTempVar());var A=n(p,e.get("left"));return"&&"===a.operator?u.jumpIfNot(A,h):(o.default.strictEqual(a.operator,"||"),u.jumpIf(A,h)),n(p,e.get("right"),t),u.mark(h),p;case"ConditionalExpression":var D=s();h=s();var S=u.explodeExpression(e.get("test"));return u.jumpIfNot(S,D),t||(p=u.makeTempVar()),n(p,e.get("consequent"),t),u.jump(h),u.mark(D),n(p,e.get("alternate"),t),u.mark(h),p;case"UnaryExpression":return r(i.unaryExpression(a.operator,u.explodeExpression(e.get("argument")),!!a.prefix));case"BinaryExpression":return r(i.binaryExpression(a.operator,n(null,e.get("left")),n(null,e.get("right"))));case"AssignmentExpression":return r(i.assignmentExpression(a.operator,u.explodeExpression(e.get("left")),u.explodeExpression(e.get("right"))));case"UpdateExpression":return r(i.updateExpression(a.operator,u.explodeExpression(e.get("argument")),a.prefix));case"YieldExpression":h=s();var C=a.argument&&u.explodeExpression(e.get("argument"));if(C&&a.delegate){var _=u.makeTempVar();return u.emit(i.returnStatement(i.callExpression(u.contextProperty("delegateYield"),[C,i.stringLiteral(_.property.name),h]))),u.mark(h),_}return u.emitAssign(u.contextProperty("next"),h),u.emit(i.returnStatement(C||null)),u.mark(h),u.contextProperty("sent");default:throw new Error("unknown Expression of type "+JSON.stringify(a.type))}}},{"./leap":594,"./meta":595,"./util":597,assert:1}],592:[function(e,t,r){"use strict";var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./util")),i=Object.prototype.hasOwnProperty;r.hoist=function(e){function t(e,t){r.assertVariableDeclaration(e);var n=[];return e.declarations.forEach(function(e){s[e.id.name]=r.identifier(e.id.name),e.init?n.push(r.assignmentExpression("=",e.id,e.init)):t&&n.push(e.id)}),0===n.length?null:1===n.length?n[0]:r.sequenceExpression(n)}var r=n.getTypes();r.assertFunction(e.node);var s={};e.get("body").traverse({VariableDeclaration:{exit:function(e){var i=t(e.node,!1);null===i?e.remove():n.replaceWithOrRemove(e,r.expressionStatement(i)),e.skip()}},ForStatement:function(e){var i=e.node.init;r.isVariableDeclaration(i)&&n.replaceWithOrRemove(e.get("init"),t(i,!1))},ForXStatement:function(e){var r=e.get("left");r.isVariableDeclaration()&&n.replaceWithOrRemove(r,t(r.node,!0))},FunctionDeclaration:function(e){var t=e.node;s[t.id.name]=t.id;var i=r.expressionStatement(r.assignmentExpression("=",t.id,r.functionExpression(t.id,t.params,t.body,t.generator,t.expression)));e.parentPath.isBlockStatement()?(e.parentPath.unshiftContainer("body",i),e.remove()):n.replaceWithOrRemove(e,i),e.skip()},FunctionExpression:function(e){e.skip()},ArrowFunctionExpression:function(e){e.skip()}});var a={};e.get("params").forEach(function(e){var t=e.node;r.isIdentifier(t)&&(a[t.name]=t)});var o=[];return Object.keys(s).forEach(function(e){i.call(a,e)||o.push(r.variableDeclarator(s[e],null))}),0===o.length?null:r.variableDeclaration("var",o)}},{"./util":597}],593:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(t){var r={visitor:e("./visit").getVisitor(t)},n=t&&t.version;return n&&parseInt(n,10)>=7&&(r.name="regenerator-transform"),r}},{"./visit":598}],594:[function(e,t,r){"use strict";function n(){h.default.ok(this instanceof n)}function i(e){n.call(this),(0,d.getTypes)().assertLiteral(e),this.returnLoc=e}function s(e,t,r){n.call(this);var i=(0,d.getTypes)();i.assertLiteral(e),i.assertLiteral(t),r?i.assertIdentifier(r):r=null,this.breakLoc=e,this.continueLoc=t,this.label=r}function a(e){n.call(this),(0,d.getTypes)().assertLiteral(e),this.breakLoc=e}function o(e,t,r){n.call(this);(0,d.getTypes)().assertLiteral(e),t?h.default.ok(t instanceof u):t=null,r?h.default.ok(r instanceof l):r=null,h.default.ok(t||r),this.firstLoc=e,this.catchEntry=t,this.finallyEntry=r}function u(e,t){n.call(this);var r=(0,d.getTypes)();r.assertLiteral(e),r.assertIdentifier(t),this.firstLoc=e,this.paramId=t}function l(e,t){n.call(this);var r=(0,d.getTypes)();r.assertLiteral(e),r.assertLiteral(t),this.firstLoc=e,this.afterLoc=t}function c(e,t){n.call(this);var r=(0,d.getTypes)();r.assertLiteral(e),r.assertIdentifier(t),this.breakLoc=e,this.label=t}function p(t){h.default.ok(this instanceof p);var r=e("./emit").Emitter;h.default.ok(t instanceof r),this.emitter=t,this.entryStack=[new i(t.finalLoc)]}var h=function(e){return e&&e.__esModule?e:{default:e}}(e("assert")),f=e("util"),d=e("./util.js");(0,f.inherits)(i,n),r.FunctionEntry=i,(0,f.inherits)(s,n),r.LoopEntry=s,(0,f.inherits)(a,n),r.SwitchEntry=a,(0,f.inherits)(o,n),r.TryEntry=o,(0,f.inherits)(u,n),r.CatchEntry=u,(0,f.inherits)(l,n),r.FinallyEntry=l,(0,f.inherits)(c,n),r.LabeledEntry=c;var m=p.prototype;r.LeapManager=p,m.withEntry=function(e,t){h.default.ok(e instanceof n),this.entryStack.push(e);try{t.call(this.emitter)}finally{var r=this.entryStack.pop();h.default.strictEqual(r,e)}},m._findLeapLocation=function(e,t){for(var r=this.entryStack.length-1;r>=0;--r){var n=this.entryStack[r],i=n[e];if(i)if(t){if(n.label&&n.label.name===t.name)return i}else if(!(n instanceof c))return i}return null},m.getBreakLoc=function(e){return this._findLeapLocation("breakLoc",e)},m.getContinueLoc=function(e){return this._findLeapLocation("continueLoc",e)}},{"./emit":591,"./util.js":597,assert:1,util:613}],595:[function(e,t,r){"use strict";function n(e,t){function r(e){function t(e){return a||(Array.isArray(e)?e.some(t):r.isNode(e)&&(i.default.strictEqual(a,!1),a=n(e))),a}var r=(0,s.getTypes)();r.assertNode(e);var a=!1,o=r.VISITOR_KEYS[e.type];if(o)for(var u=0;u<o.length;u++){t(e[o[u]])}return a}function n(n){(0,s.getTypes)().assertNode(n);var i=a(n);return o.call(i,e)?i[e]:o.call(u,n.type)?i[e]=!1:o.call(t,n.type)?i[e]=!0:i[e]=r(n)}return n.onlyChildren=r,n}var i=function(e){return e&&e.__esModule?e:{default:e}}(e("assert")),s=e("./util.js"),a=e("private").makeAccessor(),o=Object.prototype.hasOwnProperty,u={FunctionExpression:!0,ArrowFunctionExpression:!0},l={CallExpression:!0,ForInStatement:!0,UnaryExpression:!0,BinaryExpression:!0,AssignmentExpression:!0,UpdateExpression:!0,NewExpression:!0},c={YieldExpression:!0,BreakStatement:!0,ContinueStatement:!0,ReturnStatement:!0,ThrowStatement:!0};for(var p in c)o.call(c,p)&&(l[p]=c[p]);r.hasSideEffects=n("hasSideEffects",l),r.containsLeap=n("containsLeap",c)},{"./util.js":597,assert:1,private:548}],596:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){var t=n.getTypes();if(!e.node||!t.isFunction(e.node))throw new Error("replaceShorthandObjectMethod can only be called on Function AST node paths.");if(!t.isObjectMethod(e.node))return e;if(!e.node.generator)return e;var r=e.node.params.map(function(e){return t.cloneDeep(e)}),i=t.functionExpression(null,r,t.cloneDeep(e.node.body),e.node.generator,e.node.async);return n.replaceWithOrRemove(e,t.objectProperty(t.cloneDeep(e.node.key),i,e.node.computed,!1)),e.get("value")};var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./util"))},{"./util":597}],597:[function(e,t,r){"use strict";function n(){return i}r.__esModule=!0,r.wrapWithTypes=function(e,t){return function(){var r=i;i=e;try{for(var n=arguments.length,s=Array(n),a=0;a<n;a++)s[a]=arguments[a];return t.apply(this,s)}finally{i=r}}},r.getTypes=n,r.runtimeProperty=function(e){var t=n();return t.memberExpression(t.identifier("regeneratorRuntime"),t.identifier(e),!1)},r.isReference=function(e){return e.isReferenced()||e.parentPath.isAssignmentExpression({left:e.node})},r.replaceWithOrRemove=function(e,t){t?e.replaceWith(t):e.remove()};var i=null},{}],598:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=l.getTypes(),r=e.node;return t.assertFunction(r),r.id||(r.id=e.scope.parent.generateUidIdentifier("callee")),r.generator&&t.isFunctionDeclaration(r)?function(e){var t=l.getTypes(),r=e.node;t.assertIdentifier(r.id);var n=e.findParent(function(e){return e.isProgram()||e.isBlockStatement()});if(!n)return r.id;var i=n.node;s.default.ok(Array.isArray(i.body));var a=c(i);a.decl||(a.decl=t.variableDeclaration("var",[]),n.unshiftContainer("body",a.decl),a.declPath=n.get("body.0"));s.default.strictEqual(a.declPath.node,a.decl);var o=n.scope.generateUidIdentifier("marked"),u=t.callExpression(l.runtimeProperty("mark"),[r.id]),p=a.decl.declarations.push(t.variableDeclarator(o,u))-1,h=a.declPath.get("declarations."+p+".init");return s.default.strictEqual(h.node,u),h.addComment("leading","#__PURE__"),o}(e):r.id}var s=n(e("assert")),a=e("./hoist"),o=e("./emit"),u=n(e("./replaceShorthandObjectMethod")),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./util"));r.getVisitor=function(e){var t=e.types;return{Function:{exit:l.wrapWithTypes(t,function(e,r){var n=e.node;if(n.generator){if(n.async){if(!1===r.opts.asyncGenerators)return}else if(!1===r.opts.generators)return}else{if(!n.async)return;if(!1===r.opts.async)return}n=(e=(0,u.default)(e)).node;var s=e.scope.generateUidIdentifier("context"),c=e.scope.generateUidIdentifier("args");e.ensureBlock();var d=e.get("body");n.async&&d.traverse(f),d.traverse(h,{context:s});var m=[],y=[];d.get("body").forEach(function(e){var r=e.node;t.isExpressionStatement(r)&&t.isStringLiteral(r.expression)?m.push(r):r&&null!=r._blockHoist?m.push(r):y.push(r)}),m.length>0&&(d.node.body=y);var g=i(e);t.assertIdentifier(n.id);var b=t.identifier(n.id.name+"$"),v=(0,a.hoist)(e);if(function(e,t){var r={didRenameArguments:!1,argsId:t};return e.traverse(p,r),r.didRenameArguments}(e,c)){v=v||t.variableDeclaration("var",[]);var x=t.identifier("arguments");x._shadowedFunctionLiteral=e,v.declarations.push(t.variableDeclarator(c,x))}var E=new o.Emitter(s);E.explode(e.get("body")),v&&v.declarations.length>0&&m.push(v);var A=[E.getContextFunction(b),n.generator?g:t.nullLiteral(),t.thisExpression()],D=E.getTryLocsList();D&&A.push(D);var S=t.callExpression(l.runtimeProperty(n.async?"async":"wrap"),A);m.push(t.returnStatement(S)),n.body=t.blockStatement(m);var C=d.node.directives;C&&(n.body.directives=C);var _=n.generator;_&&(n.generator=!1),n.async&&(n.async=!1),_&&t.isExpression(n)&&(l.replaceWithOrRemove(e,t.callExpression(l.runtimeProperty("mark"),[n])),e.addComment("leading","#__PURE__")),e.requeue()})}}};var c=e("private").makeAccessor(),p={"FunctionExpression|FunctionDeclaration":function(e){e.skip()},Identifier:function(e,t){"arguments"===e.node.name&&l.isReference(e)&&(l.replaceWithOrRemove(e,t.argsId),t.didRenameArguments=!0)}},h={MetaProperty:function(e){var t=e.node;if("function"===t.meta.name&&"sent"===t.property.name){var r=l.getTypes();l.replaceWithOrRemove(e,r.memberExpression(this.context,r.identifier("_sent")))}}},f={Function:function(e){e.skip()},AwaitExpression:function(e){var t=l.getTypes(),r=e.node.argument;l.replaceWithOrRemove(e,t.yieldExpression(t.callExpression(l.runtimeProperty("awrap"),[r]),!1))}}},{"./emit":591,"./hoist":592,"./replaceShorthandObjectMethod":596,"./util":597,assert:1,private:548}],599:[function(e,t,r){e("assert");var n=e("recast").types,i=n.namedTypes,s=n.builders,a=Object.prototype.hasOwnProperty;r.defaults=function(e){for(var t,r=arguments.length,n=1;n<r;++n)if(t=arguments[n])for(var i in t)a.call(t,i)&&!a.call(e,i)&&(e[i]=t[i]);return e},r.runtimeProperty=function(e){return s.memberExpression(s.identifier("regeneratorRuntime"),s.identifier(e),!1)},r.isReference=function(e,t){var r=e.value;if(!i.Identifier.check(r))return!1;if(t&&r.name!==t)return!1;var n=e.parent.value;switch(n.type){case"VariableDeclarator":return"init"===e.name;case"MemberExpression":return"object"===e.name||n.computed&&"property"===e.name;case"FunctionExpression":case"FunctionDeclaration":case"ArrowFunctionExpression":return"id"!==e.name&&("params"!==e.parentPath.name||n.params!==e.parentPath.value||n.params[e.name]!==r);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:1,recast:574}],600:[function(e,t,r){var n=e("recast"),i=n.types.namedTypes,s=e("./util.js");r.transform=function(t,r){r=s.defaults(r||{},{includeRuntime:!1});return t=e("babel-core").transformFromAst(t,null,{presets:[e("regenerator-preset")],code:!1,ast:!0}).ast,!0===r.includeRuntime&&function(t){i.Program.assert(t);var r=e("..").runtime.path,s=fs.readFileSync(r,"utf8"),a=n.parse(s,{sourceFileName:r}).program.body,o=t.body;o.unshift.apply(o,a)}(i.File.check(t)?t.program:t),t}},{"..":"regenerator","./util.js":599,"babel-core":31,recast:574,"regenerator-preset":587}],601:[function(e,t,r){"use strict";var n=e("is-finite");t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("Expected `input` to be a string");if(t<0||!n(t))throw new TypeError("Expected `count` to be a positive finite number");var r="";do{1&t&&(r+=e),e+=e}while(t>>=1);return r}},{"is-finite":320}],602:[function(e,t,r){function n(e,t){for(var r in e)t[r]=e[r]}function i(e,t,r){return a(e,t,r)}var s=e("buffer"),a=s.Buffer;a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?t.exports=s:(n(s,r),r.Buffer=i),n(a,i),i.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return a(e,t,r)},i.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=a(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return a(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return s.SlowBuffer(e)}},{buffer:194}],603:[function(e,t,r){"use strict";t.exports=function(e){var t=/^\\\\\?\\/.test(e),r=/[^\x00-\x80]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}},{}],604:[function(e,t,r){function n(){i.call(this)}t.exports=n;var i=e("events").EventEmitter;e("inherits")(n,i),n.Readable=e("readable-stream/readable.js"),n.Writable=e("readable-stream/writable.js"),n.Duplex=e("readable-stream/duplex.js"),n.Transform=e("readable-stream/transform.js"),n.PassThrough=e("readable-stream/passthrough.js"),n.Stream=n,n.prototype.pipe=function(e,t){function r(t){e.writable&&!1===e.write(t)&&l.pause&&l.pause()}function n(){l.readable&&l.resume&&l.resume()}function s(){c||(c=!0,e.end())}function a(){c||(c=!0,"function"==typeof e.destroy&&e.destroy())}function o(e){if(u(),0===i.listenerCount(this,"error"))throw e}function u(){l.removeListener("data",r),e.removeListener("drain",n),l.removeListener("end",s),l.removeListener("close",a),l.removeListener("error",o),e.removeListener("error",o),l.removeListener("end",u),l.removeListener("close",u),e.removeListener("close",u)}var l=this;l.on("data",r),e.on("drain",n),e._isStdio||t&&!1===t.end||(l.on("end",s),l.on("close",a));var c=!1;return l.on("error",o),e.on("error",o),l.on("end",u),l.on("close",u),e.on("close",u),e.emit("pipe",l),e}},{events:313,inherits:317,"readable-stream/duplex.js":551,"readable-stream/passthrough.js":560,"readable-stream/readable.js":561,"readable-stream/transform.js":562,"readable-stream/writable.js":563}],605:[function(e,t,r){"use strict";function n(e){this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(h.isEncoding===f||!f(e)))throw new Error("Unknown encoding: "+e);return t||e}(e);var t;switch(this.encoding){case"utf16le":this.text=a,this.end=o,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=u,this.end=l,t=3;break;default:return this.write=c,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=h.allocUnsafe(t)}function i(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:-1}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�".repeat(r);if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�".repeat(r+1);if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�".repeat(r+2)}}(this,e,t);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function a(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function o(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function u(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function c(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}var h=e("safe-buffer").Buffer,f=h.isEncoding||function(e){switch((e=""+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}};r.StringDecoder=n,n.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},n.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�".repeat(this.lastTotal-this.lastNeed):t},n.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var s=i(t[n]);return s>=0?(s>0&&(e.lastNeed=s-1),s):--n<r?0:(s=i(t[n]))>=0?(s>0&&(e.lastNeed=s-2),s):--n<r?0:(s=i(t[n]))>=0?(s>0&&(2===s?s=0:e.lastNeed=s-3),s):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},n.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":602}],606:[function(e,t,r){(function(r){function n(e,t,n){function s(){for(;u.length&&!c.paused;){var e=u.shift();if(null===e)return c.emit("end");c.emit("data",e)}}e=e||function(e){this.queue(e)},t=t||function(){this.queue(null)};var a=!1,o=!1,u=[],l=!1,c=new i;return c.readable=c.writable=!0,c.paused=!1,c.autoDestroy=!(n&&!1===n.autoDestroy),c.write=function(t){return e.call(this,t),!c.paused},c.queue=c.push=function(e){return l?c:(null===e&&(l=!0),u.push(e),s(),c)},c.on("end",function(){c.readable=!1,!c.writable&&c.autoDestroy&&r.nextTick(function(){c.destroy()})}),c.end=function(e){if(!a)return a=!0,arguments.length&&c.write(e),c.writable=!1,t.call(c),!c.readable&&c.autoDestroy&&c.destroy(),c},c.destroy=function(){if(!o)return o=!0,a=!0,u.length=0,c.writable=c.readable=!1,c.emit("close"),c},c.pause=function(){if(!c.paused)return c.paused=!0,c},c.resume=function(){return c.paused&&(c.paused=!1,c.emit("resume")),s(),c.paused||c.emit("drain"),c},c}var i=e("stream");t.exports=n,n.through=n}).call(this,e("_process"))},{_process:550,stream:604}],607:[function(e,t,r){"use strict";t.exports=function e(t){function r(){}function n(){return typeof i.foo}r.prototype=t;var i=new r;return n(),n(),t}},{}],608:[function(e,t,r){"use strict";t.exports=function(e){for(var t=e.length;/[\s\uFEFF\u00A0]/.test(e[t-1]);)t--;return e.slice(0,t)}},{}],609:[function(e,t,r){r.isatty=function(){return!1},r.ReadStream=function(){throw new Error("tty.ReadStream is not implemented")},r.WriteStream=function(){throw new Error("tty.ReadStream is not implemented")}},{}],610:[function(e,t,r){(function(e){function r(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],611:[function(e,t,r){arguments[4][317][0].apply(r,arguments)},{dup:317}],612:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],613:[function(e,t,r){(function(t,n){function i(e,t){var n={seen:[],stylize:a};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(t)?n.showHidden=t:t&&r._extend(n,t),m(n.showHidden)&&(n.showHidden=!1),m(n.depth)&&(n.depth=2),m(n.colors)&&(n.colors=!1),m(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=s),o(n,e,n.depth)}function s(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function a(e,t){return e}function o(e,t,n){if(e.customInspect&&t&&x(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return d(i)||(i=o(e,i,n)),i}var s=function(e,t){if(m(t))return e.stylize("undefined","undefined");if(d(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(f(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(h(t))return e.stylize("null","null")}(e,t);if(s)return s;var a=Object.keys(t),g=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),v(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return u(t);if(0===a.length){if(x(t)){var E=t.name?": "+t.name:"";return e.stylize("[Function"+E+"]","special")}if(y(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(b(t))return e.stylize(Date.prototype.toString.call(t),"date");if(v(t))return u(t)}var A="",S=!1,C=["{","}"];if(c(t)&&(S=!0,C=["[","]"]),x(t)){A=" [Function"+(t.name?": "+t.name:"")+"]"}if(y(t)&&(A=" "+RegExp.prototype.toString.call(t)),b(t)&&(A=" "+Date.prototype.toUTCString.call(t)),v(t)&&(A=" "+u(t)),0===a.length&&(!S||0==t.length))return C[0]+A+C[1];if(n<0)return y(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var _;return _=S?function(e,t,r,n,i){for(var s=[],a=0,o=t.length;a<o;++a)D(t,String(a))?s.push(l(e,t,r,n,String(a),!0)):s.push("");return i.forEach(function(i){i.match(/^\d+$/)||s.push(l(e,t,r,n,i,!0))}),s}(e,t,n,g,a):a.map(function(r){return l(e,t,n,g,r,S)}),e.seen.pop(),function(e,t,r){if(e.reduce(function(e,t){return 0,t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(_,A,C)}function u(e){return"["+Error.prototype.toString.call(e)+"]"}function l(e,t,r,n,i,s){var a,u,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?u=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(u=e.stylize("[Setter]","special")),D(n,i)||(a="["+i+"]"),u||(e.seen.indexOf(l.value)<0?(u=h(r)?o(e,l.value,null):o(e,l.value,r-1)).indexOf("\n")>-1&&(u=s?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),m(a)){if(s&&i.match(/^\d+$/))return u;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+u}function c(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function h(e){return null===e}function f(e){return"number"==typeof e}function d(e){return"string"==typeof e}function m(e){return void 0===e}function y(e){return g(e)&&"[object RegExp]"===E(e)}function g(e){return"object"==typeof e&&null!==e}function b(e){return g(e)&&"[object Date]"===E(e)}function v(e){return g(e)&&("[object Error]"===E(e)||e instanceof Error)}function x(e){return"function"==typeof e}function E(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}function D(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var S=/%[sdj%]/g;r.format=function(e){if(!d(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(i(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,s=n.length,a=String(e).replace(S,function(e){if("%%"===e)return"%";if(r>=s)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),o=n[r];r<s;o=n[++r])h(o)||!g(o)?a+=" "+o:a+=" "+i(o);return a},r.deprecate=function(e,i){if(m(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(!0===t.noDeprecation)return e;var s=!1;return function(){if(!s){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),s=!0}return e.apply(this,arguments)}};var C,_={};r.debuglog=function(e){if(m(C)&&(C=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!_[e])if(new RegExp("\\b"+e+"\\b","i").test(C)){var n=t.pid;_[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else _[e]=function(){};return _[e]},r.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"},r.isArray=c,r.isBoolean=p,r.isNull=h,r.isNullOrUndefined=function(e){return null==e},r.isNumber=f,r.isString=d,r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=m,r.isRegExp=y,r.isObject=g,r.isDate=b,r.isError=v,r.isFunction=x,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e("./support/isBuffer");var w=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",function(){var e=new Date,t=[A(e.getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":");return[e.getDate(),w[e.getMonth()],t].join(" ")}(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!g(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":612,_process:550,inherits:611}],regenerator:[function(e,t,r){function r(e,t){var r=[];return a(function(e){r.push(e)},function(){try{this.queue(i(r.join(""),t).code),this.queue(null)}catch(e){this.emit("error",e)}})}function n(){regeneratorRuntime=e("regenerator-runtime")}function i(t,r){var i;return r=u.defaults(r||{},{includeRuntime:!1}),i=l.test(t)?e("babel-core").transform(t,p):{code:t},!0===r.includeRuntime&&(i.code=(c||(c=s.readFileSync(n.path,"utf8")))+"\n"+i.code),i}var s=e("fs"),a=e("through"),o=e("./lib/visit").transform,u=e("./lib/util"),l=/\bfunction\s*\*|\basync\b/;t.exports=r,r.runtime=n,n.path=e("regenerator-runtime/path.js").path;var c,p={presets:[e("regenerator-preset")],parserOpts:{sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,strictMode:!1,plugins:["*","jsx","flow"]}};r.types=e("recast").types,r.compile=i,r.transform=o},{"./lib/util":599,"./lib/visit":600,"babel-core":31,fs:193,recast:574,"regenerator-preset":587,"regenerator-runtime":589,"regenerator-runtime/path.js":588,through:606}]},{},[]); \ No newline at end of file
diff --git a/deps/npm/node_modules/ajv/lib/$data.js b/deps/npm/node_modules/ajv/lib/$data.js
deleted file mode 100644
index 60cfc2d8de..0000000000
--- a/deps/npm/node_modules/ajv/lib/$data.js
+++ /dev/null
@@ -1,49 +0,0 @@
-'use strict';
-
-var KEYWORDS = [
- 'multipleOf',
- 'maximum',
- 'exclusiveMaximum',
- 'minimum',
- 'exclusiveMinimum',
- 'maxLength',
- 'minLength',
- 'pattern',
- 'additionalItems',
- 'maxItems',
- 'minItems',
- 'uniqueItems',
- 'maxProperties',
- 'minProperties',
- 'required',
- 'additionalProperties',
- 'enum',
- 'format',
- 'const'
-];
-
-module.exports = function (metaSchema, keywordsJsonPointers) {
- for (var i=0; i<keywordsJsonPointers.length; i++) {
- metaSchema = JSON.parse(JSON.stringify(metaSchema));
- var segments = keywordsJsonPointers[i].split('/');
- var keywords = metaSchema;
- var j;
- for (j=1; j<segments.length; j++)
- keywords = keywords[segments[j]];
-
- for (j=0; j<KEYWORDS.length; j++) {
- var key = KEYWORDS[j];
- var schema = keywords[key];
- if (schema) {
- keywords[key] = {
- anyOf: [
- schema,
- { $ref: 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#' }
- ]
- };
- }
- }
- }
-
- return metaSchema;
-};
diff --git a/deps/npm/node_modules/ajv/lib/ajv.js b/deps/npm/node_modules/ajv/lib/ajv.js
deleted file mode 100644
index 3148b8e379..0000000000
--- a/deps/npm/node_modules/ajv/lib/ajv.js
+++ /dev/null
@@ -1,502 +0,0 @@
-'use strict';
-
-var compileSchema = require('./compile')
- , resolve = require('./compile/resolve')
- , Cache = require('./cache')
- , SchemaObject = require('./compile/schema_obj')
- , stableStringify = require('fast-json-stable-stringify')
- , formats = require('./compile/formats')
- , rules = require('./compile/rules')
- , $dataMetaSchema = require('./$data')
- , patternGroups = require('./patternGroups')
- , util = require('./compile/util')
- , co = require('co');
-
-module.exports = Ajv;
-
-Ajv.prototype.validate = validate;
-Ajv.prototype.compile = compile;
-Ajv.prototype.addSchema = addSchema;
-Ajv.prototype.addMetaSchema = addMetaSchema;
-Ajv.prototype.validateSchema = validateSchema;
-Ajv.prototype.getSchema = getSchema;
-Ajv.prototype.removeSchema = removeSchema;
-Ajv.prototype.addFormat = addFormat;
-Ajv.prototype.errorsText = errorsText;
-
-Ajv.prototype._addSchema = _addSchema;
-Ajv.prototype._compile = _compile;
-
-Ajv.prototype.compileAsync = require('./compile/async');
-var customKeyword = require('./keyword');
-Ajv.prototype.addKeyword = customKeyword.add;
-Ajv.prototype.getKeyword = customKeyword.get;
-Ajv.prototype.removeKeyword = customKeyword.remove;
-
-var errorClasses = require('./compile/error_classes');
-Ajv.ValidationError = errorClasses.Validation;
-Ajv.MissingRefError = errorClasses.MissingRef;
-Ajv.$dataMetaSchema = $dataMetaSchema;
-
-var META_SCHEMA_ID = 'http://json-schema.org/draft-06/schema';
-
-var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes' ];
-var META_SUPPORT_DATA = ['/properties'];
-
-/**
- * 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);
- opts = this._opts = util.copy(opts) || {};
- setLogger(this);
- this._schemas = {};
- this._refs = {};
- this._fragments = {};
- this._formats = formats(opts.format);
- var schemaUriFormat = this._schemaUriFormat = this._formats['uri-reference'];
- this._schemaUriFormatFunc = function (str) { return schemaUriFormat.test(str); };
-
- this._cache = opts.cache || new Cache;
- this._loadingSchemas = {};
- this._compilations = [];
- this.RULES = rules();
- this._getId = chooseGetId(opts);
-
- opts.loopRequired = opts.loopRequired || Infinity;
- if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;
- if (opts.serialize === undefined) opts.serialize = stableStringify;
- this._metaOpts = getMetaSchemaOptions(this);
-
- if (opts.formats) addInitialFormats(this);
- addDraft6MetaSchema(this);
- if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta);
- addInitialSchemas(this);
- if (opts.patternGroups) patternGroups(this);
-}
-
-
-
-/**
- * Validate data using schema
- * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize.
- * @this Ajv
- * @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 = this.getSchema(schemaKeyRef);
- if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"');
- } else {
- var schemaObj = this._addSchema(schemaKeyRef);
- v = schemaObj.validate || this._compile(schemaObj);
- }
-
- var valid = v(data);
- if (v.$async === true)
- return this._opts.async == '*' ? co(valid) : valid;
- this.errors = v.errors;
- return valid;
-}
-
-
-/**
- * Create validating function for passed schema.
- * @this Ajv
- * @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 = this._addSchema(schema, undefined, _meta);
- return schemaObj.validate || this._compile(schemaObj);
-}
-
-
-/**
- * Adds schema to the instance.
- * @this Ajv
- * @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.
- * @return {Ajv} this for method chaining
- */
-function addSchema(schema, key, _skipValidation, _meta) {
- if (Array.isArray(schema)){
- for (var i=0; i<schema.length; i++) this.addSchema(schema[i], undefined, _skipValidation, _meta);
- return this;
- }
- var id = this._getId(schema);
- if (id !== undefined && typeof id != 'string')
- throw new Error('schema id must be string');
- key = resolve.normalizeId(key || id);
- checkUnique(this, key);
- this._schemas[key] = this._addSchema(schema, _skipValidation, _meta, true);
- return this;
-}
-
-
-/**
- * Add schema that will be used to validate other schemas
- * options in META_IGNORE_OPTIONS are alway set to false
- * @this Ajv
- * @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
- * @return {Ajv} this for method chaining
- */
-function addMetaSchema(schema, key, skipValidation) {
- this.addSchema(schema, key, skipValidation, true);
- return this;
-}
-
-
-/**
- * Validate schema
- * @this Ajv
- * @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;
- if ($schema !== undefined && typeof $schema != 'string')
- throw new Error('$schema must be a string');
- $schema = $schema || this._opts.defaultMeta || defaultMeta(this);
- if (!$schema) {
- this.logger.warn('meta-schema not available');
- this.errors = null;
- return true;
- }
- var currentUriFormat = this._formats.uri;
- this._formats.uri = typeof currentUriFormat == 'function'
- ? this._schemaUriFormatFunc
- : this._schemaUriFormat;
- var valid;
- try { valid = this.validate($schema, schema); }
- finally { this._formats.uri = currentUriFormat; }
- if (!valid && throwOrLogError) {
- var message = 'schema is invalid: ' + this.errorsText();
- if (this._opts.validateSchema == 'log') this.logger.error(message);
- else throw new Error(message);
- }
- return valid;
-}
-
-
-function defaultMeta(self) {
- var meta = self._opts.meta;
- self._opts.defaultMeta = typeof meta == 'object'
- ? self._getId(meta) || meta
- : self.getSchema(META_SCHEMA_ID)
- ? META_SCHEMA_ID
- : undefined;
- return self._opts.defaultMeta;
-}
-
-
-/**
- * Get compiled schema from the instance by `key` or `ref`.
- * @this Ajv
- * @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(this, keyRef);
- switch (typeof schemaObj) {
- case 'object': return schemaObj.validate || this._compile(schemaObj);
- case 'string': return this.getSchema(schemaObj);
- case 'undefined': return _getSchemaFragment(this, keyRef);
- }
-}
-
-
-function _getSchemaFragment(self, 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(self, 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.
- * @this Ajv
- * @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object
- * @return {Ajv} this for method chaining
- */
-function removeSchema(schemaKeyRef) {
- if (schemaKeyRef instanceof RegExp) {
- _removeAllSchemas(this, this._schemas, schemaKeyRef);
- _removeAllSchemas(this, this._refs, schemaKeyRef);
- return this;
- }
- switch (typeof schemaKeyRef) {
- case 'undefined':
- _removeAllSchemas(this, this._schemas);
- _removeAllSchemas(this, this._refs);
- this._cache.clear();
- return this;
- case 'string':
- var schemaObj = _getSchemaObj(this, schemaKeyRef);
- if (schemaObj) this._cache.del(schemaObj.cacheKey);
- delete this._schemas[schemaKeyRef];
- delete this._refs[schemaKeyRef];
- return this;
- case 'object':
- var serialize = this._opts.serialize;
- var cacheKey = serialize ? serialize(schemaKeyRef) : schemaKeyRef;
- this._cache.del(cacheKey);
- var id = this._getId(schemaKeyRef);
- if (id) {
- id = resolve.normalizeId(id);
- delete this._schemas[id];
- delete this._refs[id];
- }
- }
- return this;
-}
-
-
-function _removeAllSchemas(self, schemas, regex) {
- for (var keyRef in schemas) {
- var schemaObj = schemas[keyRef];
- if (!schemaObj.meta && (!regex || regex.test(keyRef))) {
- self._cache.del(schemaObj.cacheKey);
- delete schemas[keyRef];
- }
- }
-}
-
-
-/* @this Ajv */
-function _addSchema(schema, skipValidation, meta, shouldAddSchema) {
- if (typeof schema != 'object' && typeof schema != 'boolean')
- throw new Error('schema should be object or boolean');
- var serialize = this._opts.serialize;
- var cacheKey = serialize ? serialize(schema) : schema;
- var cached = this._cache.get(cacheKey);
- if (cached) return cached;
-
- shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false;
-
- var id = resolve.normalizeId(this._getId(schema));
- if (id && shouldAddSchema) checkUnique(this, id);
-
- var willValidate = this._opts.validateSchema !== false && !skipValidation;
- var recursiveMeta;
- if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema.$schema)))
- this.validateSchema(schema, true);
-
- var localRefs = resolve.ids.call(this, schema);
-
- var schemaObj = new SchemaObject({
- id: id,
- schema: schema,
- localRefs: localRefs,
- cacheKey: cacheKey,
- meta: meta
- });
-
- if (id[0] != '#' && shouldAddSchema) this._refs[id] = schemaObj;
- this._cache.put(cacheKey, schemaObj);
-
- if (willValidate && recursiveMeta) this.validateSchema(schema, true);
-
- return schemaObj;
-}
-
-
-/* @this Ajv */
-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 = this._opts;
- this._opts = this._metaOpts;
- }
-
- var v;
- try { v = compileSchema.call(this, schemaObj.schema, root, schemaObj.localRefs); }
- finally {
- schemaObj.compiling = false;
- if (schemaObj.meta) this._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;
- }
-}
-
-
-function chooseGetId(opts) {
- switch (opts.schemaId) {
- case '$id': return _get$Id;
- case 'id': return _getId;
- default: return _get$IdOrId;
- }
-}
-
-/* @this Ajv */
-function _getId(schema) {
- if (schema.$id) this.logger.warn('schema $id ignored', schema.$id);
- return schema.id;
-}
-
-/* @this Ajv */
-function _get$Id(schema) {
- if (schema.id) this.logger.warn('schema id ignored', schema.id);
- return schema.$id;
-}
-
-
-function _get$IdOrId(schema) {
- if (schema.$id && schema.id && schema.$id != schema.id)
- throw new Error('schema $id is different from id');
- return schema.$id || schema.id;
-}
-
-
-/**
- * Convert array of error message objects to string
- * @this Ajv
- * @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 || this.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
- * @this Ajv
- * @param {String} name format name
- * @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
- * @return {Ajv} this for method chaining
- */
-function addFormat(name, format) {
- if (typeof format == 'string') format = new RegExp(format);
- this._formats[name] = format;
- return this;
-}
-
-
-function addDraft6MetaSchema(self) {
- var $dataSchema;
- if (self._opts.$data) {
- $dataSchema = require('./refs/$data.json');
- self.addMetaSchema($dataSchema, $dataSchema.$id, true);
- }
- if (self._opts.meta === false) return;
- var metaSchema = require('./refs/json-schema-draft-06.json');
- if (self._opts.$data) metaSchema = $dataMetaSchema(metaSchema, META_SUPPORT_DATA);
- self.addMetaSchema(metaSchema, META_SCHEMA_ID, true);
- self._refs['http://json-schema.org/schema'] = META_SCHEMA_ID;
-}
-
-
-function addInitialSchemas(self) {
- var optsSchemas = self._opts.schemas;
- if (!optsSchemas) return;
- if (Array.isArray(optsSchemas)) self.addSchema(optsSchemas);
- else for (var key in optsSchemas) self.addSchema(optsSchemas[key], key);
-}
-
-
-function addInitialFormats(self) {
- for (var name in self._opts.formats) {
- var format = self._opts.formats[name];
- self.addFormat(name, format);
- }
-}
-
-
-function checkUnique(self, id) {
- if (self._schemas[id] || self._refs[id])
- throw new Error('schema with key or id "' + id + '" already exists');
-}
-
-
-function getMetaSchemaOptions(self) {
- var metaOpts = util.copy(self._opts);
- for (var i=0; i<META_IGNORE_OPTIONS.length; i++)
- delete metaOpts[META_IGNORE_OPTIONS[i]];
- return metaOpts;
-}
-
-
-function setLogger(self) {
- var logger = self._opts.logger;
- if (logger === false) {
- self.logger = {log: noop, warn: noop, error: noop};
- } else {
- if (logger === undefined) logger = console;
- if (!(typeof logger == 'object' && logger.log && logger.warn && logger.error))
- throw new Error('logger must implement log, warn and error methods');
- self.logger = logger;
- }
-}
-
-
-function noop() {}
diff --git a/deps/npm/node_modules/ajv/lib/compile/async.js b/deps/npm/node_modules/ajv/lib/compile/async.js
deleted file mode 100644
index 6a30b8892b..0000000000
--- a/deps/npm/node_modules/ajv/lib/compile/async.js
+++ /dev/null
@@ -1,90 +0,0 @@
-'use strict';
-
-var MissingRefError = require('./error_classes').MissingRef;
-
-module.exports = compileAsync;
-
-
-/**
- * Creates validating function for passed schema with asynchronous loading of missing schemas.
- * `loadSchema` option should be a function that accepts schema uri and returns promise that resolves with the schema.
- * @this Ajv
- * @param {Object} schema schema object
- * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped
- * @param {Function} callback an optional node-style callback, it is called with 2 parameters: error (or null) and validating function.
- * @return {Promise} promise that resolves with a validating function.
- */
-function compileAsync(schema, meta, callback) {
- /* eslint no-shadow: 0 */
- /* global Promise */
- /* jshint validthis: true */
- var self = this;
- if (typeof this._opts.loadSchema != 'function')
- throw new Error('options.loadSchema should be a function');
-
- if (typeof meta == 'function') {
- callback = meta;
- meta = undefined;
- }
-
- var p = loadMetaSchemaOf(schema).then(function () {
- var schemaObj = self._addSchema(schema, undefined, meta);
- return schemaObj.validate || _compileAsync(schemaObj);
- });
-
- if (callback) {
- p.then(
- function(v) { callback(null, v); },
- callback
- );
- }
-
- return p;
-
-
- function loadMetaSchemaOf(sch) {
- var $schema = sch.$schema;
- return $schema && !self.getSchema($schema)
- ? compileAsync.call(self, { $ref: $schema }, true)
- : Promise.resolve();
- }
-
-
- function _compileAsync(schemaObj) {
- try { return self._compile(schemaObj); }
- catch(e) {
- if (e instanceof MissingRefError) return loadMissingSchema(e);
- throw e;
- }
-
-
- function loadMissingSchema(e) {
- var ref = e.missingSchema;
- if (added(ref)) throw new Error('Schema ' + ref + ' is loaded but ' + e.missingRef + ' cannot be resolved');
-
- var schemaPromise = self._loadingSchemas[ref];
- if (!schemaPromise) {
- schemaPromise = self._loadingSchemas[ref] = self._opts.loadSchema(ref);
- schemaPromise.then(removePromise, removePromise);
- }
-
- return schemaPromise.then(function (sch) {
- if (!added(ref)) {
- return loadMetaSchemaOf(sch).then(function () {
- if (!added(ref)) self.addSchema(sch, ref, undefined, meta);
- });
- }
- }).then(function() {
- return _compileAsync(schemaObj);
- });
-
- function removePromise() {
- delete self._loadingSchemas[ref];
- }
-
- function added(ref) {
- return self._refs[ref] || self._schemas[ref];
- }
- }
- }
-}
diff --git a/deps/npm/node_modules/ajv/lib/compile/equal.js b/deps/npm/node_modules/ajv/lib/compile/equal.js
deleted file mode 100644
index 911774c855..0000000000
--- a/deps/npm/node_modules/ajv/lib/compile/equal.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('fast-deep-equal');
diff --git a/deps/npm/node_modules/ajv/lib/compile/error_classes.js b/deps/npm/node_modules/ajv/lib/compile/error_classes.js
deleted file mode 100644
index 0b0ec4e4e3..0000000000
--- a/deps/npm/node_modules/ajv/lib/compile/error_classes.js
+++ /dev/null
@@ -1,34 +0,0 @@
-'use strict';
-
-var resolve = require('./resolve');
-
-module.exports = {
- Validation: errorSubclass(ValidationError),
- MissingRef: errorSubclass(MissingRefError)
-};
-
-
-function ValidationError(errors) {
- this.message = 'validation failed';
- this.errors = errors;
- this.ajv = this.validation = true;
-}
-
-
-MissingRefError.message = function (baseId, ref) {
- return 'can\'t resolve reference ' + ref + ' from id ' + baseId;
-};
-
-
-function MissingRefError(baseId, ref, message) {
- this.message = message || MissingRefError.message(baseId, ref);
- this.missingRef = resolve.url(baseId, ref);
- this.missingSchema = resolve.normalizeId(resolve.fullPath(this.missingRef));
-}
-
-
-function errorSubclass(Subclass) {
- Subclass.prototype = Object.create(Error.prototype);
- Subclass.prototype.constructor = Subclass;
- return Subclass;
-}
diff --git a/deps/npm/node_modules/ajv/lib/compile/formats.js b/deps/npm/node_modules/ajv/lib/compile/formats.js
deleted file mode 100644
index b3a1541a6f..0000000000
--- a/deps/npm/node_modules/ajv/lib/compile/formats.js
+++ /dev/null
@@ -1,135 +0,0 @@
-'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 = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-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 URIREF = /^(?:[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;
-// uri-template: https://tools.ietf.org/html/rfc6570
-var URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;
-// For the source: https://gist.github.com/dperini/729294
-// For test cases: https://mathiasbynens.be/demo/url-regex
-// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983.
-// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu;
-var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/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';
- return util.copy(formats[mode]);
-}
-
-
-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,
- 'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i,
- 'uri-template': URITEMPLATE,
- url: URL,
- // 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,
- 'uri-reference': URIREF,
- 'uri-template': URITEMPLATE,
- url: URL,
- 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
-};
-
-
-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);
-}
-
-
-var Z_ANCHOR = /[^\\]\\Z/;
-function regex(str) {
- if (Z_ANCHOR.test(str)) return false;
- try {
- new RegExp(str);
- return true;
- } catch(e) {
- return false;
- }
-}
diff --git a/deps/npm/node_modules/ajv/lib/compile/rules.js b/deps/npm/node_modules/ajv/lib/compile/rules.js
deleted file mode 100644
index 44830ad72d..0000000000
--- a/deps/npm/node_modules/ajv/lib/compile/rules.js
+++ /dev/null
@@ -1,58 +0,0 @@
-'use strict';
-
-var ruleModules = require('./_rules')
- , toHash = require('./util').toHash;
-
-module.exports = function rules() {
- var RULES = [
- { type: 'number',
- rules: [ { 'maximum': ['exclusiveMaximum'] },
- { 'minimum': ['exclusiveMinimum'] }, 'multipleOf', 'format'] },
- { type: 'string',
- rules: [ 'maxLength', 'minLength', 'pattern', 'format' ] },
- { type: 'array',
- rules: [ 'maxItems', 'minItems', 'uniqueItems', 'contains', 'items' ] },
- { type: 'object',
- rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'propertyNames',
- { 'properties': ['additionalProperties', 'patternProperties'] } ] },
- { rules: [ '$ref', 'const', 'enum', 'not', 'anyOf', 'oneOf', 'allOf' ] }
- ];
-
- var ALL = [ 'type' ];
- var KEYWORDS = [
- 'additionalItems', '$schema', '$id', 'id', 'title',
- 'description', 'default', 'definitions'
- ];
- var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ];
- RULES.all = toHash(ALL);
- RULES.types = toHash(TYPES);
-
- RULES.forEach(function (group) {
- group.rules = group.rules.map(function (keyword) {
- var implKeywords;
- if (typeof keyword == 'object') {
- var key = Object.keys(keyword)[0];
- implKeywords = keyword[key];
- keyword = key;
- implKeywords.forEach(function (k) {
- ALL.push(k);
- RULES.all[k] = true;
- });
- }
- ALL.push(keyword);
- var rule = RULES.all[keyword] = {
- keyword: keyword,
- code: ruleModules[keyword],
- implements: implKeywords
- };
- return rule;
- });
-
- if (group.type) RULES.types[group.type] = group;
- });
-
- RULES.keywords = toHash(ALL.concat(KEYWORDS));
- RULES.custom = {};
-
- return RULES;
-};
diff --git a/deps/npm/node_modules/ajv/lib/dot/_limit.jst b/deps/npm/node_modules/ajv/lib/dot/_limit.jst
deleted file mode 100644
index 13e7649b34..0000000000
--- a/deps/npm/node_modules/ajv/lib/dot/_limit.jst
+++ /dev/null
@@ -1,96 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-{{# def.$data }}
-
-{{## def.setExclusiveLimit:
- $exclusive = true;
- $errorKeyword = $exclusiveKeyword;
- $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
-#}}
-
-{{
- var $isMax = $keyword == 'maximum'
- , $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum'
- , $schemaExcl = it.schema[$exclusiveKeyword]
- , $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data
- , $op = $isMax ? '<' : '>'
- , $notOp = $isMax ? '>' : '<'
- , $errorKeyword = undefined;
-}}
-
-{{? $isDataExcl }}
- {{
- var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr)
- , $exclusive = 'exclusive' + $lvl
- , $exclType = 'exclType' + $lvl
- , $exclIsNumber = 'exclIsNumber' + $lvl
- , $opExpr = 'op' + $lvl
- , $opStr = '\' + ' + $opExpr + ' + \'';
- }}
- var schemaExcl{{=$lvl}} = {{=$schemaValueExcl}};
- {{ $schemaValueExcl = 'schemaExcl' + $lvl; }}
-
- var {{=$exclusive}};
- var {{=$exclType}} = typeof {{=$schemaValueExcl}};
- if ({{=$exclType}} != 'boolean' && {{=$exclType}} != 'undefined' && {{=$exclType}} != 'number') {
- {{ var $errorKeyword = $exclusiveKeyword; }}
- {{# def.error:'_exclusiveLimit' }}
- } else if ({{# def.$dataNotType:'number' }}
- {{=$exclType}} == 'number'
- ? (
- ({{=$exclusive}} = {{=$schemaValue}} === undefined || {{=$schemaValueExcl}} {{=$op}}= {{=$schemaValue}})
- ? {{=$data}} {{=$notOp}}= {{=$schemaValueExcl}}
- : {{=$data}} {{=$notOp}} {{=$schemaValue}}
- )
- : (
- ({{=$exclusive}} = {{=$schemaValueExcl}} === true)
- ? {{=$data}} {{=$notOp}}= {{=$schemaValue}}
- : {{=$data}} {{=$notOp}} {{=$schemaValue}}
- )
- || {{=$data}} !== {{=$data}}) {
- var op{{=$lvl}} = {{=$exclusive}} ? '{{=$op}}' : '{{=$op}}=';
-{{??}}
- {{
- var $exclIsNumber = typeof $schemaExcl == 'number'
- , $opStr = $op; /*used in error*/
- }}
-
- {{? $exclIsNumber && $isData }}
- {{ var $opExpr = '\'' + $opStr + '\''; /*used in error*/ }}
- if ({{# def.$dataNotType:'number' }}
- ( {{=$schemaValue}} === undefined
- || {{=$schemaExcl}} {{=$op}}= {{=$schemaValue}}
- ? {{=$data}} {{=$notOp}}= {{=$schemaExcl}}
- : {{=$data}} {{=$notOp}} {{=$schemaValue}} )
- || {{=$data}} !== {{=$data}}) {
- {{??}}
- {{
- if ($exclIsNumber && $schema === undefined) {
- {{# def.setExclusiveLimit }}
- $schemaValue = $schemaExcl;
- $notOp += '=';
- } else {
- if ($exclIsNumber)
- $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema);
-
- if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) {
- {{# def.setExclusiveLimit }}
- $notOp += '=';
- } else {
- $exclusive = false;
- $opStr += '=';
- }
- }
-
- var $opExpr = '\'' + $opStr + '\''; /*used in error*/
- }}
-
- if ({{# def.$dataNotType:'number' }}
- {{=$data}} {{=$notOp}} {{=$schemaValue}}
- || {{=$data}} !== {{=$data}}) {
- {{?}}
-{{?}}
- {{ $errorKeyword = $errorKeyword || $keyword; }}
- {{# def.error:'_limit' }}
- } {{? $breakOnError }} else { {{?}}
diff --git a/deps/npm/node_modules/ajv/lib/dot/contains.jst b/deps/npm/node_modules/ajv/lib/dot/contains.jst
deleted file mode 100644
index 925d2c84b5..0000000000
--- a/deps/npm/node_modules/ajv/lib/dot/contains.jst
+++ /dev/null
@@ -1,57 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-{{# def.setupNextLevel }}
-
-
-{{
- var $idx = 'i' + $lvl
- , $dataNxt = $it.dataLevel = it.dataLevel + 1
- , $nextData = 'data' + $dataNxt
- , $currentBaseId = it.baseId
- , $nonEmptySchema = {{# def.nonEmptySchema:$schema }};
-}}
-
-var {{=$errs}} = errors;
-var {{=$valid}};
-
-{{? $nonEmptySchema }}
- {{# def.setCompositeRule }}
-
- {{
- $it.schema = $schema;
- $it.schemaPath = $schemaPath;
- $it.errSchemaPath = $errSchemaPath;
- }}
-
- var {{=$nextValid}} = false;
-
- for (var {{=$idx}} = 0; {{=$idx}} < {{=$data}}.length; {{=$idx}}++) {
- {{
- $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
- var $passData = $data + '[' + $idx + ']';
- $it.dataPathArr[$dataNxt] = $idx;
- }}
-
- {{# def.generateSubschemaCode }}
- {{# def.optimizeValidate }}
-
- if ({{=$nextValid}}) break;
- }
-
- {{# def.resetCompositeRule }}
- {{= $closingBraces }}
-
- if (!{{=$nextValid}}) {
-{{??}}
- if ({{=$data}}.length == 0) {
-{{?}}
-
- {{# def.error:'contains' }}
- } else {
- {{? $nonEmptySchema }}
- {{# def.resetErrors }}
- {{?}}
- {{? it.opts.allErrors }} } {{?}}
-
-{{# def.cleanUp }}
diff --git a/deps/npm/node_modules/ajv/lib/dot/propertyNames.jst b/deps/npm/node_modules/ajv/lib/dot/propertyNames.jst
deleted file mode 100644
index 51caffc207..0000000000
--- a/deps/npm/node_modules/ajv/lib/dot/propertyNames.jst
+++ /dev/null
@@ -1,54 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-{{# def.setupNextLevel }}
-
-{{? {{# def.nonEmptySchema:$schema }} }}
- {{
- $it.schema = $schema;
- $it.schemaPath = $schemaPath;
- $it.errSchemaPath = $errSchemaPath;
- }}
-
- {{
- var $key = 'key' + $lvl
- , $idx = 'idx' + $lvl
- , $i = 'i' + $lvl
- , $invalidName = '\' + ' + $key + ' + \''
- , $dataNxt = $it.dataLevel = it.dataLevel + 1
- , $nextData = 'data' + $dataNxt
- , $dataProperties = 'dataProperties' + $lvl
- , $ownProperties = it.opts.ownProperties
- , $currentBaseId = it.baseId;
- }}
-
- var {{=$errs}} = errors;
-
- {{? $ownProperties }}
- var {{=$dataProperties}} = undefined;
- {{?}}
- {{# def.iterateProperties }}
- var startErrs{{=$lvl}} = errors;
-
- {{ var $passData = $key; }}
- {{# def.setCompositeRule }}
- {{# def.generateSubschemaCode }}
- {{# def.optimizeValidate }}
- {{# def.resetCompositeRule }}
-
- if (!{{=$nextValid}}) {
- for (var {{=$i}}=startErrs{{=$lvl}}; {{=$i}}<errors; {{=$i}}++) {
- vErrors[{{=$i}}].propertyName = {{=$key}};
- }
- {{# def.extraError:'propertyNames' }}
- {{? $breakOnError }} break; {{?}}
- }
- }
-{{?}}
-
-{{? $breakOnError }}
- {{= $closingBraces }}
- if ({{=$errs}} == errors) {
-{{?}}
-
-{{# def.cleanUp }}
diff --git a/deps/npm/node_modules/ajv/lib/dotjs/contains.js b/deps/npm/node_modules/ajv/lib/dotjs/contains.js
deleted file mode 100644
index 04c6e936f7..0000000000
--- a/deps/npm/node_modules/ajv/lib/dotjs/contains.js
+++ /dev/null
@@ -1,81 +0,0 @@
-'use strict';
-module.exports = function generate_contains(it, $keyword, $ruleType) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $errs = 'errs__' + $lvl;
- var $it = it.util.copy(it);
- var $closingBraces = '';
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- var $idx = 'i' + $lvl,
- $dataNxt = $it.dataLevel = it.dataLevel + 1,
- $nextData = 'data' + $dataNxt,
- $currentBaseId = it.baseId,
- $nonEmptySchema = it.util.schemaHasRules($schema, it.RULES.all);
- out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
- if ($nonEmptySchema) {
- var $wasComposite = it.compositeRule;
- it.compositeRule = $it.compositeRule = true;
- $it.schema = $schema;
- $it.schemaPath = $schemaPath;
- $it.errSchemaPath = $errSchemaPath;
- out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
- $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
- var $passData = $data + '[' + $idx + ']';
- $it.dataPathArr[$dataNxt] = $idx;
- 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 (' + ($nextValid) + ') break; } ';
- it.compositeRule = $it.compositeRule = $wasComposite;
- out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {';
- } else {
- out += ' if (' + ($data) + '.length == 0) {';
- }
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should contain a valid item\' ';
- }
- 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 ($nonEmptySchema) {
- out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
- }
- if (it.opts.allErrors) {
- out += ' } ';
- }
- out = it.util.cleanUpCode(out);
- return out;
-}
diff --git a/deps/npm/node_modules/ajv/lib/dotjs/dependencies.js b/deps/npm/node_modules/ajv/lib/dotjs/dependencies.js
deleted file mode 100644
index 58814c6129..0000000000
--- a/deps/npm/node_modules/ajv/lib/dotjs/dependencies.js
+++ /dev/null
@@ -1,167 +0,0 @@
-'use strict';
-module.exports = function generate_dependencies(it, $keyword, $ruleType) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $errs = 'errs__' + $lvl;
- var $it = it.util.copy(it);
- var $closingBraces = '';
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- var $schemaDeps = {},
- $propertyDeps = {},
- $ownProperties = it.opts.ownProperties;
- 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];
- if ($deps.length) {
- out += ' if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
- if ($ownProperties) {
- out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') ';
- }
- if ($breakOnError) {
- out += ' && ( ';
- var arr1 = $deps;
- if (arr1) {
- var $propertyKey, $i = -1,
- l1 = arr1.length - 1;
- while ($i < l1) {
- $propertyKey = arr1[$i += 1];
- if ($i) {
- out += ' || ';
- }
- var $prop = it.util.getProperty($propertyKey),
- $useData = $data + $prop;
- out += ' ( ( ' + ($useData) + ' === undefined ';
- if ($ownProperties) {
- out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
- }
- out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $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: \'' + ('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 $propertyKey, i2 = -1,
- l2 = arr2.length - 1;
- while (i2 < l2) {
- $propertyKey = arr2[i2 += 1];
- var $prop = it.util.getProperty($propertyKey),
- $missingProperty = it.util.escapeQuotes($propertyKey),
- $useData = $data + $prop;
- if (it.opts._errorDataPathProperty) {
- it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
- }
- out += ' if ( ' + ($useData) + ' === undefined ';
- if ($ownProperties) {
- out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
- }
- out += ') { var err = '; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('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 += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
- if ($ownProperties) {
- out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') ';
- }
- out += ') { ';
- $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 (' + ($nextValid) + ') { ';
- $closingBraces += '}';
- }
- }
- }
- if ($breakOnError) {
- out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
- }
- out = it.util.cleanUpCode(out);
- return out;
-}
diff --git a/deps/npm/node_modules/ajv/lib/dotjs/propertyNames.js b/deps/npm/node_modules/ajv/lib/dotjs/propertyNames.js
deleted file mode 100644
index 0cedcdac9a..0000000000
--- a/deps/npm/node_modules/ajv/lib/dotjs/propertyNames.js
+++ /dev/null
@@ -1,81 +0,0 @@
-'use strict';
-module.exports = function generate_propertyNames(it, $keyword, $ruleType) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $errs = 'errs__' + $lvl;
- var $it = it.util.copy(it);
- var $closingBraces = '';
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- if (it.util.schemaHasRules($schema, it.RULES.all)) {
- $it.schema = $schema;
- $it.schemaPath = $schemaPath;
- $it.errSchemaPath = $errSchemaPath;
- var $key = 'key' + $lvl,
- $idx = 'idx' + $lvl,
- $i = 'i' + $lvl,
- $invalidName = '\' + ' + $key + ' + \'',
- $dataNxt = $it.dataLevel = it.dataLevel + 1,
- $nextData = 'data' + $dataNxt,
- $dataProperties = 'dataProperties' + $lvl,
- $ownProperties = it.opts.ownProperties,
- $currentBaseId = it.baseId;
- out += ' var ' + ($errs) + ' = errors; ';
- if ($ownProperties) {
- out += ' var ' + ($dataProperties) + ' = undefined; ';
- }
- if ($ownProperties) {
- out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
- } else {
- out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
- }
- out += ' var startErrs' + ($lvl) + ' = errors; ';
- var $passData = $key;
- var $wasComposite = it.compositeRule;
- it.compositeRule = $it.compositeRule = true;
- 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) + ' ';
- }
- it.compositeRule = $it.compositeRule = $wasComposite;
- out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + '<errors; ' + ($i) + '++) { vErrors[' + ($i) + '].propertyName = ' + ($key) + '; } var err = '; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('propertyNames') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { propertyName: \'' + ($invalidName) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'property name \\\'' + ($invalidName) + '\\\' is invalid\' ';
- }
- 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; ';
- }
- }
- if ($breakOnError) {
- out += ' break; ';
- }
- out += ' } }';
- }
- if ($breakOnError) {
- out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
- }
- out = it.util.cleanUpCode(out);
- return out;
-}
diff --git a/deps/npm/node_modules/ajv/lib/dotjs/validate.js b/deps/npm/node_modules/ajv/lib/dotjs/validate.js
deleted file mode 100644
index 5ff9beee70..0000000000
--- a/deps/npm/node_modules/ajv/lib/dotjs/validate.js
+++ /dev/null
@@ -1,458 +0,0 @@
-'use strict';
-module.exports = function generate_validate(it, $keyword, $ruleType) {
- var out = '';
- var $async = it.schema.$async === true,
- $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'),
- $id = it.self._getId(it.schema);
- if (it.isTop) {
- if ($async) {
- it.async = true;
- var $es7 = it.opts.async == 'es7';
- it.yieldAwait = $es7 ? 'await' : 'yield';
- }
- out += ' var validate = ';
- if ($async) {
- if ($es7) {
- out += ' (async function ';
- } else {
- if (it.opts.async != '*') {
- out += 'co.wrap';
- }
- out += '(function* ';
- }
- } else {
- out += ' (function ';
- }
- out += ' (data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; ';
- if ($id && (it.opts.sourceCode || it.opts.processCode)) {
- out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' ';
- }
- }
- if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) {
- var $keyword = 'false schema';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $errorKeyword;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- if (it.schema === false) {
- if (it.isTop) {
- $breakOnError = true;
- } else {
- out += ' var ' + ($valid) + ' = false; ';
- }
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
- if (it.opts.messages !== false) {
- out += ' , message: \'boolean schema is false\' ';
- }
- 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++; ';
- }
- } else {
- if (it.isTop) {
- if ($async) {
- out += ' return data; ';
- } else {
- out += ' validate.errors = null; return true; ';
- }
- } else {
- out += ' var ' + ($valid) + ' = true; ';
- }
- }
- if (it.isTop) {
- out += ' }); return validate; ';
- }
- return out;
- }
- if (it.isTop) {
- var $top = it.isTop,
- $lvl = it.level = 0,
- $dataLvl = it.dataLevel = 0,
- $data = 'data';
- it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema));
- it.baseId = it.baseId || it.rootId;
- delete it.isTop;
- it.dataPathArr = [undefined];
- out += ' 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 ($id) it.baseId = it.resolve.url(it.baseId, $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 = '';
- var $errorKeyword;
- var $typeSchema = it.schema.type,
- $typeIsArray = Array.isArray($typeSchema);
- if ($typeIsArray && $typeSchema.length == 1) {
- $typeSchema = $typeSchema[0];
- $typeIsArray = false;
- }
- if (it.schema.$ref && $refKeywords) {
- if (it.opts.extendRefs == 'fail') {
- throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)');
- } else if (it.opts.extendRefs !== true) {
- $refKeywords = false;
- it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
- }
- }
- if ($typeSchema) {
- if (it.opts.coerceTypes) {
- var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema);
- }
- var $rulesGroup = it.RULES.types[$typeSchema];
- if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) {
- var $schemaPath = it.schemaPath + '.type',
- $errSchemaPath = it.errSchemaPath + '/type';
- var $schemaPath = it.schemaPath + '.type',
- $errSchemaPath = it.errSchemaPath + '/type',
- $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';
- out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { ';
- if ($coerceToTypes) {
- 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 { ';
- var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
- $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
- out += ' ' + ($data) + ' = ' + ($coerced) + '; ';
- if (!$dataLvl) {
- out += 'if (' + ($parentData) + ' !== undefined)';
- }
- out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } ';
- } else {
- 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 (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 {
- if (it.opts.v5 && it.schema.patternGroups) {
- it.logger.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.');
- }
- 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)) {
- var $code = $rule.code(it, $rule.keyword, $rulesGroup.type);
- if ($code) {
- out += ' ' + ($code) + ' ';
- if ($breakOnError) {
- $closingBraces1 += '}';
- }
- }
- }
- }
- }
- if ($breakOnError) {
- out += ' ' + ($closingBraces1) + ' ';
- $closingBraces1 = '';
- }
- if ($rulesGroup.type) {
- out += ' } ';
- if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) {
- 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 ($breakOnError) {
- out += ' ' + ($closingBraces2) + ' ';
- }
- if ($top) {
- if ($async) {
- out += ' if (errors === 0) return data; ';
- 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) {
- out = it.util.finalCleanUpCode(out, $async);
- }
-
- function $shouldUseGroup($rulesGroup) {
- var rules = $rulesGroup.rules;
- for (var i = 0; i < rules.length; i++)
- if ($shouldUseRule(rules[i])) return true;
- }
-
- function $shouldUseRule($rule) {
- return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule));
- }
-
- function $ruleImplementsSomeKeyword($rule) {
- var impl = $rule.implements;
- for (var i = 0; i < impl.length; i++)
- if (it.schema[impl[i]] !== undefined) return true;
- }
- return out;
-}
diff --git a/deps/npm/node_modules/ajv/lib/patternGroups.js b/deps/npm/node_modules/ajv/lib/patternGroups.js
deleted file mode 100644
index 531a8d004e..0000000000
--- a/deps/npm/node_modules/ajv/lib/patternGroups.js
+++ /dev/null
@@ -1,36 +0,0 @@
-'use strict';
-
-var META_SCHEMA_ID = 'http://json-schema.org/draft-06/schema';
-
-module.exports = function (ajv) {
- var defaultMeta = ajv._opts.defaultMeta;
- var metaSchemaRef = typeof defaultMeta == 'string'
- ? { $ref: defaultMeta }
- : ajv.getSchema(META_SCHEMA_ID)
- ? { $ref: META_SCHEMA_ID }
- : {};
-
- ajv.addKeyword('patternGroups', {
- // implemented in properties.jst
- metaSchema: {
- type: 'object',
- additionalProperties: {
- type: 'object',
- required: [ 'schema' ],
- properties: {
- maximum: {
- type: 'integer',
- minimum: 0
- },
- minimum: {
- type: 'integer',
- minimum: 0
- },
- schema: metaSchemaRef
- },
- additionalProperties: false
- }
- }
- });
- ajv.RULES.all.properties.implements.push('patternGroups');
-};
diff --git a/deps/npm/node_modules/ajv/lib/refs/$data.json b/deps/npm/node_modules/ajv/lib/refs/$data.json
deleted file mode 100644
index 9ab8f41c2f..0000000000
--- a/deps/npm/node_modules/ajv/lib/refs/$data.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "$schema": "http://json-schema.org/draft-06/schema#",
- "$id": "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#",
- "description": "Meta-schema for $data reference (JSON-schema extension proposal)",
- "type": "object",
- "required": [ "$data" ],
- "properties": {
- "$data": {
- "type": "string",
- "anyOf": [
- { "format": "relative-json-pointer" },
- { "format": "json-pointer" }
- ]
- }
- },
- "additionalProperties": false
-}
diff --git a/deps/npm/node_modules/ajv/lib/refs/json-schema-draft-06.json b/deps/npm/node_modules/ajv/lib/refs/json-schema-draft-06.json
deleted file mode 100644
index 5656240b94..0000000000
--- a/deps/npm/node_modules/ajv/lib/refs/json-schema-draft-06.json
+++ /dev/null
@@ -1,154 +0,0 @@
-{
- "$schema": "http://json-schema.org/draft-06/schema#",
- "$id": "http://json-schema.org/draft-06/schema#",
- "title": "Core schema meta-schema",
- "definitions": {
- "schemaArray": {
- "type": "array",
- "minItems": 1,
- "items": { "$ref": "#" }
- },
- "nonNegativeInteger": {
- "type": "integer",
- "minimum": 0
- },
- "nonNegativeIntegerDefault0": {
- "allOf": [
- { "$ref": "#/definitions/nonNegativeInteger" },
- { "default": 0 }
- ]
- },
- "simpleTypes": {
- "enum": [
- "array",
- "boolean",
- "integer",
- "null",
- "number",
- "object",
- "string"
- ]
- },
- "stringArray": {
- "type": "array",
- "items": { "type": "string" },
- "uniqueItems": true,
- "default": []
- }
- },
- "type": ["object", "boolean"],
- "properties": {
- "$id": {
- "type": "string",
- "format": "uri-reference"
- },
- "$schema": {
- "type": "string",
- "format": "uri"
- },
- "$ref": {
- "type": "string",
- "format": "uri-reference"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "default": {},
- "examples": {
- "type": "array",
- "items": {}
- },
- "multipleOf": {
- "type": "number",
- "exclusiveMinimum": 0
- },
- "maximum": {
- "type": "number"
- },
- "exclusiveMaximum": {
- "type": "number"
- },
- "minimum": {
- "type": "number"
- },
- "exclusiveMinimum": {
- "type": "number"
- },
- "maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
- "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
- "pattern": {
- "type": "string",
- "format": "regex"
- },
- "additionalItems": { "$ref": "#" },
- "items": {
- "anyOf": [
- { "$ref": "#" },
- { "$ref": "#/definitions/schemaArray" }
- ],
- "default": {}
- },
- "maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
- "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
- "uniqueItems": {
- "type": "boolean",
- "default": false
- },
- "contains": { "$ref": "#" },
- "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
- "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
- "required": { "$ref": "#/definitions/stringArray" },
- "additionalProperties": { "$ref": "#" },
- "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" }
- ]
- }
- },
- "propertyNames": { "$ref": "#" },
- "const": {},
- "enum": {
- "type": "array",
- "minItems": 1,
- "uniqueItems": true
- },
- "type": {
- "anyOf": [
- { "$ref": "#/definitions/simpleTypes" },
- {
- "type": "array",
- "items": { "$ref": "#/definitions/simpleTypes" },
- "minItems": 1,
- "uniqueItems": true
- }
- ]
- },
- "format": { "type": "string" },
- "allOf": { "$ref": "#/definitions/schemaArray" },
- "anyOf": { "$ref": "#/definitions/schemaArray" },
- "oneOf": { "$ref": "#/definitions/schemaArray" },
- "not": { "$ref": "#" }
- },
- "default": {}
-}
diff --git a/deps/npm/node_modules/ansi-regex/index.js b/deps/npm/node_modules/ansi-regex/index.js
index c4aaecf505..b9574ed7e8 100644
--- a/deps/npm/node_modules/ansi-regex/index.js
+++ b/deps/npm/node_modules/ansi-regex/index.js
@@ -1,10 +1,4 @@
'use strict';
-
-module.exports = () => {
- const pattern = [
- '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)',
- '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'
- ].join('|');
-
- return new RegExp(pattern, 'g');
+module.exports = function () {
+ return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g;
};
diff --git a/deps/npm/node_modules/ansi-regex/license b/deps/npm/node_modules/ansi-regex/license
index e7af2f7710..654d0bfe94 100644
--- a/deps/npm/node_modules/ansi-regex/license
+++ b/deps/npm/node_modules/ansi-regex/license
@@ -1,9 +1,21 @@
-MIT License
+The MIT License (MIT)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/ansi-regex/package.json b/deps/npm/node_modules/ansi-regex/package.json
index aae73cfd74..4a2879cf6f 100644
--- a/deps/npm/node_modules/ansi-regex/package.json
+++ b/deps/npm/node_modules/ansi-regex/package.json
@@ -1,32 +1,27 @@
{
- "_args": [
- [
- "ansi-regex@3.0.0",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "ansi-regex@3.0.0",
- "_id": "ansi-regex@3.0.0",
+ "_from": "ansi-regex@2.1.1",
+ "_id": "ansi-regex@2.1.1",
"_inBundle": false,
- "_integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+ "_integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"_location": "/ansi-regex",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "ansi-regex@3.0.0",
+ "raw": "ansi-regex@2.1.1",
"name": "ansi-regex",
"escapedName": "ansi-regex",
- "rawSpec": "3.0.0",
+ "rawSpec": "2.1.1",
"saveSpec": null,
- "fetchSpec": "3.0.0"
+ "fetchSpec": "2.1.1"
},
"_requiredBy": [
- "/",
- "/strip-ansi"
+ "#USER",
+ "/"
],
- "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
- "_spec": "3.0.0",
+ "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+ "_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df",
+ "_spec": "ansi-regex@2.1.1",
"_where": "/Users/rebecca/code/npm",
"author": {
"name": "Sindre Sorhus",
@@ -36,13 +31,15 @@
"bugs": {
"url": "https://github.com/chalk/ansi-regex/issues"
},
+ "bundleDependencies": false,
+ "deprecated": false,
"description": "Regular expression for matching ANSI escape codes",
"devDependencies": {
- "ava": "*",
- "xo": "*"
+ "ava": "0.17.0",
+ "xo": "0.16.0"
},
"engines": {
- "node": ">=4"
+ "node": ">=0.10.0"
},
"files": [
"index.js"
@@ -76,14 +73,37 @@
"pattern"
],
"license": "MIT",
+ "maintainers": [
+ {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ {
+ "name": "Joshua Appelman",
+ "email": "jappelman@xebia.com",
+ "url": "jbnicolai.com"
+ },
+ {
+ "name": "JD Ballard",
+ "email": "i.am.qix@gmail.com",
+ "url": "github.com/qix-"
+ }
+ ],
"name": "ansi-regex",
"repository": {
"type": "git",
"url": "git+https://github.com/chalk/ansi-regex.git"
},
"scripts": {
- "test": "xo && ava",
+ "test": "xo && ava --verbose",
"view-supported": "node fixtures/view-codes.js"
},
- "version": "3.0.0"
+ "version": "2.1.1",
+ "xo": {
+ "rules": {
+ "guard-for-in": 0,
+ "no-loop-func": 0
+ }
+ }
}
diff --git a/deps/npm/node_modules/ansi-regex/readme.md b/deps/npm/node_modules/ansi-regex/readme.md
index 22db1c3405..6a928edf0f 100644
--- a/deps/npm/node_modules/ansi-regex/readme.md
+++ b/deps/npm/node_modules/ansi-regex/readme.md
@@ -1,12 +1,12 @@
# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex)
-> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
+> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
## Install
```
-$ npm install ansi-regex
+$ npm install --save ansi-regex
```
@@ -15,32 +15,25 @@ $ npm install ansi-regex
```js
const ansiRegex = require('ansi-regex');
-ansiRegex().test('\u001B[4mcake\u001B[0m');
+ansiRegex().test('\u001b[4mcake\u001b[0m');
//=> true
ansiRegex().test('cake');
//=> false
-'\u001B[4mcake\u001B[0m'.match(ansiRegex());
-//=> ['\u001B[4m', '\u001B[0m']
+'\u001b[4mcake\u001b[0m'.match(ansiRegex());
+//=> ['\u001b[4m', '\u001b[0m']
```
-
## FAQ
### Why do you test for codes not in the ECMA 48 standard?
-Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
+Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
-## Maintainers
-
-- [Sindre Sorhus](https://github.com/sindresorhus)
-- [Josh Junon](https://github.com/qix-)
-
-
## License
-MIT
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/assert-plus/CHANGES.md b/deps/npm/node_modules/assert-plus/CHANGES.md
index 57d92bfdb9..d249d9b2ab 100644
--- a/deps/npm/node_modules/assert-plus/CHANGES.md
+++ b/deps/npm/node_modules/assert-plus/CHANGES.md
@@ -1,11 +1,5 @@
# assert-plus Changelog
-## 1.0.0
-
-- *BREAKING* assert.number (and derivatives) now accept Infinity as valid input
-- Add assert.finite check. Previous assert.number callers should use this if
- they expect Infinity inputs to throw.
-
## 0.2.0
- Fix `assert.object(null)` so it throws
diff --git a/deps/npm/node_modules/assert-plus/README.md b/deps/npm/node_modules/assert-plus/README.md
index ec200d161e..0b39593cef 100644
--- a/deps/npm/node_modules/assert-plus/README.md
+++ b/deps/npm/node_modules/assert-plus/README.md
@@ -74,48 +74,41 @@ The complete list of APIs is:
* assert.buffer
* assert.func
* assert.number
-* assert.finite
* assert.object
* assert.string
* assert.stream
* assert.date
-* assert.regexp
+* assert.regex
* assert.uuid
* assert.arrayOfArray
* assert.arrayOfBool
* assert.arrayOfBuffer
* assert.arrayOfFunc
* assert.arrayOfNumber
-* assert.arrayOfFinite
* assert.arrayOfObject
* assert.arrayOfString
* assert.arrayOfStream
* assert.arrayOfDate
-* assert.arrayOfRegexp
* assert.arrayOfUuid
* assert.optionalArray
* assert.optionalBool
* assert.optionalBuffer
* assert.optionalFunc
* assert.optionalNumber
-* assert.optionalFinite
* assert.optionalObject
* assert.optionalString
* assert.optionalStream
* assert.optionalDate
-* assert.optionalRegexp
* assert.optionalUuid
* assert.optionalArrayOfArray
* assert.optionalArrayOfBool
* assert.optionalArrayOfBuffer
* assert.optionalArrayOfFunc
* assert.optionalArrayOfNumber
-* assert.optionalArrayOfFinite
* assert.optionalArrayOfObject
* assert.optionalArrayOfString
* assert.optionalArrayOfStream
* assert.optionalArrayOfDate
-* assert.optionalArrayOfRegexp
* assert.optionalArrayOfUuid
* assert.AssertionError
* assert.fail
diff --git a/deps/npm/node_modules/assert-plus/assert.js b/deps/npm/node_modules/assert-plus/assert.js
index 26f944eec3..6bce4d8c6c 100644
--- a/deps/npm/node_modules/assert-plus/assert.js
+++ b/deps/npm/node_modules/assert-plus/assert.js
@@ -56,11 +56,6 @@ var types = {
},
number: {
check: function (arg) {
- return typeof (arg) === 'number' && !isNaN(arg);
- }
- },
- finite: {
- check: function (arg) {
return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg);
}
},
diff --git a/deps/npm/node_modules/assert-plus/package.json b/deps/npm/node_modules/assert-plus/package.json
index b8acadcae5..a16c864fbe 100644
--- a/deps/npm/node_modules/assert-plus/package.json
+++ b/deps/npm/node_modules/assert-plus/package.json
@@ -1,32 +1,27 @@
{
- "_from": "assert-plus@^1.0.0",
- "_id": "assert-plus@1.0.0",
+ "_from": "assert-plus@^0.2.0",
+ "_id": "assert-plus@0.2.0",
"_inBundle": false,
- "_integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+ "_integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=",
"_location": "/assert-plus",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "assert-plus@^1.0.0",
+ "raw": "assert-plus@^0.2.0",
"name": "assert-plus",
"escapedName": "assert-plus",
- "rawSpec": "^1.0.0",
+ "rawSpec": "^0.2.0",
"saveSpec": null,
- "fetchSpec": "^1.0.0"
+ "fetchSpec": "^0.2.0"
},
"_requiredBy": [
- "/dashdash",
- "/getpass",
- "/http-signature",
- "/jsprim",
- "/sshpk",
- "/verror"
+ "/http-signature"
],
- "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "_shasum": "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525",
- "_spec": "assert-plus@^1.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/http-signature",
+ "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz",
+ "_shasum": "d74e1b87e7affc0db8aadb7021f3fe48101ab234",
+ "_spec": "assert-plus@^0.2.0",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/http-signature",
"author": {
"name": "Mark Cavage",
"email": "mcavage@gmail.com"
@@ -83,5 +78,5 @@
"scripts": {
"test": "tape tests/*.js | ./node_modules/.bin/faucet"
},
- "version": "1.0.0"
+ "version": "0.2.0"
}
diff --git a/deps/npm/node_modules/aws-sign2/index.js b/deps/npm/node_modules/aws-sign2/index.js
index 5efa65523d..54766a1351 100644
--- a/deps/npm/node_modules/aws-sign2/index.js
+++ b/deps/npm/node_modules/aws-sign2/index.js
@@ -133,7 +133,7 @@ function stringToSign (options) {
]
return r.join('\n')
}
-module.exports.stringToSign = stringToSign
+module.exports.queryStringToSign = stringToSign
/**
* Return a string for sign() with the given `options`, but is meant exclusively
diff --git a/deps/npm/node_modules/aws-sign2/package.json b/deps/npm/node_modules/aws-sign2/package.json
index e2e71ad113..e3de9483e6 100644
--- a/deps/npm/node_modules/aws-sign2/package.json
+++ b/deps/npm/node_modules/aws-sign2/package.json
@@ -1,27 +1,27 @@
{
- "_from": "aws-sign2@~0.7.0",
- "_id": "aws-sign2@0.7.0",
+ "_from": "aws-sign2@~0.6.0",
+ "_id": "aws-sign2@0.6.0",
"_inBundle": false,
- "_integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
+ "_integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=",
"_location": "/aws-sign2",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "aws-sign2@~0.7.0",
+ "raw": "aws-sign2@~0.6.0",
"name": "aws-sign2",
"escapedName": "aws-sign2",
- "rawSpec": "~0.7.0",
+ "rawSpec": "~0.6.0",
"saveSpec": null,
- "fetchSpec": "~0.7.0"
+ "fetchSpec": "~0.6.0"
},
"_requiredBy": [
"/request"
],
- "_resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
- "_shasum": "b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8",
- "_spec": "aws-sign2@~0.7.0",
- "_where": "/Users/rebecca/code/npm/node_modules/request",
+ "_resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz",
+ "_shasum": "14342dd38dbcc94d0e5b87d763cd63612c0e794f",
+ "_spec": "aws-sign2@~0.6.0",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/request",
"author": {
"name": "Mikeal Rogers",
"email": "mikeal.rogers@gmail.com",
@@ -46,5 +46,5 @@
"repository": {
"url": "git+https://github.com/mikeal/aws-sign.git"
},
- "version": "0.7.0"
+ "version": "0.6.0"
}
diff --git a/deps/npm/node_modules/bcrypt-pbkdf/CONTRIBUTING.md b/deps/npm/node_modules/bcrypt-pbkdf/CONTRIBUTING.md
new file mode 100644
index 0000000000..401d34ed5c
--- /dev/null
+++ b/deps/npm/node_modules/bcrypt-pbkdf/CONTRIBUTING.md
@@ -0,0 +1,13 @@
+# Contributing
+
+This repository uses [cr.joyent.us](https://cr.joyent.us) (Gerrit) for new
+changes. Anyone can submit changes. To get started, see the [cr.joyent.us user
+guide](https://github.com/joyent/joyent-gerrit/blob/master/docs/user/README.md).
+This repo does not use GitHub pull requests.
+
+See the [Joyent Engineering
+Guidelines](https://github.com/joyent/eng/blob/master/docs/index.md) for general
+best practices expected in this repository.
+
+If you're changing something non-trivial or user-facing, you may want to submit
+an issue first.
diff --git a/deps/npm/node_modules/bcrypt-pbkdf/LICENSE b/deps/npm/node_modules/bcrypt-pbkdf/LICENSE
new file mode 100644
index 0000000000..fc58d2ab15
--- /dev/null
+++ b/deps/npm/node_modules/bcrypt-pbkdf/LICENSE
@@ -0,0 +1,66 @@
+The Blowfish portions are under the following license:
+
+Blowfish block cipher for OpenBSD
+Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
+All rights reserved.
+
+Implementation advice by David Mazieres <dm@lcs.mit.edu>.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+The bcrypt_pbkdf portions are under the following license:
+
+Copyright (c) 2013 Ted Unangst <tedu@openbsd.org>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+
+
+Performance improvements (Javascript-specific):
+
+Copyright 2016, Joyent Inc
+Author: Alex Wilson <alex.wilson@joyent.com>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/bcrypt-pbkdf/README.md b/deps/npm/node_modules/bcrypt-pbkdf/README.md
index 12018090bb..7551f335cc 100644
--- a/deps/npm/node_modules/bcrypt-pbkdf/README.md
+++ b/deps/npm/node_modules/bcrypt-pbkdf/README.md
@@ -1,6 +1,5 @@
Port of the OpenBSD `bcrypt_pbkdf` function to pure Javascript. `npm`-ified
-version of [Devi Mandiri's port]
-(https://github.com/devi/tmp/blob/master/js/bcrypt_pbkdf.js),
+version of [Devi Mandiri's port](https://github.com/devi/tmp/blob/master/js/bcrypt_pbkdf.js),
with some minor performance improvements. The code is copied verbatim (and
un-styled) from Devi's work.
@@ -37,3 +36,10 @@ Parameters:
* `sha2pass`, a Uint8Array of length 64
* `sha2salt`, a Uint8Array of length 64
* `out`, a Uint8Array of length 32, will be filled with output
+
+## License
+
+This source form is a 1:1 port from the OpenBSD `blowfish.c` and `bcrypt_pbkdf.c`.
+As a result, it retains the original copyright and license. The two files are
+under slightly different (but compatible) licenses, and are here combined in
+one file. For each of the full license texts see `LICENSE`.
diff --git a/deps/npm/node_modules/bcrypt-pbkdf/package.json b/deps/npm/node_modules/bcrypt-pbkdf/package.json
index 592df34e24..eb936078e6 100644
--- a/deps/npm/node_modules/bcrypt-pbkdf/package.json
+++ b/deps/npm/node_modules/bcrypt-pbkdf/package.json
@@ -1,8 +1,8 @@
{
"_from": "bcrypt-pbkdf@^1.0.0",
- "_id": "bcrypt-pbkdf@1.0.1",
+ "_id": "bcrypt-pbkdf@1.0.2",
"_inBundle": false,
- "_integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=",
+ "_integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
"_location": "/bcrypt-pbkdf",
"_phantomChildren": {},
"_requested": {
@@ -18,10 +18,13 @@
"_requiredBy": [
"/sshpk"
],
- "_resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz",
- "_shasum": "63bc5dcb61331b92bc05fd528953c33462a06f8d",
+ "_resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
+ "_shasum": "a4301d389b6a43f9b67ff3ca11a3f6637e360e9e",
"_spec": "bcrypt-pbkdf@^1.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/sshpk",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/sshpk",
+ "bugs": {
+ "url": "https://github.com/joyent/node-bcrypt-pbkdf/issues"
+ },
"bundleDependencies": false,
"dependencies": {
"tweetnacl": "^0.14.3"
@@ -29,8 +32,13 @@
"deprecated": false,
"description": "Port of the OpenBSD bcrypt_pbkdf function to pure JS",
"devDependencies": {},
+ "homepage": "https://github.com/joyent/node-bcrypt-pbkdf#readme",
"license": "BSD-3-Clause",
"main": "index.js",
"name": "bcrypt-pbkdf",
- "version": "1.0.1"
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/joyent/node-bcrypt-pbkdf.git"
+ },
+ "version": "1.0.2"
}
diff --git a/deps/npm/node_modules/boom/.npmignore b/deps/npm/node_modules/boom/.npmignore
new file mode 100644
index 0000000000..b0939eabe3
--- /dev/null
+++ b/deps/npm/node_modules/boom/.npmignore
@@ -0,0 +1,17 @@
+.idea
+*.iml
+npm-debug.log
+dump.rdb
+node_modules
+results.tap
+results.xml
+npm-shrinkwrap.json
+config.json
+.DS_Store
+*/.DS_Store
+*/*/.DS_Store
+._*
+*/._*
+*/*/._*
+coverage.*
+lib-cov
diff --git a/deps/npm/node_modules/boom/.travis.yml b/deps/npm/node_modules/boom/.travis.yml
new file mode 100755
index 0000000000..7a64dd2210
--- /dev/null
+++ b/deps/npm/node_modules/boom/.travis.yml
@@ -0,0 +1,7 @@
+language: node_js
+
+node_js:
+ - 0.10
+ - 4.0
+
+sudo: false
diff --git a/deps/npm/node_modules/boom/CONTRIBUTING.md b/deps/npm/node_modules/boom/CONTRIBUTING.md
new file mode 100644
index 0000000000..892836159b
--- /dev/null
+++ b/deps/npm/node_modules/boom/CONTRIBUTING.md
@@ -0,0 +1 @@
+Please view our [hapijs contributing guide](https://github.com/hapijs/hapi/blob/master/CONTRIBUTING.md).
diff --git a/deps/npm/node_modules/boom/LICENSE b/deps/npm/node_modules/boom/LICENSE
index 94b91cbf09..394688939d 100755
--- a/deps/npm/node_modules/boom/LICENSE
+++ b/deps/npm/node_modules/boom/LICENSE
@@ -1,5 +1,4 @@
-Copyright (c) 2012-2017, Project contributors.
-Copyright (c) 2012-2014, Walmart.
+Copyright (c) 2012-2014, Walmart and other contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -26,4 +25,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* * *
-The complete list of contributors can be found at: https://github.com/hapijs/boom/graphs/contributors
+The complete list of contributors can be found at: https://github.com/hapijs/boom/graphs/contributors \ No newline at end of file
diff --git a/deps/npm/node_modules/boom/README.md b/deps/npm/node_modules/boom/README.md
index 6452491b90..cbd91c9319 100755
--- a/deps/npm/node_modules/boom/README.md
+++ b/deps/npm/node_modules/boom/README.md
@@ -2,54 +2,11 @@
HTTP-friendly error objects
-[![Build Status](https://secure.travis-ci.org/hapijs/boom.svg)](http://travis-ci.org/hapijs/boom)
+[![Build Status](https://secure.travis-ci.org/hapijs/boom.png)](http://travis-ci.org/hapijs/boom)
[![Current Version](https://img.shields.io/npm/v/boom.svg)](https://www.npmjs.com/package/boom)
Lead Maintainer: [Adam Bretz](https://github.com/arb)
-<!-- toc -->
-
-- [Boom](#boom)
- - [Helper Methods](#helper-methods)
- - [`wrap(error, [statusCode], [message])`](#wraperror-statuscode-message)
- - [`create(statusCode, [message], [data])`](#createstatuscode-message-data)
- - [HTTP 4xx Errors](#http-4xx-errors)
- - [`Boom.badRequest([message], [data])`](#boombadrequestmessage-data)
- - [`Boom.unauthorized([message], [scheme], [attributes])`](#boomunauthorizedmessage-scheme-attributes)
- - [`Boom.paymentRequired([message], [data])`](#boompaymentrequiredmessage-data)
- - [`Boom.forbidden([message], [data])`](#boomforbiddenmessage-data)
- - [`Boom.notFound([message], [data])`](#boomnotfoundmessage-data)
- - [`Boom.methodNotAllowed([message], [data], [allow])`](#boommethodnotallowedmessage-data-allow)
- - [`Boom.notAcceptable([message], [data])`](#boomnotacceptablemessage-data)
- - [`Boom.proxyAuthRequired([message], [data])`](#boomproxyauthrequiredmessage-data)
- - [`Boom.clientTimeout([message], [data])`](#boomclienttimeoutmessage-data)
- - [`Boom.conflict([message], [data])`](#boomconflictmessage-data)
- - [`Boom.resourceGone([message], [data])`](#boomresourcegonemessage-data)
- - [`Boom.lengthRequired([message], [data])`](#boomlengthrequiredmessage-data)
- - [`Boom.preconditionFailed([message], [data])`](#boompreconditionfailedmessage-data)
- - [`Boom.entityTooLarge([message], [data])`](#boomentitytoolargemessage-data)
- - [`Boom.uriTooLong([message], [data])`](#boomuritoolongmessage-data)
- - [`Boom.unsupportedMediaType([message], [data])`](#boomunsupportedmediatypemessage-data)
- - [`Boom.rangeNotSatisfiable([message], [data])`](#boomrangenotsatisfiablemessage-data)
- - [`Boom.expectationFailed([message], [data])`](#boomexpectationfailedmessage-data)
- - [`Boom.teapot([message], [data])`](#boomteapotmessage-data)
- - [`Boom.badData([message], [data])`](#boombaddatamessage-data)
- - [`Boom.locked([message], [data])`](#boomlockedmessage-data)
- - [`Boom.preconditionRequired([message], [data])`](#boompreconditionrequiredmessage-data)
- - [`Boom.tooManyRequests([message], [data])`](#boomtoomanyrequestsmessage-data)
- - [`Boom.illegal([message], [data])`](#boomillegalmessage-data)
- - [HTTP 5xx Errors](#http-5xx-errors)
- - [`Boom.badImplementation([message], [data])` - (*alias: `internal`*)](#boombadimplementationmessage-data---alias-internal)
- - [`Boom.notImplemented([message], [data])`](#boomnotimplementedmessage-data)
- - [`Boom.badGateway([message], [data])`](#boombadgatewaymessage-data)
- - [`Boom.serverUnavailable([message], [data])`](#boomserverunavailablemessage-data)
- - [`Boom.gatewayTimeout([message], [data])`](#boomgatewaytimeoutmessage-data)
- - [F.A.Q.](#faq)
-
-<!-- tocstop -->
-
-# Boom
-
**boom** provides a set of utilities for returning HTTP errors. Each utility returns a `Boom` error response
object (instance of `Error`) which includes the following properties:
- `isBoom` - if `true`, indicates this is a `Boom` object instance.
@@ -70,6 +27,41 @@ object (instance of `Error`) which includes the following properties:
The `Boom` object also supports the following method:
- `reformat()` - rebuilds `error.output` using the other object properties.
+## Overview
+
+- Helper methods
+ - [`wrap(error, [statusCode], [message])`](#wraperror-statuscode-message)
+ - [`create(statusCode, [message], [data])`](#createstatuscode-message-data)
+- HTTP 4xx Errors
+ - 400: [`Boom.badRequest([message], [data])`](#boombadrequestmessage-data)
+ - 401: [`Boom.unauthorized([message], [scheme], [attributes])`](#boomunauthorizedmessage-scheme-attributes)
+ - 403: [`Boom.forbidden([message], [data])`](#boomforbiddenmessage-data)
+ - 404: [`Boom.notFound([message], [data])`](#boomnotfoundmessage-data)
+ - 405: [`Boom.methodNotAllowed([message], [data])`](#boommethodnotallowedmessage-data)
+ - 406: [`Boom.notAcceptable([message], [data])`](#boomnotacceptablemessage-data)
+ - 407: [`Boom.proxyAuthRequired([message], [data])`](#boomproxyauthrequiredmessage-data)
+ - 408: [`Boom.clientTimeout([message], [data])`](#boomclienttimeoutmessage-data)
+ - 409: [`Boom.conflict([message], [data])`](#boomconflictmessage-data)
+ - 410: [`Boom.resourceGone([message], [data])`](#boomresourcegonemessage-data)
+ - 411: [`Boom.lengthRequired([message], [data])`](#boomlengthrequiredmessage-data)
+ - 412: [`Boom.preconditionFailed([message], [data])`](#boompreconditionfailedmessage-data)
+ - 413: [`Boom.entityTooLarge([message], [data])`](#boomentitytoolargemessage-data)
+ - 414: [`Boom.uriTooLong([message], [data])`](#boomuritoolongmessage-data)
+ - 415: [`Boom.unsupportedMediaType([message], [data])`](#boomunsupportedmediatypemessage-data)
+ - 416: [`Boom.rangeNotSatisfiable([message], [data])`](#boomrangenotsatisfiablemessage-data)
+ - 417: [`Boom.expectationFailed([message], [data])`](#boomexpectationfailedmessage-data)
+ - 422: [`Boom.badData([message], [data])`](#boombaddatamessage-data)
+ - 428: [`Boom.preconditionRequired([message], [data])`](#boompreconditionrequiredmessage-data)
+ - 429: [`Boom.tooManyRequests([message], [data])`](#boomtoomanyrequestsmessage-data)
+- HTTP 5xx Errors
+ - 500: [`Boom.badImplementation([message], [data])`](#boombadimplementationmessage-data)
+ - 501: [`Boom.notImplemented([message], [data])`](#boomnotimplementedmessage-data)
+ - 502: [`Boom.badGateway([message], [data])`](#boombadgatewaymessage-data)
+ - 503: [`Boom.serverTimeout([message], [data])`](#boomservertimeoutmessage-data)
+ - 504: [`Boom.gatewayTimeout([message], [data])`](#boomgatewaytimeoutmessage-data)
+- [FAQ](#faq)
+
+
## Helper Methods
### `wrap(error, [statusCode], [message])`
@@ -126,8 +118,8 @@ Returns a 401 Unauthorized error where:
- an authentication scheme name
- an array of string values. These values will be separated by ', ' and set to the 'WWW-Authenticate' header.
- `attributes` - an object of values to use while setting the 'WWW-Authenticate' header. This value is only used
- when `scheme` is a string, otherwise it is ignored. Every key/value pair will be included in the
- 'WWW-Authenticate' in the format of 'key="value"' as well as in the response payload under the `attributes` key. Alternatively value can be a string which is use to set the value of the scheme, for example setting the token value for negotiate header. If string is used message parameter must be null.
+ when `schema` is a string, otherwise it is ignored. Every key/value pair will be included in the
+ 'WWW-Authenticate' in the format of 'key="value"' as well as in the response payload under the `attributes` key.
`null` and `undefined` will be replaced with an empty string. If `attributes` is set, `message` will be used as
the 'error' segment of the 'WWW-Authenticate' header. If `message` is unset, the 'error' segment of the header
will not be present and `isMissing` will be true on the error object.
@@ -170,23 +162,6 @@ Generates the following response:
```
```js
-Boom.unauthorized(null, 'Negotiate', 'VGhpcyBpcyBhIHRlc3QgdG9rZW4=');
-```
-
-Generates the following response:
-
-```json
-"payload": {
- "statusCode": 401,
- "error": "Unauthorized",
- "attributes": "VGhpcyBpcyBhIHRlc3QgdG9rZW4="
-},
-"headers" {
- "WWW-Authenticate": "Negotiate VGhpcyBpcyBhIHRlc3QgdG9rZW4="
-}
-```
-
-```js
Boom.unauthorized('invalid password', 'sample', { ttl: 0, cache: null, foo: 'bar' });
```
@@ -209,26 +184,6 @@ Generates the following response:
}
```
-### `Boom.paymentRequired([message], [data])`
-
-Returns a 402 Payment Required error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.paymentRequired('bandwidth used');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 402,
- "error": "Payment Required",
- "message": "bandwidth used"
-}
-```
-
### `Boom.forbidden([message], [data])`
Returns a 403 Forbidden error where:
@@ -269,12 +224,11 @@ Generates the following response payload:
}
```
-### `Boom.methodNotAllowed([message], [data], [allow])`
+### `Boom.methodNotAllowed([message], [data])`
Returns a 405 Method Not Allowed error where:
- `message` - optional message.
- `data` - optional additional error data.
-- `allow` - optional string or array of strings (to be combined and separated by ', ') which is set to the 'Allow' header.
```js
Boom.methodNotAllowed('that method is not allowed');
@@ -528,26 +482,6 @@ Generates the following response payload:
}
```
-### `Boom.teapot([message], [data])`
-
-Returns a 418 I'm a Teapot error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.teapot('sorry, no coffee...');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 418,
- "error": "I'm a Teapot",
- "message": "Sorry, no coffee..."
-}
-```
-
### `Boom.badData([message], [data])`
Returns a 422 Unprocessable Entity error where:
@@ -568,26 +502,6 @@ Generates the following response payload:
}
```
-### `Boom.locked([message], [data])`
-
-Returns a 423 Locked error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.locked('this resource has been locked');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 423,
- "error": "Locked",
- "message": "this resource has been locked"
-}
-```
-
### `Boom.preconditionRequired([message], [data])`
Returns a 428 Precondition Required error where:
@@ -628,31 +542,11 @@ Generates the following response payload:
}
```
-### `Boom.illegal([message], [data])`
-
-Returns a 451 Unavailable For Legal Reasons error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.illegal('you are not permitted to view this resource for legal reasons');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 451,
- "error": "Unavailable For Legal Reasons",
- "message": "you are not permitted to view this resource for legal reasons"
-}
-```
-
## HTTP 5xx Errors
All 500 errors hide your message from the end user. Your message is recorded in the server log.
-### `Boom.badImplementation([message], [data])` - (*alias: `internal`*)
+### `Boom.badImplementation([message], [data])`
Returns a 500 Internal Server Error error where:
- `message` - optional message.
@@ -712,14 +606,14 @@ Generates the following response payload:
}
```
-### `Boom.serverUnavailable([message], [data])`
+### `Boom.serverTimeout([message], [data])`
Returns a 503 Service Unavailable error where:
- `message` - optional message.
- `data` - optional additional error data.
```js
-Boom.serverUnavailable('unavailable');
+Boom.serverTimeout('unavailable');
```
Generates the following response payload:
@@ -753,8 +647,6 @@ Generates the following response payload:
## F.A.Q.
-**Q** How do I include extra information in my responses? `output.payload` is missing `data`, what gives?
-
-**A** There is a reason the values passed back in the response payloads are pretty locked down. It's mostly for security and to not leak any important information back to the client. This means you will need to put in a little more effort to include extra information about your custom error. Check out the ["Error transformation"](https://github.com/hapijs/hapi/blob/master/API.md#error-transformation) section in the hapi documentation.
+###### How do I include extra information in my responses? `output.payload` is missing `data`, what gives?
----
+There is a reason the values passed back in the response payloads are pretty locked down. It's mostly for security and to not leak any important information back to the client. This means you will need to put in a little more effort to include extra information about your custom error. Check out the ["Error transformation"](https://github.com/hapijs/hapi/blob/master/API.md#error-transformation) section in the hapi documentation.
diff --git a/deps/npm/node_modules/boom/images/boom.png b/deps/npm/node_modules/boom/images/boom.png
new file mode 100755
index 0000000000..373bc13455
--- /dev/null
+++ b/deps/npm/node_modules/boom/images/boom.png
Binary files differ
diff --git a/deps/npm/node_modules/boom/lib/index.js b/deps/npm/node_modules/boom/lib/index.js
index 17ed0279ea..6bdea69368 100755
--- a/deps/npm/node_modules/boom/lib/index.js
+++ b/deps/npm/node_modules/boom/lib/index.js
@@ -1,80 +1,16 @@
-'use strict';
-
// Load modules
-const Hoek = require('hoek');
+var Http = require('http');
+var Hoek = require('hoek');
// Declare internals
-const internals = {
- STATUS_CODES: Object.setPrototypeOf({
- '100': 'Continue',
- '101': 'Switching Protocols',
- '102': 'Processing',
- '200': 'OK',
- '201': 'Created',
- '202': 'Accepted',
- '203': 'Non-Authoritative Information',
- '204': 'No Content',
- '205': 'Reset Content',
- '206': 'Partial Content',
- '207': 'Multi-Status',
- '300': 'Multiple Choices',
- '301': 'Moved Permanently',
- '302': 'Moved Temporarily',
- '303': 'See Other',
- '304': 'Not Modified',
- '305': 'Use Proxy',
- '307': 'Temporary Redirect',
- '400': 'Bad Request',
- '401': 'Unauthorized',
- '402': 'Payment Required',
- '403': 'Forbidden',
- '404': 'Not Found',
- '405': 'Method Not Allowed',
- '406': 'Not Acceptable',
- '407': 'Proxy Authentication Required',
- '408': 'Request Time-out',
- '409': 'Conflict',
- '410': 'Gone',
- '411': 'Length Required',
- '412': 'Precondition Failed',
- '413': 'Request Entity Too Large',
- '414': 'Request-URI Too Large',
- '415': 'Unsupported Media Type',
- '416': 'Requested Range Not Satisfiable',
- '417': 'Expectation Failed',
- '418': 'I\'m a teapot',
- '422': 'Unprocessable Entity',
- '423': 'Locked',
- '424': 'Failed Dependency',
- '425': 'Unordered Collection',
- '426': 'Upgrade Required',
- '428': 'Precondition Required',
- '429': 'Too Many Requests',
- '431': 'Request Header Fields Too Large',
- '451': 'Unavailable For Legal Reasons',
- '500': 'Internal Server Error',
- '501': 'Not Implemented',
- '502': 'Bad Gateway',
- '503': 'Service Unavailable',
- '504': 'Gateway Time-out',
- '505': 'HTTP Version Not Supported',
- '506': 'Variant Also Negotiates',
- '507': 'Insufficient Storage',
- '509': 'Bandwidth Limit Exceeded',
- '510': 'Not Extended',
- '511': 'Network Authentication Required'
- }, null)
-};
-
+var internals = {};
exports.wrap = function (error, statusCode, message) {
Hoek.assert(error instanceof Error, 'Cannot wrap non-Error object');
- Hoek.assert(!error.isBoom || (!statusCode && !message), 'Cannot provide statusCode or message with boom error');
-
return (error.isBoom ? error : internals.initialize(error, statusCode || 500, message));
};
@@ -84,27 +20,18 @@ exports.create = function (statusCode, message, data) {
return internals.create(statusCode, message, data, exports.create);
};
-
internals.create = function (statusCode, message, data, ctor) {
- if (message instanceof Error) {
- if (data) {
- message.data = data;
- }
- return exports.wrap(message, statusCode);
- }
-
- const error = new Error(message ? message : undefined); // Avoids settings null message
+ var error = new Error(message ? message : undefined); // Avoids settings null message
Error.captureStackTrace(error, ctor); // Filter the stack to our external API
error.data = data || null;
internals.initialize(error, statusCode);
return error;
};
-
internals.initialize = function (error, statusCode, message) {
- const numberCode = parseInt(statusCode, 10);
+ var numberCode = parseInt(statusCode, 10);
Hoek.assert(!isNaN(numberCode) && numberCode >= 400, 'First argument must be a number (400+):', statusCode);
error.isBoom = true;
@@ -140,7 +67,7 @@ internals.initialize = function (error, statusCode, message) {
internals.reformat = function () {
this.output.payload.statusCode = this.output.statusCode;
- this.output.payload.error = internals.STATUS_CODES[this.output.statusCode] || 'Unknown';
+ this.output.payload.error = Http.STATUS_CODES[this.output.statusCode] || 'Unknown';
if (this.output.statusCode === 500) {
this.output.payload.message = 'An internal server error occurred'; // Hide actual error from user
@@ -161,13 +88,15 @@ exports.badRequest = function (message, data) {
exports.unauthorized = function (message, scheme, attributes) { // Or function (message, wwwAuthenticate[])
- const err = internals.create(401, message, undefined, exports.unauthorized);
+ var err = internals.create(401, message, undefined, exports.unauthorized);
if (!scheme) {
return err;
}
- let wwwAuthenticate = '';
+ var wwwAuthenticate = '';
+ var i = 0;
+ var il = 0;
if (typeof scheme === 'string') {
@@ -180,36 +109,29 @@ exports.unauthorized = function (message, scheme, attributes) { // Or f
}
if (attributes) {
- if (typeof attributes === 'string') {
- wwwAuthenticate = wwwAuthenticate + ' ' + Hoek.escapeHeaderAttribute(attributes);
- err.output.payload.attributes = attributes;
- }
- else {
- const names = Object.keys(attributes);
- for (let i = 0; i < names.length; ++i) {
- const name = names[i];
- if (i) {
- wwwAuthenticate = wwwAuthenticate + ',';
- }
-
- let value = attributes[name];
- if (value === null ||
- value === undefined) { // Value can be zero
-
- value = '';
- }
- wwwAuthenticate = wwwAuthenticate + ' ' + name + '="' + Hoek.escapeHeaderAttribute(value.toString()) + '"';
- err.output.payload.attributes[name] = value;
+ var names = Object.keys(attributes);
+ for (i = 0, il = names.length; i < il; ++i) {
+ var name = names[i];
+ if (i) {
+ wwwAuthenticate += ',';
}
+
+ var value = attributes[name];
+ if (value === null ||
+ value === undefined) { // Value can be zero
+
+ value = '';
+ }
+ wwwAuthenticate += ' ' + name + '="' + Hoek.escapeHeaderAttribute(value.toString()) + '"';
+ err.output.payload.attributes[name] = value;
}
}
-
if (message) {
if (attributes) {
- wwwAuthenticate = wwwAuthenticate + ',';
+ wwwAuthenticate += ',';
}
- wwwAuthenticate = wwwAuthenticate + ' error="' + Hoek.escapeHeaderAttribute(message) + '"';
+ wwwAuthenticate += ' error="' + Hoek.escapeHeaderAttribute(message) + '"';
err.output.payload.attributes.error = message;
}
else {
@@ -220,13 +142,13 @@ exports.unauthorized = function (message, scheme, attributes) { // Or f
// function (message, wwwAuthenticate[])
- const wwwArray = scheme;
- for (let i = 0; i < wwwArray.length; ++i) {
+ var wwwArray = scheme;
+ for (i = 0, il = wwwArray.length; i < il; ++i) {
if (i) {
- wwwAuthenticate = wwwAuthenticate + ', ';
+ wwwAuthenticate += ', ';
}
- wwwAuthenticate = wwwAuthenticate + wwwArray[i];
+ wwwAuthenticate += wwwArray[i];
}
}
@@ -236,12 +158,6 @@ exports.unauthorized = function (message, scheme, attributes) { // Or f
};
-exports.paymentRequired = function (message, data) {
-
- return internals.create(402, message, data, exports.paymentRequired);
-};
-
-
exports.forbidden = function (message, data) {
return internals.create(403, message, data, exports.forbidden);
@@ -254,19 +170,9 @@ exports.notFound = function (message, data) {
};
-exports.methodNotAllowed = function (message, data, allow) {
-
- const err = internals.create(405, message, data, exports.methodNotAllowed);
-
- if (typeof allow === 'string') {
- allow = [allow];
- }
-
- if (Array.isArray(allow)) {
- err.output.headers.Allow = allow.join(', ');
- }
+exports.methodNotAllowed = function (message, data) {
- return err;
+ return internals.create(405, message, data, exports.methodNotAllowed);
};
@@ -341,25 +247,12 @@ exports.expectationFailed = function (message, data) {
return internals.create(417, message, data, exports.expectationFailed);
};
-
-exports.teapot = function (message, data) {
-
- return internals.create(418, message, data, exports.teapot);
-};
-
-
exports.badData = function (message, data) {
return internals.create(422, message, data, exports.badData);
};
-exports.locked = function (message, data) {
-
- return internals.create(423, message, data, exports.locked);
-};
-
-
exports.preconditionRequired = function (message, data) {
return internals.create(428, message, data, exports.preconditionRequired);
@@ -372,12 +265,6 @@ exports.tooManyRequests = function (message, data) {
};
-exports.illegal = function (message, data) {
-
- return internals.create(451, message, data, exports.illegal);
-};
-
-
// 5xx Server Errors
exports.internal = function (message, data, statusCode) {
@@ -385,14 +272,12 @@ exports.internal = function (message, data, statusCode) {
return internals.serverError(message, data, statusCode, exports.internal);
};
-
internals.serverError = function (message, data, statusCode, ctor) {
- let error;
+ var error;
if (data instanceof Error) {
error = exports.wrap(data, statusCode, message);
- }
- else {
+ } else {
error = internals.create(statusCode || 500, message, undefined, ctor);
error.data = data;
}
@@ -413,9 +298,9 @@ exports.badGateway = function (message, data) {
};
-exports.serverUnavailable = function (message, data) {
+exports.serverTimeout = function (message, data) {
- return internals.serverError(message, data, 503, exports.serverUnavailable);
+ return internals.serverError(message, data, 503, exports.serverTimeout);
};
@@ -427,7 +312,7 @@ exports.gatewayTimeout = function (message, data) {
exports.badImplementation = function (message, data) {
- const err = internals.serverError(message, data, 500, exports.badImplementation);
+ var err = internals.serverError(message, data, 500, exports.badImplementation);
err.isDeveloperError = true;
return err;
};
diff --git a/deps/npm/node_modules/boom/package.json b/deps/npm/node_modules/boom/package.json
index 6edb39cf28..f776e82789 100644
--- a/deps/npm/node_modules/boom/package.json
+++ b/deps/npm/node_modules/boom/package.json
@@ -1,43 +1,43 @@
{
- "_from": "boom@4.x.x",
- "_id": "boom@4.3.1",
+ "_from": "boom@2.x.x",
+ "_id": "boom@2.10.1",
"_inBundle": false,
- "_integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=",
+ "_integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
"_location": "/boom",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "boom@4.x.x",
+ "raw": "boom@2.x.x",
"name": "boom",
"escapedName": "boom",
- "rawSpec": "4.x.x",
+ "rawSpec": "2.x.x",
"saveSpec": null,
- "fetchSpec": "4.x.x"
+ "fetchSpec": "2.x.x"
},
"_requiredBy": [
+ "/cryptiles",
"/hawk"
],
- "_resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz",
- "_shasum": "4f8a3005cb4a7e3889f749030fd25b96e01d2e31",
- "_spec": "boom@4.x.x",
- "_where": "/Users/rebecca/code/npm/node_modules/hawk",
+ "_resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
+ "_shasum": "39c8918ceff5799f83f9492a848f625add0c766f",
+ "_spec": "boom@2.x.x",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/hawk",
"bugs": {
"url": "https://github.com/hapijs/boom/issues"
},
"bundleDependencies": false,
"dependencies": {
- "hoek": "4.x.x"
+ "hoek": "2.x.x"
},
"deprecated": false,
"description": "HTTP-friendly error objects",
"devDependencies": {
- "code": "4.x.x",
- "lab": "13.x.x",
- "markdown-toc": "0.12.x"
+ "code": "1.x.x",
+ "lab": "7.x.x"
},
"engines": {
- "node": ">=4.0.0"
+ "node": ">=0.10.40"
},
"homepage": "https://github.com/hapijs/boom#readme",
"keywords": [
@@ -52,10 +52,8 @@
"url": "git://github.com/hapijs/boom.git"
},
"scripts": {
- "test": "lab -a code -t 100 -L -v",
- "test-cov-html": "lab -a code -r html -o coverage.html -L",
- "toc": "node generate-toc.js",
- "version": "npm run toc && git add README.md"
+ "test": "lab -a code -t 100 -L",
+ "test-cov-html": "lab -a code -r html -o coverage.html -L"
},
- "version": "4.3.1"
+ "version": "2.10.1"
}
diff --git a/deps/npm/node_modules/boom/test/index.js b/deps/npm/node_modules/boom/test/index.js
new file mode 100755
index 0000000000..79a59e9f46
--- /dev/null
+++ b/deps/npm/node_modules/boom/test/index.js
@@ -0,0 +1,654 @@
+// Load modules
+
+var Code = require('code');
+var Boom = require('../lib');
+var Lab = require('lab');
+
+
+// Declare internals
+
+var internals = {};
+
+
+// Test shortcuts
+
+var lab = exports.lab = Lab.script();
+var describe = lab.describe;
+var it = lab.it;
+var expect = Code.expect;
+
+
+it('returns the same object when already boom', function (done) {
+
+ var error = Boom.badRequest();
+ var wrapped = Boom.wrap(error);
+ expect(error).to.equal(wrapped);
+ done();
+});
+
+it('returns an error with info when constructed using another error', function (done) {
+
+ var error = new Error('ka-boom');
+ error.xyz = 123;
+ var err = Boom.wrap(error);
+ expect(err.xyz).to.equal(123);
+ expect(err.message).to.equal('ka-boom');
+ expect(err.output).to.deep.equal({
+ statusCode: 500,
+ payload: {
+ statusCode: 500,
+ error: 'Internal Server Error',
+ message: 'An internal server error occurred'
+ },
+ headers: {}
+ });
+ expect(err.data).to.equal(null);
+ done();
+});
+
+it('does not override data when constructed using another error', function (done) {
+
+ var error = new Error('ka-boom');
+ error.data = { useful: 'data' };
+ var err = Boom.wrap(error);
+ expect(err.data).to.equal(error.data);
+ done();
+});
+
+it('sets new message when none exists', function (done) {
+
+ var error = new Error();
+ var wrapped = Boom.wrap(error, 400, 'something bad');
+ expect(wrapped.message).to.equal('something bad');
+ done();
+});
+
+it('throws when statusCode is not a number', function (done) {
+
+ expect(function () {
+
+ Boom.create('x');
+ }).to.throw('First argument must be a number (400+): x');
+ done();
+});
+
+it('will cast a number-string to an integer', function (done) {
+
+ var codes = [
+ { input: '404', result: 404 },
+ { input: '404.1', result: 404 },
+ { input: 400, result: 400 },
+ { input: 400.123, result: 400 }];
+ for (var i = 0, il = codes.length; i < il; ++i) {
+ var code = codes[i];
+ var err = Boom.create(code.input);
+ expect(err.output.statusCode).to.equal(code.result);
+ }
+
+ done();
+});
+
+it('throws when statusCode is not finite', function (done) {
+
+ expect(function () {
+
+ Boom.create(1 / 0);
+ }).to.throw('First argument must be a number (400+): null');
+ done();
+});
+
+it('sets error code to unknown', function (done) {
+
+ var err = Boom.create(999);
+ expect(err.output.payload.error).to.equal('Unknown');
+ done();
+});
+
+describe('create()', function () {
+
+ it('does not sets null message', function (done) {
+
+ var error = Boom.unauthorized(null);
+ expect(error.output.payload.message).to.not.exist();
+ expect(error.isServer).to.be.false();
+ done();
+ });
+
+ it('sets message and data', function (done) {
+
+ var error = Boom.badRequest('Missing data', { type: 'user' });
+ expect(error.data.type).to.equal('user');
+ expect(error.output.payload.message).to.equal('Missing data');
+ done();
+ });
+});
+
+describe('isBoom()', function () {
+
+ it('returns true for Boom object', function (done) {
+
+ expect(Boom.badRequest().isBoom).to.equal(true);
+ done();
+ });
+
+ it('returns false for Error object', function (done) {
+
+ expect((new Error()).isBoom).to.not.exist();
+ done();
+ });
+});
+
+describe('badRequest()', function () {
+
+ it('returns a 400 error statusCode', function (done) {
+
+ var error = Boom.badRequest();
+
+ expect(error.output.statusCode).to.equal(400);
+ expect(error.isServer).to.be.false();
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.badRequest('my message').message).to.equal('my message');
+ done();
+ });
+
+ it('sets the message to HTTP status if none provided', function (done) {
+
+ expect(Boom.badRequest().message).to.equal('Bad Request');
+ done();
+ });
+});
+
+describe('unauthorized()', function () {
+
+ it('returns a 401 error statusCode', function (done) {
+
+ var err = Boom.unauthorized();
+ expect(err.output.statusCode).to.equal(401);
+ expect(err.output.headers).to.deep.equal({});
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.unauthorized('my message').message).to.equal('my message');
+ done();
+ });
+
+ it('returns a WWW-Authenticate header when passed a scheme', function (done) {
+
+ var err = Boom.unauthorized('boom', 'Test');
+ expect(err.output.statusCode).to.equal(401);
+ expect(err.output.headers['WWW-Authenticate']).to.equal('Test error="boom"');
+ done();
+ });
+
+ it('returns a WWW-Authenticate header set to the schema array value', function (done) {
+
+ var err = Boom.unauthorized(null, ['Test','one','two']);
+ expect(err.output.statusCode).to.equal(401);
+ expect(err.output.headers['WWW-Authenticate']).to.equal('Test, one, two');
+ done();
+ });
+
+ it('returns a WWW-Authenticate header when passed a scheme and attributes', function (done) {
+
+ var err = Boom.unauthorized('boom', 'Test', { a: 1, b: 'something', c: null, d: 0 });
+ expect(err.output.statusCode).to.equal(401);
+ expect(err.output.headers['WWW-Authenticate']).to.equal('Test a="1", b="something", c="", d="0", error="boom"');
+ expect(err.output.payload.attributes).to.deep.equal({ a: 1, b: 'something', c: '', d: 0, error: 'boom' });
+ done();
+ });
+
+ it('returns a WWW-Authenticate header when passed attributes, missing error', function (done) {
+
+ var err = Boom.unauthorized(null, 'Test', { a: 1, b: 'something', c: null, d: 0 });
+ expect(err.output.statusCode).to.equal(401);
+ expect(err.output.headers['WWW-Authenticate']).to.equal('Test a="1", b="something", c="", d="0"');
+ expect(err.isMissing).to.equal(true);
+ done();
+ });
+
+ it('sets the isMissing flag when error message is empty', function (done) {
+
+ var err = Boom.unauthorized('', 'Basic');
+ expect(err.isMissing).to.equal(true);
+ done();
+ });
+
+ it('does not set the isMissing flag when error message is not empty', function (done) {
+
+ var err = Boom.unauthorized('message', 'Basic');
+ expect(err.isMissing).to.equal(undefined);
+ done();
+ });
+
+ it('sets a WWW-Authenticate when passed as an array', function (done) {
+
+ var err = Boom.unauthorized('message', ['Basic', 'Example e="1"', 'Another x="3", y="4"']);
+ expect(err.output.headers['WWW-Authenticate']).to.equal('Basic, Example e="1", Another x="3", y="4"');
+ done();
+ });
+});
+
+
+describe('methodNotAllowed()', function () {
+
+ it('returns a 405 error statusCode', function (done) {
+
+ expect(Boom.methodNotAllowed().output.statusCode).to.equal(405);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.methodNotAllowed('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('notAcceptable()', function () {
+
+ it('returns a 406 error statusCode', function (done) {
+
+ expect(Boom.notAcceptable().output.statusCode).to.equal(406);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.notAcceptable('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('proxyAuthRequired()', function () {
+
+ it('returns a 407 error statusCode', function (done) {
+
+ expect(Boom.proxyAuthRequired().output.statusCode).to.equal(407);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.proxyAuthRequired('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('clientTimeout()', function () {
+
+ it('returns a 408 error statusCode', function (done) {
+
+ expect(Boom.clientTimeout().output.statusCode).to.equal(408);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.clientTimeout('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('conflict()', function () {
+
+ it('returns a 409 error statusCode', function (done) {
+
+ expect(Boom.conflict().output.statusCode).to.equal(409);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.conflict('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('resourceGone()', function () {
+
+ it('returns a 410 error statusCode', function (done) {
+
+ expect(Boom.resourceGone().output.statusCode).to.equal(410);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.resourceGone('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('lengthRequired()', function () {
+
+ it('returns a 411 error statusCode', function (done) {
+
+ expect(Boom.lengthRequired().output.statusCode).to.equal(411);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.lengthRequired('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('preconditionFailed()', function () {
+
+ it('returns a 412 error statusCode', function (done) {
+
+ expect(Boom.preconditionFailed().output.statusCode).to.equal(412);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.preconditionFailed('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('entityTooLarge()', function () {
+
+ it('returns a 413 error statusCode', function (done) {
+
+ expect(Boom.entityTooLarge().output.statusCode).to.equal(413);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.entityTooLarge('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('uriTooLong()', function () {
+
+ it('returns a 414 error statusCode', function (done) {
+
+ expect(Boom.uriTooLong().output.statusCode).to.equal(414);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.uriTooLong('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('unsupportedMediaType()', function () {
+
+ it('returns a 415 error statusCode', function (done) {
+
+ expect(Boom.unsupportedMediaType().output.statusCode).to.equal(415);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.unsupportedMediaType('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('rangeNotSatisfiable()', function () {
+
+ it('returns a 416 error statusCode', function (done) {
+
+ expect(Boom.rangeNotSatisfiable().output.statusCode).to.equal(416);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.rangeNotSatisfiable('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('expectationFailed()', function () {
+
+ it('returns a 417 error statusCode', function (done) {
+
+ expect(Boom.expectationFailed().output.statusCode).to.equal(417);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.expectationFailed('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('badData()', function () {
+
+ it('returns a 422 error statusCode', function (done) {
+
+ expect(Boom.badData().output.statusCode).to.equal(422);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.badData('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('preconditionRequired()', function () {
+
+ it('returns a 428 error statusCode', function (done) {
+
+ expect(Boom.preconditionRequired().output.statusCode).to.equal(428);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.preconditionRequired('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('tooManyRequests()', function () {
+
+ it('returns a 429 error statusCode', function (done) {
+
+ expect(Boom.tooManyRequests().output.statusCode).to.equal(429);
+ done();
+ });
+
+ it('sets the message with the passed-in message', function (done) {
+
+ expect(Boom.tooManyRequests('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+describe('serverTimeout()', function () {
+
+ it('returns a 503 error statusCode', function (done) {
+
+ expect(Boom.serverTimeout().output.statusCode).to.equal(503);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.serverTimeout('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+describe('forbidden()', function () {
+
+ it('returns a 403 error statusCode', function (done) {
+
+ expect(Boom.forbidden().output.statusCode).to.equal(403);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.forbidden('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+describe('notFound()', function () {
+
+ it('returns a 404 error statusCode', function (done) {
+
+ expect(Boom.notFound().output.statusCode).to.equal(404);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.notFound('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+describe('internal()', function () {
+
+ it('returns a 500 error statusCode', function (done) {
+
+ expect(Boom.internal().output.statusCode).to.equal(500);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ var err = Boom.internal('my message');
+ expect(err.message).to.equal('my message');
+ expect(err.isServer).to.true();
+ expect(err.output.payload.message).to.equal('An internal server error occurred');
+ done();
+ });
+
+ it('passes data on the callback if its passed in', function (done) {
+
+ expect(Boom.internal('my message', { my: 'data' }).data.my).to.equal('data');
+ done();
+ });
+
+ it('returns an error with composite message', function (done) {
+
+ try {
+ JSON.parse('{');
+ }
+ catch (err) {
+ var boom = Boom.internal('Someting bad', err);
+ expect(boom.message).to.equal('Someting bad: Unexpected end of input');
+ expect(boom.isServer).to.be.true();
+ done();
+ }
+ });
+});
+
+describe('notImplemented()', function () {
+
+ it('returns a 501 error statusCode', function (done) {
+
+ expect(Boom.notImplemented().output.statusCode).to.equal(501);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.notImplemented('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('badGateway()', function () {
+
+ it('returns a 502 error statusCode', function (done) {
+
+ expect(Boom.badGateway().output.statusCode).to.equal(502);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.badGateway('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+describe('gatewayTimeout()', function () {
+
+ it('returns a 504 error statusCode', function (done) {
+
+ expect(Boom.gatewayTimeout().output.statusCode).to.equal(504);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.gatewayTimeout('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+describe('badImplementation()', function () {
+
+ it('returns a 500 error statusCode', function (done) {
+
+ var err = Boom.badImplementation();
+ expect(err.output.statusCode).to.equal(500);
+ expect(err.isDeveloperError).to.equal(true);
+ expect(err.isServer).to.be.true();
+ done();
+ });
+});
+
+describe('stack trace', function () {
+
+ it('should omit lib', function (done) {
+
+ ['badRequest', 'unauthorized', 'forbidden', 'notFound', 'methodNotAllowed',
+ 'notAcceptable', 'proxyAuthRequired', 'clientTimeout', 'conflict',
+ 'resourceGone', 'lengthRequired', 'preconditionFailed', 'entityTooLarge',
+ 'uriTooLong', 'unsupportedMediaType', 'rangeNotSatisfiable', 'expectationFailed',
+ 'badData', 'preconditionRequired', 'tooManyRequests',
+
+ // 500s
+ 'internal', 'notImplemented', 'badGateway', 'serverTimeout', 'gatewayTimeout',
+ 'badImplementation'
+ ].forEach(function (name) {
+
+ var err = Boom[name]();
+ expect(err.stack).to.not.match(/\/lib\/index\.js/);
+ });
+
+ done();
+ });
+});
diff --git a/deps/npm/node_modules/cidr-regex/package.json b/deps/npm/node_modules/cidr-regex/package.json
index 2b84d9c194..3aa8b4032c 100644
--- a/deps/npm/node_modules/cidr-regex/package.json
+++ b/deps/npm/node_modules/cidr-regex/package.json
@@ -1,27 +1,32 @@
{
- "_from": "cidr-regex@^2.0.8",
- "_id": "cidr-regex@2.0.8",
+ "_args": [
+ [
+ "cidr-regex@2.0.9",
+ "/Users/rebecca/code/npm"
+ ]
+ ],
+ "_from": "cidr-regex@2.0.9",
+ "_id": "cidr-regex@2.0.9",
"_inBundle": false,
- "_integrity": "sha512-3r0E5P6Oeg4SCvEERX7W5fPkPz8nKWwGzU6RJ/VvROOsqiq5g6sf43c/g+sUpA29Htc7R0SG15P/Scr5lfap4g==",
+ "_integrity": "sha512-F7/fBRUU45FnvSPjXdpIrc++WRSBdCiSTlyq4ZNhLKOlHFNWgtzZ0Fd+zrqI/J1j0wmlx/f5ZQDmD2GcbrNcmw==",
"_location": "/cidr-regex",
"_phantomChildren": {},
"_requested": {
- "type": "range",
+ "type": "version",
"registry": true,
- "raw": "cidr-regex@^2.0.8",
+ "raw": "cidr-regex@2.0.9",
"name": "cidr-regex",
"escapedName": "cidr-regex",
- "rawSpec": "^2.0.8",
+ "rawSpec": "2.0.9",
"saveSpec": null,
- "fetchSpec": "^2.0.8"
+ "fetchSpec": "2.0.9"
},
"_requiredBy": [
"/is-cidr"
],
- "_resolved": "https://registry.npmjs.org/cidr-regex/-/cidr-regex-2.0.8.tgz",
- "_shasum": "c79bae6223d241c0860d93bfde1fb1c1c4fdcab6",
- "_spec": "cidr-regex@^2.0.8",
- "_where": "/Users/rebecca/code/npm/node_modules/is-cidr",
+ "_resolved": "https://registry.npmjs.org/cidr-regex/-/cidr-regex-2.0.9.tgz",
+ "_spec": "2.0.9",
+ "_where": "/Users/rebecca/code/npm",
"author": {
"name": "silverwind",
"email": "me@silverwind.io"
@@ -29,7 +34,6 @@
"bugs": {
"url": "https://github.com/silverwind/cidr-regex/issues"
},
- "bundleDependencies": false,
"contributors": [
{
"name": "Felipe Apostol",
@@ -40,13 +44,12 @@
"dependencies": {
"ip-regex": "^2.1.0"
},
- "deprecated": false,
"description": "Regular expression for matching IP addresses in CIDR notation",
"devDependencies": {
"ava": "^0.25.0",
- "eslint": "^4.18.2",
- "eslint-config-silverwind": "^1.0.37",
- "updates": "^2.3.1"
+ "eslint": "^4.19.1",
+ "eslint-config-silverwind": "^1.0.42",
+ "updates": "^3.0.0"
},
"engines": {
"node": ">=4"
@@ -74,5 +77,5 @@
"scripts": {
"test": "make test"
},
- "version": "2.0.8"
+ "version": "2.0.9"
}
diff --git a/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/index.js b/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/index.js
deleted file mode 100644
index b9574ed7e8..0000000000
--- a/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-module.exports = function () {
- return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g;
-};
diff --git a/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/package.json b/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/package.json
deleted file mode 100644
index 865aec1dcf..0000000000
--- a/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/package.json
+++ /dev/null
@@ -1,108 +0,0 @@
-{
- "_from": "ansi-regex@^2.0.0",
- "_id": "ansi-regex@2.1.1",
- "_inBundle": false,
- "_integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
- "_location": "/cli-columns/ansi-regex",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "ansi-regex@^2.0.0",
- "name": "ansi-regex",
- "escapedName": "ansi-regex",
- "rawSpec": "^2.0.0",
- "saveSpec": null,
- "fetchSpec": "^2.0.0"
- },
- "_requiredBy": [
- "/cli-columns/strip-ansi"
- ],
- "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df",
- "_spec": "ansi-regex@^2.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/cli-columns/node_modules/strip-ansi",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/chalk/ansi-regex/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Regular expression for matching ANSI escape codes",
- "devDependencies": {
- "ava": "0.17.0",
- "xo": "0.16.0"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/chalk/ansi-regex#readme",
- "keywords": [
- "ansi",
- "styles",
- "color",
- "colour",
- "colors",
- "terminal",
- "console",
- "cli",
- "string",
- "tty",
- "escape",
- "formatting",
- "rgb",
- "256",
- "shell",
- "xterm",
- "command-line",
- "text",
- "regex",
- "regexp",
- "re",
- "match",
- "test",
- "find",
- "pattern"
- ],
- "license": "MIT",
- "maintainers": [
- {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- {
- "name": "Joshua Appelman",
- "email": "jappelman@xebia.com",
- "url": "jbnicolai.com"
- },
- {
- "name": "JD Ballard",
- "email": "i.am.qix@gmail.com",
- "url": "github.com/qix-"
- }
- ],
- "name": "ansi-regex",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/chalk/ansi-regex.git"
- },
- "scripts": {
- "test": "xo && ava --verbose",
- "view-supported": "node fixtures/view-codes.js"
- },
- "version": "2.1.1",
- "xo": {
- "rules": {
- "guard-for-in": 0,
- "no-loop-func": 0
- }
- }
-}
diff --git a/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/readme.md b/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/readme.md
deleted file mode 100644
index 6a928edf0f..0000000000
--- a/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/readme.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex)
-
-> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
-
-
-## Install
-
-```
-$ npm install --save ansi-regex
-```
-
-
-## Usage
-
-```js
-const ansiRegex = require('ansi-regex');
-
-ansiRegex().test('\u001b[4mcake\u001b[0m');
-//=> true
-
-ansiRegex().test('cake');
-//=> false
-
-'\u001b[4mcake\u001b[0m'.match(ansiRegex());
-//=> ['\u001b[4m', '\u001b[0m']
-```
-
-## FAQ
-
-### Why do you test for codes not in the ECMA 48 standard?
-
-Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
-
-On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/index.js b/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/index.js
deleted file mode 100644
index 099480fbfc..0000000000
--- a/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/index.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-var ansiRegex = require('ansi-regex')();
-
-module.exports = function (str) {
- return typeof str === 'string' ? str.replace(ansiRegex, '') : str;
-};
diff --git a/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/license b/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/cli-table2/.npmignore b/deps/npm/node_modules/cli-table2/.npmignore
deleted file mode 100644
index 3a3558960b..0000000000
--- a/deps/npm/node_modules/cli-table2/.npmignore
+++ /dev/null
@@ -1,5 +0,0 @@
-node_modules/
-.idea/
-coverage/
-JasmineAdapter-1.1.2.js
-jasmine-1.1.0.js \ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/.travis.yml b/deps/npm/node_modules/cli-table2/.travis.yml
deleted file mode 100644
index 9466d5e0b8..0000000000
--- a/deps/npm/node_modules/cli-table2/.travis.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-language: node_js
-node_js:
- - "0.10"
- - "0.11"
-after_script:
- - cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js \ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/advanced-usage.md b/deps/npm/node_modules/cli-table2/advanced-usage.md
deleted file mode 100644
index 69bbe7ce2e..0000000000
--- a/deps/npm/node_modules/cli-table2/advanced-usage.md
+++ /dev/null
@@ -1,246 +0,0 @@
-##### use colSpan to span columns - (colSpan above normal cell)
- ┌───────────────┐
- │ greetings │
- ├───────────────┤
- │ greetings │
- ├───────┬───────┤
- │ hello │ howdy │
- └───────┴───────┘
-```javascript
- var table = new Table({style:{head:[],border:[]}});
-
- table.push(
- [{colSpan:2,content:'greetings'}],
- [{colSpan:2,content:'greetings'}],
- ['hello','howdy']
- );
-
-```
-
-
-##### use colSpan to span columns - (colSpan below normal cell)
- ┌───────┬───────┐
- │ hello │ howdy │
- ├───────┴───────┤
- │ greetings │
- ├───────────────┤
- │ greetings │
- └───────────────┘
-```javascript
- var table = new Table({style:{head:[],border:[]}});
-
- table.push(
- ['hello','howdy'],
- [{colSpan:2,content:'greetings'}],
- [{colSpan:2,content:'greetings'}]
- );
-
-```
-
-
-##### use rowSpan to span rows - (rowSpan on the left side)
- ┌───────────┬───────────┬───────┐
- │ greetings │ │ hello │
- │ │ greetings ├───────┤
- │ │ │ howdy │
- └───────────┴───────────┴───────┘
-```javascript
- var table = new Table({style:{head:[],border:[]}});
-
- table.push(
- [{rowSpan:2,content:'greetings'},{rowSpan:2,content:'greetings',vAlign:'center'},'hello'],
- ['howdy']
- );
-
-```
-
-
-##### use rowSpan to span rows - (rowSpan on the right side)
- ┌───────┬───────────┬───────────┐
- │ hello │ greetings │ │
- ├───────┤ │ │
- │ howdy │ │ greetings │
- └───────┴───────────┴───────────┘
-```javascript
- var table = new Table({style:{head:[],border:[]}});
-
- table.push(
- ['hello',{rowSpan:2,content:'greetings'},{rowSpan:2,content:'greetings',vAlign:'bottom'}],
- ['howdy']
- );
-
-```
-
-
-##### mix rowSpan and colSpan together for complex table layouts
- ┌───────┬─────┬────┐
- │ hello │ sup │ hi │
- ├───────┤ │ │
- │ howdy │ │ │
- ├───┬───┼──┬──┤ │
- │ o │ k │ │ │ │
- └───┴───┴──┴──┴────┘
-```javascript
- var table = new Table({style:{head:[],border:[]}});
-
- table.push(
- [{content:'hello',colSpan:2},{rowSpan:2, colSpan:2,content:'sup'},{rowSpan:3,content:'hi'}],
- [{content:'howdy',colSpan:2}],
- ['o','k','','']
- );
-
-```
-
-
-##### multi-line content will flow across rows in rowSpan cells
- ┌───────┬───────────┬───────────┐
- │ hello │ greetings │ greetings │
- ├───────┤ friends │ friends │
- │ howdy │ │ │
- └───────┴───────────┴───────────┘
-```javascript
- var table = new Table({style:{head:[],border:[]}});
-
- table.push(
- ['hello',{rowSpan:2,content:'greetings\nfriends'},{rowSpan:2,content:'greetings\nfriends'}],
- ['howdy']
- );
-
-```
-
-
-##### multi-line content will flow across rows in rowSpan cells - (complex layout)
- ┌───────┬─────┬────┐
- │ hello │ sup │ hi │
- ├───────┤ man │ yo │
- │ howdy │ hey │ │
- ├───┬───┼──┬──┤ │
- │ o │ k │ │ │ │
- └───┴───┴──┴──┴────┘
-```javascript
- var table = new Table({style:{head:[],border:[]}});
-
- table.push(
- [{content:'hello',colSpan:2},{rowSpan:2, colSpan:2,content:'sup\nman\nhey'},{rowSpan:3,content:'hi\nyo'}],
- [{content:'howdy',colSpan:2}],
- ['o','k','','']
- );
-
-```
-
-
-##### rowSpan cells can have a staggered layout
- ┌───┬───┐
- │ a │ b │
- │ ├───┤
- │ │ c │
- ├───┤ │
- │ d │ │
- └───┴───┘
-```javascript
- var table = new Table({style:{head:[],border:[]}});
-
- table.push(
- [{content:'a',rowSpan:2},'b'],
- [{content:'c',rowSpan:2}],
- ['d']
- );
-
-```
-
-
-##### the layout manager automatically create empty cells to fill in the table
- ┌───┬───┬──┐
- │ a │ b │ │
- │ ├───┤ │
- │ │ │ │
- │ ├───┴──┤
- │ │ c │
- ├───┤ │
- │ │ │
- └───┴──────┘
-```javascript
- var table = new Table({style:{head:[],border:[]}});
-
- //notice we only create 3 cells here, but the table ends up having 6.
- table.push(
- [{content:'a',rowSpan:3,colSpan:2},'b'],
- [],
- [{content:'c',rowSpan:2,colSpan:2}],
- []
- );
-```
-
-
-##### use table `rowHeights` option to fix row height. The truncation symbol will be shown on the last line.
- ┌───────┐
- │ hello │
- │ hi… │
- └───────┘
-```javascript
- var table = new Table({rowHeights:[2],style:{head:[],border:[]}});
-
- table.push(['hello\nhi\nsup']);
-
-```
-
-
-##### if `colWidths` is not specified, the layout manager will automatically widen rows to fit the content
- ┌─────────────┐
- │ hello there │
- ├──────┬──────┤
- │ hi │ hi │
- └──────┴──────┘
-```javascript
- var table = new Table({style:{head:[],border:[]}});
-
- table.push(
- [{colSpan:2,content:'hello there'}],
- ['hi', 'hi']
- );
-
-```
-
-
-##### you can specify a column width for only the first row, other rows will be automatically widened to fit content
- ┌─────────────┐
- │ hello there │
- ├────┬────────┤
- │ hi │ hi │
- └────┴────────┘
-```javascript
- var table = new Table({colWidths:[4],style:{head:[],border:[]}});
-
- table.push(
- [{colSpan:2,content:'hello there'}],
- ['hi',{hAlign:'center',content:'hi'}]
- );
-
-```
-
-
-##### a column with a null column width will be automatically widened to fit content
- ┌─────────────┐
- │ hello there │
- ├────────┬────┤
- │ hi │ hi │
- └────────┴────┘
-```javascript
- var table = new Table({colWidths:[null, 4],style:{head:[],border:[]}});
-
- table.push(
- [{colSpan:2,content:'hello there'}],
- [{hAlign:'right',content:'hi'}, 'hi']
- );
-
-```
-
-
-##### feel free to use colors in your content strings, column widths will be calculated correctly
-![table image](https://cdn.rawgit.com/jamestalmage/cli-table2/c806c2636df97f73c732b41aa913cf78d4ac0d39/examples/screenshots/truncation-with-colors.png)
-```javascript
- var table = new Table({colWidths:[5],style:{head:[],border:[]}});
-
- table.push([colors.red('hello')]);
-
-```
diff --git a/deps/npm/node_modules/cli-table2/basic-usage.md b/deps/npm/node_modules/cli-table2/basic-usage.md
deleted file mode 100644
index 7fa93e5e8a..0000000000
--- a/deps/npm/node_modules/cli-table2/basic-usage.md
+++ /dev/null
@@ -1,145 +0,0 @@
-##### Basic Usage
-![table image](https://cdn.rawgit.com/jamestalmage/cli-table2/c806c2636df97f73c732b41aa913cf78d4ac0d39/examples/screenshots/basic-usage-with-colors.png)
-```javascript
- // By default, headers will be red, and borders will be grey
- var table = new Table({head:['a','b']});
-
- table.push(['c','d']);
-
-```
-
-
-##### Basic Usage - disable colors - (used often in the examples and tests)
- ┌──────┬─────────────────────┬─────────────────────────┬─────────────────┐
- │ Rel │ Change │ By │ When │
- ├──────┼─────────────────────┼─────────────────────────┼─────────────────┤
- │ v0.1 │ Testing something … │ rauchg@gmail.com │ 7 minutes ago │
- ├──────┼─────────────────────┼─────────────────────────┼─────────────────┤
- │ v0.1 │ Testing something … │ rauchg@gmail.com │ 8 minutes ago │
- └──────┴─────────────────────┴─────────────────────────┴─────────────────┘
-```javascript
- // For most of these examples, and most of the unit tests we disable colors.
- // It makes unit tests easier to write/understand, and allows these pages to
- // display the examples as text instead of screen shots.
- var table = new Table({
- head: ['Rel', 'Change', 'By', 'When']
- , style: {
- head: [] //disable colors in header cells
- , border: [] //disable colors for the border
- }
- , colWidths: [6, 21, 25, 17] //set the widths of each column (optional)
- });
-
- table.push(
- ['v0.1', 'Testing something cool', 'rauchg@gmail.com', '7 minutes ago']
- , ['v0.1', 'Testing something cool', 'rauchg@gmail.com', '8 minutes ago']
- );
-
-```
-
-
-##### Create vertical tables by adding objects a that specify key-value pairs
- ┌────┬──────────────────────┐
- │v0.1│Testing something cool│
- ├────┼──────────────────────┤
- │v0.1│Testing something cool│
- └────┴──────────────────────┘
-```javascript
- var table = new Table({ style: {'padding-left':0, 'padding-right':0, head:[], border:[]} });
-
- table.push(
- {'v0.1': 'Testing something cool'}
- , {'v0.1': 'Testing something cool'}
- );
-
-```
-
-
-##### Cross tables are similar to vertical tables, but include an empty string for the first header
- ┌────────┬────────┬──────────────────────┐
- │ │Header 1│Header 2 │
- ├────────┼────────┼──────────────────────┤
- │Header 3│v0.1 │Testing something cool│
- ├────────┼────────┼──────────────────────┤
- │Header 4│v0.1 │Testing something cool│
- └────────┴────────┴──────────────────────┘
-```javascript
- var table = new Table({ head: ["", "Header 1", "Header 2"], style: {'padding-left':0, 'padding-right':0, head:[], border:[]} }); // clear styles to prevent color output
-
- table.push(
- {"Header 3": ['v0.1', 'Testing something cool'] }
- , {"Header 4": ['v0.1', 'Testing something cool'] }
- );
-
-```
-
-
-##### Stylize the table with custom border characters
- ╔══════╤═════╤══════╗
- ║ foo │ bar │ baz ║
- ╟──────┼─────┼──────╢
- ║ frob │ bar │ quuz ║
- ╚══════╧═════╧══════╝
-```javascript
- var table = new Table({
- chars: {
- 'top': '═'
- , 'top-mid': '╤'
- , 'top-left': '╔'
- , 'top-right': '╗'
- , 'bottom': '═'
- , 'bottom-mid': '╧'
- , 'bottom-left': '╚'
- , 'bottom-right': '╝'
- , 'left': '║'
- , 'left-mid': '╟'
- , 'right': '║'
- , 'right-mid': '╢'
- },
- style: {
- head: []
- , border: []
- }
- });
-
- table.push(
- ['foo', 'bar', 'baz']
- , ['frob', 'bar', 'quuz']
- );
-
-```
-
-
-##### Use ansi colors (i.e. colors.js) to style text within the cells at will, even across multiple lines
-![table image](https://cdn.rawgit.com/jamestalmage/cli-table2/c806c2636df97f73c732b41aa913cf78d4ac0d39/examples/screenshots/multi-line-colors.png)
-```javascript
- var table = new Table({style:{border:[],header:[]}});
-
- table.push([
- colors.red('Hello\nhow\nare\nyou?'),
- colors.blue('I\nam\nfine\nthanks!')
- ]);
-
-```
-
-
-##### Set `wordWrap` to true to make lines of text wrap instead of being truncated
- ┌───────┬─────────┐
- │ Hello │ I am │
- │ how │ fine │
- │ are │ thanks! │
- │ you? │ │
- └───────┴─────────┘
-```javascript
- var table = new Table({
- style:{border:[],header:[]},
- colWidths:[7,9],
- wordWrap:true
- });
-
- table.push([
- 'Hello how are you?',
- 'I am fine thanks!'
- ]);
-
-```
diff --git a/deps/npm/node_modules/cli-table2/examples/basic-usage-examples.js b/deps/npm/node_modules/cli-table2/examples/basic-usage-examples.js
deleted file mode 100644
index 0542b17d36..0000000000
--- a/deps/npm/node_modules/cli-table2/examples/basic-usage-examples.js
+++ /dev/null
@@ -1,222 +0,0 @@
-var Table = require('../src/table');
-var colors = require('colors/safe');
-
-module.exports = function(runTest) {
-
- function it(name, fn) {
- var result = fn();
- runTest(name, result[0], result[1], result[2]);
- }
-
- it('Basic Usage',function(){
- function makeTable(){
- // By default, headers will be red, and borders will be grey
- var table = new Table({head:['a','b']});
-
- table.push(['c','d']);
-
- return table;
- }
-
- var expected = [
- colors.gray('┌───') + colors.gray('┬───┐')
- , colors.gray('│') + colors.red(' a ') + colors.gray('│') + colors.red(' b ') + colors.gray('│')
- , colors.gray('├───') + colors.gray('┼───┤')
- , colors.gray('│') + (' c ') + colors.gray('│') + (' d ') + colors.gray('│')
- , colors.gray('└───') + colors.gray('┴───┘')
- ];
-
- return [makeTable,expected,'basic-usage-with-colors'];
- });
-
- it('Basic Usage - disable colors - (used often in the examples and tests)', function (){
- function makeTable(){
- // For most of these examples, and most of the unit tests we disable colors.
- // It makes unit tests easier to write/understand, and allows these pages to
- // display the examples as text instead of screen shots.
- var table = new Table({
- head: ['Rel', 'Change', 'By', 'When']
- , style: {
- head: [] //disable colors in header cells
- , border: [] //disable colors for the border
- }
- , colWidths: [6, 21, 25, 17] //set the widths of each column (optional)
- });
-
- table.push(
- ['v0.1', 'Testing something cool', 'rauchg@gmail.com', '7 minutes ago']
- , ['v0.1', 'Testing something cool', 'rauchg@gmail.com', '8 minutes ago']
- );
-
- return table;
- }
-
- var expected = [
- '┌──────┬─────────────────────┬─────────────────────────┬─────────────────┐'
- , '│ Rel │ Change │ By │ When │'
- , '├──────┼─────────────────────┼─────────────────────────┼─────────────────┤'
- , '│ v0.1 │ Testing something … │ rauchg@gmail.com │ 7 minutes ago │'
- , '├──────┼─────────────────────┼─────────────────────────┼─────────────────┤'
- , '│ v0.1 │ Testing something … │ rauchg@gmail.com │ 8 minutes ago │'
- , '└──────┴─────────────────────┴─────────────────────────┴─────────────────┘'
- ];
-
- return [makeTable,expected];
- });
-
- it('Create vertical tables by adding objects a that specify key-value pairs', function() {
- function makeTable(){
- var table = new Table({ style: {'padding-left':0, 'padding-right':0, head:[], border:[]} });
-
- table.push(
- {'v0.1': 'Testing something cool'}
- , {'v0.1': 'Testing something cool'}
- );
-
- return table;
- }
-
- var expected = [
- '┌────┬──────────────────────┐'
- , '│v0.1│Testing something cool│'
- , '├────┼──────────────────────┤'
- , '│v0.1│Testing something cool│'
- , '└────┴──────────────────────┘'
- ];
-
- return [makeTable,expected];
- });
-
- it('Cross tables are similar to vertical tables, but include an empty string for the first header', function() {
- function makeTable(){
- var table = new Table({ head: ["", "Header 1", "Header 2"], style: {'padding-left':0, 'padding-right':0, head:[], border:[]} }); // clear styles to prevent color output
-
- table.push(
- {"Header 3": ['v0.1', 'Testing something cool'] }
- , {"Header 4": ['v0.1', 'Testing something cool'] }
- );
-
- return table;
- }
-
- var expected = [
- '┌────────┬────────┬──────────────────────┐'
- , '│ │Header 1│Header 2 │'
- , '├────────┼────────┼──────────────────────┤'
- , '│Header 3│v0.1 │Testing something cool│'
- , '├────────┼────────┼──────────────────────┤'
- , '│Header 4│v0.1 │Testing something cool│'
- , '└────────┴────────┴──────────────────────┘'
- ];
-
- return [makeTable,expected];
- });
-
- it('Stylize the table with custom border characters', function (){
- function makeTable(){
- var table = new Table({
- chars: {
- 'top': '═'
- , 'top-mid': '╤'
- , 'top-left': '╔'
- , 'top-right': '╗'
- , 'bottom': '═'
- , 'bottom-mid': '╧'
- , 'bottom-left': '╚'
- , 'bottom-right': '╝'
- , 'left': '║'
- , 'left-mid': '╟'
- , 'right': '║'
- , 'right-mid': '╢'
- },
- style: {
- head: []
- , border: []
- }
- });
-
- table.push(
- ['foo', 'bar', 'baz']
- , ['frob', 'bar', 'quuz']
- );
-
- return table;
- }
-
- var expected = [
- '╔══════╤═════╤══════╗'
- , '║ foo │ bar │ baz ║'
- , '╟──────┼─────┼──────╢'
- , '║ frob │ bar │ quuz ║'
- , '╚══════╧═════╧══════╝'
- ];
-
- return [makeTable,expected];
- });
-
- it('Use ansi colors (i.e. colors.js) to style text within the cells at will, even across multiple lines',function(){
- function makeTable(){
- var table = new Table({style:{border:[],header:[]}});
-
- table.push([
- colors.red('Hello\nhow\nare\nyou?'),
- colors.blue('I\nam\nfine\nthanks!')
- ]);
-
- return table;
- }
-
- var expected = [
- '┌───────┬─────────┐'
- , '│ ' + colors.red('Hello') + ' │ ' + colors.blue('I') + ' │'
- , '│ ' + colors.red('how') + ' │ ' + colors.blue('am') + ' │'
- , '│ ' + colors.red('are') + ' │ ' + colors.blue('fine') + ' │'
- , '│ ' + colors.red('you?') + ' │ ' + colors.blue('thanks!') + ' │'
- , '└───────┴─────────┘'
- ];
-
- return [makeTable,expected,'multi-line-colors'];
- });
-
- it('Set `wordWrap` to true to make lines of text wrap instead of being truncated',function(){
- function makeTable(){
- var table = new Table({
- style:{border:[],header:[]},
- colWidths:[7,9],
- wordWrap:true
- });
-
- table.push([
- 'Hello how are you?',
- 'I am fine thanks!'
- ]);
-
- return table;
- }
-
- var expected = [
- '┌───────┬─────────┐'
- , '│ Hello │ I am │'
- , '│ how │ fine │'
- , '│ are │ thanks! │'
- , '│ you? │ │'
- , '└───────┴─────────┘'
- ];
-
- return [makeTable,expected];
- });
-};
-
-/* Expectation - ready to be copy/pasted and filled in. DO NOT DELETE THIS
-
-
- var expected = [
- '┌──┬───┬──┬──┐'
- , '│ │ │ │ │'
- , '├──┼───┼──┼──┤'
- , '│ │ … │ │ │'
- , '├──┼───┼──┼──┤'
- , '│ │ … │ │ │'
- , '└──┴───┴──┴──┘'
- ];
- */ \ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/examples/col-and-row-span-examples.js b/deps/npm/node_modules/cli-table2/examples/col-and-row-span-examples.js
deleted file mode 100644
index 9cd6c1ad08..0000000000
--- a/deps/npm/node_modules/cli-table2/examples/col-and-row-span-examples.js
+++ /dev/null
@@ -1,358 +0,0 @@
-var Table = require('../src/table');
-var colors = require('colors/safe');
-
-module.exports = function(runTest) {
-
- function it(name,fn) {
- var result = fn();
- runTest(name,result[0],result[1],result[2]);
- }
-
- it('use colSpan to span columns - (colSpan above normal cell)',function(){
- function makeTable(){
- var table = new Table({style:{head:[],border:[]}});
-
- table.push(
- [{colSpan:2,content:'greetings'}],
- [{colSpan:2,content:'greetings'}],
- ['hello','howdy']
- );
-
- return table;
- }
-
- var expected = [
- '┌───────────────┐'
- , '│ greetings │'
- , '├───────────────┤'
- , '│ greetings │'
- , '├───────┬───────┤'
- , '│ hello │ howdy │'
- , '└───────┴───────┘'
- ];
-
- return [makeTable,expected];
- });
-
- it('use colSpan to span columns - (colSpan below normal cell)',function(){
- function makeTable(){
- var table = new Table({style:{head:[],border:[]}});
-
- table.push(
- ['hello','howdy'],
- [{colSpan:2,content:'greetings'}],
- [{colSpan:2,content:'greetings'}]
- );
-
- return table;
- }
-
- var expected = [
- '┌───────┬───────┐'
- , '│ hello │ howdy │'
- , '├───────┴───────┤'
- , '│ greetings │'
- , '├───────────────┤'
- , '│ greetings │'
- , '└───────────────┘'
- ];
-
- return [makeTable,expected];
- });
-
- it('use rowSpan to span rows - (rowSpan on the left side)',function(){
- function makeTable(){
- var table = new Table({style:{head:[],border:[]}});
-
- table.push(
- [{rowSpan:2,content:'greetings'},{rowSpan:2,content:'greetings',vAlign:'center'},'hello'],
- ['howdy']
- );
-
- return table;
- }
-
- var expected = [
- '┌───────────┬───────────┬───────┐'
- , '│ greetings │ │ hello │'
- , '│ │ greetings ├───────┤'
- , '│ │ │ howdy │'
- , '└───────────┴───────────┴───────┘'
- ];
-
- return [makeTable,expected];
- });
-
-
- it('use rowSpan to span rows - (rowSpan on the right side)',function(){
- function makeTable(){
- var table = new Table({style:{head:[],border:[]}});
-
- table.push(
- ['hello',{rowSpan:2,content:'greetings'},{rowSpan:2,content:'greetings',vAlign:'bottom'}],
- ['howdy']
- );
-
- return table;
- }
-
- var expected = [
- '┌───────┬───────────┬───────────┐'
- , '│ hello │ greetings │ │'
- , '├───────┤ │ │'
- , '│ howdy │ │ greetings │'
- , '└───────┴───────────┴───────────┘'
- ];
-
- return[makeTable,expected];
- });
-
- it('mix rowSpan and colSpan together for complex table layouts',function(){
- function makeTable(){
- var table = new Table({style:{head:[],border:[]}});
-
- table.push(
- [{content:'hello',colSpan:2},{rowSpan:2, colSpan:2,content:'sup'},{rowSpan:3,content:'hi'}],
- [{content:'howdy',colSpan:2}],
- ['o','k','','']
- );
-
- return table;
- }
-
- var expected = [
- '┌───────┬─────┬────┐'
- , '│ hello │ sup │ hi │'
- , '├───────┤ │ │'
- , '│ howdy │ │ │'
- , '├───┬───┼──┬──┤ │'
- , '│ o │ k │ │ │ │'
- , '└───┴───┴──┴──┴────┘'
- ];
-
- return [makeTable,expected];
- });
-
- it('multi-line content will flow across rows in rowSpan cells',function(){
- function makeTable(){
- var table = new Table({style:{head:[],border:[]}});
-
- table.push(
- ['hello',{rowSpan:2,content:'greetings\nfriends'},{rowSpan:2,content:'greetings\nfriends'}],
- ['howdy']
- );
-
- return table;
- }
-
- var expected = [
- '┌───────┬───────────┬───────────┐'
- , '│ hello │ greetings │ greetings │'
- , '├───────┤ friends │ friends │'
- , '│ howdy │ │ │'
- , '└───────┴───────────┴───────────┘'
- ];
-
- return [makeTable, expected];
- });
-
- it('multi-line content will flow across rows in rowSpan cells - (complex layout)',function(){
- function makeTable(){
- var table = new Table({style:{head:[],border:[]}});
-
- table.push(
- [{content:'hello',colSpan:2},{rowSpan:2, colSpan:2,content:'sup\nman\nhey'},{rowSpan:3,content:'hi\nyo'}],
- [{content:'howdy',colSpan:2}],
- ['o','k','','']
- );
-
- return table;
- }
-
- var expected = [
- '┌───────┬─────┬────┐'
- , '│ hello │ sup │ hi │'
- , '├───────┤ man │ yo │'
- , '│ howdy │ hey │ │'
- , '├───┬───┼──┬──┤ │'
- , '│ o │ k │ │ │ │'
- , '└───┴───┴──┴──┴────┘'
- ];
-
- return [makeTable,expected];
- });
-
- it('rowSpan cells can have a staggered layout',function(){
- function makeTable(){
- var table = new Table({style:{head:[],border:[]}});
-
- table.push(
- [{content:'a',rowSpan:2},'b'],
- [{content:'c',rowSpan:2}],
- ['d']
- );
-
- return table;
- }
-
- var expected = [
- '┌───┬───┐'
- , '│ a │ b │'
- , '│ ├───┤'
- , '│ │ c │'
- , '├───┤ │'
- , '│ d │ │'
- , '└───┴───┘'
- ];
-
- return [makeTable,expected];
- });
-
- it('the layout manager automatically create empty cells to fill in the table',function(){
- function makeTable(){
- var table = new Table({style:{head:[],border:[]}});
-
- //notice we only create 3 cells here, but the table ends up having 6.
- table.push(
- [{content:'a',rowSpan:3,colSpan:2},'b'],
- [],
- [{content:'c',rowSpan:2,colSpan:2}],
- []
- );
- return table;
- }
-
- var expected = [
- '┌───┬───┬──┐'
- , '│ a │ b │ │' // top-right and bottom-left cells are automatically created to fill the empty space
- , '│ ├───┤ │'
- , '│ │ │ │'
- , '│ ├───┴──┤'
- , '│ │ c │'
- , '├───┤ │'
- , '│ │ │'
- , '└───┴──────┘'
- ];
-
- return [makeTable,expected];
- });
-
- it('use table `rowHeights` option to fix row height. The truncation symbol will be shown on the last line.',function(){
- function makeTable(){
- var table = new Table({rowHeights:[2],style:{head:[],border:[]}});
-
- table.push(['hello\nhi\nsup']);
-
- return table;
- }
-
- var expected = [
- '┌───────┐'
- , '│ hello │'
- , '│ hi… │'
- , '└───────┘'
- ];
-
- return [makeTable,expected];
- });
-
- it('if `colWidths` is not specified, the layout manager will automatically widen rows to fit the content',function(){
- function makeTable(){
- var table = new Table({style:{head:[],border:[]}});
-
- table.push(
- [{colSpan:2,content:'hello there'}],
- ['hi', 'hi']
- );
-
- return table;
- }
-
- var expected = [
- '┌─────────────┐'
- , '│ hello there │'
- , '├──────┬──────┤'
- , '│ hi │ hi │'
- , '└──────┴──────┘'
- ];
-
- return [makeTable,expected];
- });
-
- it('you can specify a column width for only the first row, other rows will be automatically widened to fit content',function(){
- function makeTable(){
- var table = new Table({colWidths:[4],style:{head:[],border:[]}});
-
- table.push(
- [{colSpan:2,content:'hello there'}],
- ['hi',{hAlign:'center',content:'hi'}]
- );
-
- return table;
- }
-
- var expected = [
- '┌─────────────┐'
- , '│ hello there │'
- , '├────┬────────┤'
- , '│ hi │ hi │'
- , '└────┴────────┘'
- ];
-
- return [makeTable, expected];
- });
-
- it('a column with a null column width will be automatically widened to fit content',function(){
- function makeTable(){
- var table = new Table({colWidths:[null, 4],style:{head:[],border:[]}});
-
- table.push(
- [{colSpan:2,content:'hello there'}],
- [{hAlign:'right',content:'hi'}, 'hi']
- );
-
- return table;
- }
-
- var expected = [
- '┌─────────────┐'
- , '│ hello there │'
- , '├────────┬────┤'
- , '│ hi │ hi │'
- , '└────────┴────┘'
- ];
-
- return [makeTable,expected];
- });
-
- it('feel free to use colors in your content strings, column widths will be calculated correctly',function(){
- function makeTable(){
- var table = new Table({colWidths:[5],style:{head:[],border:[]}});
-
- table.push([colors.red('hello')]);
-
- return table;
- }
-
- var expected = [
- '┌─────┐'
- , '│ ' + colors.red('he') + '… │'
- , '└─────┘'
- ];
-
- return [makeTable,expected,'truncation-with-colors'];
- });
-};
-
-/*
-
- var expected = [
- '┌──┬───┬──┬──┐'
- , '│ │ │ │ │'
- , '├──┼───┼──┼──┤'
- , '│ │ … │ │ │'
- , '├──┼───┼──┼──┤'
- , '│ │ … │ │ │'
- , '└──┴───┴──┴──┘'
- ];
- */ \ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/examples/screenshots/basic-usage-with-colors.png b/deps/npm/node_modules/cli-table2/examples/screenshots/basic-usage-with-colors.png
deleted file mode 100644
index 88399fca00..0000000000
--- a/deps/npm/node_modules/cli-table2/examples/screenshots/basic-usage-with-colors.png
+++ /dev/null
Binary files differ
diff --git a/deps/npm/node_modules/cli-table2/examples/screenshots/multi-line-colors.png b/deps/npm/node_modules/cli-table2/examples/screenshots/multi-line-colors.png
deleted file mode 100644
index 36f6f34f8d..0000000000
--- a/deps/npm/node_modules/cli-table2/examples/screenshots/multi-line-colors.png
+++ /dev/null
Binary files differ
diff --git a/deps/npm/node_modules/cli-table2/examples/screenshots/truncation-with-colors.png b/deps/npm/node_modules/cli-table2/examples/screenshots/truncation-with-colors.png
deleted file mode 100644
index d14b9d2fe1..0000000000
--- a/deps/npm/node_modules/cli-table2/examples/screenshots/truncation-with-colors.png
+++ /dev/null
Binary files differ
diff --git a/deps/npm/node_modules/cli-table2/gulpfile.js b/deps/npm/node_modules/cli-table2/gulpfile.js
deleted file mode 100644
index 5349626068..0000000000
--- a/deps/npm/node_modules/cli-table2/gulpfile.js
+++ /dev/null
@@ -1,73 +0,0 @@
-var gulp = require('gulp');
-var gutil = require('gulp-util');
-var mocha = require('gulp-mocha');
-var istanbul = require('gulp-istanbul');
-var printExample = require('./lib/print-example');
-var _ = require('lodash');
-
-gulp.task('test',mochaTask);
-gulp.task('coverage',coverage());
-gulp.task('coverage-api',coverage({grep:'@api'}));
-
-gulp.task('watch-test',function(){
- gulp.watch(['test/**','src/**','examples/**'],['test']);
- mochaTask();
-});
-
-gulp.task('example',function(){
- printExample.logExample(require('./examples/basic-usage-examples'));
- printExample.logExample(require('./examples/col-and-row-span-examples'));
-});
-
-/**
- * Do NOT run this in the same commit when you are adding images.
- * Commit the images, then run this.
- */
-gulp.task('example-md',['example-md-basic','example-md-advanced']);
-gulp.task('example-md-basic',function(cb){
- printExample.mdExample(require('./examples/basic-usage-examples'),'basic-usage.md',cb);
-});
-gulp.task('example-md-advanced',function(cb){
- printExample.mdExample(require('./examples/col-and-row-span-examples'),'advanced-usage.md',cb);
-});
-
-function coverage(opts){
- opts = opts || {};
-
- function coverageTask(cb){
- gulp.src(['src/*.js'])
- .pipe(istanbul()) // Covering files
- .pipe(istanbul.hookRequire()) // Force `require` to return covered files
- .on('error', logMochaError)
- .on('finish', function () {
- gulp.src(['test/*.js'])
- .pipe(mocha(opts))
- .on('error',function(err){
- logMochaError(err);
- if(cb) cb(err);
- })
- .pipe(istanbul.writeReports()) // Creating the reports after tests run
- .on('end', function(){
- if(cb) cb();
- });
- });
- }
-
- return coverageTask;
-}
-
-function mochaTask(){
- return gulp.src(['test/*.js'],{read:false})
- .pipe(mocha({
- growl:true
- }))
- .on('error',logMochaError);
-}
-
-function logMochaError(err){
- if(err && err.message){
- gutil.log(err.message);
- } else {
- gutil.log.apply(gutil,arguments);
- }
-} \ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/lib/print-example.js b/deps/npm/node_modules/cli-table2/lib/print-example.js
deleted file mode 100644
index ae23609cb2..0000000000
--- a/deps/npm/node_modules/cli-table2/lib/print-example.js
+++ /dev/null
@@ -1,123 +0,0 @@
-var chai = require('chai');
-var expect = chai.expect;
-var colors = require('colors/safe');
-var _ = require('lodash');
-var fs = require('fs');
-var git = require('git-rev');
-
-function logExample(fn){
- runPrintingExample(fn,
- function logName(name){
- console.log(colors.gray('========= ') + name + colors.gray(' ================'));
- },
- console.log, //logTable
- console.log, //logCode
- console.log, //logSeparator
- identity //screenShot
- )
-}
-
-function mdExample(fn,file,cb){
- git.long(function(commitHash){
- var buffer = [];
-
- runPrintingExample(fn,
- function logName(name){
- buffer.push('##### ' + name);
- },
- function logTable(table){
- //md files won't render color strings properly.
- table = stripColors(table);
-
- // indent table so is displayed preformatted text
- table = ' ' + (table.split('\n').join('\n '));
-
- buffer.push(table);
- },
- function logCode(code){
- buffer.push('```javascript');
- buffer.push(stripColors(code));
- buffer.push('```');
- },
- function logSeparator(sep){
- buffer.push(stripColors(sep));
- },
- function logScreenShot(image){
- buffer.push('![table image](https://cdn.rawgit.com/jamestalmage/cli-table2/'
- + commitHash + '/examples/screenshots/' + image + '.png)');
- }
- );
-
- fs.writeFileSync(file,buffer.join('\n'));
-
- if(cb){cb();}
- });
-}
-
-/**
- * Actually runs the tests and verifies the functions create the expected output.
- * @param name of the test suite, used in the mocha.describe call.
- * @param fn a function which creates the test suite.
- */
-function runTest(name,fn){
- function testExample(name,fn,expected){
- it(name,function(){
- expect(fn().toString()).to.equal(expected.join('\n'));
- });
- }
-
- describe(name,function () {
- fn(testExample,identity);
- });
-}
-
-/**
- * Common execution for runs that print output (either to console or to a Markdown file);
- * @param fn - a function containing the tests/demos.
- * @param logName - callback to print the name of this test to the console or file.
- * @param logTable - callback to print the output of the table to the console or file.
- * @param logCode - callback to print the output of the table to the console or file.
- * @param logSeparator - callback to print extra whitespace between demos.
- * @param logScreenShot - write out a link to the screenShot image.
- */
-function runPrintingExample(fn,logName,logTable,logCode,logSeparator,logScreenShot){
-
- /**
- * Called by every test/demo
- * @param name - the name of this test.
- * @param makeTable - a function which builds the table under test. Also, The contents of this function will be printed.
- * @param expected - The expected result.
- * @param screenshot - If present, there is an image containing a screenshot of the output
- */
- function printExample(name,makeTable,expected,screenshot){
- var code = makeTable.toString().split('\n').slice(1,-2).join('\n');
-
- logName(name);
- if(screenshot && logScreenShot){
- logScreenShot(screenshot);
- }
- else {
- logTable(makeTable().toString());
- }
- logCode(code);
- logSeparator('\n');
- }
-
- fn(printExample);
-}
-
-// removes all the color characters from a string
-function stripColors(str){
- return str.split( /\u001b\[(?:\d*;){0,5}\d*m/g).join('');
-}
-
-// returns the first arg - used as snapshot function
-function identity(str){
- return str;
-}
-
-module.exports = {
- mdExample:mdExample,
- logExample:logExample,
- runTest:runTest
-}; \ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/node_modules/ansi-regex/index.js b/deps/npm/node_modules/cli-table2/node_modules/ansi-regex/index.js
deleted file mode 100644
index b9574ed7e8..0000000000
--- a/deps/npm/node_modules/cli-table2/node_modules/ansi-regex/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-module.exports = function () {
- return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g;
-};
diff --git a/deps/npm/node_modules/cli-table2/node_modules/ansi-regex/license b/deps/npm/node_modules/cli-table2/node_modules/ansi-regex/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/cli-table2/node_modules/ansi-regex/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/cli-table2/node_modules/ansi-regex/package.json b/deps/npm/node_modules/cli-table2/node_modules/ansi-regex/package.json
deleted file mode 100644
index 2f6e64b15e..0000000000
--- a/deps/npm/node_modules/cli-table2/node_modules/ansi-regex/package.json
+++ /dev/null
@@ -1,108 +0,0 @@
-{
- "_from": "ansi-regex@^2.0.0",
- "_id": "ansi-regex@2.1.1",
- "_inBundle": false,
- "_integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
- "_location": "/cli-table2/ansi-regex",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "ansi-regex@^2.0.0",
- "name": "ansi-regex",
- "escapedName": "ansi-regex",
- "rawSpec": "^2.0.0",
- "saveSpec": null,
- "fetchSpec": "^2.0.0"
- },
- "_requiredBy": [
- "/cli-table2/strip-ansi"
- ],
- "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df",
- "_spec": "ansi-regex@^2.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/cli-table2/node_modules/strip-ansi",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/chalk/ansi-regex/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Regular expression for matching ANSI escape codes",
- "devDependencies": {
- "ava": "0.17.0",
- "xo": "0.16.0"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/chalk/ansi-regex#readme",
- "keywords": [
- "ansi",
- "styles",
- "color",
- "colour",
- "colors",
- "terminal",
- "console",
- "cli",
- "string",
- "tty",
- "escape",
- "formatting",
- "rgb",
- "256",
- "shell",
- "xterm",
- "command-line",
- "text",
- "regex",
- "regexp",
- "re",
- "match",
- "test",
- "find",
- "pattern"
- ],
- "license": "MIT",
- "maintainers": [
- {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- {
- "name": "Joshua Appelman",
- "email": "jappelman@xebia.com",
- "url": "jbnicolai.com"
- },
- {
- "name": "JD Ballard",
- "email": "i.am.qix@gmail.com",
- "url": "github.com/qix-"
- }
- ],
- "name": "ansi-regex",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/chalk/ansi-regex.git"
- },
- "scripts": {
- "test": "xo && ava --verbose",
- "view-supported": "node fixtures/view-codes.js"
- },
- "version": "2.1.1",
- "xo": {
- "rules": {
- "guard-for-in": 0,
- "no-loop-func": 0
- }
- }
-}
diff --git a/deps/npm/node_modules/cli-table2/node_modules/is-fullwidth-code-point/index.js b/deps/npm/node_modules/cli-table2/node_modules/is-fullwidth-code-point/index.js
deleted file mode 100644
index a7d3e3855f..0000000000
--- a/deps/npm/node_modules/cli-table2/node_modules/is-fullwidth-code-point/index.js
+++ /dev/null
@@ -1,46 +0,0 @@
-'use strict';
-var numberIsNan = require('number-is-nan');
-
-module.exports = function (x) {
- if (numberIsNan(x)) {
- return false;
- }
-
- // https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1369
-
- // code points are derived from:
- // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
- if (x >= 0x1100 && (
- x <= 0x115f || // Hangul Jamo
- 0x2329 === x || // LEFT-POINTING ANGLE BRACKET
- 0x232a === x || // RIGHT-POINTING ANGLE BRACKET
- // CJK Radicals Supplement .. Enclosed CJK Letters and Months
- (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) ||
- // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
- 0x3250 <= x && x <= 0x4dbf ||
- // CJK Unified Ideographs .. Yi Radicals
- 0x4e00 <= x && x <= 0xa4c6 ||
- // Hangul Jamo Extended-A
- 0xa960 <= x && x <= 0xa97c ||
- // Hangul Syllables
- 0xac00 <= x && x <= 0xd7a3 ||
- // CJK Compatibility Ideographs
- 0xf900 <= x && x <= 0xfaff ||
- // Vertical Forms
- 0xfe10 <= x && x <= 0xfe19 ||
- // CJK Compatibility Forms .. Small Form Variants
- 0xfe30 <= x && x <= 0xfe6b ||
- // Halfwidth and Fullwidth Forms
- 0xff01 <= x && x <= 0xff60 ||
- 0xffe0 <= x && x <= 0xffe6 ||
- // Kana Supplement
- 0x1b000 <= x && x <= 0x1b001 ||
- // Enclosed Ideographic Supplement
- 0x1f200 <= x && x <= 0x1f251 ||
- // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
- 0x20000 <= x && x <= 0x3fffd)) {
- return true;
- }
-
- return false;
-}
diff --git a/deps/npm/node_modules/cli-table2/node_modules/is-fullwidth-code-point/license b/deps/npm/node_modules/cli-table2/node_modules/is-fullwidth-code-point/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/cli-table2/node_modules/is-fullwidth-code-point/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/cli-table2/node_modules/is-fullwidth-code-point/package.json b/deps/npm/node_modules/cli-table2/node_modules/is-fullwidth-code-point/package.json
deleted file mode 100644
index 9a45effb69..0000000000
--- a/deps/npm/node_modules/cli-table2/node_modules/is-fullwidth-code-point/package.json
+++ /dev/null
@@ -1,77 +0,0 @@
-{
- "_from": "is-fullwidth-code-point@^1.0.0",
- "_id": "is-fullwidth-code-point@1.0.0",
- "_inBundle": false,
- "_integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
- "_location": "/cli-table2/is-fullwidth-code-point",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "is-fullwidth-code-point@^1.0.0",
- "name": "is-fullwidth-code-point",
- "escapedName": "is-fullwidth-code-point",
- "rawSpec": "^1.0.0",
- "saveSpec": null,
- "fetchSpec": "^1.0.0"
- },
- "_requiredBy": [
- "/cli-table2/string-width"
- ],
- "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
- "_shasum": "ef9e31386f031a7f0d643af82fde50c457ef00cb",
- "_spec": "is-fullwidth-code-point@^1.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/cli-table2/node_modules/string-width",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "number-is-nan": "^1.0.0"
- },
- "deprecated": false,
- "description": "Check if the character represented by a given Unicode code point is fullwidth",
- "devDependencies": {
- "ava": "0.0.4",
- "code-point-at": "^1.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/sindresorhus/is-fullwidth-code-point#readme",
- "keywords": [
- "fullwidth",
- "full-width",
- "full",
- "width",
- "unicode",
- "character",
- "char",
- "string",
- "str",
- "codepoint",
- "code",
- "point",
- "is",
- "detect",
- "check"
- ],
- "license": "MIT",
- "name": "is-fullwidth-code-point",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git"
- },
- "scripts": {
- "test": "node test.js"
- },
- "version": "1.0.0"
-}
diff --git a/deps/npm/node_modules/cli-table2/node_modules/is-fullwidth-code-point/readme.md b/deps/npm/node_modules/cli-table2/node_modules/is-fullwidth-code-point/readme.md
deleted file mode 100644
index 4936464b1b..0000000000
--- a/deps/npm/node_modules/cli-table2/node_modules/is-fullwidth-code-point/readme.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# is-fullwidth-code-point [![Build Status](https://travis-ci.org/sindresorhus/is-fullwidth-code-point.svg?branch=master)](https://travis-ci.org/sindresorhus/is-fullwidth-code-point)
-
-> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms)
-
-
-## Install
-
-```
-$ npm install --save is-fullwidth-code-point
-```
-
-
-## Usage
-
-```js
-var isFullwidthCodePoint = require('is-fullwidth-code-point');
-
-isFullwidthCodePoint('谢'.codePointAt());
-//=> true
-
-isFullwidthCodePoint('a'.codePointAt());
-//=> false
-```
-
-
-## API
-
-### isFullwidthCodePoint(input)
-
-#### input
-
-Type: `number`
-
-[Code point](https://en.wikipedia.org/wiki/Code_point) of a character.
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/cli-table2/node_modules/string-width/index.js b/deps/npm/node_modules/cli-table2/node_modules/string-width/index.js
deleted file mode 100644
index b9bec62440..0000000000
--- a/deps/npm/node_modules/cli-table2/node_modules/string-width/index.js
+++ /dev/null
@@ -1,37 +0,0 @@
-'use strict';
-var stripAnsi = require('strip-ansi');
-var codePointAt = require('code-point-at');
-var isFullwidthCodePoint = require('is-fullwidth-code-point');
-
-// https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1345
-module.exports = function (str) {
- if (typeof str !== 'string' || str.length === 0) {
- return 0;
- }
-
- var width = 0;
-
- str = stripAnsi(str);
-
- for (var i = 0; i < str.length; i++) {
- var code = codePointAt(str, i);
-
- // ignore control characters
- if (code <= 0x1f || (code >= 0x7f && code <= 0x9f)) {
- continue;
- }
-
- // surrogates
- if (code >= 0x10000) {
- i++;
- }
-
- if (isFullwidthCodePoint(code)) {
- width += 2;
- } else {
- width++;
- }
- }
-
- return width;
-};
diff --git a/deps/npm/node_modules/cli-table2/node_modules/string-width/license b/deps/npm/node_modules/cli-table2/node_modules/string-width/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/cli-table2/node_modules/string-width/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/cli-table2/node_modules/string-width/package.json b/deps/npm/node_modules/cli-table2/node_modules/string-width/package.json
deleted file mode 100644
index 154c4856be..0000000000
--- a/deps/npm/node_modules/cli-table2/node_modules/string-width/package.json
+++ /dev/null
@@ -1,88 +0,0 @@
-{
- "_from": "string-width@^1.0.1",
- "_id": "string-width@1.0.2",
- "_inBundle": false,
- "_integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
- "_location": "/cli-table2/string-width",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "string-width@^1.0.1",
- "name": "string-width",
- "escapedName": "string-width",
- "rawSpec": "^1.0.1",
- "saveSpec": null,
- "fetchSpec": "^1.0.1"
- },
- "_requiredBy": [
- "/cli-table2"
- ],
- "_resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
- "_shasum": "118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3",
- "_spec": "string-width@^1.0.1",
- "_where": "/Users/rebecca/code/npm/node_modules/cli-table2",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/sindresorhus/string-width/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "code-point-at": "^1.0.0",
- "is-fullwidth-code-point": "^1.0.0",
- "strip-ansi": "^3.0.0"
- },
- "deprecated": false,
- "description": "Get the visual width of a string - the number of columns required to display it",
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/sindresorhus/string-width#readme",
- "keywords": [
- "string",
- "str",
- "character",
- "char",
- "unicode",
- "width",
- "visual",
- "column",
- "columns",
- "fullwidth",
- "full-width",
- "full",
- "ansi",
- "escape",
- "codes",
- "cli",
- "command-line",
- "terminal",
- "console",
- "cjk",
- "chinese",
- "japanese",
- "korean",
- "fixed-width"
- ],
- "license": "MIT",
- "name": "string-width",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/string-width.git"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "version": "1.0.2"
-}
diff --git a/deps/npm/node_modules/cli-table2/node_modules/string-width/readme.md b/deps/npm/node_modules/cli-table2/node_modules/string-width/readme.md
deleted file mode 100644
index 1ab42c9358..0000000000
--- a/deps/npm/node_modules/cli-table2/node_modules/string-width/readme.md
+++ /dev/null
@@ -1,42 +0,0 @@
-# string-width [![Build Status](https://travis-ci.org/sindresorhus/string-width.svg?branch=master)](https://travis-ci.org/sindresorhus/string-width)
-
-> Get the visual width of a string - the number of columns required to display it
-
-Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width.
-
-Useful to be able to measure the actual width of command-line output.
-
-
-## Install
-
-```
-$ npm install --save string-width
-```
-
-
-## Usage
-
-```js
-const stringWidth = require('string-width');
-
-stringWidth('古');
-//=> 2
-
-stringWidth('\u001b[1m古\u001b[22m');
-//=> 2
-
-stringWidth('a');
-//=> 1
-```
-
-
-## Related
-
-- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module
-- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string
-- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/deps/npm/node_modules/cli-table2/node_modules/strip-ansi/index.js b/deps/npm/node_modules/cli-table2/node_modules/strip-ansi/index.js
deleted file mode 100644
index 099480fbfc..0000000000
--- a/deps/npm/node_modules/cli-table2/node_modules/strip-ansi/index.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-var ansiRegex = require('ansi-regex')();
-
-module.exports = function (str) {
- return typeof str === 'string' ? str.replace(ansiRegex, '') : str;
-};
diff --git a/deps/npm/node_modules/cli-table2/node_modules/strip-ansi/license b/deps/npm/node_modules/cli-table2/node_modules/strip-ansi/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/cli-table2/node_modules/strip-ansi/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/cli-table2/node_modules/strip-ansi/package.json b/deps/npm/node_modules/cli-table2/node_modules/strip-ansi/package.json
deleted file mode 100644
index 7a5bfd12d9..0000000000
--- a/deps/npm/node_modules/cli-table2/node_modules/strip-ansi/package.json
+++ /dev/null
@@ -1,101 +0,0 @@
-{
- "_from": "strip-ansi@^3.0.0",
- "_id": "strip-ansi@3.0.1",
- "_inBundle": false,
- "_integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
- "_location": "/cli-table2/strip-ansi",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "strip-ansi@^3.0.0",
- "name": "strip-ansi",
- "escapedName": "strip-ansi",
- "rawSpec": "^3.0.0",
- "saveSpec": null,
- "fetchSpec": "^3.0.0"
- },
- "_requiredBy": [
- "/cli-table2/string-width"
- ],
- "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "_shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf",
- "_spec": "strip-ansi@^3.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/cli-table2/node_modules/string-width",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/chalk/strip-ansi/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "ansi-regex": "^2.0.0"
- },
- "deprecated": false,
- "description": "Strip ANSI escape codes",
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/chalk/strip-ansi#readme",
- "keywords": [
- "strip",
- "trim",
- "remove",
- "ansi",
- "styles",
- "color",
- "colour",
- "colors",
- "terminal",
- "console",
- "string",
- "tty",
- "escape",
- "formatting",
- "rgb",
- "256",
- "shell",
- "xterm",
- "log",
- "logging",
- "command-line",
- "text"
- ],
- "license": "MIT",
- "maintainers": [
- {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- {
- "name": "Joshua Boy Nicolai Appelman",
- "email": "joshua@jbna.nl",
- "url": "jbna.nl"
- },
- {
- "name": "JD Ballard",
- "email": "i.am.qix@gmail.com",
- "url": "github.com/qix-"
- }
- ],
- "name": "strip-ansi",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/chalk/strip-ansi.git"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "version": "3.0.1"
-}
diff --git a/deps/npm/node_modules/cli-table2/package.json b/deps/npm/node_modules/cli-table2/package.json
deleted file mode 100644
index c502a45cdd..0000000000
--- a/deps/npm/node_modules/cli-table2/package.json
+++ /dev/null
@@ -1,90 +0,0 @@
-{
- "_args": [
- [
- "cli-table2@0.2.0",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "cli-table2@0.2.0",
- "_id": "cli-table2@0.2.0",
- "_inBundle": false,
- "_integrity": "sha1-LR738hig54biFFQFYtS9F3/jLZc=",
- "_location": "/cli-table2",
- "_phantomChildren": {
- "code-point-at": "1.1.0",
- "number-is-nan": "1.0.1"
- },
- "_requested": {
- "type": "version",
- "registry": true,
- "raw": "cli-table2@0.2.0",
- "name": "cli-table2",
- "escapedName": "cli-table2",
- "rawSpec": "0.2.0",
- "saveSpec": null,
- "fetchSpec": "0.2.0"
- },
- "_requiredBy": [
- "/",
- "/npm-audit-report"
- ],
- "_resolved": "https://registry.npmjs.org/cli-table2/-/cli-table2-0.2.0.tgz",
- "_spec": "0.2.0",
- "_where": "/Users/rebecca/code/npm",
- "author": {
- "name": "James Talmage"
- },
- "bugs": {
- "url": "https://github.com/jamestalmage/cli-table2/issues"
- },
- "dependencies": {
- "colors": "^1.1.2",
- "lodash": "^3.10.1",
- "string-width": "^1.0.1"
- },
- "description": "Pretty unicode tables for the command line. Based on the original cli-table.",
- "devDependencies": {
- "ansi-256-colors": "^1.1.0",
- "chai": "^3.4.1",
- "cli-table": "^0.3.1",
- "coveralls": "^2.11.4",
- "git-rev": "^0.2.1",
- "growl": "^1.8.1",
- "gulp": "^3.9.0",
- "gulp-istanbul": "^0.10.3",
- "gulp-mocha": "^2.2.0",
- "gulp-util": "^3.0.7",
- "sinon": "^1.17.2",
- "sinon-chai": "^2.8.0"
- },
- "directories": {
- "test": "test"
- },
- "homepage": "https://github.com/jamestalmage/cli-table2",
- "keywords": [
- "node",
- "command",
- "line",
- "cli",
- "table",
- "tables",
- "tabular",
- "unicode",
- "colors",
- "grid"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "cli-table2",
- "optionalDependencies": {
- "colors": "^1.1.2"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/jamestalmage/cli-table2.git"
- },
- "scripts": {
- "test": "gulp coverage"
- },
- "version": "0.2.0"
-}
diff --git a/deps/npm/node_modules/cli-table2/src/cell.js b/deps/npm/node_modules/cli-table2/src/cell.js
deleted file mode 100644
index 1281b979b1..0000000000
--- a/deps/npm/node_modules/cli-table2/src/cell.js
+++ /dev/null
@@ -1,364 +0,0 @@
-var _ = require('lodash');
-var utils = require('./utils');
-
-/**
- * A representation of a cell within the table.
- * Implementations must have `init` and `draw` methods,
- * as well as `colSpan`, `rowSpan`, `desiredHeight` and `desiredWidth` properties.
- * @param options
- * @constructor
- */
-function Cell(options){
- this.setOptions(options);
-}
-
-Cell.prototype.setOptions = function(options){
- if(_.isString(options) || _.isNumber(options) || _.isBoolean(options)){
- options = {content:''+options};
- }
- options = options || {};
- this.options = options;
- var content = options.content;
- if (_.isString(content) || _.isNumber(content) || _.isBoolean(content)) {
- this.content = String(content);
- } else if (!content) {
- this.content = '';
- } else {
- throw new Error('Content needs to be a primitive, got: ' + (typeof content));
- }
- this.colSpan = options.colSpan || 1;
- this.rowSpan = options.rowSpan || 1;
-};
-
-Cell.prototype.mergeTableOptions = function(tableOptions,cells){
- this.cells = cells;
-
- var optionsChars = this.options.chars || {};
- var tableChars = tableOptions.chars;
- var chars = this.chars = {};
- _.forEach(CHAR_NAMES,function(name){
- setOption(optionsChars,tableChars,name,chars);
- });
-
- this.truncate = this.options.truncate || tableOptions.truncate;
-
- var style = this.options.style = this.options.style || {};
- var tableStyle = tableOptions.style;
- setOption(style, tableStyle, 'padding-left', this);
- setOption(style, tableStyle, 'padding-right', this);
- this.head = style.head || tableStyle.head;
- this.border = style.border || tableStyle.border;
-
- var fixedWidth = tableOptions.colWidths[this.x];
- if(tableOptions.wordWrap && fixedWidth){
- fixedWidth -= this.paddingLeft + this.paddingRight;
- this.lines = utils.colorizeLines(utils.wordWrap(fixedWidth,this.content));
- }
- else {
- this.lines = utils.colorizeLines(this.content.split('\n'));
- }
-
- this.desiredWidth = utils.strlen(this.content) + this.paddingLeft + this.paddingRight;
- this.desiredHeight = this.lines.length;
-};
-
-/**
- * Each cell will have it's `x` and `y` values set by the `layout-manager` prior to
- * `init` being called;
- * @type {Number}
- */
-
-Cell.prototype.x = null;
-Cell.prototype.y = null;
-
-/**
- * Initializes the Cells data structure.
- *
- * @param tableOptions - A fully populated set of tableOptions.
- * In addition to the standard default values, tableOptions must have fully populated the
- * `colWidths` and `rowWidths` arrays. Those arrays must have lengths equal to the number
- * of columns or rows (respectively) in this table, and each array item must be a Number.
- *
- */
-Cell.prototype.init = function(tableOptions){
- var x = this.x;
- var y = this.y;
- this.widths = tableOptions.colWidths.slice(x, x + this.colSpan);
- this.heights = tableOptions.rowHeights.slice(y, y + this.rowSpan);
- this.width = _.reduce(this.widths,sumPlusOne);
- this.height = _.reduce(this.heights,sumPlusOne);
-
- this.hAlign = this.options.hAlign || tableOptions.colAligns[x];
- this.vAlign = this.options.vAlign || tableOptions.rowAligns[y];
-
- this.drawRight = x + this.colSpan == tableOptions.colWidths.length;
-};
-
-/**
- * Draws the given line of the cell.
- * This default implementation defers to methods `drawTop`, `drawBottom`, `drawLine` and `drawEmpty`.
- * @param lineNum - can be `top`, `bottom` or a numerical line number.
- * @param spanningCell - will be a number if being called from a RowSpanCell, and will represent how
- * many rows below it's being called from. Otherwise it's undefined.
- * @returns {String} The representation of this line.
- */
-Cell.prototype.draw = function(lineNum,spanningCell){
- if(lineNum == 'top') return this.drawTop(this.drawRight);
- if(lineNum == 'bottom') return this.drawBottom(this.drawRight);
- var padLen = Math.max(this.height - this.lines.length, 0);
- var padTop;
- switch (this.vAlign){
- case 'center':
- padTop = Math.ceil(padLen / 2);
- break;
- case 'bottom':
- padTop = padLen;
- break;
- default :
- padTop = 0;
- }
- if( (lineNum < padTop) || (lineNum >= (padTop + this.lines.length))){
- return this.drawEmpty(this.drawRight,spanningCell);
- }
- var forceTruncation = (this.lines.length > this.height) && (lineNum + 1 >= this.height);
- return this.drawLine(lineNum - padTop, this.drawRight, forceTruncation,spanningCell);
-};
-
-/**
- * Renders the top line of the cell.
- * @param drawRight - true if this method should render the right edge of the cell.
- * @returns {String}
- */
-Cell.prototype.drawTop = function(drawRight){
- var content = [];
- if(this.cells){ //TODO: cells should always exist - some tests don't fill it in though
- _.forEach(this.widths,function(width,index){
- content.push(this._topLeftChar(index));
- content.push(
- utils.repeat(this.chars[this.y == 0 ? 'top' : 'mid'],width)
- );
- },this);
- }
- else {
- content.push(this._topLeftChar(0));
- content.push(utils.repeat(this.chars[this.y == 0 ? 'top' : 'mid'],this.width));
- }
- if(drawRight){
- content.push(this.chars[this.y == 0 ? 'topRight' : 'rightMid']);
- }
- return this.wrapWithStyleColors('border',content.join(''));
-};
-
-Cell.prototype._topLeftChar = function(offset){
- var x = this.x+offset;
- var leftChar;
- if(this.y == 0){
- leftChar = x == 0 ? 'topLeft' : (offset == 0 ? 'topMid' : 'top');
- } else {
- if(x == 0){
- leftChar = 'leftMid';
- }
- else {
- leftChar = offset == 0 ? 'midMid' : 'bottomMid';
- if(this.cells){ //TODO: cells should always exist - some tests don't fill it in though
- var spanAbove = this.cells[this.y-1][x] instanceof Cell.ColSpanCell;
- if(spanAbove){
- leftChar = offset == 0 ? 'topMid' : 'mid';
- }
- if(offset == 0){
- var i = 1;
- while(this.cells[this.y][x-i] instanceof Cell.ColSpanCell){
- i++;
- }
- if(this.cells[this.y][x-i] instanceof Cell.RowSpanCell){
- leftChar = 'leftMid';
- }
- }
- }
- }
- }
- return this.chars[leftChar];
-};
-
-Cell.prototype.wrapWithStyleColors = function(styleProperty,content){
- if(this[styleProperty] && this[styleProperty].length){
- try {
- var colors = require('colors/safe');
- for(var i = this[styleProperty].length - 1; i >= 0; i--){
- colors = colors[this[styleProperty][i]];
- }
- return colors(content);
- } catch (e) {
- return content;
- }
- }
- else {
- return content;
- }
-};
-
-/**
- * Renders a line of text.
- * @param lineNum - Which line of text to render. This is not necessarily the line within the cell.
- * There may be top-padding above the first line of text.
- * @param drawRight - true if this method should render the right edge of the cell.
- * @param forceTruncationSymbol - `true` if the rendered text should end with the truncation symbol even
- * if the text fits. This is used when the cell is vertically truncated. If `false` the text should
- * only include the truncation symbol if the text will not fit horizontally within the cell width.
- * @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined.
- * @returns {String}
- */
-Cell.prototype.drawLine = function(lineNum,drawRight,forceTruncationSymbol,spanningCell){
- var left = this.chars[this.x == 0 ? 'left' : 'middle'];
- if(this.x && spanningCell && this.cells){
- var cellLeft = this.cells[this.y+spanningCell][this.x-1];
- while(cellLeft instanceof ColSpanCell){
- cellLeft = this.cells[cellLeft.y][cellLeft.x-1];
- }
- if(!(cellLeft instanceof RowSpanCell)){
- left = this.chars['rightMid'];
- }
- }
- var leftPadding = utils.repeat(' ', this.paddingLeft);
- var right = (drawRight ? this.chars['right'] : '');
- var rightPadding = utils.repeat(' ', this.paddingRight);
- var line = this.lines[lineNum];
- var len = this.width - (this.paddingLeft + this.paddingRight);
- if(forceTruncationSymbol) line += this.truncate || '…';
- var content = utils.truncate(line,len,this.truncate);
- content = utils.pad(content, len, ' ', this.hAlign);
- content = leftPadding + content + rightPadding;
- return this.stylizeLine(left,content,right);
-};
-
-Cell.prototype.stylizeLine = function(left,content,right){
- left = this.wrapWithStyleColors('border',left);
- right = this.wrapWithStyleColors('border',right);
- if(this.y === 0){
- content = this.wrapWithStyleColors('head',content);
- }
- return left + content + right;
-};
-
-/**
- * Renders the bottom line of the cell.
- * @param drawRight - true if this method should render the right edge of the cell.
- * @returns {String}
- */
-Cell.prototype.drawBottom = function(drawRight){
- var left = this.chars[this.x == 0 ? 'bottomLeft' : 'bottomMid'];
- var content = utils.repeat(this.chars.bottom,this.width);
- var right = drawRight ? this.chars['bottomRight'] : '';
- return this.wrapWithStyleColors('border',left + content + right);
-};
-
-/**
- * Renders a blank line of text within the cell. Used for top and/or bottom padding.
- * @param drawRight - true if this method should render the right edge of the cell.
- * @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined.
- * @returns {String}
- */
-Cell.prototype.drawEmpty = function(drawRight,spanningCell){
- var left = this.chars[this.x == 0 ? 'left' : 'middle'];
- if(this.x && spanningCell && this.cells){
- var cellLeft = this.cells[this.y+spanningCell][this.x-1];
- while(cellLeft instanceof ColSpanCell){
- cellLeft = this.cells[cellLeft.y][cellLeft.x-1];
- }
- if(!(cellLeft instanceof RowSpanCell)){
- left = this.chars['rightMid'];
- }
- }
- var right = (drawRight ? this.chars['right'] : '');
- var content = utils.repeat(' ',this.width);
- return this.stylizeLine(left , content , right);
-};
-
-/**
- * A Cell that doesn't do anything. It just draws empty lines.
- * Used as a placeholder in column spanning.
- * @constructor
- */
-function ColSpanCell(){}
-
-ColSpanCell.prototype.draw = function(){
- return '';
-};
-
-ColSpanCell.prototype.init = function(tableOptions){};
-
-
-/**
- * A placeholder Cell for a Cell that spans multiple rows.
- * It delegates rendering to the original cell, but adds the appropriate offset.
- * @param originalCell
- * @constructor
- */
-function RowSpanCell(originalCell){
- this.originalCell = originalCell;
-}
-
-RowSpanCell.prototype.init = function(tableOptions){
- var y = this.y;
- var originalY = this.originalCell.y;
- this.cellOffset = y - originalY;
- this.offset = findDimension(tableOptions.rowHeights,originalY,this.cellOffset);
-};
-
-RowSpanCell.prototype.draw = function(lineNum){
- if(lineNum == 'top'){
- return this.originalCell.draw(this.offset,this.cellOffset);
- }
- if(lineNum == 'bottom'){
- return this.originalCell.draw('bottom');
- }
- return this.originalCell.draw(this.offset + 1 + lineNum);
-};
-
-ColSpanCell.prototype.mergeTableOptions =
-RowSpanCell.prototype.mergeTableOptions = function(){};
-
-// HELPER FUNCTIONS
-function setOption(objA,objB,nameB,targetObj){
- var nameA = nameB.split('-');
- if(nameA.length > 1) {
- nameA[1] = nameA[1].charAt(0).toUpperCase() + nameA[1].substr(1);
- nameA = nameA.join('');
- targetObj[nameA] = objA[nameA] || objA[nameB] || objB[nameA] || objB[nameB];
- }
- else {
- targetObj[nameB] = objA[nameB] || objB[nameB];
- }
-}
-
-function findDimension(dimensionTable, startingIndex, span){
- var ret = dimensionTable[startingIndex];
- for(var i = 1; i < span; i++){
- ret += 1 + dimensionTable[startingIndex + i];
- }
- return ret;
-}
-
-function sumPlusOne(a,b){
- return a+b+1;
-}
-
-var CHAR_NAMES = [ 'top'
- , 'top-mid'
- , 'top-left'
- , 'top-right'
- , 'bottom'
- , 'bottom-mid'
- , 'bottom-left'
- , 'bottom-right'
- , 'left'
- , 'left-mid'
- , 'mid'
- , 'mid-mid'
- , 'right'
- , 'right-mid'
- , 'middle'
-];
-module.exports = Cell;
-module.exports.ColSpanCell = ColSpanCell;
-module.exports.RowSpanCell = RowSpanCell; \ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/src/layout-manager.js b/deps/npm/node_modules/cli-table2/src/layout-manager.js
deleted file mode 100644
index c17ce34cbe..0000000000
--- a/deps/npm/node_modules/cli-table2/src/layout-manager.js
+++ /dev/null
@@ -1,235 +0,0 @@
-var _ = require('lodash');
-var Cell = require('./cell');
-var RowSpanCell = Cell.RowSpanCell;
-var ColSpanCell = Cell.ColSpanCell;
-
-(function(){
- function layoutTable(table){
- _.forEach(table,function(row,rowIndex){
- _.forEach(row,function(cell,columnIndex){
- cell.y = rowIndex;
- cell.x = columnIndex;
- for(var y = rowIndex; y >= 0; y--){
- var row2 = table[y];
- var xMax = (y === rowIndex) ? columnIndex : row2.length;
- for(var x = 0; x < xMax; x++){
- var cell2 = row2[x];
- while(cellsConflict(cell,cell2)){
- cell.x++;
- }
- }
- }
- });
- });
- }
-
- function maxWidth(table) {
- var mw = 0;
- _.forEach(table, function (row) {
- _.forEach(row, function (cell) {
- mw = Math.max(mw,cell.x + (cell.colSpan || 1));
- });
- });
- return mw;
- }
-
- function maxHeight(table){
- return table.length;
- }
-
- function cellsConflict(cell1,cell2){
- var yMin1 = cell1.y;
- var yMax1 = cell1.y - 1 + (cell1.rowSpan || 1);
- var yMin2 = cell2.y;
- var yMax2 = cell2.y - 1 + (cell2.rowSpan || 1);
- var yConflict = !(yMin1 > yMax2 || yMin2 > yMax1);
-
- var xMin1= cell1.x;
- var xMax1 = cell1.x - 1 + (cell1.colSpan || 1);
- var xMin2= cell2.x;
- var xMax2 = cell2.x - 1 + (cell2.colSpan || 1);
- var xConflict = !(xMin1 > xMax2 || xMin2 > xMax1);
-
- return yConflict && xConflict;
- }
-
- function conflictExists(rows,x,y){
- var i_max = Math.min(rows.length-1,y);
- var cell = {x:x,y:y};
- for(var i = 0; i <= i_max; i++){
- var row = rows[i];
- for(var j = 0; j < row.length; j++){
- if(cellsConflict(cell,row[j])){
- return true;
- }
- }
- }
- return false;
- }
-
- function allBlank(rows,y,xMin,xMax){
- for(var x = xMin; x < xMax; x++){
- if(conflictExists(rows,x,y)){
- return false;
- }
- }
- return true;
- }
-
- function addRowSpanCells(table){
- _.forEach(table,function(row,rowIndex){
- _.forEach(row,function(cell){
- for(var i = 1; i < cell.rowSpan; i++){
- var rowSpanCell = new RowSpanCell(cell);
- rowSpanCell.x = cell.x;
- rowSpanCell.y = cell.y + i;
- rowSpanCell.colSpan = cell.colSpan;
- insertCell(rowSpanCell,table[rowIndex+i]);
- }
- });
- });
- }
-
- function addColSpanCells(cellRows){
- for(var rowIndex = cellRows.length-1; rowIndex >= 0; rowIndex--) {
- var cellColumns = cellRows[rowIndex];
- for (var columnIndex = 0; columnIndex < cellColumns.length; columnIndex++) {
- var cell = cellColumns[columnIndex];
- for (var k = 1; k < cell.colSpan; k++) {
- var colSpanCell = new ColSpanCell();
- colSpanCell.x = cell.x + k;
- colSpanCell.y = cell.y;
- cellColumns.splice(columnIndex + 1, 0, colSpanCell);
- }
- }
- }
- }
-
- function insertCell(cell,row){
- var x = 0;
- while(x < row.length && (row[x].x < cell.x)) {
- x++;
- }
- row.splice(x,0,cell);
- }
-
- function fillInTable(table){
- var h_max = maxHeight(table);
- var w_max = maxWidth(table);
- for(var y = 0; y < h_max; y++){
- for(var x = 0; x < w_max; x++){
- if(!conflictExists(table,x,y)){
- var opts = {x:x,y:y,colSpan:1,rowSpan:1};
- x++;
- while(x < w_max && !conflictExists(table,x,y)){
- opts.colSpan++;
- x++;
- }
- var y2 = y + 1;
- while(y2 < h_max && allBlank(table,y2,opts.x,opts.x+opts.colSpan)){
- opts.rowSpan++;
- y2++;
- }
-
- var cell = new Cell(opts);
- cell.x = opts.x;
- cell.y = opts.y;
- insertCell(cell,table[y]);
- }
- }
- }
- }
-
- function generateCells(rows){
- return _.map(rows,function(row){
- if(!_.isArray(row)){
- var key = Object.keys(row)[0];
- row = row[key];
- if(_.isArray(row)){
- row = row.slice();
- row.unshift(key);
- }
- else {
- row = [key,row];
- }
- }
- return _.map(row,function(cell){
- return new Cell(cell);
- });
- });
- }
-
- function makeTableLayout(rows){
- var cellRows = generateCells(rows);
- layoutTable(cellRows);
- fillInTable(cellRows);
- addRowSpanCells(cellRows);
- addColSpanCells(cellRows);
- return cellRows;
- }
-
- module.exports = {
- makeTableLayout: makeTableLayout,
- layoutTable: layoutTable,
- addRowSpanCells: addRowSpanCells,
- maxWidth:maxWidth,
- fillInTable:fillInTable,
- computeWidths:makeComputeWidths('colSpan','desiredWidth','x',1),
- computeHeights:makeComputeWidths('rowSpan','desiredHeight','y',1)
- };
-})();
-
-function makeComputeWidths(colSpan,desiredWidth,x,forcedMin){
- return function(vals,table){
- var result = [];
- var spanners = [];
- _.forEach(table,function(row){
- _.forEach(row,function(cell){
- if((cell[colSpan] || 1) > 1){
- spanners.push(cell);
- }
- else {
- result[cell[x]] = Math.max(result[cell[x]] || 0, cell[desiredWidth] || 0, forcedMin);
- }
- });
- });
-
- _.forEach(vals,function(val,index){
- if(_.isNumber(val)){
- result[index] = val;
- }
- });
-
- //_.forEach(spanners,function(cell){
- for(var k = spanners.length - 1; k >=0; k--){
- var cell = spanners[k];
- var span = cell[colSpan];
- var col = cell[x];
- var existingWidth = result[col];
- var editableCols = _.isNumber(vals[col]) ? 0 : 1;
- for(var i = 1; i < span; i ++){
- existingWidth += 1 + result[col + i];
- if(!_.isNumber(vals[col + i])){
- editableCols++;
- }
- }
- if(cell[desiredWidth] > existingWidth){
- i = 0;
- while(editableCols > 0 && cell[desiredWidth] > existingWidth){
- if(!_.isNumber(vals[col+i])){
- var dif = Math.round( (cell[desiredWidth] - existingWidth) / editableCols );
- existingWidth += dif;
- result[col + i] += dif;
- editableCols--;
- }
- i++;
- }
- }
- }
-
- _.extend(vals,result);
- for(var j = 0; j < vals.length; j++){
- vals[j] = Math.max(forcedMin, vals[j] || 0);
- }
- };
-}
diff --git a/deps/npm/node_modules/cli-table2/src/table.js b/deps/npm/node_modules/cli-table2/src/table.js
deleted file mode 100644
index 09af0d7e6b..0000000000
--- a/deps/npm/node_modules/cli-table2/src/table.js
+++ /dev/null
@@ -1,78 +0,0 @@
-
-var utils = require('./utils');
-var tableLayout = require('./layout-manager');
-var _ = require('lodash');
-
-function Table(options){
- this.options = utils.mergeOptions(options);
-}
-
-Table.prototype.__proto__ = Array.prototype;
-
-Table.prototype.toString = function(){
- var array = this;
- var headersPresent = this.options.head && this.options.head.length;
- if(headersPresent){
- array = [this.options.head];
- if(this.length){
- array.push.apply(array,this);
- }
- }
- else {
- this.options.style.head=[];
- }
-
- var cells = tableLayout.makeTableLayout(array);
-
- _.forEach(cells,function(row){
- _.forEach(row,function(cell){
- cell.mergeTableOptions(this.options,cells);
- },this);
- },this);
-
- tableLayout.computeWidths(this.options.colWidths,cells);
- tableLayout.computeHeights(this.options.rowHeights,cells);
-
- _.forEach(cells,function(row,rowIndex){
- _.forEach(row,function(cell,cellIndex){
- cell.init(this.options);
- },this);
- },this);
-
- var result = [];
-
- for(var rowIndex = 0; rowIndex < cells.length; rowIndex++){
- var row = cells[rowIndex];
- var heightOfRow = this.options.rowHeights[rowIndex];
-
- if(rowIndex === 0 || !this.options.style.compact || (rowIndex == 1 && headersPresent)){
- doDraw(row,'top',result);
- }
-
- for(var lineNum = 0; lineNum < heightOfRow; lineNum++){
- doDraw(row,lineNum,result);
- }
-
- if(rowIndex + 1 == cells.length){
- doDraw(row,'bottom',result);
- }
- }
-
- return result.join('\n');
-};
-
-function doDraw(row,lineNum,result){
- var line = [];
- _.forEach(row,function(cell){
- line.push(cell.draw(lineNum));
- });
- var str = line.join('');
- if(str.length) result.push(str);
-}
-
-Table.prototype.__defineGetter__('width', function (){
- var str = this.toString().split("\n");
- return str[0].length;
-});
-
-module.exports = Table; \ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/src/utils.js b/deps/npm/node_modules/cli-table2/src/utils.js
deleted file mode 100644
index 9dae6e53aa..0000000000
--- a/deps/npm/node_modules/cli-table2/src/utils.js
+++ /dev/null
@@ -1,304 +0,0 @@
-var _ = require('lodash');
-var stringWidth = require('string-width');
-
-function codeRegex(capture){
- return capture ? /\u001b\[((?:\d*;){0,5}\d*)m/g : /\u001b\[(?:\d*;){0,5}\d*m/g
-}
-
-function strlen(str){
- var code = codeRegex();
- var stripped = ("" + str).replace(code,'');
- var split = stripped.split("\n");
- return split.reduce(function (memo, s) { return (stringWidth(s) > memo) ? stringWidth(s) : memo }, 0);
-}
-
-function repeat(str,times){
- return Array(times + 1).join(str);
-}
-
-function pad(str, len, pad, dir) {
- var length = strlen(str);
- if (len + 1 >= length) {
- var padlen = len - length;
- switch (dir) {
- case 'right':
- str = repeat(pad, padlen) + str;
- break;
-
- case 'center':
- var right = Math.ceil((padlen) / 2);
- var left = padlen - right;
- str = repeat(pad, left) + str + repeat(pad, right);
- break;
-
- default :
- str = str + repeat(pad,padlen);
- break;
- }
- }
- return str;
-}
-
-var codeCache = {};
-
-function addToCodeCache(name,on,off){
- on = '\u001b[' + on + 'm';
- off = '\u001b[' + off + 'm';
- codeCache[on] = {set:name,to:true};
- codeCache[off] = {set:name,to:false};
- codeCache[name] = {on:on,off:off};
-}
-
-//https://github.com/Marak/colors.js/blob/master/lib/styles.js
-addToCodeCache('bold', 1, 22);
-addToCodeCache('italics', 3, 23);
-addToCodeCache('underline', 4, 24);
-addToCodeCache('inverse', 7, 27);
-addToCodeCache('strikethrough', 9, 29);
-
-
-function updateState(state, controlChars){
- var controlCode = controlChars[1] ? parseInt(controlChars[1].split(';')[0]) : 0;
- if ( (controlCode >= 30 && controlCode <= 39)
- || (controlCode >= 90 && controlCode <= 97)
- ) {
- state.lastForegroundAdded = controlChars[0];
- return;
- }
- if ( (controlCode >= 40 && controlCode <= 49)
- || (controlCode >= 100 && controlCode <= 107)
- ) {
- state.lastBackgroundAdded = controlChars[0];
- return;
- }
- if (controlCode === 0) {
- for (var i in state) {
- /* istanbul ignore else */
- if (state.hasOwnProperty(i)) {
- delete state[i];
- }
- }
- return;
- }
- var info = codeCache[controlChars[0]];
- if (info) {
- state[info.set] = info.to;
- }
-}
-
-function readState(line){
- var code = codeRegex(true);
- var controlChars = code.exec(line);
- var state = {};
- while(controlChars !== null){
- updateState(state, controlChars);
- controlChars = code.exec(line);
- }
- return state;
-}
-
-function unwindState(state,ret){
- var lastBackgroundAdded = state.lastBackgroundAdded;
- var lastForegroundAdded = state.lastForegroundAdded;
-
- delete state.lastBackgroundAdded;
- delete state.lastForegroundAdded;
-
- _.forEach(state,function(value,key){
- if(value){
- ret += codeCache[key].off;
- }
- });
-
- if(lastBackgroundAdded && (lastBackgroundAdded != '\u001b[49m')){
- ret += '\u001b[49m';
- }
- if(lastForegroundAdded && (lastForegroundAdded != '\u001b[39m')){
- ret += '\u001b[39m';
- }
-
- return ret;
-}
-
-function rewindState(state,ret){
- var lastBackgroundAdded = state.lastBackgroundAdded;
- var lastForegroundAdded = state.lastForegroundAdded;
-
- delete state.lastBackgroundAdded;
- delete state.lastForegroundAdded;
-
- _.forEach(state,function(value,key){
- if(value){
- ret = codeCache[key].on + ret;
- }
- });
-
- if(lastBackgroundAdded && (lastBackgroundAdded != '\u001b[49m')){
- ret = lastBackgroundAdded + ret;
- }
- if(lastForegroundAdded && (lastForegroundAdded != '\u001b[39m')){
- ret = lastForegroundAdded + ret;
- }
-
- return ret;
-}
-
-function truncateWidth(str, desiredLength){
- if (str.length === strlen(str)) {
- return str.substr(0, desiredLength);
- }
-
- while (strlen(str) > desiredLength){
- str = str.slice(0, -1);
- }
-
- return str;
-}
-
-function truncateWidthWithAnsi(str, desiredLength){
- var code = codeRegex(true);
- var split = str.split(codeRegex());
- var splitIndex = 0;
- var retLen = 0;
- var ret = '';
- var myArray;
- var state = {};
-
- while(retLen < desiredLength){
- myArray = code.exec(str);
- var toAdd = split[splitIndex];
- splitIndex++;
- if (retLen + strlen(toAdd) > desiredLength){
- toAdd = truncateWidth(toAdd, desiredLength - retLen);
- }
- ret += toAdd;
- retLen += strlen(toAdd);
-
- if(retLen < desiredLength){
- if (!myArray) { break; } // full-width chars may cause a whitespace which cannot be filled
- ret += myArray[0];
- updateState(state,myArray);
- }
- }
-
- return unwindState(state,ret);
-}
-
-function truncate(str, desiredLength, truncateChar){
- truncateChar = truncateChar || '…';
- var lengthOfStr = strlen(str);
- if(lengthOfStr <= desiredLength){
- return str;
- }
- desiredLength -= strlen(truncateChar);
-
- ret = truncateWidthWithAnsi(str, desiredLength);
-
- return ret + truncateChar;
-}
-
-
-function defaultOptions(){
- return{
- chars: {
- 'top': '─'
- , 'top-mid': '┬'
- , 'top-left': '┌'
- , 'top-right': '┐'
- , 'bottom': '─'
- , 'bottom-mid': '┴'
- , 'bottom-left': '└'
- , 'bottom-right': '┘'
- , 'left': '│'
- , 'left-mid': '├'
- , 'mid': '─'
- , 'mid-mid': '┼'
- , 'right': '│'
- , 'right-mid': '┤'
- , 'middle': '│'
- }
- , truncate: '…'
- , colWidths: []
- , rowHeights: []
- , colAligns: []
- , rowAligns: []
- , style: {
- 'padding-left': 1
- , 'padding-right': 1
- , head: ['red']
- , border: ['grey']
- , compact : false
- }
- , head: []
- };
-}
-
-function mergeOptions(options,defaults){
- options = options || {};
- defaults = defaults || defaultOptions();
- var ret = _.extend({}, defaults, options);
- ret.chars = _.extend({}, defaults.chars, options.chars);
- ret.style = _.extend({}, defaults.style, options.style);
- return ret;
-}
-
-function wordWrap(maxLength,input){
- var lines = [];
- var split = input.split(/(\s+)/g);
- var line = [];
- var lineLength = 0;
- var whitespace;
- for (var i = 0; i < split.length; i += 2) {
- var word = split[i];
- var newLength = lineLength + strlen(word);
- if (lineLength > 0 && whitespace) {
- newLength += whitespace.length;
- }
- if(newLength > maxLength){
- if(lineLength !== 0){
- lines.push(line.join(''));
- }
- line = [word];
- lineLength = strlen(word);
- } else {
- line.push(whitespace || '', word);
- lineLength = newLength;
- }
- whitespace = split[i+1];
- }
- if(lineLength){
- lines.push(line.join(''));
- }
- return lines;
-}
-
-function multiLineWordWrap(maxLength, input){
- var output = [];
- input = input.split('\n');
- for(var i = 0; i < input.length; i++){
- output.push.apply(output,wordWrap(maxLength,input[i]));
- }
- return output;
-}
-
-function colorizeLines(input){
- var state = {};
- var output = [];
- for(var i = 0; i < input.length; i++){
- var line = rewindState(state,input[i]) ;
- state = readState(line);
- var temp = _.extend({},state);
- output.push(unwindState(temp,line));
- }
- return output;
-}
-
-module.exports = {
- strlen:strlen,
- repeat:repeat,
- pad:pad,
- truncate:truncate,
- mergeOptions:mergeOptions,
- wordWrap:multiLineWordWrap,
- colorizeLines:colorizeLines
-};
diff --git a/deps/npm/node_modules/cli-table2/test/cell-test.js b/deps/npm/node_modules/cli-table2/test/cell-test.js
deleted file mode 100644
index 42a145e78e..0000000000
--- a/deps/npm/node_modules/cli-table2/test/cell-test.js
+++ /dev/null
@@ -1,935 +0,0 @@
-describe('Cell',function(){
- var chai = require('chai');
- var expect = chai.expect;
- var sinon = require('sinon');
- var sinonChai = require("sinon-chai");
- chai.use(sinonChai);
-
- var colors = require('colors');
- var Cell = require('../src/cell');
- var RowSpanCell = Cell.RowSpanCell;
- var ColSpanCell = Cell.ColSpanCell;
- var mergeOptions = require('../src/utils').mergeOptions;
-
- function defaultOptions(){
- //overwrite coloring of head and border by default for easier testing.
- return mergeOptions({style:{head:[],border:[]}});
- }
-
- function defaultChars(){
- return {
- 'top': '─'
- , 'topMid': '┬'
- , 'topLeft': '┌'
- , 'topRight': '┐'
- , 'bottom': '─'
- , 'bottomMid': '┴'
- , 'bottomLeft': '└'
- , 'bottomRight': '┘'
- , 'left': '│'
- , 'leftMid': '├'
- , 'mid': '─'
- , 'midMid': '┼'
- , 'right': '│'
- , 'rightMid': '┤'
- , 'middle': '│'
- };
- }
-
- describe('constructor',function(){
- it('colSpan and rowSpan default to 1',function(){
- var cell = new Cell();
- expect(cell.colSpan).to.equal(1);
- expect(cell.rowSpan).to.equal(1);
- });
-
- it('colSpan and rowSpan can be set via constructor',function(){
- var cell = new Cell({rowSpan:2,colSpan:3});
- expect(cell.rowSpan).to.equal(2);
- expect(cell.colSpan).to.equal(3);
- });
-
- it('content can be set as a string',function(){
- var cell = new Cell('hello\nworld');
- expect(cell.content).to.equal('hello\nworld');
- });
-
- it('content can be set as a options property',function(){
- var cell = new Cell({content:'hello\nworld'});
- expect(cell.content).to.equal('hello\nworld');
- });
-
- it('default content is an empty string',function(){
- var cell = new Cell();
- expect(cell.content).to.equal('');
- });
-
- it('new Cell(null) will have empty string content',function(){
- var cell = new Cell(null);
- expect(cell.content).to.equal('');
- });
-
- it('new Cell({content: null}) will have empty string content',function(){
- var cell = new Cell({content: null});
- expect(cell.content).to.equal('');
- });
-
- it('new Cell(0) will have "0" as content',function(){
- var cell = new Cell(0);
- expect(cell.content).to.equal('0');
- });
-
- it('new Cell({content: 0}) will have "0" as content',function(){
- var cell = new Cell({content: 0});
- expect(cell.content).to.equal('0');
- });
-
- it('new Cell(false) will have "false" as content',function(){
- var cell = new Cell(false);
- expect(cell.content).to.equal('false');
- });
-
- it('new Cell({content: false}) will have "false" as content',function(){
- var cell = new Cell({content: false});
- expect(cell.content).to.equal('false');
- });
- });
-
- describe('mergeTableOptions',function(){
- describe('chars',function(){
- it('unset chars take on value of table',function(){
- var cell = new Cell();
- var tableOptions = defaultOptions();
- cell.mergeTableOptions(tableOptions);
- expect(cell.chars).to.eql(defaultChars());
- });
-
- it('set chars override the value of table',function(){
- var cell = new Cell({chars:{bottomRight:'='}});
- cell.mergeTableOptions(defaultOptions());
- var chars = defaultChars();
- chars.bottomRight = '=';
- expect(cell.chars).to.eql(chars);
- });
-
- it('hyphenated names will be converted to camel-case',function(){
- var cell = new Cell({chars:{'bottom-left':'='}});
- cell.mergeTableOptions(defaultOptions());
- var chars = defaultChars();
- chars.bottomLeft = '=';
- expect(cell.chars).to.eql(chars);
- });
- });
-
- describe('truncate',function(){
- it('if unset takes on value of table',function(){
- var cell = new Cell();
- cell.mergeTableOptions(defaultOptions());
- expect(cell.truncate).to.equal('…');
- });
-
- it('if set overrides value of table',function(){
- var cell = new Cell({truncate:'...'});
- cell.mergeTableOptions(defaultOptions());
- expect(cell.truncate).to.equal('...');
- });
- });
-
- describe('style.padding-left', function () {
- it('if unset will be copied from tableOptions.style', function () {
- var cell = new Cell();
- cell.mergeTableOptions(defaultOptions());
- expect(cell.paddingLeft).to.equal(1);
-
- cell = new Cell();
- var tableOptions = defaultOptions();
- tableOptions.style['padding-left'] = 2;
- cell.mergeTableOptions(tableOptions);
- expect(cell.paddingLeft).to.equal(2);
-
- cell = new Cell();
- tableOptions = defaultOptions();
- tableOptions.style.paddingLeft = 3;
- cell.mergeTableOptions(tableOptions);
- expect(cell.paddingLeft).to.equal(3);
- });
-
- it('if set will override tableOptions.style', function () {
- var cell = new Cell({style:{'padding-left':2}});
- cell.mergeTableOptions(defaultOptions());
- expect(cell.paddingLeft).to.equal(2);
-
- cell = new Cell({style:{paddingLeft:3}});
- cell.mergeTableOptions(defaultOptions());
- expect(cell.paddingLeft).to.equal(3);
- });
- });
-
- describe('style.padding-right', function () {
- it('if unset will be copied from tableOptions.style', function () {
- var cell = new Cell();
- cell.mergeTableOptions(defaultOptions());
- expect(cell.paddingRight).to.equal(1);
-
- cell = new Cell();
- var tableOptions = defaultOptions();
- tableOptions.style['padding-right'] = 2;
- cell.mergeTableOptions(tableOptions);
- expect(cell.paddingRight).to.equal(2);
-
- cell = new Cell();
- tableOptions = defaultOptions();
- tableOptions.style.paddingRight = 3;
- cell.mergeTableOptions(tableOptions);
- expect(cell.paddingRight).to.equal(3);
- });
-
- it('if set will override tableOptions.style', function () {
- var cell = new Cell({style:{'padding-right':2}});
- cell.mergeTableOptions(defaultOptions());
- expect(cell.paddingRight).to.equal(2);
-
- cell = new Cell({style:{paddingRight:3}});
- cell.mergeTableOptions(defaultOptions());
- expect(cell.paddingRight).to.equal(3);
- });
- });
-
- describe('desiredWidth',function(){
- it('content(hello) padding(1,1) == 7',function(){
- var cell = new Cell('hello');
- cell.mergeTableOptions(defaultOptions());
- expect(cell.desiredWidth).to.equal(7);
- });
-
- it('content(hi) padding(1,2) == 5',function(){
- var cell = new Cell({content:'hi',style:{paddingRight:2}});
- var tableOptions = defaultOptions();
- cell.mergeTableOptions(tableOptions);
- expect(cell.desiredWidth).to.equal(5);
- });
-
- it('content(hi) padding(3,2) == 7',function(){
- var cell = new Cell({content:'hi',style:{paddingLeft:3,paddingRight:2}});
- var tableOptions = defaultOptions();
- cell.mergeTableOptions(tableOptions);
- expect(cell.desiredWidth).to.equal(7);
- });
- });
-
- describe('desiredHeight',function(){
- it('1 lines of text',function(){
- var cell = new Cell('hi');
- cell.mergeTableOptions(defaultOptions());
- expect(cell.desiredHeight).to.equal(1);
- });
-
- it('2 lines of text',function(){
- var cell = new Cell('hi\nbye');
- cell.mergeTableOptions(defaultOptions());
- expect(cell.desiredHeight).to.equal(2);
- });
-
- it('2 lines of text',function(){
- var cell = new Cell('hi\nbye\nyo');
- cell.mergeTableOptions(defaultOptions());
- expect(cell.desiredHeight).to.equal(3);
- });
- });
- });
-
- describe('init',function(){
- describe('hAlign',function(){
- it('if unset takes colAlign value from tableOptions',function(){
- var tableOptions = defaultOptions();
- tableOptions.colAligns = ['left','right','both'];
- var cell = new Cell();
- cell.x = 0;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.hAlign).to.equal('left');
- cell = new Cell();
- cell.x = 1;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.hAlign).to.equal('right');
- cell = new Cell();
- cell.mergeTableOptions(tableOptions);
- cell.x=2;
- cell.init(tableOptions);
- expect(cell.hAlign).to.equal('both');
- });
-
- it('if set overrides tableOptions',function(){
- var tableOptions = defaultOptions();
- tableOptions.colAligns = ['left','right','both'];
- var cell = new Cell({hAlign:'right'});
- cell.x = 0;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.hAlign).to.equal('right');
- cell = new Cell({hAlign:'left'});
- cell.x = 1;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.hAlign).to.equal('left');
- cell = new Cell({hAlign:'right'});
- cell.x = 2;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.hAlign).to.equal('right');
- });
- });
-
- describe('vAlign',function(){
- it('if unset takes rowAlign value from tableOptions',function(){
- var tableOptions = defaultOptions();
- tableOptions.rowAligns = ['top','bottom','center'];
- var cell = new Cell();
- cell.y=0;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.vAlign).to.equal('top');
- cell = new Cell();
- cell.y = 1;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.vAlign).to.equal('bottom');
- cell = new Cell();
- cell.y = 2;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.vAlign).to.equal('center');
- });
-
- it('if set overrides tableOptions',function(){
- var tableOptions = defaultOptions();
- tableOptions.rowAligns = ['top','bottom','center'];
-
- var cell = new Cell({vAlign:'bottom'});
- cell.y = 0;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.vAlign).to.equal('bottom');
-
- cell = new Cell({vAlign:'top'});
- cell.y = 1;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.vAlign).to.equal('top');
-
- cell = new Cell({vAlign:'center'});
- cell.y = 2;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.vAlign).to.equal('center');
- });
- });
-
- describe('width', function(){
- it('will match colWidth of x',function(){
- var tableOptions = defaultOptions();
- tableOptions.colWidths = [5,10,15];
-
- var cell = new Cell();
- cell.x = 0;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.width).to.equal(5);
-
- cell = new Cell();
- cell.x = 1;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.width).to.equal(10);
-
- cell = new Cell();
- cell.x = 2;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.width).to.equal(15);
- });
-
- it('will add colWidths if colSpan > 1',function(){
- var tableOptions = defaultOptions();
- tableOptions.colWidths = [5,10,15];
-
- var cell = new Cell({colSpan:2});
- cell.x=0;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.width).to.equal(16);
-
- cell = new Cell({colSpan:2});
- cell.x=1;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.width).to.equal(26);
-
- cell = new Cell({colSpan:3});
- cell.x=0;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.width).to.equal(32);
- });
- });
-
- describe('height', function(){
- it('will match rowHeight of x',function(){
- var tableOptions = defaultOptions();
- tableOptions.rowHeights = [5,10,15];
-
- var cell = new Cell();
- cell.y=0;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.height).to.equal(5);
-
- cell = new Cell();
- cell.y=1;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.height).to.equal(10);
-
- cell = new Cell();
- cell.y=2;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.height).to.equal(15);
- });
-
- it('will add rowHeights if rowSpan > 1',function(){
- var tableOptions = defaultOptions();
- tableOptions.rowHeights = [5,10,15];
-
- var cell = new Cell({rowSpan:2});
- cell.y = 0;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.height).to.equal(16);
-
- cell = new Cell({rowSpan:2});
- cell.y = 1;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.height).to.equal(26);
-
- cell = new Cell({rowSpan:3});
- cell.y = 0;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.height).to.equal(32);
- });
- });
-
- describe('drawRight', function(){
- var tableOptions;
-
- beforeEach(function(){
- tableOptions = defaultOptions();
- tableOptions.colWidths = [20,20,20];
- });
-
- it('col 1 of 3, with default colspan',function(){
- var cell = new Cell();
- cell.x = 0;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.drawRight).to.equal(false);
- });
-
- it('col 2 of 3, with default colspan',function(){
- var cell = new Cell();
- cell.x = 1;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.drawRight).to.equal(false);
- });
-
- it('col 3 of 3, with default colspan',function(){
- var cell = new Cell();
- cell.x = 2;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.drawRight).to.equal(true);
- });
-
- it('col 3 of 4, with default colspan',function(){
- var cell = new Cell();
- cell.x = 2;
- tableOptions.colWidths = [20,20,20,20];
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.drawRight).to.equal(false);
- });
-
- it('col 2 of 3, with colspan of 2',function(){
- var cell = new Cell({colSpan:2});
- cell.x=1;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.drawRight).to.equal(true);
- });
-
- it('col 1 of 3, with colspan of 3',function(){
- var cell = new Cell({colSpan:3});
- cell.x = 0;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.drawRight).to.equal(true);
- });
-
- it('col 1 of 3, with colspan of 2',function(){
- var cell = new Cell({colSpan:2});
- cell.x = 0;
- cell.mergeTableOptions(tableOptions);
- cell.init(tableOptions);
- expect(cell.drawRight).to.equal(false);
- });
- });
- });
-
- describe('drawLine', function(){
- var cell;
-
- beforeEach(function () {
- cell = new Cell();
-
- //manually init
- cell.chars = defaultChars();
- cell.paddingLeft = cell.paddingRight = 1;
- cell.width = 7;
- cell.height = 3;
- cell.hAlign = 'center';
- cell.vAlign = 'center';
- cell.chars.left = 'L';
- cell.chars.right = 'R';
- cell.chars.middle = 'M';
- cell.content = 'hello\nhowdy\ngoodnight';
- cell.lines = cell.content.split('\n');
- cell.x = cell.y = 0;
- });
-
- describe('top line',function(){
- it('will draw the top left corner when x=0,y=0',function(){
- cell.x = cell.y = 0;
- expect(cell.draw('top')).to.equal('┌───────');
- cell.drawRight = true;
- expect(cell.draw('top')).to.equal('┌───────┐');
- });
-
- it('will draw the top mid corner when x=1,y=0',function(){
- cell.x = 1;
- cell.y = 0;
- expect(cell.draw('top')).to.equal('┬───────');
- cell.drawRight = true;
- expect(cell.draw('top')).to.equal('┬───────┐');
- });
-
- it('will draw the left mid corner when x=0,y=1',function(){
- cell.x = 0;
- cell.y = 1;
- expect(cell.draw('top')).to.equal('├───────');
- cell.drawRight = true;
- expect(cell.draw('top')).to.equal('├───────┤');
- });
-
- it('will draw the mid mid corner when x=1,y=1',function(){
- cell.x = 1;
- cell.y = 1;
- expect(cell.draw('top')).to.equal('┼───────');
- cell.drawRight = true;
- expect(cell.draw('top')).to.equal('┼───────┤');
- });
-
- it('will draw in the color specified by border style',function(){
- cell.border = ['gray'];
- expect(cell.draw('top')).to.equal(colors.gray('┌───────'))
- });
- });
-
- describe('bottom line',function(){
- it('will draw the bottom left corner if x=0',function(){
- cell.x = 0;
- cell.y = 1;
- expect(cell.draw('bottom')).to.equal('└───────');
- cell.drawRight = true;
- expect(cell.draw('bottom')).to.equal('└───────┘');
- });
-
- it('will draw the bottom left corner if x=1',function(){
- cell.x = 1;
- cell.y = 1;
- expect(cell.draw('bottom')).to.equal('┴───────');
- cell.drawRight = true;
- expect(cell.draw('bottom')).to.equal('┴───────┘');
- });
-
- it('will draw in the color specified by border style',function(){
- cell.border = ['gray'];
- expect(cell.draw('bottom')).to.equal(colors.gray('└───────'))
- });
- });
-
- describe('drawBottom',function(){
- it('draws an empty line',function(){
- expect(cell.drawEmpty()).to.equal('L ');
- expect(cell.drawEmpty(true)).to.equal('L R');
- });
-
- it('draws an empty line',function(){
- cell.border = ['gray'];
- cell.head = ['red'];
- expect(cell.drawEmpty()).to.equal(colors.gray('L') + colors.red(' '));
- expect(cell.drawEmpty(true)).to.equal(colors.gray('L') + colors.red(' ') + colors.gray('R'));
- });
- });
-
- describe('first line of text',function(){
- beforeEach(function () {
- cell.width = 9;
- });
-
- it('will draw left side if x=0',function(){
- cell.x = 0;
- expect(cell.draw(0)).to.equal('L hello ');
- cell.drawRight = true;
- expect(cell.draw(0)).to.equal('L hello R');
- });
-
- it('will draw mid side if x=1',function(){
- cell.x = 1;
- expect(cell.draw(0)).to.equal('M hello ');
- cell.drawRight = true;
- expect(cell.draw(0)).to.equal('M hello R');
- });
-
- it('will align left',function(){
- cell.x = 1;
- cell.hAlign = 'left';
- expect(cell.draw(0)).to.equal('M hello ');
- cell.drawRight = true;
- expect(cell.draw(0)).to.equal('M hello R');
- });
-
- it('will align right',function(){
- cell.x = 1;
- cell.hAlign = 'right';
- expect(cell.draw(0)).to.equal('M hello ');
- cell.drawRight = true;
- expect(cell.draw(0)).to.equal('M hello R');
- });
-
- it('left and right will be drawn in color of border style',function(){
- cell.border = ['gray'];
- cell.x = 0;
- expect(cell.draw(0)).to.equal(colors.gray('L') + ' hello ');
- cell.drawRight = true;
- expect(cell.draw(0)).to.equal(colors.gray('L') + ' hello ' + colors.gray('R'));
- });
-
- it('text will be drawn in color of head style if y == 0',function(){
- cell.head = ['red'];
- cell.x = cell.y = 0;
- expect(cell.draw(0)).to.equal('L' + colors.red(' hello '));
- cell.drawRight = true;
- expect(cell.draw(0)).to.equal('L' + colors.red(' hello ') + 'R');
- });
-
- it('text will NOT be drawn in color of head style if y == 1',function(){
- cell.head = ['red'];
- cell.x = cell.y = 1;
- expect(cell.draw(0)).to.equal('M hello ');
- cell.drawRight = true;
- expect(cell.draw(0)).to.equal('M hello R');
- });
-
- it('head and border colors together',function(){
- cell.border = ['gray'];
- cell.head = ['red'];
- cell.x = cell.y = 0;
- expect(cell.draw(0)).to.equal(colors.gray('L') + colors.red(' hello '));
- cell.drawRight = true;
- expect(cell.draw(0)).to.equal(colors.gray('L') + colors.red(' hello ') + colors.gray('R'));
- });
- });
-
- describe('second line of text',function(){
- beforeEach(function () {
- cell.width = 9;
- });
-
- it('will draw left side if x=0',function(){
- cell.x = 0;
- expect(cell.draw(1)).to.equal('L howdy ');
- cell.drawRight = true;
- expect(cell.draw(1)).to.equal('L howdy R');
- });
-
- it('will draw mid side if x=1',function(){
- cell.x = 1;
- expect(cell.draw(1)).to.equal('M howdy ');
- cell.drawRight = true;
- expect(cell.draw(1)).to.equal('M howdy R');
- });
-
- it('will align left',function(){
- cell.x = 1;
- cell.hAlign = 'left';
- expect(cell.draw(1)).to.equal('M howdy ');
- cell.drawRight = true;
- expect(cell.draw(1)).to.equal('M howdy R');
- });
-
- it('will align right',function(){
- cell.x = 1;
- cell.hAlign = 'right';
- expect(cell.draw(1)).to.equal('M howdy ');
- cell.drawRight = true;
- expect(cell.draw(1)).to.equal('M howdy R');
- });
- });
-
- describe('truncated line of text',function(){
- beforeEach(function () {
- cell.width = 9;
- });
-
- it('will draw left side if x=0',function(){
- cell.x = 0;
- expect(cell.draw(2)).to.equal('L goodni… ');
- cell.drawRight = true;
- expect(cell.draw(2)).to.equal('L goodni… R');
- });
-
- it('will draw mid side if x=1',function(){
- cell.x = 1;
- expect(cell.draw(2)).to.equal('M goodni… ');
- cell.drawRight = true;
- expect(cell.draw(2)).to.equal('M goodni… R');
- });
-
- it('will not change when aligned left',function(){
- cell.x = 1;
- cell.hAlign = 'left';
- expect(cell.draw(2)).to.equal('M goodni… ');
- cell.drawRight = true;
- expect(cell.draw(2)).to.equal('M goodni… R');
- });
-
- it('will not change when aligned right',function(){
- cell.x = 1;
- cell.hAlign = 'right';
- expect(cell.draw(2)).to.equal('M goodni… ');
- cell.drawRight = true;
- expect(cell.draw(2)).to.equal('M goodni… R');
- });
- });
-
- describe('vAlign',function(){
- beforeEach(function () {
- cell.height = '5';
- });
-
- it('center',function(){
- cell.vAlign = 'center';
- expect(cell.draw(0)).to.equal('L ');
- expect(cell.draw(1)).to.equal('L hello ');
- expect(cell.draw(2)).to.equal('L howdy ');
- expect(cell.draw(3)).to.equal('L good… ');
- expect(cell.draw(4)).to.equal('L ');
-
- cell.drawRight = true;
- expect(cell.draw(0)).to.equal('L R');
- expect(cell.draw(1)).to.equal('L hello R');
- expect(cell.draw(2)).to.equal('L howdy R');
- expect(cell.draw(3)).to.equal('L good… R');
- expect(cell.draw(4)).to.equal('L R');
-
- cell.x = 1;
- cell.drawRight = false;
- expect(cell.draw(0)).to.equal('M ');
- expect(cell.draw(1)).to.equal('M hello ');
- expect(cell.draw(2)).to.equal('M howdy ');
- expect(cell.draw(3)).to.equal('M good… ');
- expect(cell.draw(4)).to.equal('M ');
- });
-
- it('top',function(){
- cell.vAlign = 'top';
- expect(cell.draw(0)).to.equal('L hello ');
- expect(cell.draw(1)).to.equal('L howdy ');
- expect(cell.draw(2)).to.equal('L good… ');
- expect(cell.draw(3)).to.equal('L ');
- expect(cell.draw(4)).to.equal('L ');
-
- cell.vAlign = null; //top is the default
- cell.drawRight = true;
- expect(cell.draw(0)).to.equal('L hello R');
- expect(cell.draw(1)).to.equal('L howdy R');
- expect(cell.draw(2)).to.equal('L good… R');
- expect(cell.draw(3)).to.equal('L R');
- expect(cell.draw(4)).to.equal('L R');
-
- cell.x = 1;
- cell.drawRight = false;
- expect(cell.draw(0)).to.equal('M hello ');
- expect(cell.draw(1)).to.equal('M howdy ');
- expect(cell.draw(2)).to.equal('M good… ');
- expect(cell.draw(3)).to.equal('M ');
- expect(cell.draw(4)).to.equal('M ');
- });
-
- it('center',function(){
- cell.vAlign = 'bottom';
- expect(cell.draw(0)).to.equal('L ');
- expect(cell.draw(1)).to.equal('L ');
- expect(cell.draw(2)).to.equal('L hello ');
- expect(cell.draw(3)).to.equal('L howdy ');
- expect(cell.draw(4)).to.equal('L good… ');
-
- cell.drawRight = true;
- expect(cell.draw(0)).to.equal('L R');
- expect(cell.draw(1)).to.equal('L R');
- expect(cell.draw(2)).to.equal('L hello R');
- expect(cell.draw(3)).to.equal('L howdy R');
- expect(cell.draw(4)).to.equal('L good… R');
-
- cell.x = 1;
- cell.drawRight = false;
- expect(cell.draw(0)).to.equal('M ');
- expect(cell.draw(1)).to.equal('M ');
- expect(cell.draw(2)).to.equal('M hello ');
- expect(cell.draw(3)).to.equal('M howdy ');
- expect(cell.draw(4)).to.equal('M good… ');
- });
- });
-
- it('vertically truncated will show truncation on last visible line',function(){
- cell.height = 2;
- expect(cell.draw(0)).to.equal('L hello ');
- expect(cell.draw(1)).to.equal('L howd… ');
- });
-
- it("won't vertically truncate if the lines just fit",function(){
- cell.height = 2;
- cell.content = "hello\nhowdy";
- cell.lines = cell.content.split("\n");
- expect(cell.draw(0)).to.equal('L hello ');
- expect(cell.draw(1)).to.equal('L howdy ');
- });
-
- it("will vertically truncate even if last line is short",function(){
- cell.height = 2;
- cell.content = "hello\nhi\nhowdy";
- cell.lines = cell.content.split("\n");
- expect(cell.draw(0)).to.equal('L hello ');
- expect(cell.draw(1)).to.equal('L hi… ');
- });
-
- it("allows custom truncation",function(){
- cell.height = 2;
- cell.truncate = '...';
- cell.content = "hello\nhi\nhowdy";
- cell.lines = cell.content.split("\n");
- expect(cell.draw(0)).to.equal('L hello ');
- expect(cell.draw(1)).to.equal('L hi... ');
-
- cell.content = "hello\nhowdy\nhi";
- cell.lines = cell.content.split("\n");
- expect(cell.draw(0)).to.equal('L hello ');
- expect(cell.draw(1)).to.equal('L ho... ');
- });
- });
-
- describe("ColSpanCell",function(){
- it('has an init function',function(){
- expect(new ColSpanCell()).to.respondTo('init');
- new ColSpanCell().init(); // nothing happens.
- });
-
- it('draw returns an empty string',function(){
- expect(new ColSpanCell().draw('top')).to.equal('');
- expect(new ColSpanCell().draw('bottom')).to.equal('');
- expect(new ColSpanCell().draw(1)).to.equal('');
- });
- });
-
- describe("RowSpanCell",function(){
- var original, tableOptions;
-
- beforeEach(function () {
- original = {
- rowSpan:3,
- y:0,
- draw:sinon.spy()
- };
- tableOptions = {
- rowHeights:[2,3,4,5]
- }
- });
-
- it('drawing top of the next row',function(){
- var spanner = new RowSpanCell(original);
- spanner.x = 0;
- spanner.y = 1;
- spanner.init(tableOptions);
- spanner.draw('top');
- expect(original.draw).to.have.been.calledOnce.and.calledWith(2);
- });
-
- it('drawing line 0 of the next row',function(){
- var spanner = new RowSpanCell(original);
- spanner.x = 0;
- spanner.y = 1;
- spanner.init(tableOptions);
- spanner.draw(0);
- expect(original.draw).to.have.been.calledOnce.and.calledWith(3);
- });
-
- it('drawing line 1 of the next row',function(){
- var spanner = new RowSpanCell(original);
- spanner.x = 0;
- spanner.y = 1;
- spanner.init(tableOptions);
- spanner.draw(1);
- expect(original.draw).to.have.been.calledOnce.and.calledWith(4);
- });
-
- it('drawing top of two rows below',function(){
- var spanner = new RowSpanCell(original);
- spanner.x = 0;
- spanner.y = 2;
- spanner.init(tableOptions);
- spanner.draw('top');
- expect(original.draw).to.have.been.calledOnce.and.calledWith(6);
- });
-
- it('drawing line 0 of two rows below',function(){
- var spanner = new RowSpanCell(original);
- spanner.x = 0;
- spanner.y = 2;
- spanner.init(tableOptions);
- spanner.draw(0);
- expect(original.draw).to.have.been.calledOnce.and.calledWith(7);
- });
-
- it('drawing line 1 of two rows below',function(){
- var spanner = new RowSpanCell(original);
- spanner.x = 0;
- spanner.y = 2;
- spanner.init(tableOptions);
- spanner.draw(1);
- expect(original.draw).to.have.been.calledOnce.and.calledWith(8);
- });
-
- it('drawing bottom',function(){
- var spanner = new RowSpanCell(original);
- spanner.x = 0;
- spanner.y = 1;
- spanner.init(tableOptions);
- spanner.draw('bottom');
- expect(original.draw).to.have.been.calledOnce.and.calledWith('bottom');
- });
- });
-});
diff --git a/deps/npm/node_modules/cli-table2/test/example-tests.js b/deps/npm/node_modules/cli-table2/test/example-tests.js
deleted file mode 100644
index e3ea2a7834..0000000000
--- a/deps/npm/node_modules/cli-table2/test/example-tests.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var printExamples = require('../lib/print-example');
-var examples = require('../examples/col-and-row-span-examples');
-var usage = require('../examples/basic-usage-examples');
-
-printExamples.runTest('@api Usage',usage);
-printExamples.runTest('@api Table (examples)',examples); \ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/test/layout-manager-test.js b/deps/npm/node_modules/cli-table2/test/layout-manager-test.js
deleted file mode 100644
index 362f348e0e..0000000000
--- a/deps/npm/node_modules/cli-table2/test/layout-manager-test.js
+++ /dev/null
@@ -1,163 +0,0 @@
-describe('layout-manager',function(){
- var chai = require('chai');
- var expect = chai.expect;
-
- var layoutManager = require('../src/layout-manager');
- var layoutTable = layoutManager.layoutTable;
- var addRowSpanCells = layoutManager.addRowSpanCells;
- var maxWidth = layoutManager.maxWidth;
- var Cell = require('../src/cell');
- var RowSpanCell = Cell.RowSpanCell;
-
- describe('layoutTable',function(){
- it('sets x and y',function(){
- var table = [
- [{},{}],
- [{},{}]
- ];
-
- layoutTable(table);
-
- expect(table).to.eql([
- [{x:0,y:0},{x:1,y:0}],
- [{x:0,y:1},{x:1,y:1}]
- ]);
-
- var w = maxWidth(table);
- expect(w).to.equal(2);
- });
-
- it('colSpan will push x values to the right',function(){
- var table = [
- [{colSpan:2},{}],
- [{},{colSpan:2}]
- ];
-
- layoutTable(table);
-
- expect(table).to.eql([
- [{x:0,y:0,colSpan:2},{x:2,y:0}],
- [{x:0,y:1},{x:1,y:1,colSpan:2}]
- ]);
-
- expect(maxWidth(table)).to.equal(3);
- });
-
- it('rowSpan will push x values on cells below',function(){
- var table = [
- [{rowSpan:2},{}],
- [{}]
- ];
-
- layoutTable(table);
-
- expect(table).to.eql([
- [{x:0,y:0,rowSpan:2},{x:1,y:0}],
- [{x:1,y:1}]
- ]);
-
- expect(maxWidth(table)).to.equal(2);
- });
-
- it('colSpan and rowSpan together',function(){
- var table = [
- [{rowSpan:2,colSpan:2},{}],
- [{}]
- ];
-
- layoutTable(table);
-
- expect(table).to.eql([
- [{x:0,y:0,rowSpan:2,colSpan:2},{x:2,y:0}],
- [{x:2,y:1}]
- ]);
-
- expect(maxWidth(table)).to.equal(3);
- });
-
- it('complex layout',function(){
-
- var table = [
- [{c:'a'},{c:'b'}, {c:'c',rowSpan:3,colSpan:2}, {c:'d'}],
- [{c:'e',rowSpan:2,colSpan:2}, {c:'f'}],
- [ {c:'g'}]
- ];
-
- layoutTable(table);
-
- expect(table).to.eql([
- [{c:'a',y:0,x:0}, {c:'b',y:0,x:1}, {c:'c',y:0,x:2,rowSpan:3,colSpan:2}, {c:'d',y:0,x:4}],
- [{c:'e',rowSpan:2,colSpan:2,y:1,x:0}, {c:'f',y:1,x:4}],
- [{c:'g',y:2,x:4}]
- ]);
-
- });
-
- it('maxWidth of single element',function(){
- var table = [[{}]];
- layoutTable(table)
- expect(maxWidth(table)).to.equal(1);
- });
- });
-
- describe('addRowSpanCells',function(){
- it('will insert a rowSpan cell - beginning of line',function(){
- var table = [
- [{x:0,y:0,rowSpan:2},{x:1,y:0}],
- [{x:1,y:1}]
- ];
-
- addRowSpanCells(table);
-
- expect(table[0]).to.eql([{x:0,y:0,rowSpan:2},{x:1,y:0}]);
- expect(table[1].length).to.equal(2);
- expect(table[1][0]).to.be.instanceOf(RowSpanCell);
- expect(table[1][1]).to.eql({x:1,y:1});
- });
-
- it('will insert a rowSpan cell - end of line',function(){
- var table = [
- [{x:0,y:0},{x:1,y:0,rowSpan:2}],
- [{x:0,y:1}]
- ];
-
- addRowSpanCells(table);
-
- expect(table[0]).to.eql([{x:0,y:0},{rowSpan:2,x:1,y:0}]);
- expect(table[1].length).to.equal(2);
- expect(table[1][0]).to.eql({x:0,y:1});
- expect(table[1][1]).to.be.instanceOf(RowSpanCell);
- });
-
- it('will insert a rowSpan cell - middle of line',function(){
- var table = [
- [{x:0,y:0},{x:1,y:0,rowSpan:2},{x:2,y:0}],
- [{x:0,y:1},{x:2,y:1}]
- ];
-
- addRowSpanCells(table);
-
- expect(table[0]).to.eql([{x:0,y:0},{rowSpan:2,x:1,y:0},{x:2,y:0}]);
- expect(table[1].length).to.equal(3);
- expect(table[1][0]).to.eql({x:0,y:1});
- expect(table[1][1]).to.be.instanceOf(RowSpanCell);
- expect(table[1][2]).to.eql({x:2,y:1});
- });
-
- it('will insert a rowSpan cell - multiple on the same line',function(){
- var table = [
- [{x:0,y:0},{x:1,y:0,rowSpan:2},{x:2,y:0,rowSpan:2},{x:3,y:0}],
- [{x:0,y:1},{x:3,y:1}]
- ];
-
- addRowSpanCells(table);
-
- expect(table[0]).to.eql([{x:0,y:0},{rowSpan:2,x:1,y:0},{rowSpan:2,x:2,y:0},{x:3,y:0}]);
- expect(table[1].length).to.equal(4);
- expect(table[1][0]).to.eql({x:0,y:1});
- expect(table[1][1]).to.be.instanceOf(RowSpanCell);
- expect(table[1][2]).to.be.instanceOf(RowSpanCell);
- expect(table[1][3]).to.eql({x:3,y:1});
- });
- });
-}); \ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/test/original-cli-table-index-tests.js b/deps/npm/node_modules/cli-table2/test/original-cli-table-index-tests.js
deleted file mode 100644
index 78362671b1..0000000000
--- a/deps/npm/node_modules/cli-table2/test/original-cli-table-index-tests.js
+++ /dev/null
@@ -1,294 +0,0 @@
-describe('@api original-cli-table index tests',function(){
- var Table = require('../src/table');
- var chai = require('chai');
- var expect = chai.expect;
-
- it('test complete table', function (){
- var table = new Table({
- head: ['Rel', 'Change', 'By', 'When']
- , style: {
- 'padding-left': 1
- , 'padding-right': 1
- , head: []
- , border: []
- }
- , colWidths: [6, 21, 25, 17]
- });
-
- table.push(
- ['v0.1', 'Testing something cool', 'rauchg@gmail.com', '7 minutes ago']
- , ['v0.1', 'Testing something cool', 'rauchg@gmail.com', '8 minutes ago']
- );
-
- var expected = [
- '┌──────┬─────────────────────┬─────────────────────────┬─────────────────┐'
- , '│ Rel │ Change │ By │ When │'
- , '├──────┼─────────────────────┼─────────────────────────┼─────────────────┤'
- , '│ v0.1 │ Testing something … │ rauchg@gmail.com │ 7 minutes ago │'
- , '├──────┼─────────────────────┼─────────────────────────┼─────────────────┤'
- , '│ v0.1 │ Testing something … │ rauchg@gmail.com │ 8 minutes ago │'
- , '└──────┴─────────────────────┴─────────────────────────┴─────────────────┘'
- ];
-
- expect(table.toString()).to.equal(expected.join("\n"));
- //expect(table.render()).should.eql(expected.join("\n"));
- });
-
- it('test width property', function (){
- var table = new Table({
- head: ['Cool'],
- style: {
- head: [],
- border: []
- }
- });
-
- expect(table.width).to.equal(8);
- });
-
- it('test vertical table output', function() {
- var table = new Table({ style: {'padding-left':0, 'padding-right':0, head:[], border:[]} }); // clear styles to prevent color output
-
- table.push(
- {'v0.1': 'Testing something cool'}
- , {'v0.1': 'Testing something cool'}
- );
-
- var expected = [
- '┌────┬──────────────────────┐'
- , '│v0.1│Testing something cool│'
- , '├────┼──────────────────────┤'
- , '│v0.1│Testing something cool│'
- , '└────┴──────────────────────┘'
- ];
-
- expect(table.toString()).to.equal(expected.join("\n"));
- });
-
- it('test cross table output', function() {
- var table = new Table({ head: ["", "Header 1", "Header 2"], style: {'padding-left':0, 'padding-right':0, head:[], border:[]} }); // clear styles to prevent color output
-
- table.push(
- {"Header 3": ['v0.1', 'Testing something cool'] }
- , {"Header 4": ['v0.1', 'Testing something cool'] }
- );
-
- var expected = [
- '┌────────┬────────┬──────────────────────┐'
- , '│ │Header 1│Header 2 │'
- , '├────────┼────────┼──────────────────────┤'
- , '│Header 3│v0.1 │Testing something cool│'
- , '├────────┼────────┼──────────────────────┤'
- , '│Header 4│v0.1 │Testing something cool│'
- , '└────────┴────────┴──────────────────────┘'
- ];
-
- expect(table.toString()).to.equal(expected.join("\n"));
- });
-
- it('test table colors', function(){
- var table = new Table({
- head: ['Rel', 'By'],
- style: {head: ['red'], border: ['grey']}
- });
-
- /*var off = ''
- , red = ''
- , orange = ''
- , grey = ''*/
- var off = '\u001b[39m'
- , red = '\u001b[31m'
- , orange = '\u001b[38;5;221m'
- , grey = '\u001b[90m'
-
- , c256s = orange + 'v0.1' + off;
-
- table.push(
- [c256s, 'rauchg@gmail.com']
- );
-
- // The expectation from the original cli-table is commented out below.
- // The output from cli-table2 will still look the same, but the border color is
- // toggled off and back on at the border of each cell.
-
- /*var expected = [
- grey + '┌──────┬──────────────────┐' + off
- , grey + '│' + off + red + ' Rel ' + off + grey + '│' + off + red + ' By ' + off + grey + '│' + off
- , grey + '├──────┼──────────────────┤' + off
- , grey + '│' + off + ' ' + c256s + ' ' + grey + '│' + off + ' rauchg@gmail.com ' + grey + '│' + off
- , grey + '└──────┴──────────────────┘' + off
- ];*/
-
- var expected = [
- grey + '┌──────'+off+grey+'┬──────────────────┐' + off
- , grey + '│' + off + red + ' Rel ' + off + grey + '│' + off + red + ' By ' + off + grey + '│' + off
- , grey + '├──────'+off+grey+'┼──────────────────┤' + off
- , grey + '│' + off + ' ' + c256s + ' ' + grey + '│' + off + ' rauchg@gmail.com ' + grey + '│' + off
- , grey + '└──────'+off+grey+'┴──────────────────┘' + off
- ];
-
- expect(table.toString()).to.equal(expected.join("\n"));
- });
-
- it('test custom chars', function (){
- var table = new Table({
- chars: {
- 'top': '═'
- , 'top-mid': '╤'
- , 'top-left': '╔'
- , 'top-right': '╗'
- , 'bottom': '═'
- , 'bottom-mid': '╧'
- , 'bottom-left': '╚'
- , 'bottom-right': '╝'
- , 'left': '║'
- , 'left-mid': '╟'
- , 'right': '║'
- , 'right-mid': '╢'
- },
- style: {
- head: []
- , border: []
- }
- });
-
- table.push(
- ['foo', 'bar', 'baz']
- , ['frob', 'bar', 'quuz']
- );
-
- var expected = [
- '╔══════╤═════╤══════╗'
- , '║ foo │ bar │ baz ║'
- , '╟──────┼─────┼──────╢'
- , '║ frob │ bar │ quuz ║'
- , '╚══════╧═════╧══════╝'
- ];
-
- expect(table.toString()).to.equal(expected.join("\n"));
- });
-
- it('test compact shortand', function (){
- var table = new Table({
- style: {
- head: []
- , border: []
- , compact : true
- }
- });
-
- table.push(
- ['foo', 'bar', 'baz']
- , ['frob', 'bar', 'quuz']
- );
-
- var expected = [
- '┌──────┬─────┬──────┐'
- , '│ foo │ bar │ baz │'
- , '│ frob │ bar │ quuz │'
- , '└──────┴─────┴──────┘'
- ];
-
- expect(table.toString()).to.equal(expected.join("\n"));
- });
-
- it('test compact empty mid line', function (){
- var table = new Table({
- chars: {
- 'mid': ''
- , 'left-mid': ''
- , 'mid-mid': ''
- , 'right-mid': ''
- },
- style: {
- head: []
- , border: []
- }
- });
-
- table.push(
- ['foo', 'bar', 'baz']
- , ['frob', 'bar', 'quuz']
- );
-
- var expected = [
- '┌──────┬─────┬──────┐'
- , '│ foo │ bar │ baz │'
- , '│ frob │ bar │ quuz │'
- , '└──────┴─────┴──────┘'
- ];
-
- expect(table.toString()).to.equal(expected.join("\n"));
- });
-
- it('test decoration lines disabled', function (){
- var table = new Table({
- chars: {
- 'top': ''
- , 'top-mid': ''
- , 'top-left': ''
- , 'top-right': ''
- , 'bottom': ''
- , 'bottom-mid': ''
- , 'bottom-left': ''
- , 'bottom-right': ''
- , 'left': ''
- , 'left-mid': ''
- , 'mid': ''
- , 'mid-mid': ''
- , 'right': ''
- , 'right-mid': ''
- , 'middle': ' ' // a single space
- },
- style: {
- head: []
- , border: []
- , 'padding-left': 0
- , 'padding-right': 0
- }
- });
-
- table.push(
- ['foo', 'bar', 'baz']
- , ['frobnicate', 'bar', 'quuz']
- );
-
- var expected = [
- 'foo bar baz '
- , 'frobnicate bar quuz'
- ];
-
- expect(table.toString()).to.equal(expected.join("\n"));
- });
-
- it('test with null/undefined as values or column names', function (){
- var table = new Table({
- style: {
- head: []
- , border: []
- }
- });
-
- table.push(
- [null, undefined, 0]
- );
-
- // This is the expectation from the original cli-table.
- // The empty columns have widths based on the strings `null` and `undefined`
- // That does not make sense to me, so I am deviating from the original behavior here.
-
- /*var expected = [
- '┌──────┬───────────┬───┐'
- , '│ │ │ 0 │'
- , '└──────┴───────────┴───┘'
- ]; */
-
- var expected = [
- '┌──┬──┬───┐'
- , '│ │ │ 0 │'
- , '└──┴──┴───┘'
- ];
-
- expect(table.toString()).to.equal(expected.join("\n"));
- });
-});
diff --git a/deps/npm/node_modules/cli-table2/test/original-cli-table-newlines-test.js b/deps/npm/node_modules/cli-table2/test/original-cli-table-newlines-test.js
deleted file mode 100644
index 8bafa332cf..0000000000
--- a/deps/npm/node_modules/cli-table2/test/original-cli-table-newlines-test.js
+++ /dev/null
@@ -1,85 +0,0 @@
-describe('@api original-cli-table newline tests',function(){
- var Table = require('../src/table');
- var chai = require('chai');
- var expect = chai.expect;
-
- it('test table with newlines in headers', function() {
- var table = new Table({
- head: ['Test', "1\n2\n3"]
- , style: {
- 'padding-left': 1
- , 'padding-right': 1
- , head: []
- , border: []
- }
- });
-
- var expected = [
- '┌──────┬───┐'
- , '│ Test │ 1 │'
- , '│ │ 2 │'
- , '│ │ 3 │'
- , '└──────┴───┘'
- ];
-
- expect(table.toString()).to.equal(expected.join("\n"));
- });
-
- it('test column width is accurately reflected when newlines are present', function() {
- var table = new Table({ head: ['Test\nWidth'], style: {head:[], border:[]} });
- expect(table.width).to.equal(9);
- });
-
- it('test newlines in body cells', function() {
- var table = new Table({style: {head:[], border:[]}});
-
- table.push(["something\nwith\nnewlines"]);
-
- var expected = [
- '┌───────────┐'
- , '│ something │'
- , '│ with │'
- , '│ newlines │'
- , '└───────────┘'
- ];
-
- expect(table.toString()).to.equal(expected.join("\n"));
- });
-
- it('test newlines in vertical cell header and body', function() {
- var table = new Table({ style: {'padding-left':0, 'padding-right':0, head:[], border:[]} });
-
- table.push(
- {'v\n0.1': 'Testing\nsomething cool'}
- );
-
- var expected = [
- '┌───┬──────────────┐'
- , '│v │Testing │'
- , '│0.1│something cool│'
- , '└───┴──────────────┘'
- ];
-
- expect(table.toString()).to.equal(expected.join("\n"));
- });
-
- it('test newlines in cross table header and body', function() {
- var table = new Table({ head: ["", "Header\n1"], style: {'padding-left':0, 'padding-right':0, head:[], border:[]} });
-
- table.push({ "Header\n2": ['Testing\nsomething\ncool'] });
-
- var expected = [
- '┌──────┬─────────┐'
- , '│ │Header │'
- , '│ │1 │'
- , '├──────┼─────────┤'
- , '│Header│Testing │'
- , '│2 │something│'
- , '│ │cool │'
- , '└──────┴─────────┘'
- ];
-
- expect(table.toString()).to.equal(expected.join("\n"));
- });
-
-});
diff --git a/deps/npm/node_modules/cli-table2/test/table-layout-test.js b/deps/npm/node_modules/cli-table2/test/table-layout-test.js
deleted file mode 100644
index c1c05eab0a..0000000000
--- a/deps/npm/node_modules/cli-table2/test/table-layout-test.js
+++ /dev/null
@@ -1,466 +0,0 @@
-describe('tableLayout', function () {
- var Cell = require('../src/cell');
- var layoutManager = require('../src/layout-manager');
- var layoutTable = layoutManager.layoutTable;
- var makeTableLayout = layoutManager.makeTableLayout;
- var addRowSpanCells = layoutManager.addRowSpanCells;
- var maxWidth = layoutManager.maxWidth;
- var fillInTable = layoutManager.fillInTable;
- var computeWidths = layoutManager.computeWidths;
- var computeHeights = layoutManager.computeHeights;
- var chai = require('chai');
- var expect = chai.expect;
- var _ = require('lodash');
-
- it('simple 2x2 layout',function(){
- var actual = makeTableLayout([
- ['hello','goodbye'],
- ['hola','adios']
- ]);
-
- var expected = [
- ['hello','goodbye'],
- ['hola','adios']
- ];
-
- checkLayout(actual,expected);
- });
-
- it('cross table',function(){
- var actual = makeTableLayout([
- {'1.0':['yes','no']},
- {'2.0':['hello','goodbye']}
- ]);
-
- var expected = [
- ['1.0','yes','no'],
- ['2.0','hello','goodbye']
- ];
-
- checkLayout(actual,expected);
- });
-
- it('vertical table',function(){
- var actual = makeTableLayout([
- {'1.0':'yes'},
- {'2.0':'hello'}
- ]);
-
- var expected = [
- ['1.0','yes'],
- ['2.0','hello']
- ];
-
- checkLayout(actual,expected);
- });
-
- it('colSpan adds RowSpanCells to the right',function(){
- var actual = makeTableLayout([
- [{content:'hello',colSpan:2}],
- ['hola','adios']
- ]);
-
- var expected = [
- [{content:'hello',colSpan:2},null],
- ['hola','adios']
- ];
-
- checkLayout(actual,expected);
- });
-
- it('rowSpan adds RowSpanCell below',function(){
- var actual = makeTableLayout([
- [{content:'hello',rowSpan:2},'goodbye'],
- ['adios']
- ]);
-
- var expected = [
- ['hello' , 'goodbye'],
- [{spannerFor:[0,0]} , 'adios']
- ];
-
- checkLayout(actual,expected);
- });
-
- it('rowSpan and cellSpan together',function(){
- var actual = makeTableLayout([
- [{content:'hello',rowSpan:2,colSpan:2},'goodbye'],
- ['adios']
- ]);
-
- var expected = [
- ['hello' , null, 'goodbye'],
- [{spannerFor:[0,0]} , null, 'adios']
- ];
-
- checkLayout(actual,expected);
- });
-
- it('complex layout',function(){
- var actual = makeTableLayout([
- [{content:'hello',rowSpan:2,colSpan:2},{content:'yo',rowSpan:2,colSpan:2},'goodbye'],
- ['adios']
- ]);
-
- var expected = [
- ['hello' , null, 'yo' , null, 'goodbye'],
- [{spannerFor:[0,0]} , null, {spannerFor:[0,2]} , null, 'adios']
- ];
-
- checkLayout(actual,expected);
- });
-
- it('complex layout2',function(){
- var actual = makeTableLayout([
- ['a','b', {content:'c',rowSpan:3,colSpan:2},'d'],
- [{content:'e',rowSpan:2,colSpan:2}, 'f'],
- ['g']
- ]);
-
- var expected = [
- ['a', 'b', 'c', null, 'd'],
- ['e', null, {spannerFor:[0,2]}, null, 'f'],
- [{spannerFor:[1,0]}, null, {spannerFor:[0,2]}, null, 'g']
- ];
-
- checkLayout(actual,expected);
- });
-
- it('stairstep spans',function(){
- var actual = makeTableLayout([
- [{content:'',rowSpan:2},''],
- [{content:'',rowSpan:2}],
- ['']
- ]);
-
- var expected = [
- [{content:'',rowSpan:2}, ''],
- [{spannerFor:[0,0]},{content:'',rowSpan:2}],
- ['',{spannerFor:[1,1]}]
- ];
-
- checkLayout(actual,expected);
- });
-
- describe('fillInTable',function(){
- function mc(opts,y,x){
- var cell = new Cell(opts);
- cell.x = x;
- cell.y = y;
- return cell;
- }
-
- it('will blank out individual cells',function(){
- var cells = [
- [mc('a',0,1)],
- [mc('b',1,0)]
- ];
- fillInTable(cells);
-
- checkLayout(cells,[
- ['', 'a'],
- ['b', '']
- ]);
- });
-
- it('will autospan to the right',function(){
- var cells = [
- [],
- [mc('a',1,1)]
- ];
- fillInTable(cells);
-
- checkLayout(cells,[
- [{content:'',colSpan:2}, null],
- ['', 'a']
- ]);
- });
-
- it('will autospan down',function(){
- var cells = [
- [ mc('a',0,1)],
- []
- ];
- fillInTable(cells);
- addRowSpanCells(cells);
-
- checkLayout(cells,[
- [{content:'',rowSpan:2}, 'a'],
- [{spannerFor:[0,0]}, '']
- ]);
- });
-
- it('will autospan right and down',function(){
- var cells = [
- [ mc('a',0,2)],
- [],
- [ mc('b',2,1)]
- ];
- fillInTable(cells);
- addRowSpanCells(cells);
-
- checkLayout(cells,[
- [{content:'',colSpan:2, rowSpan:2}, null, 'a'],
- [{spannerFor:[0,0]}, null, {content:'', colSpan:1, rowSpan:2}],
- ['','b',{spannerFor:[1,2]}]
- ]);
- });
- });
-
- describe('computeWidths',function() {
- function mc(y,x,desiredWidth, colSpan) {
- return {x:x,y:y,desiredWidth:desiredWidth,colSpan:colSpan};
- }
-
- it('finds the maximum desired width of each column', function () {
- var widths = [];
- var cells = [
- [mc(0,0,7), mc(0,1,3), mc(0,2,5)],
- [mc(1,0,8), mc(1,1,5), mc(1,2,2)],
- [mc(2,0,6), mc(2,1,9), mc(2,2,1)]
- ];
-
- computeWidths(widths, cells);
-
- expect(widths).to.eql([8, 9, 5]);
- });
-
- it('won\'t touch hard coded values', function () {
- var widths = [null, 3];
- var cells = [
- [mc(0,0,7), mc(0,1,3), mc(0,2,5)],
- [mc(1,0,8), mc(1,1,5), mc(1,2,2)],
- [mc(2,0,6), mc(2,1,9), mc(2,2,1)]
- ];
-
- computeWidths(widths, cells);
-
- expect(widths).to.eql([8, 3, 5]);
- });
-
- it('assumes undefined desiredWidth is 1', function () {
- var widths = [];
- var cells = [[{x:0,y:0}], [{x:0,y:1}], [{x:0,y:2}]];
- computeWidths(widths, cells);
- expect(widths).to.eql([1])
- });
-
- it('takes into account colSpan and wont over expand', function () {
- var widths = [];
- var cells = [
- [mc(0,0,10, 2), mc(0,2,5)],
- [mc(1,0,5), mc(1,1,5), mc(1,2,2)],
- [mc(2,0,4), mc(2,1,2), mc(2,2,1)]
- ];
- computeWidths(widths, cells);
- expect(widths).to.eql([5, 5, 5]);
- });
-
- it('will expand rows involved in colSpan in a balanced way', function () {
- var widths = [];
- var cells = [
- [mc(0,0,13,2), mc(0,2,5)],
- [mc(1,0,5), mc(1,1,5), mc(1,2,2)],
- [mc(2,0,4), mc(2,1,2), mc(2,2,1)]
- ];
- computeWidths(widths, cells);
- expect(widths).to.eql([6, 6, 5]);
- });
-
- it('expands across 3 cols', function () {
- var widths = [];
- var cells = [
- [mc(0,0,25,3) ],
- [mc(1,0,5), mc(1,1,5), mc(1,2,2) ],
- [mc(2,0,4), mc(2,1,2), mc(2,2,1) ]
- ];
- computeWidths(widths, cells);
- expect(widths).to.eql([9, 9, 5]);
- });
-
- it('multiple spans in same table', function () {
- var widths = [];
- var cells = [
- [mc(0,0,25,3) ],
- [mc(1,0,30,3) ],
- [mc(2,0,4), mc(2,1,2), mc(2,2,1) ]
- ];
- computeWidths(widths, cells);
- expect(widths).to.eql([11, 9, 8]);
- });
-
- it('spans will only edit uneditable tables',function(){
- var widths = [null, 3];
- var cells = [
- [mc(0,0,20,3) ],
- [mc(1,0,4), mc(1,1,20), mc(1,2,5) ]
- ];
- computeWidths(widths, cells);
- expect(widths).to.eql([7,3,8])
- });
-
- it('spans will only edit uneditable tables - first column uneditable',function(){
- var widths = [3];
- var cells = [
- [mc(0,0,20,3) ],
- [mc(1,0,4), mc(1,1,3), mc(1,2,5) ]
- ];
- computeWidths(widths, cells);
- expect(widths).to.eql([3,7,8])
- });
- });
-
- describe('computeHeights',function(){
- function mc(y,x,desiredHeight,colSpan){
- return {x:x,y:y,desiredHeight:desiredHeight,rowSpan:colSpan};
- }
-
- it('finds the maximum desired height of each row',function(){
- var heights = [];
- var cells = [
- [mc(0,0,7), mc(0,1,3), mc(0,2,5) ],
- [mc(1,0,8), mc(1,1,5), mc(1,2,2) ],
- [mc(2,0,6), mc(2,1,9), mc(2,2,1) ]
- ];
-
- computeHeights(heights,cells);
-
- expect(heights).to.eql([7,8,9]);
- });
-
- it('won\'t touch hard coded values',function(){
- var heights = [null,3];
- var cells = [
- [mc(0,0,7), mc(0,1,3), mc(0,2,5)],
- [mc(1,0,8), mc(1,1,5), mc(1,2,2)],
- [mc(2,0,6), mc(2,1,9), mc(2,2,1)]
- ];
-
- computeHeights(heights,cells);
-
- expect(heights).to.eql([7,3,9]);
- });
-
- it('assumes undefined desiredHeight is 1',function(){
- var heights = [];
- var cells = [[{x:0,y:0},{x:1,y:0},{x:2,y:0}]];
- computeHeights(heights,cells);
- expect(heights).to.eql([1])
- });
-
- it('takes into account rowSpan and wont over expand',function(){
- var heights = [];
- var cells = [
- [mc(0,0,10,2), mc(0,1,5), mc(0,2,2)],
- [ mc(1,1,5), mc(1,2,2)],
- [mc(2,0,4), mc(2,1,2), mc(2,2,1)]
- ];
- computeHeights(heights,cells);
- expect(heights).to.eql([5,5,4]);
- });
-
- it('will expand rows involved in rowSpan in a balanced way',function(){
- var heights = [];
- var cells = [
- [mc(0,0,13,2), mc(0,1,5), mc(0,2,5)],
- [ mc(1,1,5), mc(1,2,2)],
- [mc(2,0,4), mc(2,1,2), mc(2,2,1)]
- ];
- computeHeights(heights,cells);
- expect(heights).to.eql([6,6,4]);
- });
-
- it('expands across 3 rows',function(){
- var heights = [];
- var cells = [
- [mc(0,0,25,3), mc(0,1,5), mc(0,2,4)],
- [ mc(1,1,5), mc(1,2,2)],
- [ mc(2,1,2), mc(2,2,1)]
- ];
- computeHeights(heights,cells);
- expect(heights).to.eql([9,9,5]);
- });
-
- it('multiple spans in same table',function(){
- var heights = [];
- var cells = [
- [mc(0,0,25,3), mc(0,1,30,3), mc(0,2,4)],
- [ mc(1,2,2)],
- [ mc(2,2,1)]
- ];
- computeHeights(heights,cells);
- expect(heights).to.eql([11,9,8]);
- });
- });
-
- /**
- * Provides a shorthand for validating a table of cells.
- * To pass, both arrays must have the same dimensions, and each cell in `actualRows` must
- * satisfy the shorthand assertion of the corresponding location in `expectedRows`.
- *
- * Available Expectations Can Be:
- *
- * * A `String` - Must be a normal cell with contents equal to the String value.
- * * `null` - Must be a RowSpanCell
- *
- * Or an `Object` with any of the following properties (multiple properties allowed):
- * * rowSpan:Number - Must be a normal cell with the given rowSpan.
- * * colSpan:Number - Must be a normal cell with the given colSpan.
- * * content:String - Must be a normal cell with the given content.
- * * spannerFor:[row,col] - Must be a RowSpanCell delegating to the cell at the given coordinates.
- *
- * @param actualRows - the table of cells under test.
- * @param expectedRows - a table of shorthand assertions.
- */
-
- function checkLayout(actualTable,expectedTable){
- _.forEach(expectedTable,function(expectedRow,y){
- _.forEach(expectedRow,function(expectedCell,x){
- if(expectedCell !== null){
- var actualCell = findCell(actualTable,x,y);
- checkExpectation(actualCell,expectedCell,x,y,actualTable);
- }
- });
- });
- }
-
- function findCell(table,x,y){
- for(var i = 0; i < table.length; i++){
- var row = table[i];
- for(var j = 0; j < row.length; j++){
- var cell = row[j];
- if(cell.x === x && cell.y === y){
- return cell;
- }
- }
- }
- }
-
- function checkExpectation(actualCell,expectedCell,x,y,actualTable){
- if(_.isString(expectedCell)){
- expectedCell = {content:expectedCell};
- }
- var address = '(' + y + ',' + x + ')';
- if(expectedCell.hasOwnProperty('content')){
- expect(actualCell, address).to.be.instanceOf(Cell);
- expect(actualCell.content,'content of ' + address).to.equal(expectedCell.content);
- }
- if(expectedCell.hasOwnProperty('rowSpan')){
- expect(actualCell, address).to.be.instanceOf(Cell);
- expect(actualCell.rowSpan, 'rowSpan of ' + address).to.equal(expectedCell.rowSpan);
- }
- if(expectedCell.hasOwnProperty('colSpan')){
- expect(actualCell, address).to.be.instanceOf(Cell);
- expect(actualCell.colSpan, 'colSpan of ' + address).to.equal(expectedCell.colSpan);
- }
- if(expectedCell.hasOwnProperty('spannerFor')){
- expect(actualCell, address).to.be.instanceOf(Cell.RowSpanCell);
- expect(actualCell.originalCell,address + 'originalCell should be a cell').to.be.instanceOf(Cell);
- expect(actualCell.originalCell,address + 'originalCell not right').to.equal(findCell(actualTable,
- expectedCell.spannerFor[1],
- expectedCell.spannerFor[0]
- ));
- //TODO: retest here x,y coords
- }
- }
-}); \ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/test/table-test.js b/deps/npm/node_modules/cli-table2/test/table-test.js
deleted file mode 100644
index 4bc3e055d9..0000000000
--- a/deps/npm/node_modules/cli-table2/test/table-test.js
+++ /dev/null
@@ -1,87 +0,0 @@
-describe('@api Table ',function(){
- var chai = require('chai');
- var expect = chai.expect;
- var Table = require('..');
- var colors = require('colors/safe');
-
- it('wordWrap with colored text',function(){
- var table = new Table({style:{border:[],head:[]},wordWrap:true,colWidths:[7,9]});
-
- table.push([colors.red('Hello how are you?'),colors.blue('I am fine thanks!')]);
-
- var expected = [
- '┌───────┬─────────┐'
- , '│ ' + colors.red('Hello') + ' │ ' + colors.blue('I am') + ' │'
- , '│ ' + colors.red('how') + ' │ ' + colors.blue('fine') + ' │'
- , '│ ' + colors.red('are') + ' │ ' + colors.blue('thanks!') + ' │'
- , '│ ' + colors.red('you?') + ' │ │'
- , '└───────┴─────────┘'
- ];
-
- expect(table.toString()).to.equal(expected.join('\n'));
- });
-
- it('allows numbers as `content` property of cells defined using object notation', function() {
- var table = new Table({style:{border:[],head:[]}});
-
- table.push([{content: 12}]);
-
- var expected = [
- '┌────┐'
- , '│ 12 │'
- , '└────┘'
- ];
-
- expect(table.toString()).to.equal(expected.join('\n'));
- });
-
- it('throws if content is not a string or number', function() {
- var table = new Table({style:{border:[],head:[]}});
-
- expect(function() {
- table.push([{content: {a:'b'}}]);
- table.toString();
- }).to.throw();
-
- });
-
- it('works with CJK values', function () {
- var table = new Table({style: {border:[],head:[]}, colWidths: [5, 10, 5]});
-
- table.push(
- ['foobar', 'English test', 'baz']
- , ['foobar', '中文测试', 'baz']
- , ['foobar', '日本語テスト', 'baz']
- , ['foobar', '한국어테스트', 'baz']
- );
-
- var expected = [
- '┌─────┬──────────┬─────┐'
- , '│ fo… │ English… │ baz │'
- , '├─────┼──────────┼─────┤'
- , '│ fo… │ 中文测试 │ baz │'
- , '├─────┼──────────┼─────┤'
- , '│ fo… │ 日本語… │ baz │'
- , '├─────┼──────────┼─────┤'
- , '│ fo… │ 한국어… │ baz │'
- , '└─────┴──────────┴─────┘'
- ];
-
- expect(table.toString()).to.equal(expected.join("\n"));
- });
-});
-
-
-/*
-
- var expected = [
- '┌──┬───┬──┬──┐'
- , '│ │ │ │ │'
- , '├──┼───┼──┼──┤'
- , '│ │ … │ │ │'
- , '├──┼───┼──┼──┤'
- , '│ │ … │ │ │'
- , '└──┴───┴──┴──┘'
- ];
-
- */
diff --git a/deps/npm/node_modules/cli-table2/test/utils-test.js b/deps/npm/node_modules/cli-table2/test/utils-test.js
deleted file mode 100644
index f876b87e63..0000000000
--- a/deps/npm/node_modules/cli-table2/test/utils-test.js
+++ /dev/null
@@ -1,414 +0,0 @@
-describe('utils',function(){
- var colors = require('colors/safe');
- var chai = require('chai');
- var utils = require('../src/utils');
- var expect = chai.expect;
-
- var strlen = utils.strlen;
- var repeat = utils.repeat;
- var pad = utils.pad;
- var truncate = utils.truncate;
- var mergeOptions = utils.mergeOptions;
- var wordWrap = utils.wordWrap;
-
-
- describe('strlen',function(){
- it('length of "hello" is 5',function(){
- expect(strlen('hello')).to.equal(5);
- });
-
- it('length of "hi" is 2',function(){
- expect(strlen('hi')).to.equal(2);
- });
-
- it('length of "hello" in red is 5',function(){
- expect(strlen(colors.red('hello'))).to.equal(5);
- });
-
- it('length of "hello" in zebra is 5',function(){
- expect(strlen(colors.zebra('hello'))).to.equal(5);
- });
-
- it('length of "hello\\nhi\\nheynow" is 6',function(){
- expect(strlen('hello\nhi\nheynow')).to.equal(6);
- });
-
- it('length of "中文字符" is 8',function(){
- expect(strlen('中文字符')).to.equal(8);
- });
-
- it('length of "日本語の文字" is 12',function(){
- expect(strlen('日本語の文字')).to.equal(12);
- });
-
- it('length of "한글" is 4',function(){
- expect(strlen('한글')).to.equal(4);
- });
- });
-
- describe('repeat',function(){
- it('"-" x 3',function(){
- expect(repeat('-',3)).to.equal('---');
- });
-
- it('"-" x 4',function(){
- expect(repeat('-',4)).to.equal('----');
- });
-
- it('"=" x 4',function(){
- expect(repeat('=',4)).to.equal('====');
- });
- });
-
- describe('pad',function(){
- it("pad('hello',6,' ', right) == ' hello'", function () {
- expect(pad('hello',6,' ','right')).to.equal(' hello');
- });
-
- it("pad('hello',7,' ', left) == 'hello '", function () {
- expect(pad('hello',7,' ','left')).to.equal('hello ');
- });
-
- it("pad('hello',8,' ', center) == ' hello '", function () {
- expect(pad('hello',8,' ','center')).to.equal(' hello ');
- });
-
- it("pad('hello',9,' ', center) == ' hello '", function () {
- expect(pad('hello',9,' ','center')).to.equal(' hello ');
- });
-
- it("pad('yo',4,' ', center) == ' yo '", function () {
- expect(pad('yo',4,' ','center')).to.equal(' yo ');
- });
-
- it('pad red(hello)', function(){
- expect(pad(colors.red('hello'),7,' ','right')).to.equal(' ' + colors.red('hello'));
- });
-
- it("pad('hello', 2, ' ', right) == 'hello'", function(){
- expect(pad('hello', 2, ' ', 'right')).to.equal('hello');
- });
- });
-
- describe('truncate',function(){
- it('truncate("hello", 5) === "hello"',function(){
- expect(truncate('hello',5)).to.equal('hello');
- });
-
- it('truncate("hello sir", 7, "…") == "hello …"',function(){
- expect(truncate('hello sir', 7, '…')).to.equal('hello …');
- });
-
- it('truncate("hello sir", 6, "…") == "hello…"',function(){
- expect(truncate('hello sir', 6, '…')).to.equal('hello…');
- });
-
- it('truncate("goodnight moon", 8, "…") == "goodnig…"',function(){
- expect(truncate('goodnight moon', 8, '…')).to.equal('goodnig…');
- });
-
- it('truncate(colors.zebra("goodnight moon"), 15, "…") == colors.zebra("goodnight moon")',function(){
- var original = colors.zebra('goodnight moon');
- expect(truncate(original, 15, '…')).to.equal(original);
- });
-
- it('truncate(colors.zebra("goodnight moon"), 8, "…") == colors.zebra("goodnig") + "…"',function(){
- var original = colors.zebra('goodnight moon');
- var expected = colors.zebra('goodnig') + '…';
- expect(truncate(original, 8, '…')).to.equal(expected);
- });
-
- it('truncate(colors.zebra("goodnight moon"), 9, "…") == colors.zebra("goodnig") + "…"',function(){
- var original = colors.zebra('goodnight moon');
- var expected = colors.zebra('goodnigh') + '…';
- expect(truncate(original, 9, '…')).to.equal(expected);
- });
-
- it('red(hello) + green(world) truncated to 9 chars',function(){
- var original = colors.red('hello') + colors.green(' world');
- var expected = colors.red('hello') + colors.green(' wo') + '…';
- expect(truncate(original, 9)).to.equal(expected);
- });
-
- it('red-on-green(hello) + green-on-red(world) truncated to 9 chars',function(){
- var original = colors.red.bgGreen('hello') + colors.green.bgRed(' world');
- var expected = colors.red.bgGreen('hello') + colors.green.bgRed(' wo') + '…';
- expect(truncate(original,9)).to.equal(expected);
- });
-
- it('red-on-green(hello) + green-on-red(world) truncated to 10 chars - using inverse',function(){
- var original = colors.red.bgGreen('hello' + colors.inverse(' world'));
- var expected = colors.red.bgGreen('hello' + colors.inverse(' wor')) + '…';
- expect(truncate(original,10)).to.equal(expected);
- });
-
- it('red-on-green( zebra (hello world) ) truncated to 11 chars',function(){
- var original = colors.red.bgGreen(colors.zebra('hello world'));
- var expected = colors.red.bgGreen(colors.zebra('hello world'));
- expect(truncate(original,11)).to.equal(expected);
- });
-
- it('red-on-green( zebra (hello world) ) truncated to 10 chars',function(){
- var original = colors.red.bgGreen(colors.zebra('hello world'));
- var expected = colors.red.bgGreen(colors.zebra('hello wor')) + '…';
- expect(truncate(original,10)).to.equal(expected);
- });
-
- it('handles reset code', function() {
- var original = '\x1b[31mhello\x1b[0m world';
- var expected = '\x1b[31mhello\x1b[0m wor…';
- expect(truncate(original,10)).to.equal(expected);
- });
-
- it('handles reset code (EMPTY VERSION)', function() {
- var original = '\x1b[31mhello\x1b[0m world';
- var expected = '\x1b[31mhello\x1b[0m wor…';
- expect(truncate(original,10)).to.equal(expected);
- });
-
- it('truncateWidth("漢字テスト", 15) === "漢字テスト"',function(){
- expect(truncate('漢字テスト',15)).to.equal('漢字テスト');
- });
-
- it('truncateWidth("漢字テスト", 6) === "漢字…"',function(){
- expect(truncate('漢字テスト',6)).to.equal('漢字…');
- });
-
- it('truncateWidth("漢字テスト", 5) === "漢字…"',function(){
- expect(truncate('漢字テスト',5)).to.equal('漢字…');
- });
-
- it('truncateWidth("漢字testてすと", 12) === "漢字testて…"',function(){
- expect(truncate('漢字testてすと',12)).to.equal('漢字testて…');
- });
-
- it('handles color code with CJK chars',function(){
- var original = '漢字\x1b[31m漢字\x1b[0m漢字';
- var expected = '漢字\x1b[31m漢字\x1b[0m漢…';
- expect(truncate(original,11)).to.equal(expected);
- });
- });
-
- function defaultOptions(){
- return {
- chars: {
- 'top': '─'
- , 'top-mid': '┬'
- , 'top-left': '┌'
- , 'top-right': '┐'
- , 'bottom': '─'
- , 'bottom-mid': '┴'
- , 'bottom-left': '└'
- , 'bottom-right': '┘'
- , 'left': '│'
- , 'left-mid': '├'
- , 'mid': '─'
- , 'mid-mid': '┼'
- , 'right': '│'
- , 'right-mid': '┤'
- , 'middle': '│'
- }
- , truncate: '…'
- , colWidths: []
- , rowHeights: []
- , colAligns: []
- , rowAligns: []
- , style: {
- 'padding-left': 1
- , 'padding-right': 1
- , head: ['red']
- , border: ['grey']
- , compact : false
- }
- , head: []
- };
- }
-
- describe('mergeOptions',function(){
- it('allows you to override chars',function(){
- expect(mergeOptions()).to.eql(defaultOptions());
- });
-
- it('chars will be merged deeply',function(){
- var expected = defaultOptions();
- expected.chars.left = 'L';
- expect(mergeOptions({chars:{left:'L'}})).to.eql(expected);
- });
-
- it('style will be merged deeply',function(){
- var expected = defaultOptions();
- expected.style['padding-left'] = 2;
- expect(mergeOptions({style:{'padding-left':2}})).to.eql(expected);
- });
-
- it('head will be overwritten',function(){
- var expected = defaultOptions();
- expected.style.head = [];
- //we can't use lodash's `merge()` in implementation because it would deeply copy array.
- expect(mergeOptions({style:{'head':[]}})).to.eql(expected);
- });
-
- it('border will be overwritten',function(){
- var expected = defaultOptions();
- expected.style.border = [];
- //we can't use lodash's `merge()` in implementation because it would deeply copy array.
- expect(mergeOptions({style:{'border':[]}})).to.eql(expected);
- });
- });
-
- describe('wordWrap',function(){
- it('length',function(){
- var input = 'Hello, how are you today? I am fine, thank you!';
-
- var expected = 'Hello, how\nare you\ntoday? I\nam fine,\nthank you!';
-
- expect(wordWrap(10,input).join('\n')).to.equal(expected);
- });
-
- it('length with colors',function(){
- var input = colors.red('Hello, how are') + colors.blue(' you today? I') + colors.green(' am fine, thank you!');
-
- var expected = colors.red('Hello, how\nare') + colors.blue(' you\ntoday? I') + colors.green('\nam fine,\nthank you!');
-
- expect(wordWrap(10,input).join('\n')).to.equal(expected);
- });
-
- it('will not create an empty last line',function(){
- var input = 'Hello Hello ';
-
- var expected = 'Hello\nHello';
-
- expect(wordWrap(5,input).join('\n')).to.equal(expected);
- });
-
- it('will handle color reset code',function(){
- var input = '\x1b[31mHello\x1b[0m Hello ';
-
- var expected = '\x1b[31mHello\x1b[0m\nHello';
-
- expect(wordWrap(5,input).join('\n')).to.equal(expected);
- });
-
- it('will handle color reset code (EMPTY version)',function(){
- var input = '\x1b[31mHello\x1b[m Hello ';
-
- var expected = '\x1b[31mHello\x1b[m\nHello';
-
- expect(wordWrap(5,input).join('\n')).to.equal(expected);
- });
-
- it('words longer than limit will not create extra newlines',function(){
- var input = 'disestablishment is a multiplicity someotherlongword';
-
- var expected = 'disestablishment\nis a\nmultiplicity\nsomeotherlongword';
-
- expect(wordWrap(7,input).join('\n')).to.equal(expected);
- });
-
- it('multiple line input',function(){
- var input = 'a\nb\nc d e d b duck\nm\nn\nr';
- var expected = ['a', 'b', 'c d', 'e d', 'b', 'duck', 'm', 'n', 'r'];
-
- expect(wordWrap(4,input)).to.eql(expected);
- });
-
- it('will not start a line with whitespace', function(){
- var input = 'ab cd ef gh ij kl';
- var expected = ['ab cd','ef gh', 'ij kl'];
- expect(wordWrap(7, input)).to.eql(expected);
- });
-
- it('wraps CJK chars', function(){
- var input = '漢字 漢\n字 漢字';
- var expected = ['漢字 漢','字 漢字'];
- expect(wordWrap(7, input)).to.eql(expected);
- });
-
- it('wraps CJK chars with colors', function(){
- var input = '\x1b[31m漢字\x1b[0m\n 漢字';
- var expected = ['\x1b[31m漢字\x1b[0m', ' 漢字'];
- expect(wordWrap(5, input)).to.eql(expected);
- });
- });
-
- describe('colorizeLines',function(){
- it('foreground colors continue on each line',function(){
- var input = colors.red('Hello\nHi').split('\n');
-
- expect(utils.colorizeLines(input)).to.eql([
- colors.red('Hello'),
- colors.red('Hi')
- ]);
- });
-
- it('foreground colors continue on each line',function(){
- var input = colors.bgRed('Hello\nHi').split('\n');
-
- expect(utils.colorizeLines(input)).to.eql([
- colors.bgRed('Hello'),
- colors.bgRed('Hi')
- ]);
- });
-
- it('styles will continue on each line',function(){
- var input = colors.underline('Hello\nHi').split('\n');
-
- expect(utils.colorizeLines(input)).to.eql([
- colors.underline('Hello'),
- colors.underline('Hi')
- ]);
- });
-
- it('styles that end before the break will not be applied to the next line',function(){
- var input = (colors.underline('Hello') +'\nHi').split('\n');
-
- expect(utils.colorizeLines(input)).to.eql([
- colors.underline('Hello'),
- 'Hi'
- ]);
- });
-
- it('the reset code can be used to drop styles', function() {
- var input = '\x1b[31mHello\x1b[0m\nHi'.split('\n');
- expect(utils.colorizeLines(input)).to.eql([
- "\x1b[31mHello\x1b[0m",
- "Hi"
- ]);
- });
-
- it('handles aixterm 16-color foreground', function() {
- var input = '\x1b[90mHello\nHi\x1b[0m'.split('\n');
- expect(utils.colorizeLines(input)).to.eql([
- '\x1b[90mHello\x1b[39m',
- '\x1b[90mHi\x1b[0m'
- ]);
- });
-
- it('handles aixterm 16-color background', function() {
- var input = '\x1b[100mHello\nHi\x1b[m\nHowdy'.split('\n');
- expect(utils.colorizeLines(input)).to.eql([
- '\x1b[100mHello\x1b[49m',
- '\x1b[100mHi\x1b[m',
- 'Howdy'
- ]);
- });
-
- it('handles aixterm 256-color foreground', function() {
- var input ='\x1b[48;5;8mHello\nHi\x1b[0m\nHowdy'.split('\n');
- expect(utils.colorizeLines(input)).to.eql([
- '\x1b[48;5;8mHello\x1b[49m',
- '\x1b[48;5;8mHi\x1b[0m',
- 'Howdy'
- ]);
- });
-
- it('handles CJK chars',function(){
- var input = colors.red('漢字\nテスト').split('\n');
-
- expect(utils.colorizeLines(input)).to.eql([
- colors.red('漢字'),
- colors.red('テスト')
- ]);
- });
- });
-}); \ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/test/verify-legacy-compatibility-test.js b/deps/npm/node_modules/cli-table2/test/verify-legacy-compatibility-test.js
deleted file mode 100644
index 5cd4703477..0000000000
--- a/deps/npm/node_modules/cli-table2/test/verify-legacy-compatibility-test.js
+++ /dev/null
@@ -1,158 +0,0 @@
-(function(){
- describe('verify original cli-table behavior',function(){
- commonTests(require('cli-table'));
- });
-
- describe('@api cli-table2 matches verified behavior',function(){
- commonTests(require('../src/table'));
- });
-
- function commonTests(Table){
- var chai = require('chai');
- var expect = chai.expect;
- var colors = require('colors/safe');
-
- it('empty table has a width of 0',function(){
- var table = new Table();
- expect(table.width).to.equal(0);
- expect(table.toString()).to.equal('');
- });
-
- it('header text will be colored according to style',function(){
- var table = new Table({head:['hello','goodbye'],style:{border:[],head:['red','bgWhite']}});
-
- var expected = [
- '┌───────┬─────────┐'
- , '│' + colors.bgWhite.red(' hello ') +'│' + colors.bgWhite.red(' goodbye ') + '│'
- , '└───────┴─────────┘'
- ];
-
- expect(table.toString()).to.equal(expected.join('\n'));
- });
-
- it('tables with one row of data will not be treated as headers',function(){
- var table = new Table({style:{border:[],head:['red']}});
-
- table.push(['hello','goodbye']);
-
- var expected = [
- '┌───────┬─────────┐'
- , '│ hello │ goodbye │'
- , '└───────┴─────────┘'
- ];
-
- expect(table.toString()).to.equal(expected.join('\n'));
- });
-
- it('table with headers and data headers',function(){
- var table = new Table({head:['hello','goodbye'],style:{border:[],head:['red']}});
-
- table.push(['hola','adios']);
-
- var expected = [
- '┌───────┬─────────┐'
- , '│' + colors.red(' hello ') +'│' + colors.red(' goodbye ') + '│'
- , '├───────┼─────────┤'
- , '│ hola │ adios │'
- , '└───────┴─────────┘'
- ];
-
- expect(table.toString()).to.equal(expected.join('\n'));
- });
-
- it('compact shorthand',function(){
- var table = new Table({style:{compact:true,border:[],head:['red']}});
-
- table.push(['hello','goodbye'],['hola','adios']);
-
- var expected = [
- '┌───────┬─────────┐'
- , '│ hello │ goodbye │'
- , '│ hola │ adios │'
- , '└───────┴─────────┘'
- ];
-
- expect(table.toString()).to.equal(expected.join('\n'));
- });
-
- it('compact shorthand - headers are still rendered with separator',function(){
- var table = new Table({head:['hello','goodbye'],style:{compact:true,border:[],head:[]}});
-
- table.push(['hola','adios'],['hi','bye']);
-
- var expected = [
- '┌───────┬─────────┐'
- , '│ hello │ goodbye │'
- , '├───────┼─────────┤'
- , '│ hola │ adios │'
- , '│ hi │ bye │'
- , '└───────┴─────────┘'
- ];
-
- expect(table.toString()).to.equal(expected.join('\n'));
- });
-
- it('compact longhand - headers are not rendered with separator',function(){
- var table = new Table({
- chars: {
- 'mid': ''
- , 'left-mid': ''
- , 'mid-mid': ''
- , 'right-mid': ''
- },
- head:['hello','goodbye'],
- style:{border:[],head:[]}}
- );
-
- table.push(['hola','adios'],['hi','bye']);
-
- var expected = [
- '┌───────┬─────────┐'
- , '│ hello │ goodbye │'
- , '│ hola │ adios │'
- , '│ hi │ bye │'
- , '└───────┴─────────┘'
- ];
-
- expect(table.toString()).to.equal(expected.join('\n'));
- });
-
- it('compact longhand',function(){
- var table = new Table({
- chars: {
- 'mid': ''
- , 'left-mid': ''
- , 'mid-mid': ''
- , 'right-mid': ''
- },
- style:{border:[],head:['red']}
- });
-
- table.push(['hello','goodbye'],['hola','adios']);
-
- var expected = [
- '┌───────┬─────────┐'
- , '│ hello │ goodbye │'
- , '│ hola │ adios │'
- , '└───────┴─────────┘'
- ];
-
- expect(table.toString()).to.equal(expected.join('\n'));
- });
-
- it('objects with multiple properties in a cross-table',function(){
- var table = new Table({style:{border:[],head:[]}});
-
- table.push(
- {'a':['b'], c:['d']} // value of property 'c' will be discarded
- );
-
- var expected = [
- '┌───┬───┐'
- , '│ a │ b │'
- , '└───┴───┘'
- ];
- expect(table.toString()).to.equal(expected.join('\n'));
- });
- }
-})(); \ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table3/CHANGELOG.md b/deps/npm/node_modules/cli-table3/CHANGELOG.md
new file mode 100644
index 0000000000..62eb485bdf
--- /dev/null
+++ b/deps/npm/node_modules/cli-table3/CHANGELOG.md
@@ -0,0 +1,48 @@
+# Changelog
+
+## v0.5.0 (2018-06-11)
+
+#### :boom: Breaking Change
+* [#2](https://github.com/cli-table/cli-table3/pull/2) Update Node version requirements. ([@Turbo87](https://github.com/Turbo87))
+
+#### :memo: Documentation
+* [#11](https://github.com/cli-table/cli-table3/pull/11) Update Documentation. ([@Turbo87](https://github.com/Turbo87))
+
+#### :house: Internal
+* [#16](https://github.com/cli-table/cli-table3/pull/16) Replace `kind-of` dependency with `typeof` and `Array.isArray()`. ([@Turbo87](https://github.com/Turbo87))
+* [#15](https://github.com/cli-table/cli-table3/pull/15) Remove Gulp. ([@Turbo87](https://github.com/Turbo87))
+* [#13](https://github.com/cli-table/cli-table3/pull/13) Use ES6 class syntax and `let/const`. ([@Turbo87](https://github.com/Turbo87))
+* [#12](https://github.com/cli-table/cli-table3/pull/12) Add ESLint and Prettier. ([@Turbo87](https://github.com/Turbo87))
+* [#10](https://github.com/cli-table/cli-table3/pull/10) chore: use yarn cache. ([@DanielRuf](https://github.com/DanielRuf))
+* [#9](https://github.com/cli-table/cli-table3/pull/9) Use Jest for testing. ([@Turbo87](https://github.com/Turbo87))
+* [#3](https://github.com/cli-table/cli-table3/pull/3) Add `yarn.lock` file. ([@Turbo87](https://github.com/Turbo87))
+* [#1](https://github.com/cli-table/cli-table3/pull/1) Skip broken test. ([@Turbo87](https://github.com/Turbo87))
+
+#### Committers: 3
+- Daniel Ruf ([DanielRuf](https://github.com/DanielRuf))
+- Tobias Bieniek ([Turbo87](https://github.com/Turbo87))
+- [dependabot[bot]](https://github.com/apps/dependabot)
+
+
+## v0.4.0 (2018-06-10)
+
+First official release as `cli-table3`. Changes compares to `cli-table2` v0.2.0:
+
+#### :rocket: Enhancement
+* [#27](https://github.com/jamestalmage/cli-table2/pull/27) Remove "lodash" dependency. ([@Turbo87](https://github.com/Turbo87))
+
+#### :bug: Bug Fix
+* [#29](https://github.com/jamestalmage/cli-table2/pull/29) Fix wordWrap with colSpan. ([@mmurphy](https://github.com/mmurphy))
+* [#24](https://github.com/jamestalmage/cli-table2/pull/24) Fixing the runtime error when content is truncated. ([@sthadeshwar](https://github.com/sthadeshwar))
+
+#### :memo: Documentation
+* [#41](https://github.com/jamestalmage/cli-table2/pull/41) Create LICENSE. ([@GantMan](https://github.com/GantMan))
+
+#### :house: Internal
+* [#26](https://github.com/jamestalmage/cli-table2/pull/26) package.json: Whitelist JS files ([@Turbo87](https://github.com/Turbo87))
+
+#### Committers: 4
+- Gant Laborde ([GantMan](https://github.com/GantMan))
+- Martin Murphy ([mmurphy](https://github.com/mmurphy))
+- Satyajit Thadeshwar ([sthadeshwar](https://github.com/sthadeshwar))
+- Tobias Bieniek ([Turbo87](https://github.com/Turbo87))
diff --git a/deps/npm/node_modules/fast-deep-equal/LICENSE b/deps/npm/node_modules/cli-table3/LICENSE
index 7f1543566f..a09b7de012 100644
--- a/deps/npm/node_modules/fast-deep-equal/LICENSE
+++ b/deps/npm/node_modules/cli-table3/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2017 Evgeny Poberezkin
+Copyright (c) 2014 James Talmage <james.talmage@jrtechnical.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/deps/npm/node_modules/cli-table2/README.md b/deps/npm/node_modules/cli-table3/README.md
index f0352a194d..22e4a75e9c 100644
--- a/deps/npm/node_modules/cli-table2/README.md
+++ b/deps/npm/node_modules/cli-table3/README.md
@@ -1,11 +1,16 @@
-CLI Table 2 [![npm version](https://badge.fury.io/js/cli-table2.svg)](http://badge.fury.io/js/cli-table2) [![Build Status](https://travis-ci.org/jamestalmage/cli-table2.svg?branch=master)](https://travis-ci.org/jamestalmage/cli-table2) [![Coverage Status](https://coveralls.io/repos/jamestalmage/cli-table2/badge.png?branch=master)](https://coveralls.io/r/jamestalmage/cli-table2?branch=master)
-===========
+cli-table3
+===============================================================================
+
+[![npm version](https://img.shields.io/npm/v/cli-table3.svg)](https://www.npmjs.com/package/cli-table3)
+[![Build Status](https://travis-ci.com/cli-table/cli-table3.svg?branch=master)](https://travis-ci.com/cli-table/cli-table3)
This utility allows you to render unicode-aided tables on the command line from
-your node.js scripts. Based on (and api compatible with) the original [cli-table](https://github.com/Automattic/cli-table),
-`cli-table2` is nearly a complete rewrite to accommodate column and row spanning.
-It passes the entire original cli-table test suite, and should be a drop in
-replacement for nearly all users.
+your node.js scripts.
+
+`cli-table3` is based on (and api compatible with) the original [cli-table](https://github.com/Automattic/cli-table),
+and [cli-table2](https://github.com/jamestalmage/cli-table2), which are both
+unmaintained. `cli-table3` includes all the additional features from
+`cli-table2`.
![Screenshot](http://i.imgur.com/sYq4T.png)
@@ -19,7 +24,7 @@ replacement for nearly all users.
- Better handling of text color that spans multiple lines.
- API compatible with the original cli-table.
- Exhaustive test suite including the entire original cli-table test suite.
-- Lots of examples auto-generated from the tests ([basic](https://github.com/jamestalmage/cli-table2/blob/master/basic-usage.md), [advanced](https://github.com/jamestalmage/cli-table2/blob/master/advanced-usage.md)).
+- Lots of examples auto-generated from the tests ([basic](https://github.com/cli-table/cli-table3/blob/master/basic-usage.md), [advanced](https://github.com/cli-table/cli-table3/blob/master/advanced-usage.md)).
## Features
@@ -35,21 +40,21 @@ replacement for nearly all users.
## Installation
```bash
-npm install cli-table2
+npm install cli-table3
```
## How to use
A portion of the unit test suite is used to generate examples:
-- [basic-usage](https://github.com/jamestalmage/cli-table2/blob/master/basic-usage.md) - covers basic uses.
-- [advanced](https://github.com/jamestalmage/cli-table2/blob/master/advanced-usage.md) - covers using the new column and row span features.
+- [basic-usage](https://github.com/cli-table/cli-table3/blob/master/basic-usage.md) - covers basic uses.
+- [advanced](https://github.com/cli-table/cli-table3/blob/master/advanced-usage.md) - covers using the new column and row span features.
This package is api compatible with the original [cli-table](https://github.com/Automattic/cli-table).
So all the original documentation still applies (copied below).
### Horizontal Tables
```javascript
-var Table = require('cli-table2');
+var Table = require('cli-table3');
// instantiate
var table = new Table({
@@ -68,7 +73,7 @@ console.log(table.toString());
### Vertical Tables
```javascript
-var Table = require('cli-table2');
+var Table = require('cli-table3');
var table = new Table();
table.push(
@@ -85,7 +90,7 @@ Cross tables are very similar to vertical tables, with two key differences:
2. The individual rows take the general form of { "Header": ["Row", "Values"] }
```javascript
-var Table = require('cli-table2');
+var Table = require('cli-table3');
var table = new Table({ head: ["", "Top Header 1", "Top Header 2"] });
table.push(
@@ -163,25 +168,23 @@ console.log(table.toString());
## Build Targets
-Clone the repository and run `npm install` to install all its submodules, then run one of the following commands:
+Clone the repository and run `yarn install` to install all its submodules, then run one of the following commands:
###### Run the tests with coverage reports.
```bash
-$ gulp coverage
+$ yarn test:coverage
```
###### Run the tests every time a file changes.
```bash
-$ gulp watch-test
+$ yarn test:watch
```
-###### Run the examples and print the output to the command line.
+###### Update the documentation.
```bash
-$ gulp example
+$ yarn docs
```
-Other build targets are available, check `gulpfile.js` for a comprehensive list.
-
## Credits
- James Talmage - author &lt;james.talmage@jrtechnical.com&gt; ([jamestalmage](http://github.com/jamestalmage))
diff --git a/deps/npm/node_modules/cli-table2/index.js b/deps/npm/node_modules/cli-table3/index.js
index b49d920dd3..b49d920dd3 100644
--- a/deps/npm/node_modules/cli-table2/index.js
+++ b/deps/npm/node_modules/cli-table3/index.js
diff --git a/deps/npm/node_modules/cli-table3/package.json b/deps/npm/node_modules/cli-table3/package.json
new file mode 100644
index 0000000000..d0545c93f7
--- /dev/null
+++ b/deps/npm/node_modules/cli-table3/package.json
@@ -0,0 +1,128 @@
+{
+ "_from": "cli-table3",
+ "_id": "cli-table3@0.5.0",
+ "_inBundle": false,
+ "_integrity": "sha512-c7YHpUyO1SaKaO7kYtxd5NZ8FjAmSK3LpKkuzdwn+2CwpFxBpdoQLm+OAnnCfoEl7onKhN9PKQi1lsHuAIUqGQ==",
+ "_location": "/cli-table3",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "tag",
+ "registry": true,
+ "raw": "cli-table3",
+ "name": "cli-table3",
+ "escapedName": "cli-table3",
+ "rawSpec": "",
+ "saveSpec": null,
+ "fetchSpec": "latest"
+ },
+ "_requiredBy": [
+ "#USER",
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.0.tgz",
+ "_shasum": "adb2f025715f4466e67629783c8d73e9030eb4bd",
+ "_spec": "cli-table3",
+ "_where": "/Users/zkat/Documents/code/work/npm",
+ "author": {
+ "name": "James Talmage"
+ },
+ "bugs": {
+ "url": "https://github.com/cli-table/cli-table3/issues"
+ },
+ "bundleDependencies": false,
+ "changelog": {
+ "repo": "cli-table/cli-table3",
+ "labels": {
+ "breaking": ":boom: Breaking Change",
+ "enhancement": ":rocket: Enhancement",
+ "bug": ":bug: Bug Fix",
+ "documentation": ":memo: Documentation",
+ "internal": ":house: Internal"
+ }
+ },
+ "dependencies": {
+ "colors": "^1.1.2",
+ "object-assign": "^4.1.0",
+ "string-width": "^2.1.1"
+ },
+ "deprecated": false,
+ "description": "Pretty unicode tables for the command line. Based on the original cli-table.",
+ "devDependencies": {
+ "ansi-256-colors": "^1.1.0",
+ "cli-table": "^0.3.1",
+ "eslint-config-prettier": "^2.9.0",
+ "eslint-plugin-prettier": "^2.6.0",
+ "jest": "^23.1.0",
+ "jest-runner-eslint": "^0.6.0",
+ "lerna-changelog": "^0.7.0",
+ "prettier": "1.13.5"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "files": [
+ "src/",
+ "index.js"
+ ],
+ "homepage": "https://github.com/cli-table/cli-table3",
+ "jest": {
+ "projects": [
+ {
+ "displayName": "test",
+ "testMatch": [
+ "**/test/**/*-test(s)?.js"
+ ]
+ },
+ {
+ "runner": "jest-runner-eslint",
+ "displayName": "lint",
+ "testMatch": [
+ "<rootDir>/examples/**/*.js",
+ "<rootDir>/lib/**/*.js",
+ "<rootDir>/scripts/**/*.js",
+ "<rootDir>/src/**/*.js",
+ "<rootDir>/test/**/*.js"
+ ]
+ }
+ ]
+ },
+ "keywords": [
+ "node",
+ "command",
+ "line",
+ "cli",
+ "table",
+ "tables",
+ "tabular",
+ "unicode",
+ "colors",
+ "grid"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "cli-table3",
+ "optionalDependencies": {
+ "colors": "^1.1.2"
+ },
+ "prettier": {
+ "printWidth": 120,
+ "tabWidth": 2,
+ "singleQuote": true,
+ "trailingComma": "es5"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/cli-table/cli-table3.git"
+ },
+ "scripts": {
+ "changelog": "lerna-changelog",
+ "docs": "node ./scripts/update-docs.js",
+ "prettier": "prettier --write '{examples,lib,scripts,src,test}/**/*.js'",
+ "test": "jest --color",
+ "test:watch": "jest --color --watchAll --notify"
+ },
+ "version": "0.5.0"
+}
diff --git a/deps/npm/node_modules/cli-table3/src/cell.js b/deps/npm/node_modules/cli-table3/src/cell.js
new file mode 100644
index 0000000000..2db7f74d72
--- /dev/null
+++ b/deps/npm/node_modules/cli-table3/src/cell.js
@@ -0,0 +1,371 @@
+const utils = require('./utils');
+
+class Cell {
+ /**
+ * A representation of a cell within the table.
+ * Implementations must have `init` and `draw` methods,
+ * as well as `colSpan`, `rowSpan`, `desiredHeight` and `desiredWidth` properties.
+ * @param options
+ * @constructor
+ */
+ constructor(options) {
+ this.setOptions(options);
+
+ /**
+ * Each cell will have it's `x` and `y` values set by the `layout-manager` prior to
+ * `init` being called;
+ * @type {Number}
+ */
+ this.x = null;
+ this.y = null;
+ }
+
+ setOptions(options) {
+ if (['boolean', 'number', 'string'].indexOf(typeof options) !== -1) {
+ options = { content: '' + options };
+ }
+ options = options || {};
+ this.options = options;
+ let content = options.content;
+ if (['boolean', 'number', 'string'].indexOf(typeof content) !== -1) {
+ this.content = String(content);
+ } else if (!content) {
+ this.content = '';
+ } else {
+ throw new Error('Content needs to be a primitive, got: ' + typeof content);
+ }
+ this.colSpan = options.colSpan || 1;
+ this.rowSpan = options.rowSpan || 1;
+ }
+
+ mergeTableOptions(tableOptions, cells) {
+ this.cells = cells;
+
+ let optionsChars = this.options.chars || {};
+ let tableChars = tableOptions.chars;
+ let chars = (this.chars = {});
+ CHAR_NAMES.forEach(function(name) {
+ setOption(optionsChars, tableChars, name, chars);
+ });
+
+ this.truncate = this.options.truncate || tableOptions.truncate;
+
+ let style = (this.options.style = this.options.style || {});
+ let tableStyle = tableOptions.style;
+ setOption(style, tableStyle, 'padding-left', this);
+ setOption(style, tableStyle, 'padding-right', this);
+ this.head = style.head || tableStyle.head;
+ this.border = style.border || tableStyle.border;
+
+ let fixedWidth = tableOptions.colWidths[this.x];
+ if (tableOptions.wordWrap && fixedWidth) {
+ fixedWidth -= this.paddingLeft + this.paddingRight;
+ if (this.colSpan) {
+ let i = 1;
+ while (i < this.colSpan) {
+ fixedWidth += tableOptions.colWidths[this.x + i];
+ i++;
+ }
+ }
+ this.lines = utils.colorizeLines(utils.wordWrap(fixedWidth, this.content));
+ } else {
+ this.lines = utils.colorizeLines(this.content.split('\n'));
+ }
+
+ this.desiredWidth = utils.strlen(this.content) + this.paddingLeft + this.paddingRight;
+ this.desiredHeight = this.lines.length;
+ }
+
+ /**
+ * Initializes the Cells data structure.
+ *
+ * @param tableOptions - A fully populated set of tableOptions.
+ * In addition to the standard default values, tableOptions must have fully populated the
+ * `colWidths` and `rowWidths` arrays. Those arrays must have lengths equal to the number
+ * of columns or rows (respectively) in this table, and each array item must be a Number.
+ *
+ */
+ init(tableOptions) {
+ let x = this.x;
+ let y = this.y;
+ this.widths = tableOptions.colWidths.slice(x, x + this.colSpan);
+ this.heights = tableOptions.rowHeights.slice(y, y + this.rowSpan);
+ this.width = this.widths.reduce(sumPlusOne, -1);
+ this.height = this.heights.reduce(sumPlusOne, -1);
+
+ this.hAlign = this.options.hAlign || tableOptions.colAligns[x];
+ this.vAlign = this.options.vAlign || tableOptions.rowAligns[y];
+
+ this.drawRight = x + this.colSpan == tableOptions.colWidths.length;
+ }
+
+ /**
+ * Draws the given line of the cell.
+ * This default implementation defers to methods `drawTop`, `drawBottom`, `drawLine` and `drawEmpty`.
+ * @param lineNum - can be `top`, `bottom` or a numerical line number.
+ * @param spanningCell - will be a number if being called from a RowSpanCell, and will represent how
+ * many rows below it's being called from. Otherwise it's undefined.
+ * @returns {String} The representation of this line.
+ */
+ draw(lineNum, spanningCell) {
+ if (lineNum == 'top') return this.drawTop(this.drawRight);
+ if (lineNum == 'bottom') return this.drawBottom(this.drawRight);
+ let padLen = Math.max(this.height - this.lines.length, 0);
+ let padTop;
+ switch (this.vAlign) {
+ case 'center':
+ padTop = Math.ceil(padLen / 2);
+ break;
+ case 'bottom':
+ padTop = padLen;
+ break;
+ default:
+ padTop = 0;
+ }
+ if (lineNum < padTop || lineNum >= padTop + this.lines.length) {
+ return this.drawEmpty(this.drawRight, spanningCell);
+ }
+ let forceTruncation = this.lines.length > this.height && lineNum + 1 >= this.height;
+ return this.drawLine(lineNum - padTop, this.drawRight, forceTruncation, spanningCell);
+ }
+
+ /**
+ * Renders the top line of the cell.
+ * @param drawRight - true if this method should render the right edge of the cell.
+ * @returns {String}
+ */
+ drawTop(drawRight) {
+ let content = [];
+ if (this.cells) {
+ //TODO: cells should always exist - some tests don't fill it in though
+ this.widths.forEach(function(width, index) {
+ content.push(this._topLeftChar(index));
+ content.push(utils.repeat(this.chars[this.y == 0 ? 'top' : 'mid'], width));
+ }, this);
+ } else {
+ content.push(this._topLeftChar(0));
+ content.push(utils.repeat(this.chars[this.y == 0 ? 'top' : 'mid'], this.width));
+ }
+ if (drawRight) {
+ content.push(this.chars[this.y == 0 ? 'topRight' : 'rightMid']);
+ }
+ return this.wrapWithStyleColors('border', content.join(''));
+ }
+
+ _topLeftChar(offset) {
+ let x = this.x + offset;
+ let leftChar;
+ if (this.y == 0) {
+ leftChar = x == 0 ? 'topLeft' : offset == 0 ? 'topMid' : 'top';
+ } else {
+ if (x == 0) {
+ leftChar = 'leftMid';
+ } else {
+ leftChar = offset == 0 ? 'midMid' : 'bottomMid';
+ if (this.cells) {
+ //TODO: cells should always exist - some tests don't fill it in though
+ let spanAbove = this.cells[this.y - 1][x] instanceof Cell.ColSpanCell;
+ if (spanAbove) {
+ leftChar = offset == 0 ? 'topMid' : 'mid';
+ }
+ if (offset == 0) {
+ let i = 1;
+ while (this.cells[this.y][x - i] instanceof Cell.ColSpanCell) {
+ i++;
+ }
+ if (this.cells[this.y][x - i] instanceof Cell.RowSpanCell) {
+ leftChar = 'leftMid';
+ }
+ }
+ }
+ }
+ }
+ return this.chars[leftChar];
+ }
+
+ wrapWithStyleColors(styleProperty, content) {
+ if (this[styleProperty] && this[styleProperty].length) {
+ try {
+ let colors = require('colors/safe');
+ for (let i = this[styleProperty].length - 1; i >= 0; i--) {
+ colors = colors[this[styleProperty][i]];
+ }
+ return colors(content);
+ } catch (e) {
+ return content;
+ }
+ } else {
+ return content;
+ }
+ }
+
+ /**
+ * Renders a line of text.
+ * @param lineNum - Which line of text to render. This is not necessarily the line within the cell.
+ * There may be top-padding above the first line of text.
+ * @param drawRight - true if this method should render the right edge of the cell.
+ * @param forceTruncationSymbol - `true` if the rendered text should end with the truncation symbol even
+ * if the text fits. This is used when the cell is vertically truncated. If `false` the text should
+ * only include the truncation symbol if the text will not fit horizontally within the cell width.
+ * @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined.
+ * @returns {String}
+ */
+ drawLine(lineNum, drawRight, forceTruncationSymbol, spanningCell) {
+ let left = this.chars[this.x == 0 ? 'left' : 'middle'];
+ if (this.x && spanningCell && this.cells) {
+ let cellLeft = this.cells[this.y + spanningCell][this.x - 1];
+ while (cellLeft instanceof ColSpanCell) {
+ cellLeft = this.cells[cellLeft.y][cellLeft.x - 1];
+ }
+ if (!(cellLeft instanceof RowSpanCell)) {
+ left = this.chars['rightMid'];
+ }
+ }
+ let leftPadding = utils.repeat(' ', this.paddingLeft);
+ let right = drawRight ? this.chars['right'] : '';
+ let rightPadding = utils.repeat(' ', this.paddingRight);
+ let line = this.lines[lineNum];
+ let len = this.width - (this.paddingLeft + this.paddingRight);
+ if (forceTruncationSymbol) line += this.truncate || '…';
+ let content = utils.truncate(line, len, this.truncate);
+ content = utils.pad(content, len, ' ', this.hAlign);
+ content = leftPadding + content + rightPadding;
+ return this.stylizeLine(left, content, right);
+ }
+
+ stylizeLine(left, content, right) {
+ left = this.wrapWithStyleColors('border', left);
+ right = this.wrapWithStyleColors('border', right);
+ if (this.y === 0) {
+ content = this.wrapWithStyleColors('head', content);
+ }
+ return left + content + right;
+ }
+
+ /**
+ * Renders the bottom line of the cell.
+ * @param drawRight - true if this method should render the right edge of the cell.
+ * @returns {String}
+ */
+ drawBottom(drawRight) {
+ let left = this.chars[this.x == 0 ? 'bottomLeft' : 'bottomMid'];
+ let content = utils.repeat(this.chars.bottom, this.width);
+ let right = drawRight ? this.chars['bottomRight'] : '';
+ return this.wrapWithStyleColors('border', left + content + right);
+ }
+
+ /**
+ * Renders a blank line of text within the cell. Used for top and/or bottom padding.
+ * @param drawRight - true if this method should render the right edge of the cell.
+ * @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined.
+ * @returns {String}
+ */
+ drawEmpty(drawRight, spanningCell) {
+ let left = this.chars[this.x == 0 ? 'left' : 'middle'];
+ if (this.x && spanningCell && this.cells) {
+ let cellLeft = this.cells[this.y + spanningCell][this.x - 1];
+ while (cellLeft instanceof ColSpanCell) {
+ cellLeft = this.cells[cellLeft.y][cellLeft.x - 1];
+ }
+ if (!(cellLeft instanceof RowSpanCell)) {
+ left = this.chars['rightMid'];
+ }
+ }
+ let right = drawRight ? this.chars['right'] : '';
+ let content = utils.repeat(' ', this.width);
+ return this.stylizeLine(left, content, right);
+ }
+}
+
+class ColSpanCell {
+ /**
+ * A Cell that doesn't do anything. It just draws empty lines.
+ * Used as a placeholder in column spanning.
+ * @constructor
+ */
+ constructor() {}
+
+ draw() {
+ return '';
+ }
+
+ init() {}
+
+ mergeTableOptions() {}
+}
+
+class RowSpanCell {
+ /**
+ * A placeholder Cell for a Cell that spans multiple rows.
+ * It delegates rendering to the original cell, but adds the appropriate offset.
+ * @param originalCell
+ * @constructor
+ */
+ constructor(originalCell) {
+ this.originalCell = originalCell;
+ }
+
+ init(tableOptions) {
+ let y = this.y;
+ let originalY = this.originalCell.y;
+ this.cellOffset = y - originalY;
+ this.offset = findDimension(tableOptions.rowHeights, originalY, this.cellOffset);
+ }
+
+ draw(lineNum) {
+ if (lineNum == 'top') {
+ return this.originalCell.draw(this.offset, this.cellOffset);
+ }
+ if (lineNum == 'bottom') {
+ return this.originalCell.draw('bottom');
+ }
+ return this.originalCell.draw(this.offset + 1 + lineNum);
+ }
+
+ mergeTableOptions() {}
+}
+
+// HELPER FUNCTIONS
+function setOption(objA, objB, nameB, targetObj) {
+ let nameA = nameB.split('-');
+ if (nameA.length > 1) {
+ nameA[1] = nameA[1].charAt(0).toUpperCase() + nameA[1].substr(1);
+ nameA = nameA.join('');
+ targetObj[nameA] = objA[nameA] || objA[nameB] || objB[nameA] || objB[nameB];
+ } else {
+ targetObj[nameB] = objA[nameB] || objB[nameB];
+ }
+}
+
+function findDimension(dimensionTable, startingIndex, span) {
+ let ret = dimensionTable[startingIndex];
+ for (let i = 1; i < span; i++) {
+ ret += 1 + dimensionTable[startingIndex + i];
+ }
+ return ret;
+}
+
+function sumPlusOne(a, b) {
+ return a + b + 1;
+}
+
+let CHAR_NAMES = [
+ 'top',
+ 'top-mid',
+ 'top-left',
+ 'top-right',
+ 'bottom',
+ 'bottom-mid',
+ 'bottom-left',
+ 'bottom-right',
+ 'left',
+ 'left-mid',
+ 'mid',
+ 'mid-mid',
+ 'right',
+ 'right-mid',
+ 'middle',
+];
+module.exports = Cell;
+module.exports.ColSpanCell = ColSpanCell;
+module.exports.RowSpanCell = RowSpanCell;
diff --git a/deps/npm/node_modules/cli-table3/src/layout-manager.js b/deps/npm/node_modules/cli-table3/src/layout-manager.js
new file mode 100644
index 0000000000..908040e7e5
--- /dev/null
+++ b/deps/npm/node_modules/cli-table3/src/layout-manager.js
@@ -0,0 +1,232 @@
+const objectAssign = require('object-assign');
+const Cell = require('./cell');
+const { ColSpanCell, RowSpanCell } = Cell;
+
+(function() {
+ function layoutTable(table) {
+ table.forEach(function(row, rowIndex) {
+ row.forEach(function(cell, columnIndex) {
+ cell.y = rowIndex;
+ cell.x = columnIndex;
+ for (let y = rowIndex; y >= 0; y--) {
+ let row2 = table[y];
+ let xMax = y === rowIndex ? columnIndex : row2.length;
+ for (let x = 0; x < xMax; x++) {
+ let cell2 = row2[x];
+ while (cellsConflict(cell, cell2)) {
+ cell.x++;
+ }
+ }
+ }
+ });
+ });
+ }
+
+ function maxWidth(table) {
+ let mw = 0;
+ table.forEach(function(row) {
+ row.forEach(function(cell) {
+ mw = Math.max(mw, cell.x + (cell.colSpan || 1));
+ });
+ });
+ return mw;
+ }
+
+ function maxHeight(table) {
+ return table.length;
+ }
+
+ function cellsConflict(cell1, cell2) {
+ let yMin1 = cell1.y;
+ let yMax1 = cell1.y - 1 + (cell1.rowSpan || 1);
+ let yMin2 = cell2.y;
+ let yMax2 = cell2.y - 1 + (cell2.rowSpan || 1);
+ let yConflict = !(yMin1 > yMax2 || yMin2 > yMax1);
+
+ let xMin1 = cell1.x;
+ let xMax1 = cell1.x - 1 + (cell1.colSpan || 1);
+ let xMin2 = cell2.x;
+ let xMax2 = cell2.x - 1 + (cell2.colSpan || 1);
+ let xConflict = !(xMin1 > xMax2 || xMin2 > xMax1);
+
+ return yConflict && xConflict;
+ }
+
+ function conflictExists(rows, x, y) {
+ let i_max = Math.min(rows.length - 1, y);
+ let cell = { x: x, y: y };
+ for (let i = 0; i <= i_max; i++) {
+ let row = rows[i];
+ for (let j = 0; j < row.length; j++) {
+ if (cellsConflict(cell, row[j])) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ function allBlank(rows, y, xMin, xMax) {
+ for (let x = xMin; x < xMax; x++) {
+ if (conflictExists(rows, x, y)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ function addRowSpanCells(table) {
+ table.forEach(function(row, rowIndex) {
+ row.forEach(function(cell) {
+ for (let i = 1; i < cell.rowSpan; i++) {
+ let rowSpanCell = new RowSpanCell(cell);
+ rowSpanCell.x = cell.x;
+ rowSpanCell.y = cell.y + i;
+ rowSpanCell.colSpan = cell.colSpan;
+ insertCell(rowSpanCell, table[rowIndex + i]);
+ }
+ });
+ });
+ }
+
+ function addColSpanCells(cellRows) {
+ for (let rowIndex = cellRows.length - 1; rowIndex >= 0; rowIndex--) {
+ let cellColumns = cellRows[rowIndex];
+ for (let columnIndex = 0; columnIndex < cellColumns.length; columnIndex++) {
+ let cell = cellColumns[columnIndex];
+ for (let k = 1; k < cell.colSpan; k++) {
+ let colSpanCell = new ColSpanCell();
+ colSpanCell.x = cell.x + k;
+ colSpanCell.y = cell.y;
+ cellColumns.splice(columnIndex + 1, 0, colSpanCell);
+ }
+ }
+ }
+ }
+
+ function insertCell(cell, row) {
+ let x = 0;
+ while (x < row.length && row[x].x < cell.x) {
+ x++;
+ }
+ row.splice(x, 0, cell);
+ }
+
+ function fillInTable(table) {
+ let h_max = maxHeight(table);
+ let w_max = maxWidth(table);
+ for (let y = 0; y < h_max; y++) {
+ for (let x = 0; x < w_max; x++) {
+ if (!conflictExists(table, x, y)) {
+ let opts = { x: x, y: y, colSpan: 1, rowSpan: 1 };
+ x++;
+ while (x < w_max && !conflictExists(table, x, y)) {
+ opts.colSpan++;
+ x++;
+ }
+ let y2 = y + 1;
+ while (y2 < h_max && allBlank(table, y2, opts.x, opts.x + opts.colSpan)) {
+ opts.rowSpan++;
+ y2++;
+ }
+
+ let cell = new Cell(opts);
+ cell.x = opts.x;
+ cell.y = opts.y;
+ insertCell(cell, table[y]);
+ }
+ }
+ }
+ }
+
+ function generateCells(rows) {
+ return rows.map(function(row) {
+ if (!Array.isArray(row)) {
+ let key = Object.keys(row)[0];
+ row = row[key];
+ if (Array.isArray(row)) {
+ row = row.slice();
+ row.unshift(key);
+ } else {
+ row = [key, row];
+ }
+ }
+ return row.map(function(cell) {
+ return new Cell(cell);
+ });
+ });
+ }
+
+ function makeTableLayout(rows) {
+ let cellRows = generateCells(rows);
+ layoutTable(cellRows);
+ fillInTable(cellRows);
+ addRowSpanCells(cellRows);
+ addColSpanCells(cellRows);
+ return cellRows;
+ }
+
+ module.exports = {
+ makeTableLayout: makeTableLayout,
+ layoutTable: layoutTable,
+ addRowSpanCells: addRowSpanCells,
+ maxWidth: maxWidth,
+ fillInTable: fillInTable,
+ computeWidths: makeComputeWidths('colSpan', 'desiredWidth', 'x', 1),
+ computeHeights: makeComputeWidths('rowSpan', 'desiredHeight', 'y', 1),
+ };
+})();
+
+function makeComputeWidths(colSpan, desiredWidth, x, forcedMin) {
+ return function(vals, table) {
+ let result = [];
+ let spanners = [];
+ table.forEach(function(row) {
+ row.forEach(function(cell) {
+ if ((cell[colSpan] || 1) > 1) {
+ spanners.push(cell);
+ } else {
+ result[cell[x]] = Math.max(result[cell[x]] || 0, cell[desiredWidth] || 0, forcedMin);
+ }
+ });
+ });
+
+ vals.forEach(function(val, index) {
+ if (typeof val === 'number') {
+ result[index] = val;
+ }
+ });
+
+ //spanners.forEach(function(cell){
+ for (let k = spanners.length - 1; k >= 0; k--) {
+ let cell = spanners[k];
+ let span = cell[colSpan];
+ let col = cell[x];
+ let existingWidth = result[col];
+ let editableCols = typeof vals[col] === 'number' ? 0 : 1;
+ for (let i = 1; i < span; i++) {
+ existingWidth += 1 + result[col + i];
+ if (typeof vals[col + i] !== 'number') {
+ editableCols++;
+ }
+ }
+ if (cell[desiredWidth] > existingWidth) {
+ let i = 0;
+ while (editableCols > 0 && cell[desiredWidth] > existingWidth) {
+ if (typeof vals[col + i] !== 'number') {
+ let dif = Math.round((cell[desiredWidth] - existingWidth) / editableCols);
+ existingWidth += dif;
+ result[col + i] += dif;
+ editableCols--;
+ }
+ i++;
+ }
+ }
+ }
+
+ objectAssign(vals, result);
+ for (let j = 0; j < vals.length; j++) {
+ vals[j] = Math.max(forcedMin, vals[j] || 0);
+ }
+ };
+}
diff --git a/deps/npm/node_modules/cli-table3/src/table.js b/deps/npm/node_modules/cli-table3/src/table.js
new file mode 100644
index 0000000000..af4f146463
--- /dev/null
+++ b/deps/npm/node_modules/cli-table3/src/table.js
@@ -0,0 +1,77 @@
+const utils = require('./utils');
+const tableLayout = require('./layout-manager');
+
+class Table extends Array {
+ constructor(options) {
+ super();
+
+ this.options = utils.mergeOptions(options);
+ }
+
+ toString() {
+ let array = this;
+ let headersPresent = this.options.head && this.options.head.length;
+ if (headersPresent) {
+ array = [this.options.head];
+ if (this.length) {
+ array.push.apply(array, this);
+ }
+ } else {
+ this.options.style.head = [];
+ }
+
+ let cells = tableLayout.makeTableLayout(array);
+
+ cells.forEach(function(row) {
+ row.forEach(function(cell) {
+ cell.mergeTableOptions(this.options, cells);
+ }, this);
+ }, this);
+
+ tableLayout.computeWidths(this.options.colWidths, cells);
+ tableLayout.computeHeights(this.options.rowHeights, cells);
+
+ cells.forEach(function(row) {
+ row.forEach(function(cell) {
+ cell.init(this.options);
+ }, this);
+ }, this);
+
+ let result = [];
+
+ for (let rowIndex = 0; rowIndex < cells.length; rowIndex++) {
+ let row = cells[rowIndex];
+ let heightOfRow = this.options.rowHeights[rowIndex];
+
+ if (rowIndex === 0 || !this.options.style.compact || (rowIndex == 1 && headersPresent)) {
+ doDraw(row, 'top', result);
+ }
+
+ for (let lineNum = 0; lineNum < heightOfRow; lineNum++) {
+ doDraw(row, lineNum, result);
+ }
+
+ if (rowIndex + 1 == cells.length) {
+ doDraw(row, 'bottom', result);
+ }
+ }
+
+ return result.join('\n');
+ }
+
+ get width() {
+ let str = this.toString().split('\n');
+ return str[0].length;
+ }
+}
+
+function doDraw(row, lineNum, result) {
+ let line = [];
+ row.forEach(function(cell) {
+ line.push(cell.draw(lineNum));
+ });
+ let str = line.join('');
+ if (str.length) result.push(str);
+}
+
+module.exports = Table;
diff --git a/deps/npm/node_modules/cli-table3/src/utils.js b/deps/npm/node_modules/cli-table3/src/utils.js
new file mode 100644
index 0000000000..c9149558e2
--- /dev/null
+++ b/deps/npm/node_modules/cli-table3/src/utils.js
@@ -0,0 +1,303 @@
+const objectAssign = require('object-assign');
+const stringWidth = require('string-width');
+
+function codeRegex(capture) {
+ return capture ? /\u001b\[((?:\d*;){0,5}\d*)m/g : /\u001b\[(?:\d*;){0,5}\d*m/g;
+}
+
+function strlen(str) {
+ let code = codeRegex();
+ let stripped = ('' + str).replace(code, '');
+ let split = stripped.split('\n');
+ return split.reduce(function(memo, s) {
+ return stringWidth(s) > memo ? stringWidth(s) : memo;
+ }, 0);
+}
+
+function repeat(str, times) {
+ return Array(times + 1).join(str);
+}
+
+function pad(str, len, pad, dir) {
+ let length = strlen(str);
+ if (len + 1 >= length) {
+ let padlen = len - length;
+ switch (dir) {
+ case 'right': {
+ str = repeat(pad, padlen) + str;
+ break;
+ }
+ case 'center': {
+ let right = Math.ceil(padlen / 2);
+ let left = padlen - right;
+ str = repeat(pad, left) + str + repeat(pad, right);
+ break;
+ }
+ default: {
+ str = str + repeat(pad, padlen);
+ break;
+ }
+ }
+ }
+ return str;
+}
+
+let codeCache = {};
+
+function addToCodeCache(name, on, off) {
+ on = '\u001b[' + on + 'm';
+ off = '\u001b[' + off + 'm';
+ codeCache[on] = { set: name, to: true };
+ codeCache[off] = { set: name, to: false };
+ codeCache[name] = { on: on, off: off };
+}
+
+//https://github.com/Marak/colors.js/blob/master/lib/styles.js
+addToCodeCache('bold', 1, 22);
+addToCodeCache('italics', 3, 23);
+addToCodeCache('underline', 4, 24);
+addToCodeCache('inverse', 7, 27);
+addToCodeCache('strikethrough', 9, 29);
+
+function updateState(state, controlChars) {
+ let controlCode = controlChars[1] ? parseInt(controlChars[1].split(';')[0]) : 0;
+ if ((controlCode >= 30 && controlCode <= 39) || (controlCode >= 90 && controlCode <= 97)) {
+ state.lastForegroundAdded = controlChars[0];
+ return;
+ }
+ if ((controlCode >= 40 && controlCode <= 49) || (controlCode >= 100 && controlCode <= 107)) {
+ state.lastBackgroundAdded = controlChars[0];
+ return;
+ }
+ if (controlCode === 0) {
+ for (let i in state) {
+ /* istanbul ignore else */
+ if (state.hasOwnProperty(i)) {
+ delete state[i];
+ }
+ }
+ return;
+ }
+ let info = codeCache[controlChars[0]];
+ if (info) {
+ state[info.set] = info.to;
+ }
+}
+
+function readState(line) {
+ let code = codeRegex(true);
+ let controlChars = code.exec(line);
+ let state = {};
+ while (controlChars !== null) {
+ updateState(state, controlChars);
+ controlChars = code.exec(line);
+ }
+ return state;
+}
+
+function unwindState(state, ret) {
+ let lastBackgroundAdded = state.lastBackgroundAdded;
+ let lastForegroundAdded = state.lastForegroundAdded;
+
+ delete state.lastBackgroundAdded;
+ delete state.lastForegroundAdded;
+
+ Object.keys(state).forEach(function(key) {
+ if (state[key]) {
+ ret += codeCache[key].off;
+ }
+ });
+
+ if (lastBackgroundAdded && lastBackgroundAdded != '\u001b[49m') {
+ ret += '\u001b[49m';
+ }
+ if (lastForegroundAdded && lastForegroundAdded != '\u001b[39m') {
+ ret += '\u001b[39m';
+ }
+
+ return ret;
+}
+
+function rewindState(state, ret) {
+ let lastBackgroundAdded = state.lastBackgroundAdded;
+ let lastForegroundAdded = state.lastForegroundAdded;
+
+ delete state.lastBackgroundAdded;
+ delete state.lastForegroundAdded;
+
+ Object.keys(state).forEach(function(key) {
+ if (state[key]) {
+ ret = codeCache[key].on + ret;
+ }
+ });
+
+ if (lastBackgroundAdded && lastBackgroundAdded != '\u001b[49m') {
+ ret = lastBackgroundAdded + ret;
+ }
+ if (lastForegroundAdded && lastForegroundAdded != '\u001b[39m') {
+ ret = lastForegroundAdded + ret;
+ }
+
+ return ret;
+}
+
+function truncateWidth(str, desiredLength) {
+ if (str.length === strlen(str)) {
+ return str.substr(0, desiredLength);
+ }
+
+ while (strlen(str) > desiredLength) {
+ str = str.slice(0, -1);
+ }
+
+ return str;
+}
+
+function truncateWidthWithAnsi(str, desiredLength) {
+ let code = codeRegex(true);
+ let split = str.split(codeRegex());
+ let splitIndex = 0;
+ let retLen = 0;
+ let ret = '';
+ let myArray;
+ let state = {};
+
+ while (retLen < desiredLength) {
+ myArray = code.exec(str);
+ let toAdd = split[splitIndex];
+ splitIndex++;
+ if (retLen + strlen(toAdd) > desiredLength) {
+ toAdd = truncateWidth(toAdd, desiredLength - retLen);
+ }
+ ret += toAdd;
+ retLen += strlen(toAdd);
+
+ if (retLen < desiredLength) {
+ if (!myArray) {
+ break;
+ } // full-width chars may cause a whitespace which cannot be filled
+ ret += myArray[0];
+ updateState(state, myArray);
+ }
+ }
+
+ return unwindState(state, ret);
+}
+
+function truncate(str, desiredLength, truncateChar) {
+ truncateChar = truncateChar || '…';
+ let lengthOfStr = strlen(str);
+ if (lengthOfStr <= desiredLength) {
+ return str;
+ }
+ desiredLength -= strlen(truncateChar);
+
+ let ret = truncateWidthWithAnsi(str, desiredLength);
+
+ return ret + truncateChar;
+}
+
+function defaultOptions() {
+ return {
+ chars: {
+ top: '─',
+ 'top-mid': '┬',
+ 'top-left': '┌',
+ 'top-right': '┐',
+ bottom: '─',
+ 'bottom-mid': '┴',
+ 'bottom-left': '└',
+ 'bottom-right': '┘',
+ left: '│',
+ 'left-mid': '├',
+ mid: '─',
+ 'mid-mid': '┼',
+ right: '│',
+ 'right-mid': '┤',
+ middle: '│',
+ },
+ truncate: '…',
+ colWidths: [],
+ rowHeights: [],
+ colAligns: [],
+ rowAligns: [],
+ style: {
+ 'padding-left': 1,
+ 'padding-right': 1,
+ head: ['red'],
+ border: ['grey'],
+ compact: false,
+ },
+ head: [],
+ };
+}
+
+function mergeOptions(options, defaults) {
+ options = options || {};
+ defaults = defaults || defaultOptions();
+ let ret = objectAssign({}, defaults, options);
+ ret.chars = objectAssign({}, defaults.chars, options.chars);
+ ret.style = objectAssign({}, defaults.style, options.style);
+ return ret;
+}
+
+function wordWrap(maxLength, input) {
+ let lines = [];
+ let split = input.split(/(\s+)/g);
+ let line = [];
+ let lineLength = 0;
+ let whitespace;
+ for (let i = 0; i < split.length; i += 2) {
+ let word = split[i];
+ let newLength = lineLength + strlen(word);
+ if (lineLength > 0 && whitespace) {
+ newLength += whitespace.length;
+ }
+ if (newLength > maxLength) {
+ if (lineLength !== 0) {
+ lines.push(line.join(''));
+ }
+ line = [word];
+ lineLength = strlen(word);
+ } else {
+ line.push(whitespace || '', word);
+ lineLength = newLength;
+ }
+ whitespace = split[i + 1];
+ }
+ if (lineLength) {
+ lines.push(line.join(''));
+ }
+ return lines;
+}
+
+function multiLineWordWrap(maxLength, input) {
+ let output = [];
+ input = input.split('\n');
+ for (let i = 0; i < input.length; i++) {
+ output.push.apply(output, wordWrap(maxLength, input[i]));
+ }
+ return output;
+}
+
+function colorizeLines(input) {
+ let state = {};
+ let output = [];
+ for (let i = 0; i < input.length; i++) {
+ let line = rewindState(state, input[i]);
+ state = readState(line);
+ let temp = objectAssign({}, state);
+ output.push(unwindState(temp, line));
+ }
+ return output;
+}
+
+module.exports = {
+ strlen: strlen,
+ repeat: repeat,
+ pad: pad,
+ truncate: truncate,
+ mergeOptions: mergeOptions,
+ wordWrap: multiLineWordWrap,
+ colorizeLines: colorizeLines,
+};
diff --git a/deps/npm/node_modules/cliui/node_modules/ansi-regex/index.js b/deps/npm/node_modules/cliui/node_modules/ansi-regex/index.js
new file mode 100644
index 0000000000..c4aaecf505
--- /dev/null
+++ b/deps/npm/node_modules/cliui/node_modules/ansi-regex/index.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = () => {
+ const pattern = [
+ '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)',
+ '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'
+ ].join('|');
+
+ return new RegExp(pattern, 'g');
+};
diff --git a/deps/npm/node_modules/cliui/node_modules/ansi-regex/license b/deps/npm/node_modules/cliui/node_modules/ansi-regex/license
new file mode 100644
index 0000000000..e7af2f7710
--- /dev/null
+++ b/deps/npm/node_modules/cliui/node_modules/ansi-regex/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+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/deps/npm/node_modules/gauge/node_modules/ansi-regex/package.json b/deps/npm/node_modules/cliui/node_modules/ansi-regex/package.json
index 9a902d5bf4..8e2c1b93e5 100644
--- a/deps/npm/node_modules/gauge/node_modules/ansi-regex/package.json
+++ b/deps/npm/node_modules/cliui/node_modules/ansi-regex/package.json
@@ -1,27 +1,27 @@
{
- "_from": "ansi-regex@^2.0.0",
- "_id": "ansi-regex@2.1.1",
+ "_from": "ansi-regex@^3.0.0",
+ "_id": "ansi-regex@3.0.0",
"_inBundle": false,
- "_integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
- "_location": "/gauge/ansi-regex",
+ "_integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+ "_location": "/cliui/ansi-regex",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "ansi-regex@^2.0.0",
+ "raw": "ansi-regex@^3.0.0",
"name": "ansi-regex",
"escapedName": "ansi-regex",
- "rawSpec": "^2.0.0",
+ "rawSpec": "^3.0.0",
"saveSpec": null,
- "fetchSpec": "^2.0.0"
+ "fetchSpec": "^3.0.0"
},
"_requiredBy": [
- "/gauge/strip-ansi"
+ "/cliui/strip-ansi"
],
- "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df",
- "_spec": "ansi-regex@^2.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/gauge/node_modules/strip-ansi",
+ "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
+ "_shasum": "ed0317c322064f79466c02966bddb605ab37d998",
+ "_spec": "ansi-regex@^3.0.0",
+ "_where": "/Users/rebecca/code/npm/node_modules/cliui/node_modules/strip-ansi",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
@@ -34,11 +34,11 @@
"deprecated": false,
"description": "Regular expression for matching ANSI escape codes",
"devDependencies": {
- "ava": "0.17.0",
- "xo": "0.16.0"
+ "ava": "*",
+ "xo": "*"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">=4"
},
"files": [
"index.js"
@@ -72,37 +72,14 @@
"pattern"
],
"license": "MIT",
- "maintainers": [
- {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- {
- "name": "Joshua Appelman",
- "email": "jappelman@xebia.com",
- "url": "jbnicolai.com"
- },
- {
- "name": "JD Ballard",
- "email": "i.am.qix@gmail.com",
- "url": "github.com/qix-"
- }
- ],
"name": "ansi-regex",
"repository": {
"type": "git",
"url": "git+https://github.com/chalk/ansi-regex.git"
},
"scripts": {
- "test": "xo && ava --verbose",
+ "test": "xo && ava",
"view-supported": "node fixtures/view-codes.js"
},
- "version": "2.1.1",
- "xo": {
- "rules": {
- "guard-for-in": 0,
- "no-loop-func": 0
- }
- }
+ "version": "3.0.0"
}
diff --git a/deps/npm/node_modules/gauge/node_modules/ansi-regex/readme.md b/deps/npm/node_modules/cliui/node_modules/ansi-regex/readme.md
index 6a928edf0f..22db1c3405 100644
--- a/deps/npm/node_modules/gauge/node_modules/ansi-regex/readme.md
+++ b/deps/npm/node_modules/cliui/node_modules/ansi-regex/readme.md
@@ -1,12 +1,12 @@
# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex)
-> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
+> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
## Install
```
-$ npm install --save ansi-regex
+$ npm install ansi-regex
```
@@ -15,25 +15,32 @@ $ npm install --save ansi-regex
```js
const ansiRegex = require('ansi-regex');
-ansiRegex().test('\u001b[4mcake\u001b[0m');
+ansiRegex().test('\u001B[4mcake\u001B[0m');
//=> true
ansiRegex().test('cake');
//=> false
-'\u001b[4mcake\u001b[0m'.match(ansiRegex());
-//=> ['\u001b[4m', '\u001b[0m']
+'\u001B[4mcake\u001B[0m'.match(ansiRegex());
+//=> ['\u001B[4m', '\u001B[0m']
```
+
## FAQ
### Why do you test for codes not in the ECMA 48 standard?
-Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
+Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+
## License
-MIT © [Sindre Sorhus](http://sindresorhus.com)
+MIT
diff --git a/deps/npm/node_modules/cliui/node_modules/strip-ansi/index.js b/deps/npm/node_modules/cliui/node_modules/strip-ansi/index.js
new file mode 100644
index 0000000000..96e0292c8e
--- /dev/null
+++ b/deps/npm/node_modules/cliui/node_modules/strip-ansi/index.js
@@ -0,0 +1,4 @@
+'use strict';
+const ansiRegex = require('ansi-regex');
+
+module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input;
diff --git a/deps/npm/node_modules/cliui/node_modules/strip-ansi/license b/deps/npm/node_modules/cliui/node_modules/strip-ansi/license
new file mode 100644
index 0000000000..e7af2f7710
--- /dev/null
+++ b/deps/npm/node_modules/cliui/node_modules/strip-ansi/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+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/deps/npm/node_modules/columnify/node_modules/strip-ansi/package.json b/deps/npm/node_modules/cliui/node_modules/strip-ansi/package.json
index 2befc6de4d..b45e23c118 100644
--- a/deps/npm/node_modules/columnify/node_modules/strip-ansi/package.json
+++ b/deps/npm/node_modules/cliui/node_modules/strip-ansi/package.json
@@ -1,27 +1,27 @@
{
- "_from": "strip-ansi@^3.0.0",
- "_id": "strip-ansi@3.0.1",
+ "_from": "strip-ansi@^4.0.0",
+ "_id": "strip-ansi@4.0.0",
"_inBundle": false,
- "_integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
- "_location": "/columnify/strip-ansi",
+ "_integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
+ "_location": "/cliui/strip-ansi",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "strip-ansi@^3.0.0",
+ "raw": "strip-ansi@^4.0.0",
"name": "strip-ansi",
"escapedName": "strip-ansi",
- "rawSpec": "^3.0.0",
+ "rawSpec": "^4.0.0",
"saveSpec": null,
- "fetchSpec": "^3.0.0"
+ "fetchSpec": "^4.0.0"
},
"_requiredBy": [
- "/columnify"
+ "/cliui"
],
- "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "_shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf",
- "_spec": "strip-ansi@^3.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/columnify",
+ "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
+ "_shasum": "a8479022eb1ac368a871389b635262c505ee368f",
+ "_spec": "strip-ansi@^4.0.0",
+ "_where": "/Users/rebecca/code/npm/node_modules/cliui",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
@@ -32,7 +32,7 @@
},
"bundleDependencies": false,
"dependencies": {
- "ansi-regex": "^2.0.0"
+ "ansi-regex": "^3.0.0"
},
"deprecated": false,
"description": "Strip ANSI escape codes",
@@ -41,7 +41,7 @@
"xo": "*"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">=4"
},
"files": [
"index.js"
@@ -72,23 +72,6 @@
"text"
],
"license": "MIT",
- "maintainers": [
- {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- {
- "name": "Joshua Boy Nicolai Appelman",
- "email": "joshua@jbna.nl",
- "url": "jbna.nl"
- },
- {
- "name": "JD Ballard",
- "email": "i.am.qix@gmail.com",
- "url": "github.com/qix-"
- }
- ],
"name": "strip-ansi",
"repository": {
"type": "git",
@@ -97,5 +80,5 @@
"scripts": {
"test": "xo && ava"
},
- "version": "3.0.1"
+ "version": "4.0.0"
}
diff --git a/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/readme.md b/deps/npm/node_modules/cliui/node_modules/strip-ansi/readme.md
index cb7d9ff7ee..dc76f0cb1a 100644
--- a/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/readme.md
+++ b/deps/npm/node_modules/cliui/node_modules/strip-ansi/readme.md
@@ -1,22 +1,22 @@
# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi)
-> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
+> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
## Install
```
-$ npm install --save strip-ansi
+$ npm install strip-ansi
```
## Usage
```js
-var stripAnsi = require('strip-ansi');
+const stripAnsi = require('strip-ansi');
-stripAnsi('\u001b[4mcake\u001b[0m');
-//=> 'cake'
+stripAnsi('\u001B[4mUnicorn\u001B[0m');
+//=> 'Unicorn'
```
@@ -28,6 +28,12 @@ stripAnsi('\u001b[4mcake\u001b[0m');
- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+
## License
-MIT © [Sindre Sorhus](http://sindresorhus.com)
+MIT
diff --git a/deps/npm/node_modules/columnify/node_modules/ansi-regex/index.js b/deps/npm/node_modules/columnify/node_modules/ansi-regex/index.js
deleted file mode 100644
index b9574ed7e8..0000000000
--- a/deps/npm/node_modules/columnify/node_modules/ansi-regex/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-module.exports = function () {
- return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g;
-};
diff --git a/deps/npm/node_modules/columnify/node_modules/ansi-regex/license b/deps/npm/node_modules/columnify/node_modules/ansi-regex/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/columnify/node_modules/ansi-regex/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/columnify/node_modules/ansi-regex/package.json b/deps/npm/node_modules/columnify/node_modules/ansi-regex/package.json
deleted file mode 100644
index 257bf82157..0000000000
--- a/deps/npm/node_modules/columnify/node_modules/ansi-regex/package.json
+++ /dev/null
@@ -1,108 +0,0 @@
-{
- "_from": "ansi-regex@^2.0.0",
- "_id": "ansi-regex@2.1.1",
- "_inBundle": false,
- "_integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
- "_location": "/columnify/ansi-regex",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "ansi-regex@^2.0.0",
- "name": "ansi-regex",
- "escapedName": "ansi-regex",
- "rawSpec": "^2.0.0",
- "saveSpec": null,
- "fetchSpec": "^2.0.0"
- },
- "_requiredBy": [
- "/columnify/strip-ansi"
- ],
- "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df",
- "_spec": "ansi-regex@^2.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/columnify/node_modules/strip-ansi",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/chalk/ansi-regex/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Regular expression for matching ANSI escape codes",
- "devDependencies": {
- "ava": "0.17.0",
- "xo": "0.16.0"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/chalk/ansi-regex#readme",
- "keywords": [
- "ansi",
- "styles",
- "color",
- "colour",
- "colors",
- "terminal",
- "console",
- "cli",
- "string",
- "tty",
- "escape",
- "formatting",
- "rgb",
- "256",
- "shell",
- "xterm",
- "command-line",
- "text",
- "regex",
- "regexp",
- "re",
- "match",
- "test",
- "find",
- "pattern"
- ],
- "license": "MIT",
- "maintainers": [
- {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- {
- "name": "Joshua Appelman",
- "email": "jappelman@xebia.com",
- "url": "jbnicolai.com"
- },
- {
- "name": "JD Ballard",
- "email": "i.am.qix@gmail.com",
- "url": "github.com/qix-"
- }
- ],
- "name": "ansi-regex",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/chalk/ansi-regex.git"
- },
- "scripts": {
- "test": "xo && ava --verbose",
- "view-supported": "node fixtures/view-codes.js"
- },
- "version": "2.1.1",
- "xo": {
- "rules": {
- "guard-for-in": 0,
- "no-loop-func": 0
- }
- }
-}
diff --git a/deps/npm/node_modules/columnify/node_modules/ansi-regex/readme.md b/deps/npm/node_modules/columnify/node_modules/ansi-regex/readme.md
deleted file mode 100644
index 6a928edf0f..0000000000
--- a/deps/npm/node_modules/columnify/node_modules/ansi-regex/readme.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex)
-
-> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
-
-
-## Install
-
-```
-$ npm install --save ansi-regex
-```
-
-
-## Usage
-
-```js
-const ansiRegex = require('ansi-regex');
-
-ansiRegex().test('\u001b[4mcake\u001b[0m');
-//=> true
-
-ansiRegex().test('cake');
-//=> false
-
-'\u001b[4mcake\u001b[0m'.match(ansiRegex());
-//=> ['\u001b[4m', '\u001b[0m']
-```
-
-## FAQ
-
-### Why do you test for codes not in the ECMA 48 standard?
-
-Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
-
-On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/index.js b/deps/npm/node_modules/columnify/node_modules/strip-ansi/index.js
deleted file mode 100644
index 099480fbfc..0000000000
--- a/deps/npm/node_modules/columnify/node_modules/strip-ansi/index.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-var ansiRegex = require('ansi-regex')();
-
-module.exports = function (str) {
- return typeof str === 'string' ? str.replace(ansiRegex, '') : str;
-};
diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/license b/deps/npm/node_modules/columnify/node_modules/strip-ansi/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/columnify/node_modules/strip-ansi/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/readme.md b/deps/npm/node_modules/columnify/node_modules/strip-ansi/readme.md
deleted file mode 100644
index cb7d9ff7ee..0000000000
--- a/deps/npm/node_modules/columnify/node_modules/strip-ansi/readme.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi)
-
-> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
-
-
-## Install
-
-```
-$ npm install --save strip-ansi
-```
-
-
-## Usage
-
-```js
-var stripAnsi = require('strip-ansi');
-
-stripAnsi('\u001b[4mcake\u001b[0m');
-//=> 'cake'
-```
-
-
-## Related
-
-- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module
-- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
-- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
-- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/cryptiles/.npmignore b/deps/npm/node_modules/cryptiles/.npmignore
index adac8ad9c6..b0939eabe3 100644
--- a/deps/npm/node_modules/cryptiles/.npmignore
+++ b/deps/npm/node_modules/cryptiles/.npmignore
@@ -1,3 +1,17 @@
-*
-!lib/**
-!.npmignore
+.idea
+*.iml
+npm-debug.log
+dump.rdb
+node_modules
+results.tap
+results.xml
+npm-shrinkwrap.json
+config.json
+.DS_Store
+*/.DS_Store
+*/*/.DS_Store
+._*
+*/._*
+*/*/._*
+coverage.*
+lib-cov
diff --git a/deps/npm/node_modules/cryptiles/.travis.yml b/deps/npm/node_modules/cryptiles/.travis.yml
new file mode 100755
index 0000000000..7a64dd2210
--- /dev/null
+++ b/deps/npm/node_modules/cryptiles/.travis.yml
@@ -0,0 +1,7 @@
+language: node_js
+
+node_js:
+ - 0.10
+ - 4.0
+
+sudo: false
diff --git a/deps/npm/node_modules/cryptiles/LICENSE b/deps/npm/node_modules/cryptiles/LICENSE
index 4028ccd3fa..cda44736af 100755
--- a/deps/npm/node_modules/cryptiles/LICENSE
+++ b/deps/npm/node_modules/cryptiles/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2014-2017, Eran Hammer and Project contributors
+Copyright (c) 2014, Eran Hammer and other contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/deps/npm/node_modules/cryptiles/README.md b/deps/npm/node_modules/cryptiles/README.md
index b3df9e67ff..4008305017 100755..100644
--- a/deps/npm/node_modules/cryptiles/README.md
+++ b/deps/npm/node_modules/cryptiles/README.md
@@ -12,8 +12,5 @@ Lead Maintainer - [C J Silverio](https://github.com/ceejbot)
### `randomString(<Number> size)`
Returns a cryptographically strong pseudo-random data string. Takes a size argument for the length of the string.
-### `randomDigits(<Number> size)`
-Returns a cryptographically strong pseudo-random data string consisting of only numerical digits (0-9). Takes a size argument for the length of the string.
-
### `fixedTimeComparison(<String> a, <String> b)`
Compare two strings using fixed time algorithm (to prevent time-based analysis of MAC digest match). Returns `true` if the strings match, `false` if they differ.
diff --git a/deps/npm/node_modules/cryptiles/lib/index.js b/deps/npm/node_modules/cryptiles/lib/index.js
index 511eab66d4..c8a046d743 100755
--- a/deps/npm/node_modules/cryptiles/lib/index.js
+++ b/deps/npm/node_modules/cryptiles/lib/index.js
@@ -1,50 +1,28 @@
-'use strict';
-
// Load modules
-const Crypto = require('crypto');
-const Boom = require('boom');
+var Crypto = require('crypto');
+var Boom = require('boom');
// Declare internals
-const internals = {};
+var internals = {};
// Generate a cryptographically strong pseudo-random data
exports.randomString = function (size) {
- const buffer = exports.randomBits((size + 1) * 6);
+ var buffer = exports.randomBits((size + 1) * 6);
if (buffer instanceof Error) {
return buffer;
}
- const string = buffer.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, '');
+ var string = buffer.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, '');
return string.slice(0, size);
};
-// Return a random string of digits
-
-exports.randomDigits = function (size) {
-
- const buffer = exports.randomBits(size * 8);
- if (buffer instanceof Error) {
- return buffer;
- }
-
- const digits = [];
- for (let i = 0; i < buffer.length; ++i) {
- digits.push(Math.floor(buffer[i] / 25.6));
- }
-
- return digits.join('');
-};
-
-
-// Generate a buffer of random bits
-
exports.randomBits = function (bits) {
if (!bits ||
@@ -53,7 +31,7 @@ exports.randomBits = function (bits) {
return Boom.internal('Invalid random bits count');
}
- const bytes = Math.ceil(bits / 8);
+ var bytes = Math.ceil(bits / 8);
try {
return Crypto.randomBytes(bytes);
}
@@ -73,14 +51,14 @@ exports.fixedTimeComparison = function (a, b) {
return false;
}
- let mismatch = (a.length === b.length ? 0 : 1);
+ var mismatch = (a.length === b.length ? 0 : 1);
if (mismatch) {
b = a;
}
- for (let i = 0; i < a.length; ++i) {
- const ac = a.charCodeAt(i);
- const bc = b.charCodeAt(i);
+ for (var i = 0, il = a.length; i < il; ++i) {
+ var ac = a.charCodeAt(i);
+ var bc = b.charCodeAt(i);
mismatch |= (ac ^ bc);
}
diff --git a/deps/npm/node_modules/cryptiles/node_modules/boom/LICENSE b/deps/npm/node_modules/cryptiles/node_modules/boom/LICENSE
deleted file mode 100755
index 94b91cbf09..0000000000
--- a/deps/npm/node_modules/cryptiles/node_modules/boom/LICENSE
+++ /dev/null
@@ -1,29 +0,0 @@
-Copyright (c) 2012-2017, Project contributors.
-Copyright (c) 2012-2014, Walmart.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * The names of any contributors may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- * * *
-
-The complete list of contributors can be found at: https://github.com/hapijs/boom/graphs/contributors
diff --git a/deps/npm/node_modules/cryptiles/node_modules/boom/README.md b/deps/npm/node_modules/cryptiles/node_modules/boom/README.md
deleted file mode 100755
index 50d5b0d7d2..0000000000
--- a/deps/npm/node_modules/cryptiles/node_modules/boom/README.md
+++ /dev/null
@@ -1,784 +0,0 @@
-![boom Logo](https://raw.github.com/hapijs/boom/master/images/boom.png)
-
-HTTP-friendly error objects
-
-[![Build Status](https://secure.travis-ci.org/hapijs/boom.svg)](http://travis-ci.org/hapijs/boom)
-[![Current Version](https://img.shields.io/npm/v/boom.svg)](https://www.npmjs.com/package/boom)
-
-Lead Maintainer: [Adam Bretz](https://github.com/arb)
-
-<!-- toc -->
-
-- [Boom](#boom)
- - [Helper Methods](#helper-methods)
- - [`boomify(error, [options])`](#boomifyerror-options)
- - [`wrap(error, [statusCode], [message])`](#wraperror-statuscode-message)
- - [`create(statusCode, [message], [data])`](#createstatuscode-message-data)
- - [HTTP 4xx Errors](#http-4xx-errors)
- - [`Boom.badRequest([message], [data])`](#boombadrequestmessage-data)
- - [`Boom.unauthorized([message], [scheme], [attributes])`](#boomunauthorizedmessage-scheme-attributes)
- - [`Boom.paymentRequired([message], [data])`](#boompaymentrequiredmessage-data)
- - [`Boom.forbidden([message], [data])`](#boomforbiddenmessage-data)
- - [`Boom.notFound([message], [data])`](#boomnotfoundmessage-data)
- - [`Boom.methodNotAllowed([message], [data], [allow])`](#boommethodnotallowedmessage-data-allow)
- - [`Boom.notAcceptable([message], [data])`](#boomnotacceptablemessage-data)
- - [`Boom.proxyAuthRequired([message], [data])`](#boomproxyauthrequiredmessage-data)
- - [`Boom.clientTimeout([message], [data])`](#boomclienttimeoutmessage-data)
- - [`Boom.conflict([message], [data])`](#boomconflictmessage-data)
- - [`Boom.resourceGone([message], [data])`](#boomresourcegonemessage-data)
- - [`Boom.lengthRequired([message], [data])`](#boomlengthrequiredmessage-data)
- - [`Boom.preconditionFailed([message], [data])`](#boompreconditionfailedmessage-data)
- - [`Boom.entityTooLarge([message], [data])`](#boomentitytoolargemessage-data)
- - [`Boom.uriTooLong([message], [data])`](#boomuritoolongmessage-data)
- - [`Boom.unsupportedMediaType([message], [data])`](#boomunsupportedmediatypemessage-data)
- - [`Boom.rangeNotSatisfiable([message], [data])`](#boomrangenotsatisfiablemessage-data)
- - [`Boom.expectationFailed([message], [data])`](#boomexpectationfailedmessage-data)
- - [`Boom.teapot([message], [data])`](#boomteapotmessage-data)
- - [`Boom.badData([message], [data])`](#boombaddatamessage-data)
- - [`Boom.locked([message], [data])`](#boomlockedmessage-data)
- - [`Boom.preconditionRequired([message], [data])`](#boompreconditionrequiredmessage-data)
- - [`Boom.tooManyRequests([message], [data])`](#boomtoomanyrequestsmessage-data)
- - [`Boom.illegal([message], [data])`](#boomillegalmessage-data)
- - [HTTP 5xx Errors](#http-5xx-errors)
- - [`Boom.badImplementation([message], [data])` - (*alias: `internal`*)](#boombadimplementationmessage-data---alias-internal)
- - [`Boom.notImplemented([message], [data])`](#boomnotimplementedmessage-data)
- - [`Boom.badGateway([message], [data])`](#boombadgatewaymessage-data)
- - [`Boom.serverUnavailable([message], [data])`](#boomserverunavailablemessage-data)
- - [`Boom.gatewayTimeout([message], [data])`](#boomgatewaytimeoutmessage-data)
- - [F.A.Q.](#faq)
-
-<!-- tocstop -->
-
-# Boom
-
-**boom** provides a set of utilities for returning HTTP errors. Each utility returns a `Boom` error response
-object (instance of `Error`) which includes the following properties:
-- `isBoom` - if `true`, indicates this is a `Boom` object instance.
-- `isServer` - convenience bool indicating status code >= 500.
-- `message` - the error message.
-- `typeof` - the contructor used to create the error (e.g. `Boom.badRequest`).
-- `output` - the formatted response. Can be directly manipulated after object construction to return a custom
- error response. Allowed root keys:
- - `statusCode` - the HTTP status code (typically 4xx or 5xx).
- - `headers` - an object containing any HTTP headers where each key is a header name and value is the header content.
- - `payload` - the formatted object used as the response payload (stringified). Can be directly manipulated but any
- changes will be lost
- if `reformat()` is called. Any content allowed and by default includes the following content:
- - `statusCode` - the HTTP status code, derived from `error.output.statusCode`.
- - `error` - the HTTP status message (e.g. 'Bad Request', 'Internal Server Error') derived from `statusCode`.
- - `message` - the error message derived from `error.message`.
-- inherited `Error` properties.
-
-The `Boom` object also supports the following method:
-- `reformat()` - rebuilds `error.output` using the other object properties.
-
-## Helper Methods
-
-### `boomify(error, [options])`
-
-Decorates an error with the **boom** properties where:
-- `error` - the `Error` object to decorate.
-- `options` - optional object with the following optional settings:
- - `statusCode` - the HTTP status code. Defaults to `500` if no status code is already set.
- - `message` - error message string. If the error already has a message, the provided `message` is added as a prefix.
- Defaults to no message.
- - `override` - if `false`, the `error` provided is a **boom** object, and a `statusCode` or `message` are provided,
- the values are ignored. Defaults to `true` (apply the provided `statusCode` and `message` options to the error
- regardless of its type, `Error` or **boom** object).
-
-Note: This method replaces the [`wrap()`](#wraperror-statuscode-message) and changes the default behavior to override
-existing **boom** objects with the provided status code and message.
-
-```js
-var error = new Error('Unexpected input');
-Boom.boomify(error, { statusCode: 400 });
-```
-
-### `wrap(error, [statusCode], [message])`
-
-Note: This method is deprecated.
-
-Decorates an error with the **boom** properties where:
-- `error` - the error object to wrap. If `error` is already a **boom** object, returns back the same object.
-- `statusCode` - optional HTTP status code. Defaults to `500`.
-- `message` - optional message string. If the error already has a message, it adds the message as a prefix.
- Defaults to no message.
-
-```js
-var error = new Error('Unexpected input');
-Boom.wrap(error, 400);
-```
-
-### `create(statusCode, [message], [data])`
-
-Generates an `Error` object with the **boom** decorations where:
-- `statusCode` - an HTTP error code number. Must be greater or equal 400.
-- `message` - optional message string.
-- `data` - additional error data set to `error.data` property.
-
-```js
-var error = Boom.create(400, 'Bad request', { timestamp: Date.now() });
-```
-
-## HTTP 4xx Errors
-
-### `Boom.badRequest([message], [data])`
-
-Returns a 400 Bad Request error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.badRequest('invalid query');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 400,
- "error": "Bad Request",
- "message": "invalid query"
-}
-```
-
-### `Boom.unauthorized([message], [scheme], [attributes])`
-
-Returns a 401 Unauthorized error where:
-- `message` - optional message.
-- `scheme` can be one of the following:
- - an authentication scheme name
- - an array of string values. These values will be separated by ', ' and set to the 'WWW-Authenticate' header.
-- `attributes` - an object of values to use while setting the 'WWW-Authenticate' header. This value is only used
- when `scheme` is a string, otherwise it is ignored. Every key/value pair will be included in the
- 'WWW-Authenticate' in the format of 'key="value"' as well as in the response payload under the `attributes` key. Alternatively value can be a string which is use to set the value of the scheme, for example setting the token value for negotiate header. If string is used message parameter must be null.
- `null` and `undefined` will be replaced with an empty string. If `attributes` is set, `message` will be used as
- the 'error' segment of the 'WWW-Authenticate' header. If `message` is unset, the 'error' segment of the header
- will not be present and `isMissing` will be true on the error object.
-
-If either `scheme` or `attributes` are set, the resultant `Boom` object will have the 'WWW-Authenticate' header set for the response.
-
-```js
-Boom.unauthorized('invalid password');
-```
-
-Generates the following response:
-
-```json
-"payload": {
- "statusCode": 401,
- "error": "Unauthorized",
- "message": "invalid password"
-},
-"headers" {}
-```
-
-```js
-Boom.unauthorized('invalid password', 'sample');
-```
-
-Generates the following response:
-
-```json
-"payload": {
- "statusCode": 401,
- "error": "Unauthorized",
- "message": "invalid password",
- "attributes": {
- "error": "invalid password"
- }
-},
-"headers" {
- "WWW-Authenticate": "sample error=\"invalid password\""
-}
-```
-
-```js
-Boom.unauthorized(null, 'Negotiate', 'VGhpcyBpcyBhIHRlc3QgdG9rZW4=');
-```
-
-Generates the following response:
-
-```json
-"payload": {
- "statusCode": 401,
- "error": "Unauthorized",
- "attributes": "VGhpcyBpcyBhIHRlc3QgdG9rZW4="
-},
-"headers" {
- "WWW-Authenticate": "Negotiate VGhpcyBpcyBhIHRlc3QgdG9rZW4="
-}
-```
-
-```js
-Boom.unauthorized('invalid password', 'sample', { ttl: 0, cache: null, foo: 'bar' });
-```
-
-Generates the following response:
-
-```json
-"payload": {
- "statusCode": 401,
- "error": "Unauthorized",
- "message": "invalid password",
- "attributes": {
- "error": "invalid password",
- "ttl": 0,
- "cache": "",
- "foo": "bar"
- }
-},
-"headers" {
- "WWW-Authenticate": "sample ttl=\"0\", cache=\"\", foo=\"bar\", error=\"invalid password\""
-}
-```
-
-### `Boom.paymentRequired([message], [data])`
-
-Returns a 402 Payment Required error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.paymentRequired('bandwidth used');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 402,
- "error": "Payment Required",
- "message": "bandwidth used"
-}
-```
-
-### `Boom.forbidden([message], [data])`
-
-Returns a 403 Forbidden error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.forbidden('try again some time');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 403,
- "error": "Forbidden",
- "message": "try again some time"
-}
-```
-
-### `Boom.notFound([message], [data])`
-
-Returns a 404 Not Found error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.notFound('missing');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 404,
- "error": "Not Found",
- "message": "missing"
-}
-```
-
-### `Boom.methodNotAllowed([message], [data], [allow])`
-
-Returns a 405 Method Not Allowed error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-- `allow` - optional string or array of strings (to be combined and separated by ', ') which is set to the 'Allow' header.
-
-```js
-Boom.methodNotAllowed('that method is not allowed');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 405,
- "error": "Method Not Allowed",
- "message": "that method is not allowed"
-}
-```
-
-### `Boom.notAcceptable([message], [data])`
-
-Returns a 406 Not Acceptable error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.notAcceptable('unacceptable');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 406,
- "error": "Not Acceptable",
- "message": "unacceptable"
-}
-```
-
-### `Boom.proxyAuthRequired([message], [data])`
-
-Returns a 407 Proxy Authentication Required error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.proxyAuthRequired('auth missing');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 407,
- "error": "Proxy Authentication Required",
- "message": "auth missing"
-}
-```
-
-### `Boom.clientTimeout([message], [data])`
-
-Returns a 408 Request Time-out error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.clientTimeout('timed out');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 408,
- "error": "Request Time-out",
- "message": "timed out"
-}
-```
-
-### `Boom.conflict([message], [data])`
-
-Returns a 409 Conflict error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.conflict('there was a conflict');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 409,
- "error": "Conflict",
- "message": "there was a conflict"
-}
-```
-
-### `Boom.resourceGone([message], [data])`
-
-Returns a 410 Gone error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.resourceGone('it is gone');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 410,
- "error": "Gone",
- "message": "it is gone"
-}
-```
-
-### `Boom.lengthRequired([message], [data])`
-
-Returns a 411 Length Required error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.lengthRequired('length needed');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 411,
- "error": "Length Required",
- "message": "length needed"
-}
-```
-
-### `Boom.preconditionFailed([message], [data])`
-
-Returns a 412 Precondition Failed error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.preconditionFailed();
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 412,
- "error": "Precondition Failed"
-}
-```
-
-### `Boom.entityTooLarge([message], [data])`
-
-Returns a 413 Request Entity Too Large error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.entityTooLarge('too big');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 413,
- "error": "Request Entity Too Large",
- "message": "too big"
-}
-```
-
-### `Boom.uriTooLong([message], [data])`
-
-Returns a 414 Request-URI Too Large error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.uriTooLong('uri is too long');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 414,
- "error": "Request-URI Too Large",
- "message": "uri is too long"
-}
-```
-
-### `Boom.unsupportedMediaType([message], [data])`
-
-Returns a 415 Unsupported Media Type error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.unsupportedMediaType('that media is not supported');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 415,
- "error": "Unsupported Media Type",
- "message": "that media is not supported"
-}
-```
-
-### `Boom.rangeNotSatisfiable([message], [data])`
-
-Returns a 416 Requested Range Not Satisfiable error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.rangeNotSatisfiable();
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 416,
- "error": "Requested Range Not Satisfiable"
-}
-```
-
-### `Boom.expectationFailed([message], [data])`
-
-Returns a 417 Expectation Failed error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.expectationFailed('expected this to work');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 417,
- "error": "Expectation Failed",
- "message": "expected this to work"
-}
-```
-
-### `Boom.teapot([message], [data])`
-
-Returns a 418 I'm a Teapot error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.teapot('sorry, no coffee...');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 418,
- "error": "I'm a Teapot",
- "message": "Sorry, no coffee..."
-}
-```
-
-### `Boom.badData([message], [data])`
-
-Returns a 422 Unprocessable Entity error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.badData('your data is bad and you should feel bad');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 422,
- "error": "Unprocessable Entity",
- "message": "your data is bad and you should feel bad"
-}
-```
-
-### `Boom.locked([message], [data])`
-
-Returns a 423 Locked error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.locked('this resource has been locked');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 423,
- "error": "Locked",
- "message": "this resource has been locked"
-}
-```
-
-### `Boom.preconditionRequired([message], [data])`
-
-Returns a 428 Precondition Required error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.preconditionRequired('you must supply an If-Match header');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 428,
- "error": "Precondition Required",
- "message": "you must supply an If-Match header"
-}
-```
-
-### `Boom.tooManyRequests([message], [data])`
-
-Returns a 429 Too Many Requests error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.tooManyRequests('you have exceeded your request limit');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 429,
- "error": "Too Many Requests",
- "message": "you have exceeded your request limit"
-}
-```
-
-### `Boom.illegal([message], [data])`
-
-Returns a 451 Unavailable For Legal Reasons error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.illegal('you are not permitted to view this resource for legal reasons');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 451,
- "error": "Unavailable For Legal Reasons",
- "message": "you are not permitted to view this resource for legal reasons"
-}
-```
-
-## HTTP 5xx Errors
-
-All 500 errors hide your message from the end user. Your message is recorded in the server log.
-
-### `Boom.badImplementation([message], [data])` - (*alias: `internal`*)
-
-Returns a 500 Internal Server Error error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.badImplementation('terrible implementation');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 500,
- "error": "Internal Server Error",
- "message": "An internal server error occurred"
-}
-```
-
-### `Boom.notImplemented([message], [data])`
-
-Returns a 501 Not Implemented error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.notImplemented('method not implemented');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 501,
- "error": "Not Implemented",
- "message": "method not implemented"
-}
-```
-
-### `Boom.badGateway([message], [data])`
-
-Returns a 502 Bad Gateway error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.badGateway('that is a bad gateway');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 502,
- "error": "Bad Gateway",
- "message": "that is a bad gateway"
-}
-```
-
-### `Boom.serverUnavailable([message], [data])`
-
-Returns a 503 Service Unavailable error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.serverUnavailable('unavailable');
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 503,
- "error": "Service Unavailable",
- "message": "unavailable"
-}
-```
-
-### `Boom.gatewayTimeout([message], [data])`
-
-Returns a 504 Gateway Time-out error where:
-- `message` - optional message.
-- `data` - optional additional error data.
-
-```js
-Boom.gatewayTimeout();
-```
-
-Generates the following response payload:
-
-```json
-{
- "statusCode": 504,
- "error": "Gateway Time-out"
-}
-```
-
-## F.A.Q.
-
-**Q** How do I include extra information in my responses? `output.payload` is missing `data`, what gives?
-
-**A** There is a reason the values passed back in the response payloads are pretty locked down. It's mostly for security and to not leak any important information back to the client. This means you will need to put in a little more effort to include extra information about your custom error. Check out the ["Error transformation"](https://github.com/hapijs/hapi/blob/master/API.md#error-transformation) section in the hapi documentation.
-
----
diff --git a/deps/npm/node_modules/cryptiles/node_modules/boom/lib/index.js b/deps/npm/node_modules/cryptiles/node_modules/boom/lib/index.js
deleted file mode 100755
index c57c79d434..0000000000
--- a/deps/npm/node_modules/cryptiles/node_modules/boom/lib/index.js
+++ /dev/null
@@ -1,457 +0,0 @@
-'use strict';
-
-// Load modules
-
-const Hoek = require('hoek');
-
-
-// Declare internals
-
-const internals = {
- STATUS_CODES: Object.setPrototypeOf({
- '100': 'Continue',
- '101': 'Switching Protocols',
- '102': 'Processing',
- '200': 'OK',
- '201': 'Created',
- '202': 'Accepted',
- '203': 'Non-Authoritative Information',
- '204': 'No Content',
- '205': 'Reset Content',
- '206': 'Partial Content',
- '207': 'Multi-Status',
- '300': 'Multiple Choices',
- '301': 'Moved Permanently',
- '302': 'Moved Temporarily',
- '303': 'See Other',
- '304': 'Not Modified',
- '305': 'Use Proxy',
- '307': 'Temporary Redirect',
- '400': 'Bad Request',
- '401': 'Unauthorized',
- '402': 'Payment Required',
- '403': 'Forbidden',
- '404': 'Not Found',
- '405': 'Method Not Allowed',
- '406': 'Not Acceptable',
- '407': 'Proxy Authentication Required',
- '408': 'Request Time-out',
- '409': 'Conflict',
- '410': 'Gone',
- '411': 'Length Required',
- '412': 'Precondition Failed',
- '413': 'Request Entity Too Large',
- '414': 'Request-URI Too Large',
- '415': 'Unsupported Media Type',
- '416': 'Requested Range Not Satisfiable',
- '417': 'Expectation Failed',
- '418': 'I\'m a teapot',
- '422': 'Unprocessable Entity',
- '423': 'Locked',
- '424': 'Failed Dependency',
- '425': 'Unordered Collection',
- '426': 'Upgrade Required',
- '428': 'Precondition Required',
- '429': 'Too Many Requests',
- '431': 'Request Header Fields Too Large',
- '451': 'Unavailable For Legal Reasons',
- '500': 'Internal Server Error',
- '501': 'Not Implemented',
- '502': 'Bad Gateway',
- '503': 'Service Unavailable',
- '504': 'Gateway Time-out',
- '505': 'HTTP Version Not Supported',
- '506': 'Variant Also Negotiates',
- '507': 'Insufficient Storage',
- '509': 'Bandwidth Limit Exceeded',
- '510': 'Not Extended',
- '511': 'Network Authentication Required'
- }, null)
-};
-
-
-exports.boomify = function (error, options) {
-
- Hoek.assert(error instanceof Error, 'Cannot wrap non-Error object');
-
- options = options || {};
-
- if (!error.isBoom) {
- return internals.initialize(error, options.statusCode || 500, options.message);
- }
-
- if (options.override === false || // Defaults to true
- (!options.statusCode && !options.message)) {
-
- return error;
- }
-
- return internals.initialize(error, options.statusCode || error.output.statusCode, options.message);
-};
-
-
-exports.wrap = function (error, statusCode, message) {
-
- Hoek.assert(error instanceof Error, 'Cannot wrap non-Error object');
- Hoek.assert(!error.isBoom || (!statusCode && !message), 'Cannot provide statusCode or message with boom error');
-
- return (error.isBoom ? error : internals.initialize(error, statusCode || 500, message));
-};
-
-
-exports.create = function (statusCode, message, data) {
-
- return internals.create(statusCode, message, data, exports.create);
-};
-
-
-internals.create = function (statusCode, message, data, ctor) {
-
- if (message instanceof Error) {
- if (data) {
- message.data = data;
- }
-
- return exports.wrap(message, statusCode);
- }
-
- const error = new Error(message ? message : undefined); // Avoids settings null message
- Error.captureStackTrace(error, ctor); // Filter the stack to our external API
- error.data = data || null;
- internals.initialize(error, statusCode);
- error.typeof = ctor;
-
- return error;
-};
-
-
-internals.initialize = function (error, statusCode, message) {
-
- const numberCode = parseInt(statusCode, 10);
- Hoek.assert(!isNaN(numberCode) && numberCode >= 400, 'First argument must be a number (400+):', statusCode);
-
- error.isBoom = true;
- error.isServer = numberCode >= 500;
-
- if (!error.hasOwnProperty('data')) {
- error.data = null;
- }
-
- error.output = {
- statusCode: numberCode,
- payload: {},
- headers: {}
- };
-
- error.reformat = internals.reformat;
-
- if (!message &&
- !error.message) {
-
- error.reformat();
- message = error.output.payload.error;
- }
-
- if (message) {
- error.message = (message + (error.message ? ': ' + error.message : ''));
- error.output.payload.message = error.message;
- }
-
- error.reformat();
- return error;
-};
-
-
-internals.reformat = function () {
-
- this.output.payload.statusCode = this.output.statusCode;
- this.output.payload.error = internals.STATUS_CODES[this.output.statusCode] || 'Unknown';
-
- if (this.output.statusCode === 500) {
- this.output.payload.message = 'An internal server error occurred'; // Hide actual error from user
- }
- else if (this.message) {
- this.output.payload.message = this.message;
- }
-};
-
-
-// 4xx Client Errors
-
-exports.badRequest = function (message, data) {
-
- return internals.create(400, message, data, exports.badRequest);
-};
-
-
-exports.unauthorized = function (message, scheme, attributes) { // Or function (message, wwwAuthenticate[])
-
- const err = internals.create(401, message, undefined, exports.unauthorized);
-
- if (!scheme) {
- return err;
- }
-
- let wwwAuthenticate = '';
-
- if (typeof scheme === 'string') {
-
- // function (message, scheme, attributes)
-
- wwwAuthenticate = scheme;
-
- if (attributes || message) {
- err.output.payload.attributes = {};
- }
-
- if (attributes) {
- if (typeof attributes === 'string') {
- wwwAuthenticate = wwwAuthenticate + ' ' + Hoek.escapeHeaderAttribute(attributes);
- err.output.payload.attributes = attributes;
- }
- else {
- const names = Object.keys(attributes);
- for (let i = 0; i < names.length; ++i) {
- const name = names[i];
- if (i) {
- wwwAuthenticate = wwwAuthenticate + ',';
- }
-
- let value = attributes[name];
- if (value === null ||
- value === undefined) { // Value can be zero
-
- value = '';
- }
- wwwAuthenticate = wwwAuthenticate + ' ' + name + '="' + Hoek.escapeHeaderAttribute(value.toString()) + '"';
- err.output.payload.attributes[name] = value;
- }
- }
- }
-
-
- if (message) {
- if (attributes) {
- wwwAuthenticate = wwwAuthenticate + ',';
- }
- wwwAuthenticate = wwwAuthenticate + ' error="' + Hoek.escapeHeaderAttribute(message) + '"';
- err.output.payload.attributes.error = message;
- }
- else {
- err.isMissing = true;
- }
- }
- else {
-
- // function (message, wwwAuthenticate[])
-
- const wwwArray = scheme;
- for (let i = 0; i < wwwArray.length; ++i) {
- if (i) {
- wwwAuthenticate = wwwAuthenticate + ', ';
- }
-
- wwwAuthenticate = wwwAuthenticate + wwwArray[i];
- }
- }
-
- err.output.headers['WWW-Authenticate'] = wwwAuthenticate;
-
- return err;
-};
-
-
-exports.paymentRequired = function (message, data) {
-
- return internals.create(402, message, data, exports.paymentRequired);
-};
-
-
-exports.forbidden = function (message, data) {
-
- return internals.create(403, message, data, exports.forbidden);
-};
-
-
-exports.notFound = function (message, data) {
-
- return internals.create(404, message, data, exports.notFound);
-};
-
-
-exports.methodNotAllowed = function (message, data, allow) {
-
- const err = internals.create(405, message, data, exports.methodNotAllowed);
-
- if (typeof allow === 'string') {
- allow = [allow];
- }
-
- if (Array.isArray(allow)) {
- err.output.headers.Allow = allow.join(', ');
- }
-
- return err;
-};
-
-
-exports.notAcceptable = function (message, data) {
-
- return internals.create(406, message, data, exports.notAcceptable);
-};
-
-
-exports.proxyAuthRequired = function (message, data) {
-
- return internals.create(407, message, data, exports.proxyAuthRequired);
-};
-
-
-exports.clientTimeout = function (message, data) {
-
- return internals.create(408, message, data, exports.clientTimeout);
-};
-
-
-exports.conflict = function (message, data) {
-
- return internals.create(409, message, data, exports.conflict);
-};
-
-
-exports.resourceGone = function (message, data) {
-
- return internals.create(410, message, data, exports.resourceGone);
-};
-
-
-exports.lengthRequired = function (message, data) {
-
- return internals.create(411, message, data, exports.lengthRequired);
-};
-
-
-exports.preconditionFailed = function (message, data) {
-
- return internals.create(412, message, data, exports.preconditionFailed);
-};
-
-
-exports.entityTooLarge = function (message, data) {
-
- return internals.create(413, message, data, exports.entityTooLarge);
-};
-
-
-exports.uriTooLong = function (message, data) {
-
- return internals.create(414, message, data, exports.uriTooLong);
-};
-
-
-exports.unsupportedMediaType = function (message, data) {
-
- return internals.create(415, message, data, exports.unsupportedMediaType);
-};
-
-
-exports.rangeNotSatisfiable = function (message, data) {
-
- return internals.create(416, message, data, exports.rangeNotSatisfiable);
-};
-
-
-exports.expectationFailed = function (message, data) {
-
- return internals.create(417, message, data, exports.expectationFailed);
-};
-
-
-exports.teapot = function (message, data) {
-
- return internals.create(418, message, data, exports.teapot);
-};
-
-
-exports.badData = function (message, data) {
-
- return internals.create(422, message, data, exports.badData);
-};
-
-
-exports.locked = function (message, data) {
-
- return internals.create(423, message, data, exports.locked);
-};
-
-
-exports.preconditionRequired = function (message, data) {
-
- return internals.create(428, message, data, exports.preconditionRequired);
-};
-
-
-exports.tooManyRequests = function (message, data) {
-
- return internals.create(429, message, data, exports.tooManyRequests);
-};
-
-
-exports.illegal = function (message, data) {
-
- return internals.create(451, message, data, exports.illegal);
-};
-
-
-// 5xx Server Errors
-
-exports.internal = function (message, data, statusCode) {
-
- return internals.serverError(message, data, statusCode, exports.internal);
-};
-
-
-internals.serverError = function (message, data, statusCode, ctor) {
-
- if (data instanceof Error &&
- !data.isBoom) {
-
- return exports.wrap(data, statusCode, message);
- }
-
- const error = internals.create(statusCode || 500, message, undefined, ctor);
- error.data = data;
- return error;
-};
-
-
-exports.notImplemented = function (message, data) {
-
- return internals.serverError(message, data, 501, exports.notImplemented);
-};
-
-
-exports.badGateway = function (message, data) {
-
- return internals.serverError(message, data, 502, exports.badGateway);
-};
-
-
-exports.serverUnavailable = function (message, data) {
-
- return internals.serverError(message, data, 503, exports.serverUnavailable);
-};
-
-
-exports.gatewayTimeout = function (message, data) {
-
- return internals.serverError(message, data, 504, exports.gatewayTimeout);
-};
-
-
-exports.badImplementation = function (message, data) {
-
- const err = internals.serverError(message, data, 500, exports.badImplementation);
- err.isDeveloperError = true;
- return err;
-};
diff --git a/deps/npm/node_modules/cryptiles/node_modules/boom/package.json b/deps/npm/node_modules/cryptiles/node_modules/boom/package.json
deleted file mode 100644
index 8349d1b932..0000000000
--- a/deps/npm/node_modules/cryptiles/node_modules/boom/package.json
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- "_from": "boom@5.x.x",
- "_id": "boom@5.2.0",
- "_inBundle": false,
- "_integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==",
- "_location": "/cryptiles/boom",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "boom@5.x.x",
- "name": "boom",
- "escapedName": "boom",
- "rawSpec": "5.x.x",
- "saveSpec": null,
- "fetchSpec": "5.x.x"
- },
- "_requiredBy": [
- "/cryptiles"
- ],
- "_resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz",
- "_shasum": "5dd9da6ee3a5f302077436290cb717d3f4a54e02",
- "_spec": "boom@5.x.x",
- "_where": "/Users/rebecca/code/npm/node_modules/cryptiles",
- "bugs": {
- "url": "https://github.com/hapijs/boom/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "hoek": "4.x.x"
- },
- "deprecated": false,
- "description": "HTTP-friendly error objects",
- "devDependencies": {
- "code": "4.x.x",
- "lab": "14.x.x",
- "markdown-toc": "0.12.x"
- },
- "engines": {
- "node": ">=4.0.0"
- },
- "homepage": "https://github.com/hapijs/boom#readme",
- "keywords": [
- "error",
- "http"
- ],
- "license": "BSD-3-Clause",
- "main": "lib/index.js",
- "name": "boom",
- "repository": {
- "type": "git",
- "url": "git://github.com/hapijs/boom.git"
- },
- "scripts": {
- "test": "lab -a code -t 100 -L -v",
- "test-cov-html": "lab -a code -r html -o coverage.html -L",
- "toc": "node generate-toc.js",
- "version": "npm run toc && git add README.md"
- },
- "version": "5.2.0"
-}
diff --git a/deps/npm/node_modules/cryptiles/package.json b/deps/npm/node_modules/cryptiles/package.json
index ad7bdfaf36..28c6ad3610 100755
--- a/deps/npm/node_modules/cryptiles/package.json
+++ b/deps/npm/node_modules/cryptiles/package.json
@@ -1,44 +1,42 @@
{
- "_from": "cryptiles@3.x.x",
- "_id": "cryptiles@3.1.2",
+ "_from": "cryptiles@2.x.x",
+ "_id": "cryptiles@2.0.5",
"_inBundle": false,
- "_integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=",
+ "_integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=",
"_location": "/cryptiles",
- "_phantomChildren": {
- "hoek": "4.2.1"
- },
+ "_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "cryptiles@3.x.x",
+ "raw": "cryptiles@2.x.x",
"name": "cryptiles",
"escapedName": "cryptiles",
- "rawSpec": "3.x.x",
+ "rawSpec": "2.x.x",
"saveSpec": null,
- "fetchSpec": "3.x.x"
+ "fetchSpec": "2.x.x"
},
"_requiredBy": [
"/hawk"
],
- "_resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz",
- "_shasum": "a89fbb220f5ce25ec56e8c4aa8a4fd7b5b0d29fe",
- "_spec": "cryptiles@3.x.x",
- "_where": "/Users/rebecca/code/npm/node_modules/hawk",
+ "_resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz",
+ "_shasum": "3bdfecdc608147c1c67202fa291e7dca59eaa3b8",
+ "_spec": "cryptiles@2.x.x",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/hawk",
"bugs": {
"url": "https://github.com/hapijs/cryptiles/issues"
},
"bundleDependencies": false,
"dependencies": {
- "boom": "5.x.x"
+ "boom": "2.x.x"
},
"deprecated": false,
"description": "General purpose crypto utilities",
"devDependencies": {
- "code": "4.x.x",
- "lab": "13.x.x"
+ "code": "1.x.x",
+ "lab": "5.x.x"
},
"engines": {
- "node": ">=4.0.0"
+ "node": ">=0.10.40"
},
"homepage": "https://github.com/hapijs/cryptiles#readme",
"keywords": [
@@ -57,5 +55,5 @@
"test": "lab -a code -t 100 -L",
"test-cov-html": "lab -a code -r html -o coverage.html"
},
- "version": "3.1.2"
+ "version": "2.0.5"
}
diff --git a/deps/npm/node_modules/cryptiles/test/index.js b/deps/npm/node_modules/cryptiles/test/index.js
new file mode 100755
index 0000000000..170393f9b5
--- /dev/null
+++ b/deps/npm/node_modules/cryptiles/test/index.js
@@ -0,0 +1,102 @@
+// Load modules
+
+var Code = require('code');
+var Cryptiles = require('..');
+var Lab = require('lab');
+
+
+// Declare internals
+
+var internals = {};
+
+
+// Test shortcuts
+
+var lab = exports.lab = Lab.script();
+var describe = lab.describe;
+var it = lab.it;
+var expect = Code.expect;
+
+
+describe('randomString()', function () {
+
+ it('should generate the right length string', function (done) {
+
+ for (var i = 1; i <= 1000; ++i) {
+ expect(Cryptiles.randomString(i).length).to.equal(i);
+ }
+
+ done();
+ });
+
+ it('returns an error on invalid bits size', function (done) {
+
+ expect(Cryptiles.randomString(99999999999999999999).message).to.match(/Failed generating random bits/);
+ done();
+ });
+});
+
+describe('randomBits()', function () {
+
+ it('returns an error on invalid input', function (done) {
+
+ expect(Cryptiles.randomBits(0).message).to.equal('Invalid random bits count');
+ done();
+ });
+});
+
+describe('fixedTimeComparison()', function () {
+
+ var a = Cryptiles.randomString(50000);
+ var b = Cryptiles.randomString(150000);
+
+ it('should take the same amount of time comparing different string sizes', function (done) {
+
+ var now = Date.now();
+ Cryptiles.fixedTimeComparison(b, a);
+ var t1 = Date.now() - now;
+
+ now = Date.now();
+ Cryptiles.fixedTimeComparison(b, b);
+ var t2 = Date.now() - now;
+
+ expect(t2 - t1).to.be.within(-20, 20);
+ done();
+ });
+
+ it('should return true for equal strings', function (done) {
+
+ expect(Cryptiles.fixedTimeComparison(a, a)).to.equal(true);
+ done();
+ });
+
+ it('should return false for different strings (size, a < b)', function (done) {
+
+ expect(Cryptiles.fixedTimeComparison(a, a + 'x')).to.equal(false);
+ done();
+ });
+
+ it('should return false for different strings (size, a > b)', function (done) {
+
+ expect(Cryptiles.fixedTimeComparison(a + 'x', a)).to.equal(false);
+ done();
+ });
+
+ it('should return false for different strings (size, a = b)', function (done) {
+
+ expect(Cryptiles.fixedTimeComparison(a + 'x', a + 'y')).to.equal(false);
+ done();
+ });
+
+ it('should return false when not a string', function (done) {
+
+ expect(Cryptiles.fixedTimeComparison('x', null)).to.equal(false);
+ done();
+ });
+
+ it('should return false when not a string (left)', function (done) {
+
+ expect(Cryptiles.fixedTimeComparison(null, 'x')).to.equal(false);
+ done();
+ });
+});
diff --git a/deps/npm/node_modules/dashdash/node_modules/assert-plus/AUTHORS b/deps/npm/node_modules/dashdash/node_modules/assert-plus/AUTHORS
new file mode 100644
index 0000000000..1923524fe4
--- /dev/null
+++ b/deps/npm/node_modules/dashdash/node_modules/assert-plus/AUTHORS
@@ -0,0 +1,6 @@
+Dave Eddy <dave@daveeddy.com>
+Fred Kuo <fred.kuo@joyent.com>
+Lars-Magnus Skog <ralphtheninja@riseup.net>
+Mark Cavage <mcavage@gmail.com>
+Patrick Mooney <pmooney@pfmooney.com>
+Rob Gulewich <robert.gulewich@joyent.com>
diff --git a/deps/npm/node_modules/dashdash/node_modules/assert-plus/CHANGES.md b/deps/npm/node_modules/dashdash/node_modules/assert-plus/CHANGES.md
new file mode 100644
index 0000000000..57d92bfdb9
--- /dev/null
+++ b/deps/npm/node_modules/dashdash/node_modules/assert-plus/CHANGES.md
@@ -0,0 +1,14 @@
+# assert-plus Changelog
+
+## 1.0.0
+
+- *BREAKING* assert.number (and derivatives) now accept Infinity as valid input
+- Add assert.finite check. Previous assert.number callers should use this if
+ they expect Infinity inputs to throw.
+
+## 0.2.0
+
+- Fix `assert.object(null)` so it throws
+- Fix optional/arrayOf exports for non-type-of asserts
+- Add optiona/arrayOf exports for Stream/Date/Regex/uuid
+- Add basic unit test coverage
diff --git a/deps/npm/node_modules/dashdash/node_modules/assert-plus/README.md b/deps/npm/node_modules/dashdash/node_modules/assert-plus/README.md
new file mode 100644
index 0000000000..ec200d161e
--- /dev/null
+++ b/deps/npm/node_modules/dashdash/node_modules/assert-plus/README.md
@@ -0,0 +1,162 @@
+# assert-plus
+
+This library is a super small wrapper over node's assert module that has two
+things: (1) the ability to disable assertions with the environment variable
+NODE\_NDEBUG, and (2) some API wrappers for argument testing. Like
+`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks
+like this:
+
+```javascript
+ var assert = require('assert-plus');
+
+ function fooAccount(options, callback) {
+ assert.object(options, 'options');
+ assert.number(options.id, 'options.id');
+ assert.bool(options.isManager, 'options.isManager');
+ assert.string(options.name, 'options.name');
+ assert.arrayOfString(options.email, 'options.email');
+ assert.func(callback, 'callback');
+
+ // Do stuff
+ callback(null, {});
+ }
+```
+
+# API
+
+All methods that *aren't* part of node's core assert API are simply assumed to
+take an argument, and then a string 'name' that's not a message; `AssertionError`
+will be thrown if the assertion fails with a message like:
+
+ AssertionError: foo (string) is required
+ at test (/home/mark/work/foo/foo.js:3:9)
+ at Object.<anonymous> (/home/mark/work/foo/foo.js:15:1)
+ at Module._compile (module.js:446:26)
+ at Object..js (module.js:464:10)
+ at Module.load (module.js:353:31)
+ at Function._load (module.js:311:12)
+ at Array.0 (module.js:484:10)
+ at EventEmitter._tickCallback (node.js:190:38)
+
+from:
+
+```javascript
+ function test(foo) {
+ assert.string(foo, 'foo');
+ }
+```
+
+There you go. You can check that arrays are of a homogeneous type with `Arrayof$Type`:
+
+```javascript
+ function test(foo) {
+ assert.arrayOfString(foo, 'foo');
+ }
+```
+
+You can assert IFF an argument is not `undefined` (i.e., an optional arg):
+
+```javascript
+ assert.optionalString(foo, 'foo');
+```
+
+Lastly, you can opt-out of assertion checking altogether by setting the
+environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have
+lots of assertions, and don't want to pay `typeof ()` taxes to v8 in
+production. Be advised: The standard functions re-exported from `assert` are
+also disabled in assert-plus if NDEBUG is specified. Using them directly from
+the `assert` module avoids this behavior.
+
+The complete list of APIs is:
+
+* assert.array
+* assert.bool
+* assert.buffer
+* assert.func
+* assert.number
+* assert.finite
+* assert.object
+* assert.string
+* assert.stream
+* assert.date
+* assert.regexp
+* assert.uuid
+* assert.arrayOfArray
+* assert.arrayOfBool
+* assert.arrayOfBuffer
+* assert.arrayOfFunc
+* assert.arrayOfNumber
+* assert.arrayOfFinite
+* assert.arrayOfObject
+* assert.arrayOfString
+* assert.arrayOfStream
+* assert.arrayOfDate
+* assert.arrayOfRegexp
+* assert.arrayOfUuid
+* assert.optionalArray
+* assert.optionalBool
+* assert.optionalBuffer
+* assert.optionalFunc
+* assert.optionalNumber
+* assert.optionalFinite
+* assert.optionalObject
+* assert.optionalString
+* assert.optionalStream
+* assert.optionalDate
+* assert.optionalRegexp
+* assert.optionalUuid
+* assert.optionalArrayOfArray
+* assert.optionalArrayOfBool
+* assert.optionalArrayOfBuffer
+* assert.optionalArrayOfFunc
+* assert.optionalArrayOfNumber
+* assert.optionalArrayOfFinite
+* assert.optionalArrayOfObject
+* assert.optionalArrayOfString
+* assert.optionalArrayOfStream
+* assert.optionalArrayOfDate
+* assert.optionalArrayOfRegexp
+* assert.optionalArrayOfUuid
+* assert.AssertionError
+* assert.fail
+* assert.ok
+* assert.equal
+* assert.notEqual
+* assert.deepEqual
+* assert.notDeepEqual
+* assert.strictEqual
+* assert.notStrictEqual
+* assert.throws
+* assert.doesNotThrow
+* assert.ifError
+
+# Installation
+
+ npm install assert-plus
+
+## License
+
+The MIT License (MIT)
+Copyright (c) 2012 Mark Cavage
+
+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.
+
+## Bugs
+
+See <https://github.com/mcavage/node-assert-plus/issues>.
diff --git a/deps/npm/node_modules/dashdash/node_modules/assert-plus/assert.js b/deps/npm/node_modules/dashdash/node_modules/assert-plus/assert.js
new file mode 100644
index 0000000000..26f944eec3
--- /dev/null
+++ b/deps/npm/node_modules/dashdash/node_modules/assert-plus/assert.js
@@ -0,0 +1,211 @@
+// Copyright (c) 2012, Mark Cavage. All rights reserved.
+// Copyright 2015 Joyent, Inc.
+
+var assert = require('assert');
+var Stream = require('stream').Stream;
+var util = require('util');
+
+
+///--- Globals
+
+/* JSSTYLED */
+var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
+
+
+///--- Internal
+
+function _capitalize(str) {
+ return (str.charAt(0).toUpperCase() + str.slice(1));
+}
+
+function _toss(name, expected, oper, arg, actual) {
+ throw new assert.AssertionError({
+ message: util.format('%s (%s) is required', name, expected),
+ actual: (actual === undefined) ? typeof (arg) : actual(arg),
+ expected: expected,
+ operator: oper || '===',
+ stackStartFunction: _toss.caller
+ });
+}
+
+function _getClass(arg) {
+ return (Object.prototype.toString.call(arg).slice(8, -1));
+}
+
+function noop() {
+ // Why even bother with asserts?
+}
+
+
+///--- Exports
+
+var types = {
+ bool: {
+ check: function (arg) { return typeof (arg) === 'boolean'; }
+ },
+ func: {
+ check: function (arg) { return typeof (arg) === 'function'; }
+ },
+ string: {
+ check: function (arg) { return typeof (arg) === 'string'; }
+ },
+ object: {
+ check: function (arg) {
+ return typeof (arg) === 'object' && arg !== null;
+ }
+ },
+ number: {
+ check: function (arg) {
+ return typeof (arg) === 'number' && !isNaN(arg);
+ }
+ },
+ finite: {
+ check: function (arg) {
+ return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg);
+ }
+ },
+ buffer: {
+ check: function (arg) { return Buffer.isBuffer(arg); },
+ operator: 'Buffer.isBuffer'
+ },
+ array: {
+ check: function (arg) { return Array.isArray(arg); },
+ operator: 'Array.isArray'
+ },
+ stream: {
+ check: function (arg) { return arg instanceof Stream; },
+ operator: 'instanceof',
+ actual: _getClass
+ },
+ date: {
+ check: function (arg) { return arg instanceof Date; },
+ operator: 'instanceof',
+ actual: _getClass
+ },
+ regexp: {
+ check: function (arg) { return arg instanceof RegExp; },
+ operator: 'instanceof',
+ actual: _getClass
+ },
+ uuid: {
+ check: function (arg) {
+ return typeof (arg) === 'string' && UUID_REGEXP.test(arg);
+ },
+ operator: 'isUUID'
+ }
+};
+
+function _setExports(ndebug) {
+ var keys = Object.keys(types);
+ var out;
+
+ /* re-export standard assert */
+ if (process.env.NODE_NDEBUG) {
+ out = noop;
+ } else {
+ out = function (arg, msg) {
+ if (!arg) {
+ _toss(msg, 'true', arg);
+ }
+ };
+ }
+
+ /* standard checks */
+ keys.forEach(function (k) {
+ if (ndebug) {
+ out[k] = noop;
+ return;
+ }
+ var type = types[k];
+ out[k] = function (arg, msg) {
+ if (!type.check(arg)) {
+ _toss(msg, k, type.operator, arg, type.actual);
+ }
+ };
+ });
+
+ /* optional checks */
+ keys.forEach(function (k) {
+ var name = 'optional' + _capitalize(k);
+ if (ndebug) {
+ out[name] = noop;
+ return;
+ }
+ var type = types[k];
+ out[name] = function (arg, msg) {
+ if (arg === undefined || arg === null) {
+ return;
+ }
+ if (!type.check(arg)) {
+ _toss(msg, k, type.operator, arg, type.actual);
+ }
+ };
+ });
+
+ /* arrayOf checks */
+ keys.forEach(function (k) {
+ var name = 'arrayOf' + _capitalize(k);
+ if (ndebug) {
+ out[name] = noop;
+ return;
+ }
+ var type = types[k];
+ var expected = '[' + k + ']';
+ out[name] = function (arg, msg) {
+ if (!Array.isArray(arg)) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ var i;
+ for (i = 0; i < arg.length; i++) {
+ if (!type.check(arg[i])) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ }
+ };
+ });
+
+ /* optionalArrayOf checks */
+ keys.forEach(function (k) {
+ var name = 'optionalArrayOf' + _capitalize(k);
+ if (ndebug) {
+ out[name] = noop;
+ return;
+ }
+ var type = types[k];
+ var expected = '[' + k + ']';
+ out[name] = function (arg, msg) {
+ if (arg === undefined || arg === null) {
+ return;
+ }
+ if (!Array.isArray(arg)) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ var i;
+ for (i = 0; i < arg.length; i++) {
+ if (!type.check(arg[i])) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ }
+ };
+ });
+
+ /* re-export built-in assertions */
+ Object.keys(assert).forEach(function (k) {
+ if (k === 'AssertionError') {
+ out[k] = assert[k];
+ return;
+ }
+ if (ndebug) {
+ out[k] = noop;
+ return;
+ }
+ out[k] = assert[k];
+ });
+
+ /* export ourselves (for unit tests _only_) */
+ out._setExports = _setExports;
+
+ return out;
+}
+
+module.exports = _setExports(process.env.NODE_NDEBUG);
diff --git a/deps/npm/node_modules/dashdash/node_modules/assert-plus/package.json b/deps/npm/node_modules/dashdash/node_modules/assert-plus/package.json
new file mode 100644
index 0000000000..f84344a3f3
--- /dev/null
+++ b/deps/npm/node_modules/dashdash/node_modules/assert-plus/package.json
@@ -0,0 +1,82 @@
+{
+ "_from": "assert-plus@^1.0.0",
+ "_id": "assert-plus@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+ "_location": "/dashdash/assert-plus",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "assert-plus@^1.0.0",
+ "name": "assert-plus",
+ "escapedName": "assert-plus",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/dashdash"
+ ],
+ "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+ "_shasum": "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525",
+ "_spec": "assert-plus@^1.0.0",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/dashdash",
+ "author": {
+ "name": "Mark Cavage",
+ "email": "mcavage@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/mcavage/node-assert-plus/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Dave Eddy",
+ "email": "dave@daveeddy.com"
+ },
+ {
+ "name": "Fred Kuo",
+ "email": "fred.kuo@joyent.com"
+ },
+ {
+ "name": "Lars-Magnus Skog",
+ "email": "ralphtheninja@riseup.net"
+ },
+ {
+ "name": "Mark Cavage",
+ "email": "mcavage@gmail.com"
+ },
+ {
+ "name": "Patrick Mooney",
+ "email": "pmooney@pfmooney.com"
+ },
+ {
+ "name": "Rob Gulewich",
+ "email": "robert.gulewich@joyent.com"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Extra assertions on top of node's assert module",
+ "devDependencies": {
+ "faucet": "0.0.1",
+ "tape": "4.2.2"
+ },
+ "engines": {
+ "node": ">=0.8"
+ },
+ "homepage": "https://github.com/mcavage/node-assert-plus#readme",
+ "license": "MIT",
+ "main": "./assert.js",
+ "name": "assert-plus",
+ "optionalDependencies": {},
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mcavage/node-assert-plus.git"
+ },
+ "scripts": {
+ "test": "tape tests/*.js | ./node_modules/.bin/faucet"
+ },
+ "version": "1.0.0"
+}
diff --git a/deps/npm/node_modules/fast-deep-equal/README.md b/deps/npm/node_modules/fast-deep-equal/README.md
deleted file mode 100644
index ee83edd454..0000000000
--- a/deps/npm/node_modules/fast-deep-equal/README.md
+++ /dev/null
@@ -1,55 +0,0 @@
-# fast-deep-equal
-The fastest deep equal
-
-[![Build Status](https://travis-ci.org/epoberezkin/fast-deep-equal.svg?branch=master)](https://travis-ci.org/epoberezkin/fast-deep-equal)
-[![npm version](https://badge.fury.io/js/fast-deep-equal.svg)](http://badge.fury.io/js/fast-deep-equal)
-[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/fast-deep-equal/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/fast-deep-equal?branch=master)
-
-
-## Install
-
-```bash
-npm install fast-deep-equal
-```
-
-
-## Features
-
-- ES5 compatible
-- works in node.js (0.10+) and browsers (IE9+)
-- checks equality of Date and RegExp objects by value.
-
-
-## Usage
-
-```javascript
-var equal = require('fast-deep-equal');
-console.log(equal({foo: 'bar'}, {foo: 'bar'})); // true
-```
-
-
-## Performance benchmark
-
-```
-fast-deep-equal x 82,915 ops/sec ±0.63% (89 runs sampled)
-nano-equal x 50,506 ops/sec ±2.23% (86 runs sampled)
-shallow-equal-fuzzy x 14,873 ops/sec ±3.19% (83 runs sampled)
-underscore.isEqual x 16,055 ops/sec ±2.29% (85 runs sampled)
-lodash.isEqual x 10,740 ops/sec ±1.04% (89 runs sampled)
-deep-equal x 12,276 ops/sec ±2.44% (84 runs sampled)
-deep-eql x 10,565 ops/sec ±0.89% (90 runs sampled)
-assert.deepStrictEqual x 965 ops/sec ±2.99% (81 runs sampled)
-The fastest is fast-deep-equal
-```
-
-To run benchmark (requires node.js 6+):
-
-```bash
-npm install
-node benchmark
-```
-
-
-## License
-
-[MIT](https://github.com/epoberezkin/fast-deep-equal/blob/master/LICENSE)
diff --git a/deps/npm/node_modules/fast-deep-equal/index.d.ts b/deps/npm/node_modules/fast-deep-equal/index.d.ts
deleted file mode 100644
index 3c042caa7d..0000000000
--- a/deps/npm/node_modules/fast-deep-equal/index.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-declare module 'fast-deep-equal' {
- const equal: (a: any, b: any) => boolean;
- export = equal;
-}
diff --git a/deps/npm/node_modules/fast-deep-equal/index.js b/deps/npm/node_modules/fast-deep-equal/index.js
deleted file mode 100644
index 7aaaba3f6c..0000000000
--- a/deps/npm/node_modules/fast-deep-equal/index.js
+++ /dev/null
@@ -1,55 +0,0 @@
-'use strict';
-
-var isArray = Array.isArray;
-var keyList = Object.keys;
-var hasProp = Object.prototype.hasOwnProperty;
-
-module.exports = function equal(a, b) {
- if (a === b) return true;
-
- var arrA = isArray(a)
- , arrB = isArray(b)
- , i
- , length
- , key;
-
- if (arrA && arrB) {
- length = a.length;
- if (length != b.length) return false;
- for (i = 0; i < length; i++)
- if (!equal(a[i], b[i])) return false;
- return true;
- }
-
- if (arrA != arrB) return false;
-
- var dateA = a instanceof Date
- , dateB = b instanceof Date;
- if (dateA != dateB) return false;
- if (dateA && dateB) return a.getTime() == b.getTime();
-
- var regexpA = a instanceof RegExp
- , regexpB = b instanceof RegExp;
- if (regexpA != regexpB) return false;
- if (regexpA && regexpB) return a.toString() == b.toString();
-
- if (a instanceof Object && b instanceof Object) {
- var keys = keyList(a);
- length = keys.length;
-
- if (length !== keyList(b).length)
- return false;
-
- for (i = 0; i < length; i++)
- if (!hasProp.call(b, keys[i])) return false;
-
- for (i = 0; i < length; i++) {
- key = keys[i];
- if (!equal(a[key], b[key])) return false;
- }
-
- return true;
- }
-
- return false;
-};
diff --git a/deps/npm/node_modules/fast-deep-equal/package.json b/deps/npm/node_modules/fast-deep-equal/package.json
deleted file mode 100644
index d084012d2d..0000000000
--- a/deps/npm/node_modules/fast-deep-equal/package.json
+++ /dev/null
@@ -1,85 +0,0 @@
-{
- "_from": "fast-deep-equal@^1.0.0",
- "_id": "fast-deep-equal@1.1.0",
- "_inBundle": false,
- "_integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=",
- "_location": "/fast-deep-equal",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "fast-deep-equal@^1.0.0",
- "name": "fast-deep-equal",
- "escapedName": "fast-deep-equal",
- "rawSpec": "^1.0.0",
- "saveSpec": null,
- "fetchSpec": "^1.0.0"
- },
- "_requiredBy": [
- "/ajv"
- ],
- "_resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
- "_shasum": "c053477817c86b51daa853c81e059b733d023614",
- "_spec": "fast-deep-equal@^1.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/ajv",
- "author": {
- "name": "Evgeny Poberezkin"
- },
- "bugs": {
- "url": "https://github.com/epoberezkin/fast-deep-equal/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Fast deep equal",
- "devDependencies": {
- "benchmark": "^2.1.4",
- "coveralls": "^2.13.1",
- "deep-eql": "^2.0.2",
- "deep-equal": "^1.0.1",
- "eslint": "^4.0.0",
- "lodash": "^4.17.4",
- "mocha": "^3.4.2",
- "nano-equal": "^1.0.1",
- "nyc": "^11.0.2",
- "pre-commit": "^1.2.2",
- "shallow-equal-fuzzy": "0.0.2",
- "typescript": "^2.6.1",
- "underscore": "^1.8.3"
- },
- "files": [
- "index.js",
- "index.d.ts"
- ],
- "homepage": "https://github.com/epoberezkin/fast-deep-equal#readme",
- "keywords": [
- "fast",
- "equal",
- "deep-equal"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "fast-deep-equal",
- "nyc": {
- "exclude": [
- "**/spec/**",
- "node_modules"
- ],
- "reporter": [
- "lcov",
- "text-summary"
- ]
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/epoberezkin/fast-deep-equal.git"
- },
- "scripts": {
- "eslint": "eslint *.js benchmark spec",
- "test": "npm run eslint && npm run test-ts && npm run test-cov",
- "test-cov": "nyc npm run test-spec",
- "test-spec": "mocha spec/*.spec.js -R spec",
- "test-ts": "tsc --target ES5 --noImplicitAny index.d.ts"
- },
- "types": "index.d.ts",
- "version": "1.1.0"
-}
diff --git a/deps/npm/node_modules/fast-json-stable-stringify/.eslintrc.yml b/deps/npm/node_modules/fast-json-stable-stringify/.eslintrc.yml
deleted file mode 100644
index 1c77b0d479..0000000000
--- a/deps/npm/node_modules/fast-json-stable-stringify/.eslintrc.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-extends: eslint:recommended
-env:
- node: true
- browser: true
-rules:
- block-scoped-var: 2
- callback-return: 2
- dot-notation: 2
- indent: 2
- linebreak-style: [2, unix]
- new-cap: 2
- no-console: [2, allow: [warn, error]]
- no-else-return: 2
- no-eq-null: 2
- no-fallthrough: 2
- no-invalid-this: 2
- no-return-assign: 2
- no-shadow: 1
- no-trailing-spaces: 2
- no-use-before-define: [2, nofunc]
- quotes: [2, single, avoid-escape]
- semi: [2, always]
- strict: [2, global]
- valid-jsdoc: [2, requireReturn: false]
- no-control-regex: 0
- no-useless-escape: 2
diff --git a/deps/npm/node_modules/fast-json-stable-stringify/.npmignore b/deps/npm/node_modules/fast-json-stable-stringify/.npmignore
deleted file mode 100644
index 899d7360ba..0000000000
--- a/deps/npm/node_modules/fast-json-stable-stringify/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-node_modules
-.nyc_output/
-coverage/
-.DS_Store
diff --git a/deps/npm/node_modules/fast-json-stable-stringify/.travis.yml b/deps/npm/node_modules/fast-json-stable-stringify/.travis.yml
deleted file mode 100644
index 7ddce74b84..0000000000
--- a/deps/npm/node_modules/fast-json-stable-stringify/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
- - "4"
- - "6"
- - "7"
- - "8"
-after_script:
- - coveralls < coverage/lcov.info
diff --git a/deps/npm/node_modules/fast-json-stable-stringify/README.md b/deps/npm/node_modules/fast-json-stable-stringify/README.md
deleted file mode 100644
index 0f43b4a7e0..0000000000
--- a/deps/npm/node_modules/fast-json-stable-stringify/README.md
+++ /dev/null
@@ -1,119 +0,0 @@
-# fast-json-stable-stringify
-
-Deterministic `JSON.stringify()` - a faster version of [@substack](https://github.com/substack)'s json-stable-strigify without [jsonify](https://github.com/substack/jsonify).
-
-You can also pass in a custom comparison function.
-
-[![Build Status](https://travis-ci.org/epoberezkin/fast-json-stable-stringify.svg?branch=master)](https://travis-ci.org/epoberezkin/fast-json-stable-stringify)
-[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/fast-json-stable-stringify/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/fast-json-stable-stringify?branch=master)
-
-# example
-
-``` js
-var stringify = require('fast-json-stable-stringify');
-var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
-console.log(stringify(obj));
-```
-
-output:
-
-```
-{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}
-```
-
-
-# methods
-
-``` js
-var stringify = require('fast-json-stable-stringify')
-```
-
-## var str = stringify(obj, opts)
-
-Return a deterministic stringified string `str` from the object `obj`.
-
-
-## options
-
-### cmp
-
-If `opts` is given, you can supply an `opts.cmp` to have a custom comparison
-function for object keys. Your function `opts.cmp` is called with these
-parameters:
-
-``` js
-opts.cmp({ key: akey, value: avalue }, { key: bkey, value: bvalue })
-```
-
-For example, to sort on the object key names in reverse order you could write:
-
-``` js
-var stringify = require('fast-json-stable-stringify');
-
-var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
-var s = stringify(obj, function (a, b) {
- return a.key < b.key ? 1 : -1;
-});
-console.log(s);
-```
-
-which results in the output string:
-
-```
-{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}
-```
-
-Or if you wanted to sort on the object values in reverse order, you could write:
-
-```
-var stringify = require('fast-json-stable-stringify');
-
-var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 };
-var s = stringify(obj, function (a, b) {
- return a.value < b.value ? 1 : -1;
-});
-console.log(s);
-```
-
-which outputs:
-
-```
-{"d":6,"c":5,"b":[{"z":3,"y":2,"x":1},9],"a":10}
-```
-
-### cycles
-
-Pass `true` in `opts.cycles` to stringify circular property as `__cycle__` - the result will not be a valid JSON string in this case.
-
-TypeError will be thrown in case of circular object without this option.
-
-
-# install
-
-With [npm](https://npmjs.org) do:
-
-```
-npm install fast-json-stable-stringify
-```
-
-
-# benchmark
-
-To run benchmark (requires Node.js 6+):
-```
-node benchmark
-```
-
-Results:
-```
-fast-json-stable-stringify x 17,189 ops/sec ±1.43% (83 runs sampled)
-json-stable-stringify x 13,634 ops/sec ±1.39% (85 runs sampled)
-fast-stable-stringify x 20,212 ops/sec ±1.20% (84 runs sampled)
-faster-stable-stringify x 15,549 ops/sec ±1.12% (84 runs sampled)
-The fastest is fast-stable-stringify
-```
-
-
-# license
-
-[MIT](https://github.com/epoberezkin/fast-json-stable-stringify/blob/master/LICENSE)
diff --git a/deps/npm/node_modules/fast-json-stable-stringify/benchmark/index.js b/deps/npm/node_modules/fast-json-stable-stringify/benchmark/index.js
deleted file mode 100644
index e725f9fc5f..0000000000
--- a/deps/npm/node_modules/fast-json-stable-stringify/benchmark/index.js
+++ /dev/null
@@ -1,31 +0,0 @@
-'use strict';
-
-const Benchmark = require('benchmark');
-const suite = new Benchmark.Suite;
-const testData = require('./test.json');
-
-
-const stringifyPackages = {
- // 'JSON.stringify': JSON.stringify,
- 'fast-json-stable-stringify': require('../index'),
- 'json-stable-stringify': true,
- 'fast-stable-stringify': true,
- 'faster-stable-stringify': true
-};
-
-
-for (const name in stringifyPackages) {
- let func = stringifyPackages[name];
- if (func === true) func = require(name);
-
- suite.add(name, function() {
- func(testData);
- });
-}
-
-suite
- .on('cycle', (event) => console.log(String(event.target)))
- .on('complete', function () {
- console.log('The fastest is ' + this.filter('fastest').map('name'));
- })
- .run({async: true});
diff --git a/deps/npm/node_modules/fast-json-stable-stringify/benchmark/test.json b/deps/npm/node_modules/fast-json-stable-stringify/benchmark/test.json
deleted file mode 100644
index c9118c11f5..0000000000
--- a/deps/npm/node_modules/fast-json-stable-stringify/benchmark/test.json
+++ /dev/null
@@ -1,137 +0,0 @@
-[
- {
- "_id": "59ef4a83ee8364808d761beb",
- "index": 0,
- "guid": "e50ffae9-7128-4148-9ee5-40c3fc523c5d",
- "isActive": false,
- "balance": "$2,341.81",
- "picture": "http://placehold.it/32x32",
- "age": 28,
- "eyeColor": "brown",
- "name": "Carey Savage",
- "gender": "female",
- "company": "VERAQ",
- "email": "careysavage@veraq.com",
- "phone": "+1 (897) 574-3014",
- "address": "458 Willow Street, Henrietta, California, 7234",
- "about": "Nisi reprehenderit nulla ad officia pariatur non dolore laboris irure cupidatat laborum. Minim eu ex Lorem adipisicing exercitation irure minim sunt est enim mollit incididunt voluptate nulla. Ut mollit anim reprehenderit et aliqua ex esse aliquip. Aute sit duis deserunt do incididunt consequat minim qui dolor commodo deserunt et voluptate.\r\n",
- "registered": "2014-05-21T01:56:51 -01:00",
- "latitude": 63.89502,
- "longitude": 62.369807,
- "tags": [
- "nostrud",
- "nisi",
- "consectetur",
- "ullamco",
- "cupidatat",
- "culpa",
- "commodo"
- ],
- "friends": [
- {
- "id": 0,
- "name": "Henry Walls"
- },
- {
- "id": 1,
- "name": "Janice Baker"
- },
- {
- "id": 2,
- "name": "Russell Bush"
- }
- ],
- "greeting": "Hello, Carey Savage! You have 4 unread messages.",
- "favoriteFruit": "banana"
- },
- {
- "_id": "59ef4a83ff5774a691454e89",
- "index": 1,
- "guid": "2bee9efc-4095-4c2e-87ef-d08c8054c89d",
- "isActive": true,
- "balance": "$1,618.15",
- "picture": "http://placehold.it/32x32",
- "age": 35,
- "eyeColor": "blue",
- "name": "Elinor Pearson",
- "gender": "female",
- "company": "FLEXIGEN",
- "email": "elinorpearson@flexigen.com",
- "phone": "+1 (923) 548-3751",
- "address": "600 Bayview Avenue, Draper, Montana, 3088",
- "about": "Mollit commodo ea sit Lorem velit. Irure anim esse Lorem sint quis officia ut. Aliqua nisi dolore in aute deserunt mollit ex ea in mollit.\r\n",
- "registered": "2017-04-22T07:58:41 -01:00",
- "latitude": -87.824919,
- "longitude": 69.538927,
- "tags": [
- "fugiat",
- "labore",
- "proident",
- "quis",
- "eiusmod",
- "qui",
- "est"
- ],
- "friends": [
- {
- "id": 0,
- "name": "Massey Wagner"
- },
- {
- "id": 1,
- "name": "Marcella Ferrell"
- },
- {
- "id": 2,
- "name": "Evans Mckee"
- }
- ],
- "greeting": "Hello, Elinor Pearson! You have 3 unread messages.",
- "favoriteFruit": "strawberry"
- },
- {
- "_id": "59ef4a839ec8a4be4430b36b",
- "index": 2,
- "guid": "ddd6e8c0-95bd-416d-8b46-a768d6363809",
- "isActive": false,
- "balance": "$2,046.95",
- "picture": "http://placehold.it/32x32",
- "age": 40,
- "eyeColor": "green",
- "name": "Irwin Davidson",
- "gender": "male",
- "company": "DANJA",
- "email": "irwindavidson@danja.com",
- "phone": "+1 (883) 537-2041",
- "address": "439 Cook Street, Chapin, Kentucky, 7398",
- "about": "Irure velit non commodo aliqua exercitation ut nostrud minim magna. Dolor ad ad ut irure eu. Non pariatur dolor eiusmod ipsum do et exercitation cillum. Et amet laboris minim eiusmod ullamco magna ea reprehenderit proident sunt.\r\n",
- "registered": "2016-09-01T07:49:08 -01:00",
- "latitude": -49.803812,
- "longitude": 104.93279,
- "tags": [
- "consequat",
- "enim",
- "quis",
- "magna",
- "est",
- "culpa",
- "tempor"
- ],
- "friends": [
- {
- "id": 0,
- "name": "Ruth Hansen"
- },
- {
- "id": 1,
- "name": "Kathrine Austin"
- },
- {
- "id": 2,
- "name": "Rivera Munoz"
- }
- ],
- "greeting": "Hello, Irwin Davidson! You have 2 unread messages.",
- "favoriteFruit": "banana"
- }
-]
diff --git a/deps/npm/node_modules/fast-json-stable-stringify/index.js b/deps/npm/node_modules/fast-json-stable-stringify/index.js
deleted file mode 100644
index c44e6a4137..0000000000
--- a/deps/npm/node_modules/fast-json-stable-stringify/index.js
+++ /dev/null
@@ -1,59 +0,0 @@
-'use strict';
-
-module.exports = function (data, opts) {
- if (!opts) opts = {};
- if (typeof opts === 'function') opts = { cmp: opts };
- var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false;
-
- 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 (node) {
- if (node && node.toJSON && typeof node.toJSON === 'function') {
- node = node.toJSON();
- }
-
- if (node === undefined) return;
- if (typeof node == 'number') return isFinite(node) ? '' + node : 'null';
- if (typeof node !== 'object') return JSON.stringify(node);
-
- var i, out;
- if (Array.isArray(node)) {
- out = '[';
- for (i = 0; i < node.length; i++) {
- if (i) out += ',';
- out += stringify(node[i]) || 'null';
- }
- return out + ']';
- }
-
- if (node === null) return 'null';
-
- if (seen.indexOf(node) !== -1) {
- if (cycles) return JSON.stringify('__cycle__');
- throw new TypeError('Converting circular structure to JSON');
- }
-
- var seenIndex = seen.push(node) - 1;
- var keys = Object.keys(node).sort(cmp && cmp(node));
- out = '';
- for (i = 0; i < keys.length; i++) {
- var key = keys[i];
- var value = stringify(node[key]);
-
- if (!value) continue;
- if (out) out += ',';
- out += JSON.stringify(key) + ':' + value;
- }
- seen.splice(seenIndex, 1);
- return '{' + out + '}';
- })(data);
-};
diff --git a/deps/npm/node_modules/fast-json-stable-stringify/package.json b/deps/npm/node_modules/fast-json-stable-stringify/package.json
deleted file mode 100644
index 965546480e..0000000000
--- a/deps/npm/node_modules/fast-json-stable-stringify/package.json
+++ /dev/null
@@ -1,78 +0,0 @@
-{
- "_from": "fast-json-stable-stringify@^2.0.0",
- "_id": "fast-json-stable-stringify@2.0.0",
- "_inBundle": false,
- "_integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=",
- "_location": "/fast-json-stable-stringify",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "fast-json-stable-stringify@^2.0.0",
- "name": "fast-json-stable-stringify",
- "escapedName": "fast-json-stable-stringify",
- "rawSpec": "^2.0.0",
- "saveSpec": null,
- "fetchSpec": "^2.0.0"
- },
- "_requiredBy": [
- "/ajv"
- ],
- "_resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
- "_shasum": "d5142c0caee6b1189f87d3a76111064f86c8bbf2",
- "_spec": "fast-json-stable-stringify@^2.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/ajv",
- "author": {
- "name": "James Halliday",
- "email": "mail@substack.net",
- "url": "http://substack.net"
- },
- "bugs": {
- "url": "https://github.com/epoberezkin/fast-json-stable-stringify/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "deterministic `JSON.stringify()` - a faster version of substack's json-stable-strigify without jsonify",
- "devDependencies": {
- "benchmark": "^2.1.4",
- "coveralls": "^3.0.0",
- "eslint": "^4.9.0",
- "fast-stable-stringify": "latest",
- "faster-stable-stringify": "latest",
- "json-stable-stringify": "latest",
- "nyc": "^11.2.1",
- "pre-commit": "^1.2.2",
- "tape": "~1.0.4"
- },
- "homepage": "https://github.com/epoberezkin/fast-json-stable-stringify",
- "keywords": [
- "json",
- "stringify",
- "deterministic",
- "hash",
- "stable"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "fast-json-stable-stringify",
- "nyc": {
- "exclude": [
- "test",
- "node_modules"
- ],
- "reporter": [
- "lcov",
- "text-summary"
- ]
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/epoberezkin/fast-json-stable-stringify.git"
- },
- "scripts": {
- "eslint": "eslint index.js test",
- "test": "npm run eslint && nyc npm run test-spec",
- "test-spec": "tape test/*.js"
- },
- "version": "2.0.0"
-}
diff --git a/deps/npm/node_modules/fast-json-stable-stringify/test/str.js b/deps/npm/node_modules/fast-json-stable-stringify/test/str.js
deleted file mode 100644
index 99a9ade18b..0000000000
--- a/deps/npm/node_modules/fast-json-stable-stringify/test/str.js
+++ /dev/null
@@ -1,46 +0,0 @@
-'use strict';
-
-var test = require('tape');
-var stringify = require('../');
-
-test('simple object', function (t) {
- t.plan(1);
- var obj = { c: 6, b: [4,5], a: 3, z: null };
- t.equal(stringify(obj), '{"a":3,"b":[4,5],"c":6,"z":null}');
-});
-
-test('object with undefined', function (t) {
- t.plan(1);
- var obj = { a: 3, z: undefined };
- t.equal(stringify(obj), '{"a":3}');
-});
-
-test('object with null', function (t) {
- t.plan(1);
- var obj = { a: 3, z: null };
- t.equal(stringify(obj), '{"a":3,"z":null}');
-});
-
-test('object with NaN and Infinity', function (t) {
- t.plan(1);
- var obj = { a: 3, b: NaN, c: Infinity };
- t.equal(stringify(obj), '{"a":3,"b":null,"c":null}');
-});
-
-test('array with undefined', function (t) {
- t.plan(1);
- var obj = [4, undefined, 6];
- t.equal(stringify(obj), '[4,null,6]');
-});
-
-test('object with empty string', function (t) {
- t.plan(1);
- var obj = { a: 3, z: '' };
- t.equal(stringify(obj), '{"a":3,"z":""}');
-});
-
-test('array with empty string', function (t) {
- t.plan(1);
- var obj = [4, '', 6];
- t.equal(stringify(obj), '[4,"",6]');
-});
diff --git a/deps/npm/node_modules/form-data/README.md b/deps/npm/node_modules/form-data/README.md
index cb421fbb40..78ef315ff0 100644
--- a/deps/npm/node_modules/form-data/README.md
+++ b/deps/npm/node_modules/form-data/README.md
@@ -6,11 +6,11 @@ The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface]
[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface
-[![Linux Build](https://img.shields.io/travis/form-data/form-data/v2.3.2.svg?label=linux:4.x-9.x)](https://travis-ci.org/form-data/form-data)
-[![MacOS Build](https://img.shields.io/travis/form-data/form-data/v2.3.2.svg?label=macos:4.x-9.x)](https://travis-ci.org/form-data/form-data)
-[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/form-data/v2.3.2.svg?label=windows:4.x-9.x)](https://ci.appveyor.com/project/alexindigo/form-data)
+[![Linux Build](https://img.shields.io/travis/form-data/form-data/v2.1.4.svg?label=linux:0.12-6.x)](https://travis-ci.org/form-data/form-data)
+[![MacOS Build](https://img.shields.io/travis/form-data/form-data/v2.1.4.svg?label=macos:0.12-6.x)](https://travis-ci.org/form-data/form-data)
+[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/form-data/v2.1.4.svg?label=windows:0.12-6.x)](https://ci.appveyor.com/project/alexindigo/form-data)
-[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/v2.3.2.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master)
+[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/v2.1.4.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master)
[![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data)
[![bitHound Overall Score](https://www.bithound.io/github/form-data/form-data/badges/score.svg)](https://www.bithound.io/github/form-data/form-data)
@@ -75,20 +75,6 @@ form.submit('http://example.org/', function(err, res) {
For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods.
-### Custom options
-
-You can provide custom options, such as `maxDataSize`:
-
-``` javascript
-var FormData = require('form-data');
-
-var form = new FormData({ maxDataSize: 20971520 });
-form.append('my_field', 'my value');
-form.append('my_buffer', /* something big */);
-```
-
-List of available options could be found in [combined-stream](https://github.com/felixge/node-combined-stream/blob/master/lib/combined_stream.js#L7-L15)
-
### Alternative submission methods
You can use node's http client interface:
@@ -146,9 +132,8 @@ someModule.stream(function(err, stdout, stderr) {
var form = new FormData();
form.append('file', stdout, {
- filename: 'unicycle.jpg', // ... or:
- filepath: 'photos/toys/unicycle.jpg',
- contentType: 'image/jpeg',
+ filename: 'unicycle.jpg',
+ contentType: 'image/jpg',
knownLength: 19806
});
@@ -159,8 +144,6 @@ someModule.stream(function(err, stdout, stderr) {
});
```
-The `filepath` property overrides `filename` and may contain a relative path. This is typically used when uploading [multiple files from a directory](https://wicg.github.io/entries-api/#dom-htmlinputelement-webkitdirectory).
-
For edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter:
``` javascript
diff --git a/deps/npm/node_modules/form-data/README.md.bak b/deps/npm/node_modules/form-data/README.md.bak
deleted file mode 100644
index 0524d60288..0000000000
--- a/deps/npm/node_modules/form-data/README.md.bak
+++ /dev/null
@@ -1,234 +0,0 @@
-# Form-Data [![NPM Module](https://img.shields.io/npm/v/form-data.svg)](https://www.npmjs.com/package/form-data) [![Join the chat at https://gitter.im/form-data/form-data](http://form-data.github.io/images/gitterbadge.svg)](https://gitter.im/form-data/form-data)
-
-A library to create readable ```"multipart/form-data"``` streams. Can be used to submit forms and file uploads to other web applications.
-
-The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd].
-
-[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface
-
-[![Linux Build](https://img.shields.io/travis/form-data/form-data/master.svg?label=linux:4.x-9.x)](https://travis-ci.org/form-data/form-data)
-[![MacOS Build](https://img.shields.io/travis/form-data/form-data/master.svg?label=macos:4.x-9.x)](https://travis-ci.org/form-data/form-data)
-[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/form-data/master.svg?label=windows:4.x-9.x)](https://ci.appveyor.com/project/alexindigo/form-data)
-
-[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/master.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master)
-[![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data)
-[![bitHound Overall Score](https://www.bithound.io/github/form-data/form-data/badges/score.svg)](https://www.bithound.io/github/form-data/form-data)
-
-## Install
-
-```
-npm install --save form-data
-```
-
-## Usage
-
-In this example we are constructing a form with 3 fields that contain a string,
-a buffer and a file stream.
-
-``` javascript
-var FormData = require('form-data');
-var fs = require('fs');
-
-var form = new FormData();
-form.append('my_field', 'my value');
-form.append('my_buffer', new Buffer(10));
-form.append('my_file', fs.createReadStream('/foo/bar.jpg'));
-```
-
-Also you can use http-response stream:
-
-``` javascript
-var FormData = require('form-data');
-var http = require('http');
-
-var form = new FormData();
-
-http.request('http://nodejs.org/images/logo.png', function(response) {
- form.append('my_field', 'my value');
- form.append('my_buffer', new Buffer(10));
- form.append('my_logo', response);
-});
-```
-
-Or @mikeal's [request](https://github.com/request/request) stream:
-
-``` javascript
-var FormData = require('form-data');
-var request = require('request');
-
-var form = new FormData();
-
-form.append('my_field', 'my value');
-form.append('my_buffer', new Buffer(10));
-form.append('my_logo', request('http://nodejs.org/images/logo.png'));
-```
-
-In order to submit this form to a web application, call ```submit(url, [callback])``` method:
-
-``` javascript
-form.submit('http://example.org/', function(err, res) {
- // res – response object (http.IncomingMessage) //
- res.resume();
-});
-
-```
-
-For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods.
-
-### Custom options
-
-You can provide custom options, such as `maxDataSize`:
-
-``` javascript
-var FormData = require('form-data');
-
-var form = new FormData({ maxDataSize: 20971520 });
-form.append('my_field', 'my value');
-form.append('my_buffer', /* something big */);
-```
-
-List of available options could be found in [combined-stream](https://github.com/felixge/node-combined-stream/blob/master/lib/combined_stream.js#L7-L15)
-
-### Alternative submission methods
-
-You can use node's http client interface:
-
-``` javascript
-var http = require('http');
-
-var request = http.request({
- method: 'post',
- host: 'example.org',
- path: '/upload',
- headers: form.getHeaders()
-});
-
-form.pipe(request);
-
-request.on('response', function(res) {
- console.log(res.statusCode);
-});
-```
-
-Or if you would prefer the `'Content-Length'` header to be set for you:
-
-``` javascript
-form.submit('example.org/upload', function(err, res) {
- console.log(res.statusCode);
-});
-```
-
-To use custom headers and pre-known length in parts:
-
-``` javascript
-var CRLF = '\r\n';
-var form = new FormData();
-
-var options = {
- header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF,
- knownLength: 1
-};
-
-form.append('my_buffer', buffer, options);
-
-form.submit('http://example.com/', function(err, res) {
- if (err) throw err;
- console.log('Done');
-});
-```
-
-Form-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide "file"-related information manually:
-
-``` javascript
-someModule.stream(function(err, stdout, stderr) {
- if (err) throw err;
-
- var form = new FormData();
-
- form.append('file', stdout, {
- filename: 'unicycle.jpg', // ... or:
- filepath: 'photos/toys/unicycle.jpg',
- contentType: 'image/jpeg',
- knownLength: 19806
- });
-
- form.submit('http://example.com/', function(err, res) {
- if (err) throw err;
- console.log('Done');
- });
-});
-```
-
-The `filepath` property overrides `filename` and may contain a relative path. This is typically used when uploading [multiple files from a directory](https://wicg.github.io/entries-api/#dom-htmlinputelement-webkitdirectory).
-
-For edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter:
-
-``` javascript
-form.submit({
- host: 'example.com',
- path: '/probably.php?extra=params',
- auth: 'username:password'
-}, function(err, res) {
- console.log(res.statusCode);
-});
-```
-
-In case you need to also send custom HTTP headers with the POST request, you can use the `headers` key in first parameter of `form.submit()`:
-
-``` javascript
-form.submit({
- host: 'example.com',
- path: '/surelynot.php',
- headers: {'x-test-header': 'test-header-value'}
-}, function(err, res) {
- console.log(res.statusCode);
-});
-```
-
-### Integration with other libraries
-
-#### Request
-
-Form submission using [request](https://github.com/request/request):
-
-```javascript
-var formData = {
- my_field: 'my_value',
- my_file: fs.createReadStream(__dirname + '/unicycle.jpg'),
-};
-
-request.post({url:'http://service.com/upload', formData: formData}, function(err, httpResponse, body) {
- if (err) {
- return console.error('upload failed:', err);
- }
- console.log('Upload successful! Server responded with:', body);
-});
-```
-
-For more details see [request readme](https://github.com/request/request#multipartform-data-multipart-form-uploads).
-
-#### node-fetch
-
-You can also submit a form using [node-fetch](https://github.com/bitinn/node-fetch):
-
-```javascript
-var form = new FormData();
-
-form.append('a', 1);
-
-fetch('http://example.com', { method: 'POST', body: form })
- .then(function(res) {
- return res.json();
- }).then(function(json) {
- console.log(json);
- });
-```
-
-## Notes
-
-- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround.
-- Starting version `2.x` FormData has dropped support for `node@0.10.x`.
-
-## License
-
-Form-Data is released under the [MIT](License) license.
diff --git a/deps/npm/node_modules/form-data/lib/form_data.js b/deps/npm/node_modules/form-data/lib/form_data.js
index 3a1bb82b11..79aa0f9f51 100644
--- a/deps/npm/node_modules/form-data/lib/form_data.js
+++ b/deps/npm/node_modules/form-data/lib/form_data.js
@@ -21,9 +21,8 @@ util.inherits(FormData, CombinedStream);
* and file uploads to other web applications.
*
* @constructor
- * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream
*/
-function FormData(options) {
+function FormData() {
if (!(this instanceof FormData)) {
return new FormData();
}
@@ -33,11 +32,6 @@ function FormData(options) {
this._valuesToMeasure = [];
CombinedStream.call(this);
-
- options = options || {};
- for (var option in options) {
- this[option] = options[option];
- }
}
FormData.LINE_BREAK = '\r\n';
@@ -192,7 +186,6 @@ FormData.prototype._multiPartHeader = function(field, value, options) {
var header;
for (var prop in headers) {
- if (!headers.hasOwnProperty(prop)) continue;
header = headers[prop];
// skip nullish headers.
@@ -216,25 +209,20 @@ FormData.prototype._multiPartHeader = function(field, value, options) {
FormData.prototype._getContentDisposition = function(value, options) {
- var filename
- , contentDisposition
- ;
+ var contentDisposition;
+
+ // custom filename takes precedence
+ // fs- and request- streams have path property
+ // formidable and the browser add a name property.
+ var filename = options.filename || value.name || value.path;
- if (typeof options.filepath === 'string') {
- // custom filepath for relative paths
- filename = path.normalize(options.filepath).replace(/\\/g, '/');
- } else if (options.filename || value.name || value.path) {
- // custom filename take precedence
- // formidable and the browser add a name property
- // fs- and request- streams have path property
- filename = path.basename(options.filename || value.name || value.path);
- } else if (value.readable && value.hasOwnProperty('httpVersion')) {
- // or try http response
- filename = path.basename(value.client._httpMessage.path);
+ // or try http response
+ if (!filename && value.readable && value.hasOwnProperty('httpVersion')) {
+ filename = value.client._httpMessage.path;
}
if (filename) {
- contentDisposition = 'filename="' + filename + '"';
+ contentDisposition = 'filename="' + path.basename(filename) + '"';
}
return contentDisposition;
@@ -260,9 +248,9 @@ FormData.prototype._getContentType = function(value, options) {
contentType = value.headers['content-type'];
}
- // or guess it from the filepath or filename
- if (!contentType && (options.filepath || options.filename)) {
- contentType = mime.lookup(options.filepath || options.filename);
+ // or guess it from the filename
+ if (!contentType && options.filename) {
+ contentType = mime.lookup(options.filename);
}
// fallback to the default content type if `value` is not simple value
@@ -400,8 +388,7 @@ FormData.prototype.submit = function(params, cb) {
options = populate({
port: params.port,
path: params.pathname,
- host: params.hostname,
- protocol: params.protocol
+ host: params.hostname
}, defaults);
// use custom params
diff --git a/deps/npm/node_modules/form-data/package.json b/deps/npm/node_modules/form-data/package.json
index f5ac03c1bb..338703b99d 100644
--- a/deps/npm/node_modules/form-data/package.json
+++ b/deps/npm/node_modules/form-data/package.json
@@ -1,27 +1,27 @@
{
- "_from": "form-data@~2.3.1",
- "_id": "form-data@2.3.2",
+ "_from": "form-data@~2.1.1",
+ "_id": "form-data@2.1.4",
"_inBundle": false,
- "_integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=",
+ "_integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=",
"_location": "/form-data",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "form-data@~2.3.1",
+ "raw": "form-data@~2.1.1",
"name": "form-data",
"escapedName": "form-data",
- "rawSpec": "~2.3.1",
+ "rawSpec": "~2.1.1",
"saveSpec": null,
- "fetchSpec": "~2.3.1"
+ "fetchSpec": "~2.1.1"
},
"_requiredBy": [
"/request"
],
- "_resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz",
- "_shasum": "4970498be604c20c005d4f5c23aecd21d6b49099",
- "_spec": "form-data@~2.3.1",
- "_where": "/Users/rebecca/code/npm/node_modules/request",
+ "_resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz",
+ "_shasum": "33c183acf193276ecaa98143a69e94bfee1750d1",
+ "_spec": "form-data@~2.1.1",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/request",
"author": {
"name": "Felix Geisendörfer",
"email": "felix@debuggable.com",
@@ -34,7 +34,7 @@
"bundleDependencies": false,
"dependencies": {
"asynckit": "^0.4.0",
- "combined-stream": "1.0.6",
+ "combined-stream": "^1.0.5",
"mime-types": "^2.1.12"
},
"deprecated": false,
@@ -94,5 +94,5 @@
"test": "istanbul cover test/run.js",
"update-readme": "sed -i.bak 's/\\/master\\.svg/\\/v'$(npm --silent run get-version)'.svg/g' README.md"
},
- "version": "2.3.2"
+ "version": "2.1.4"
}
diff --git a/deps/npm/node_modules/gauge/node_modules/ansi-regex/index.js b/deps/npm/node_modules/gauge/node_modules/ansi-regex/index.js
deleted file mode 100644
index b9574ed7e8..0000000000
--- a/deps/npm/node_modules/gauge/node_modules/ansi-regex/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-module.exports = function () {
- return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g;
-};
diff --git a/deps/npm/node_modules/gauge/node_modules/ansi-regex/license b/deps/npm/node_modules/gauge/node_modules/ansi-regex/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/gauge/node_modules/ansi-regex/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/index.js b/deps/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/index.js
deleted file mode 100644
index a7d3e3855f..0000000000
--- a/deps/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/index.js
+++ /dev/null
@@ -1,46 +0,0 @@
-'use strict';
-var numberIsNan = require('number-is-nan');
-
-module.exports = function (x) {
- if (numberIsNan(x)) {
- return false;
- }
-
- // https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1369
-
- // code points are derived from:
- // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
- if (x >= 0x1100 && (
- x <= 0x115f || // Hangul Jamo
- 0x2329 === x || // LEFT-POINTING ANGLE BRACKET
- 0x232a === x || // RIGHT-POINTING ANGLE BRACKET
- // CJK Radicals Supplement .. Enclosed CJK Letters and Months
- (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) ||
- // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
- 0x3250 <= x && x <= 0x4dbf ||
- // CJK Unified Ideographs .. Yi Radicals
- 0x4e00 <= x && x <= 0xa4c6 ||
- // Hangul Jamo Extended-A
- 0xa960 <= x && x <= 0xa97c ||
- // Hangul Syllables
- 0xac00 <= x && x <= 0xd7a3 ||
- // CJK Compatibility Ideographs
- 0xf900 <= x && x <= 0xfaff ||
- // Vertical Forms
- 0xfe10 <= x && x <= 0xfe19 ||
- // CJK Compatibility Forms .. Small Form Variants
- 0xfe30 <= x && x <= 0xfe6b ||
- // Halfwidth and Fullwidth Forms
- 0xff01 <= x && x <= 0xff60 ||
- 0xffe0 <= x && x <= 0xffe6 ||
- // Kana Supplement
- 0x1b000 <= x && x <= 0x1b001 ||
- // Enclosed Ideographic Supplement
- 0x1f200 <= x && x <= 0x1f251 ||
- // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
- 0x20000 <= x && x <= 0x3fffd)) {
- return true;
- }
-
- return false;
-}
diff --git a/deps/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/license b/deps/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/gauge/node_modules/strip-ansi/index.js b/deps/npm/node_modules/gauge/node_modules/strip-ansi/index.js
deleted file mode 100644
index 099480fbfc..0000000000
--- a/deps/npm/node_modules/gauge/node_modules/strip-ansi/index.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-var ansiRegex = require('ansi-regex')();
-
-module.exports = function (str) {
- return typeof str === 'string' ? str.replace(ansiRegex, '') : str;
-};
diff --git a/deps/npm/node_modules/gauge/node_modules/strip-ansi/license b/deps/npm/node_modules/gauge/node_modules/strip-ansi/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/gauge/node_modules/strip-ansi/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/gauge/node_modules/strip-ansi/package.json b/deps/npm/node_modules/gauge/node_modules/strip-ansi/package.json
deleted file mode 100644
index cc7b988613..0000000000
--- a/deps/npm/node_modules/gauge/node_modules/strip-ansi/package.json
+++ /dev/null
@@ -1,102 +0,0 @@
-{
- "_from": "strip-ansi@^3.0.1",
- "_id": "strip-ansi@3.0.1",
- "_inBundle": false,
- "_integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
- "_location": "/gauge/strip-ansi",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "strip-ansi@^3.0.1",
- "name": "strip-ansi",
- "escapedName": "strip-ansi",
- "rawSpec": "^3.0.1",
- "saveSpec": null,
- "fetchSpec": "^3.0.1"
- },
- "_requiredBy": [
- "/gauge",
- "/gauge/string-width"
- ],
- "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "_shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf",
- "_spec": "strip-ansi@^3.0.1",
- "_where": "/Users/rebecca/code/npm/node_modules/gauge",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/chalk/strip-ansi/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "ansi-regex": "^2.0.0"
- },
- "deprecated": false,
- "description": "Strip ANSI escape codes",
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/chalk/strip-ansi#readme",
- "keywords": [
- "strip",
- "trim",
- "remove",
- "ansi",
- "styles",
- "color",
- "colour",
- "colors",
- "terminal",
- "console",
- "string",
- "tty",
- "escape",
- "formatting",
- "rgb",
- "256",
- "shell",
- "xterm",
- "log",
- "logging",
- "command-line",
- "text"
- ],
- "license": "MIT",
- "maintainers": [
- {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- {
- "name": "Joshua Boy Nicolai Appelman",
- "email": "joshua@jbna.nl",
- "url": "jbna.nl"
- },
- {
- "name": "JD Ballard",
- "email": "i.am.qix@gmail.com",
- "url": "github.com/qix-"
- }
- ],
- "name": "strip-ansi",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/chalk/strip-ansi.git"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "version": "3.0.1"
-}
diff --git a/deps/npm/node_modules/gauge/node_modules/strip-ansi/readme.md b/deps/npm/node_modules/gauge/node_modules/strip-ansi/readme.md
deleted file mode 100644
index cb7d9ff7ee..0000000000
--- a/deps/npm/node_modules/gauge/node_modules/strip-ansi/readme.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi)
-
-> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
-
-
-## Install
-
-```
-$ npm install --save strip-ansi
-```
-
-
-## Usage
-
-```js
-var stripAnsi = require('strip-ansi');
-
-stripAnsi('\u001b[4mcake\u001b[0m');
-//=> 'cake'
-```
-
-
-## Related
-
-- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module
-- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
-- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
-- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/getpass/node_modules/assert-plus/AUTHORS b/deps/npm/node_modules/getpass/node_modules/assert-plus/AUTHORS
new file mode 100644
index 0000000000..1923524fe4
--- /dev/null
+++ b/deps/npm/node_modules/getpass/node_modules/assert-plus/AUTHORS
@@ -0,0 +1,6 @@
+Dave Eddy <dave@daveeddy.com>
+Fred Kuo <fred.kuo@joyent.com>
+Lars-Magnus Skog <ralphtheninja@riseup.net>
+Mark Cavage <mcavage@gmail.com>
+Patrick Mooney <pmooney@pfmooney.com>
+Rob Gulewich <robert.gulewich@joyent.com>
diff --git a/deps/npm/node_modules/getpass/node_modules/assert-plus/CHANGES.md b/deps/npm/node_modules/getpass/node_modules/assert-plus/CHANGES.md
new file mode 100644
index 0000000000..57d92bfdb9
--- /dev/null
+++ b/deps/npm/node_modules/getpass/node_modules/assert-plus/CHANGES.md
@@ -0,0 +1,14 @@
+# assert-plus Changelog
+
+## 1.0.0
+
+- *BREAKING* assert.number (and derivatives) now accept Infinity as valid input
+- Add assert.finite check. Previous assert.number callers should use this if
+ they expect Infinity inputs to throw.
+
+## 0.2.0
+
+- Fix `assert.object(null)` so it throws
+- Fix optional/arrayOf exports for non-type-of asserts
+- Add optiona/arrayOf exports for Stream/Date/Regex/uuid
+- Add basic unit test coverage
diff --git a/deps/npm/node_modules/getpass/node_modules/assert-plus/README.md b/deps/npm/node_modules/getpass/node_modules/assert-plus/README.md
new file mode 100644
index 0000000000..ec200d161e
--- /dev/null
+++ b/deps/npm/node_modules/getpass/node_modules/assert-plus/README.md
@@ -0,0 +1,162 @@
+# assert-plus
+
+This library is a super small wrapper over node's assert module that has two
+things: (1) the ability to disable assertions with the environment variable
+NODE\_NDEBUG, and (2) some API wrappers for argument testing. Like
+`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks
+like this:
+
+```javascript
+ var assert = require('assert-plus');
+
+ function fooAccount(options, callback) {
+ assert.object(options, 'options');
+ assert.number(options.id, 'options.id');
+ assert.bool(options.isManager, 'options.isManager');
+ assert.string(options.name, 'options.name');
+ assert.arrayOfString(options.email, 'options.email');
+ assert.func(callback, 'callback');
+
+ // Do stuff
+ callback(null, {});
+ }
+```
+
+# API
+
+All methods that *aren't* part of node's core assert API are simply assumed to
+take an argument, and then a string 'name' that's not a message; `AssertionError`
+will be thrown if the assertion fails with a message like:
+
+ AssertionError: foo (string) is required
+ at test (/home/mark/work/foo/foo.js:3:9)
+ at Object.<anonymous> (/home/mark/work/foo/foo.js:15:1)
+ at Module._compile (module.js:446:26)
+ at Object..js (module.js:464:10)
+ at Module.load (module.js:353:31)
+ at Function._load (module.js:311:12)
+ at Array.0 (module.js:484:10)
+ at EventEmitter._tickCallback (node.js:190:38)
+
+from:
+
+```javascript
+ function test(foo) {
+ assert.string(foo, 'foo');
+ }
+```
+
+There you go. You can check that arrays are of a homogeneous type with `Arrayof$Type`:
+
+```javascript
+ function test(foo) {
+ assert.arrayOfString(foo, 'foo');
+ }
+```
+
+You can assert IFF an argument is not `undefined` (i.e., an optional arg):
+
+```javascript
+ assert.optionalString(foo, 'foo');
+```
+
+Lastly, you can opt-out of assertion checking altogether by setting the
+environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have
+lots of assertions, and don't want to pay `typeof ()` taxes to v8 in
+production. Be advised: The standard functions re-exported from `assert` are
+also disabled in assert-plus if NDEBUG is specified. Using them directly from
+the `assert` module avoids this behavior.
+
+The complete list of APIs is:
+
+* assert.array
+* assert.bool
+* assert.buffer
+* assert.func
+* assert.number
+* assert.finite
+* assert.object
+* assert.string
+* assert.stream
+* assert.date
+* assert.regexp
+* assert.uuid
+* assert.arrayOfArray
+* assert.arrayOfBool
+* assert.arrayOfBuffer
+* assert.arrayOfFunc
+* assert.arrayOfNumber
+* assert.arrayOfFinite
+* assert.arrayOfObject
+* assert.arrayOfString
+* assert.arrayOfStream
+* assert.arrayOfDate
+* assert.arrayOfRegexp
+* assert.arrayOfUuid
+* assert.optionalArray
+* assert.optionalBool
+* assert.optionalBuffer
+* assert.optionalFunc
+* assert.optionalNumber
+* assert.optionalFinite
+* assert.optionalObject
+* assert.optionalString
+* assert.optionalStream
+* assert.optionalDate
+* assert.optionalRegexp
+* assert.optionalUuid
+* assert.optionalArrayOfArray
+* assert.optionalArrayOfBool
+* assert.optionalArrayOfBuffer
+* assert.optionalArrayOfFunc
+* assert.optionalArrayOfNumber
+* assert.optionalArrayOfFinite
+* assert.optionalArrayOfObject
+* assert.optionalArrayOfString
+* assert.optionalArrayOfStream
+* assert.optionalArrayOfDate
+* assert.optionalArrayOfRegexp
+* assert.optionalArrayOfUuid
+* assert.AssertionError
+* assert.fail
+* assert.ok
+* assert.equal
+* assert.notEqual
+* assert.deepEqual
+* assert.notDeepEqual
+* assert.strictEqual
+* assert.notStrictEqual
+* assert.throws
+* assert.doesNotThrow
+* assert.ifError
+
+# Installation
+
+ npm install assert-plus
+
+## License
+
+The MIT License (MIT)
+Copyright (c) 2012 Mark Cavage
+
+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.
+
+## Bugs
+
+See <https://github.com/mcavage/node-assert-plus/issues>.
diff --git a/deps/npm/node_modules/getpass/node_modules/assert-plus/assert.js b/deps/npm/node_modules/getpass/node_modules/assert-plus/assert.js
new file mode 100644
index 0000000000..26f944eec3
--- /dev/null
+++ b/deps/npm/node_modules/getpass/node_modules/assert-plus/assert.js
@@ -0,0 +1,211 @@
+// Copyright (c) 2012, Mark Cavage. All rights reserved.
+// Copyright 2015 Joyent, Inc.
+
+var assert = require('assert');
+var Stream = require('stream').Stream;
+var util = require('util');
+
+
+///--- Globals
+
+/* JSSTYLED */
+var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
+
+
+///--- Internal
+
+function _capitalize(str) {
+ return (str.charAt(0).toUpperCase() + str.slice(1));
+}
+
+function _toss(name, expected, oper, arg, actual) {
+ throw new assert.AssertionError({
+ message: util.format('%s (%s) is required', name, expected),
+ actual: (actual === undefined) ? typeof (arg) : actual(arg),
+ expected: expected,
+ operator: oper || '===',
+ stackStartFunction: _toss.caller
+ });
+}
+
+function _getClass(arg) {
+ return (Object.prototype.toString.call(arg).slice(8, -1));
+}
+
+function noop() {
+ // Why even bother with asserts?
+}
+
+
+///--- Exports
+
+var types = {
+ bool: {
+ check: function (arg) { return typeof (arg) === 'boolean'; }
+ },
+ func: {
+ check: function (arg) { return typeof (arg) === 'function'; }
+ },
+ string: {
+ check: function (arg) { return typeof (arg) === 'string'; }
+ },
+ object: {
+ check: function (arg) {
+ return typeof (arg) === 'object' && arg !== null;
+ }
+ },
+ number: {
+ check: function (arg) {
+ return typeof (arg) === 'number' && !isNaN(arg);
+ }
+ },
+ finite: {
+ check: function (arg) {
+ return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg);
+ }
+ },
+ buffer: {
+ check: function (arg) { return Buffer.isBuffer(arg); },
+ operator: 'Buffer.isBuffer'
+ },
+ array: {
+ check: function (arg) { return Array.isArray(arg); },
+ operator: 'Array.isArray'
+ },
+ stream: {
+ check: function (arg) { return arg instanceof Stream; },
+ operator: 'instanceof',
+ actual: _getClass
+ },
+ date: {
+ check: function (arg) { return arg instanceof Date; },
+ operator: 'instanceof',
+ actual: _getClass
+ },
+ regexp: {
+ check: function (arg) { return arg instanceof RegExp; },
+ operator: 'instanceof',
+ actual: _getClass
+ },
+ uuid: {
+ check: function (arg) {
+ return typeof (arg) === 'string' && UUID_REGEXP.test(arg);
+ },
+ operator: 'isUUID'
+ }
+};
+
+function _setExports(ndebug) {
+ var keys = Object.keys(types);
+ var out;
+
+ /* re-export standard assert */
+ if (process.env.NODE_NDEBUG) {
+ out = noop;
+ } else {
+ out = function (arg, msg) {
+ if (!arg) {
+ _toss(msg, 'true', arg);
+ }
+ };
+ }
+
+ /* standard checks */
+ keys.forEach(function (k) {
+ if (ndebug) {
+ out[k] = noop;
+ return;
+ }
+ var type = types[k];
+ out[k] = function (arg, msg) {
+ if (!type.check(arg)) {
+ _toss(msg, k, type.operator, arg, type.actual);
+ }
+ };
+ });
+
+ /* optional checks */
+ keys.forEach(function (k) {
+ var name = 'optional' + _capitalize(k);
+ if (ndebug) {
+ out[name] = noop;
+ return;
+ }
+ var type = types[k];
+ out[name] = function (arg, msg) {
+ if (arg === undefined || arg === null) {
+ return;
+ }
+ if (!type.check(arg)) {
+ _toss(msg, k, type.operator, arg, type.actual);
+ }
+ };
+ });
+
+ /* arrayOf checks */
+ keys.forEach(function (k) {
+ var name = 'arrayOf' + _capitalize(k);
+ if (ndebug) {
+ out[name] = noop;
+ return;
+ }
+ var type = types[k];
+ var expected = '[' + k + ']';
+ out[name] = function (arg, msg) {
+ if (!Array.isArray(arg)) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ var i;
+ for (i = 0; i < arg.length; i++) {
+ if (!type.check(arg[i])) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ }
+ };
+ });
+
+ /* optionalArrayOf checks */
+ keys.forEach(function (k) {
+ var name = 'optionalArrayOf' + _capitalize(k);
+ if (ndebug) {
+ out[name] = noop;
+ return;
+ }
+ var type = types[k];
+ var expected = '[' + k + ']';
+ out[name] = function (arg, msg) {
+ if (arg === undefined || arg === null) {
+ return;
+ }
+ if (!Array.isArray(arg)) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ var i;
+ for (i = 0; i < arg.length; i++) {
+ if (!type.check(arg[i])) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ }
+ };
+ });
+
+ /* re-export built-in assertions */
+ Object.keys(assert).forEach(function (k) {
+ if (k === 'AssertionError') {
+ out[k] = assert[k];
+ return;
+ }
+ if (ndebug) {
+ out[k] = noop;
+ return;
+ }
+ out[k] = assert[k];
+ });
+
+ /* export ourselves (for unit tests _only_) */
+ out._setExports = _setExports;
+
+ return out;
+}
+
+module.exports = _setExports(process.env.NODE_NDEBUG);
diff --git a/deps/npm/node_modules/getpass/node_modules/assert-plus/package.json b/deps/npm/node_modules/getpass/node_modules/assert-plus/package.json
new file mode 100644
index 0000000000..eab20ba1ea
--- /dev/null
+++ b/deps/npm/node_modules/getpass/node_modules/assert-plus/package.json
@@ -0,0 +1,82 @@
+{
+ "_from": "assert-plus@^1.0.0",
+ "_id": "assert-plus@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+ "_location": "/getpass/assert-plus",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "assert-plus@^1.0.0",
+ "name": "assert-plus",
+ "escapedName": "assert-plus",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/getpass"
+ ],
+ "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+ "_shasum": "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525",
+ "_spec": "assert-plus@^1.0.0",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/getpass",
+ "author": {
+ "name": "Mark Cavage",
+ "email": "mcavage@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/mcavage/node-assert-plus/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Dave Eddy",
+ "email": "dave@daveeddy.com"
+ },
+ {
+ "name": "Fred Kuo",
+ "email": "fred.kuo@joyent.com"
+ },
+ {
+ "name": "Lars-Magnus Skog",
+ "email": "ralphtheninja@riseup.net"
+ },
+ {
+ "name": "Mark Cavage",
+ "email": "mcavage@gmail.com"
+ },
+ {
+ "name": "Patrick Mooney",
+ "email": "pmooney@pfmooney.com"
+ },
+ {
+ "name": "Rob Gulewich",
+ "email": "robert.gulewich@joyent.com"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Extra assertions on top of node's assert module",
+ "devDependencies": {
+ "faucet": "0.0.1",
+ "tape": "4.2.2"
+ },
+ "engines": {
+ "node": ">=0.8"
+ },
+ "homepage": "https://github.com/mcavage/node-assert-plus#readme",
+ "license": "MIT",
+ "main": "./assert.js",
+ "name": "assert-plus",
+ "optionalDependencies": {},
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mcavage/node-assert-plus.git"
+ },
+ "scripts": {
+ "test": "tape tests/*.js | ./node_modules/.bin/faucet"
+ },
+ "version": "1.0.0"
+}
diff --git a/deps/npm/node_modules/har-schema/lib/afterRequest.json b/deps/npm/node_modules/har-schema/lib/afterRequest.json
index 5f52581549..0ae5a69d97 100644
--- a/deps/npm/node_modules/har-schema/lib/afterRequest.json
+++ b/deps/npm/node_modules/har-schema/lib/afterRequest.json
@@ -1,6 +1,5 @@
{
- "$id": "afterRequest.json#",
- "$schema": "http://json-schema.org/draft-06/schema#",
+ "id": "afterRequest.json#",
"type": "object",
"optional": true,
"required": [
diff --git a/deps/npm/node_modules/har-schema/lib/beforeRequest.json b/deps/npm/node_modules/har-schema/lib/beforeRequest.json
index c7b5c1016a..20f2ca117c 100644
--- a/deps/npm/node_modules/har-schema/lib/beforeRequest.json
+++ b/deps/npm/node_modules/har-schema/lib/beforeRequest.json
@@ -1,6 +1,5 @@
{
- "$id": "beforeRequest.json#",
- "$schema": "http://json-schema.org/draft-06/schema#",
+ "id": "beforeRequest.json#",
"type": "object",
"optional": true,
"required": [
diff --git a/deps/npm/node_modules/har-schema/lib/browser.json b/deps/npm/node_modules/har-schema/lib/browser.json
index d6869f75ac..dd8bff4f4c 100644
--- a/deps/npm/node_modules/har-schema/lib/browser.json
+++ b/deps/npm/node_modules/har-schema/lib/browser.json
@@ -1,6 +1,5 @@
{
- "$id": "browser.json#",
- "$schema": "http://json-schema.org/draft-06/schema#",
+ "id": "browser.json#",
"type": "object",
"required": [
"name",
diff --git a/deps/npm/node_modules/har-schema/lib/cache.json b/deps/npm/node_modules/har-schema/lib/cache.json
index 30a7182eb9..d95e461456 100644
--- a/deps/npm/node_modules/har-schema/lib/cache.json
+++ b/deps/npm/node_modules/har-schema/lib/cache.json
@@ -1,6 +1,5 @@
{
- "$id": "cache.json#",
- "$schema": "http://json-schema.org/draft-06/schema#",
+ "id": "cache.json#",
"properties": {
"beforeRequest": {
"oneOf": [
diff --git a/deps/npm/node_modules/har-schema/lib/content.json b/deps/npm/node_modules/har-schema/lib/content.json
index 43944bfa18..7aece620da 100644
--- a/deps/npm/node_modules/har-schema/lib/content.json
+++ b/deps/npm/node_modules/har-schema/lib/content.json
@@ -1,6 +1,5 @@
{
- "$id": "content.json#",
- "$schema": "http://json-schema.org/draft-06/schema#",
+ "id": "content.json#",
"type": "object",
"required": [
"size",
diff --git a/deps/npm/node_modules/har-schema/lib/cookie.json b/deps/npm/node_modules/har-schema/lib/cookie.json
index 661f7f32ac..ec1dcf1753 100644
--- a/deps/npm/node_modules/har-schema/lib/cookie.json
+++ b/deps/npm/node_modules/har-schema/lib/cookie.json
@@ -1,6 +1,5 @@
{
- "$id": "cookie.json#",
- "$schema": "http://json-schema.org/draft-06/schema#",
+ "id": "cookie.json#",
"type": "object",
"required": [
"name",
diff --git a/deps/npm/node_modules/har-schema/lib/creator.json b/deps/npm/node_modules/har-schema/lib/creator.json
index 71a75cd414..003a06aeec 100644
--- a/deps/npm/node_modules/har-schema/lib/creator.json
+++ b/deps/npm/node_modules/har-schema/lib/creator.json
@@ -1,6 +1,5 @@
{
- "$id": "creator.json#",
- "$schema": "http://json-schema.org/draft-06/schema#",
+ "id": "creator.json#",
"type": "object",
"required": [
"name",
diff --git a/deps/npm/node_modules/har-schema/lib/entry.json b/deps/npm/node_modules/har-schema/lib/entry.json
index 18025f4337..d97a8f2248 100644
--- a/deps/npm/node_modules/har-schema/lib/entry.json
+++ b/deps/npm/node_modules/har-schema/lib/entry.json
@@ -1,6 +1,5 @@
{
- "$id": "entry.json#",
- "$schema": "http://json-schema.org/draft-06/schema#",
+ "id": "entry.json#",
"type": "object",
"optional": true,
"required": [
diff --git a/deps/npm/node_modules/har-schema/lib/har.json b/deps/npm/node_modules/har-schema/lib/har.json
index d1a1de551c..faeadede2f 100644
--- a/deps/npm/node_modules/har-schema/lib/har.json
+++ b/deps/npm/node_modules/har-schema/lib/har.json
@@ -1,6 +1,5 @@
{
- "$id": "har.json#",
- "$schema": "http://json-schema.org/draft-06/schema#",
+ "id": "har.json#",
"type": "object",
"required": [
"log"
diff --git a/deps/npm/node_modules/har-schema/lib/header.json b/deps/npm/node_modules/har-schema/lib/header.json
index 103d949a33..2b17040752 100644
--- a/deps/npm/node_modules/har-schema/lib/header.json
+++ b/deps/npm/node_modules/har-schema/lib/header.json
@@ -1,6 +1,5 @@
{
- "$id": "header.json#",
- "$schema": "http://json-schema.org/draft-06/schema#",
+ "id": "header.json#",
"type": "object",
"required": [
"name",
diff --git a/deps/npm/node_modules/har-schema/lib/log.json b/deps/npm/node_modules/har-schema/lib/log.json
index c353b40f13..402e9b459e 100644
--- a/deps/npm/node_modules/har-schema/lib/log.json
+++ b/deps/npm/node_modules/har-schema/lib/log.json
@@ -1,6 +1,5 @@
{
- "$id": "log.json#",
- "$schema": "http://json-schema.org/draft-06/schema#",
+ "id": "log.json#",
"type": "object",
"required": [
"version",
diff --git a/deps/npm/node_modules/har-schema/lib/page.json b/deps/npm/node_modules/har-schema/lib/page.json
index e24a3cee68..0a9ddb0c12 100644
--- a/deps/npm/node_modules/har-schema/lib/page.json
+++ b/deps/npm/node_modules/har-schema/lib/page.json
@@ -1,6 +1,5 @@
{
- "$id": "page.json#",
- "$schema": "http://json-schema.org/draft-06/schema#",
+ "id": "page.json#",
"type": "object",
"optional": true,
"required": [
diff --git a/deps/npm/node_modules/har-schema/lib/pageTimings.json b/deps/npm/node_modules/har-schema/lib/pageTimings.json
index 130411fee6..5fd6cb39ed 100644
--- a/deps/npm/node_modules/har-schema/lib/pageTimings.json
+++ b/deps/npm/node_modules/har-schema/lib/pageTimings.json
@@ -1,6 +1,5 @@
{
- "$id": "pageTimings.json#",
- "$schema": "http://json-schema.org/draft-06/schema#",
+ "id": "pageTimings.json#",
"type": "object",
"properties": {
"onContentLoad": {
diff --git a/deps/npm/node_modules/har-schema/lib/postData.json b/deps/npm/node_modules/har-schema/lib/postData.json
index 3aa6294a43..9f86a72107 100644
--- a/deps/npm/node_modules/har-schema/lib/postData.json
+++ b/deps/npm/node_modules/har-schema/lib/postData.json
@@ -1,6 +1,5 @@
{
- "$id": "postData.json#",
- "$schema": "http://json-schema.org/draft-06/schema#",
+ "id": "postData.json#",
"type": "object",
"optional": true,
"required": [
diff --git a/deps/npm/node_modules/har-schema/lib/query.json b/deps/npm/node_modules/har-schema/lib/query.json
index f82d8d8dac..fa1b8af4bd 100644
--- a/deps/npm/node_modules/har-schema/lib/query.json
+++ b/deps/npm/node_modules/har-schema/lib/query.json
@@ -1,6 +1,5 @@
{
- "$id": "query.json#",
- "$schema": "http://json-schema.org/draft-06/schema#",
+ "id": "query.json#",
"type": "object",
"required": [
"name",
diff --git a/deps/npm/node_modules/har-schema/lib/request.json b/deps/npm/node_modules/har-schema/lib/request.json
index 0e2566dedc..06435d380e 100644
--- a/deps/npm/node_modules/har-schema/lib/request.json
+++ b/deps/npm/node_modules/har-schema/lib/request.json
@@ -1,6 +1,5 @@
{
- "$id": "request.json#",
- "$schema": "http://json-schema.org/draft-06/schema#",
+ "id": "request.json#",
"type": "object",
"required": [
"method",
diff --git a/deps/npm/node_modules/har-schema/lib/response.json b/deps/npm/node_modules/har-schema/lib/response.json
index ec30f802ba..f27c397d73 100644
--- a/deps/npm/node_modules/har-schema/lib/response.json
+++ b/deps/npm/node_modules/har-schema/lib/response.json
@@ -1,6 +1,5 @@
{
- "$id": "response.json#",
- "$schema": "http://json-schema.org/draft-06/schema#",
+ "id": "response.json#",
"type": "object",
"required": [
"status",
diff --git a/deps/npm/node_modules/har-schema/lib/timings.json b/deps/npm/node_modules/har-schema/lib/timings.json
index 5fe7dc7a5e..2055d09e8c 100644
--- a/deps/npm/node_modules/har-schema/lib/timings.json
+++ b/deps/npm/node_modules/har-schema/lib/timings.json
@@ -1,6 +1,5 @@
{
- "$id": "timings.json#",
- "$schema": "http://json-schema.org/draft-06/schema#",
+ "id": "timings.json#",
"required": [
"send",
"wait",
diff --git a/deps/npm/node_modules/har-schema/package.json b/deps/npm/node_modules/har-schema/package.json
index ddb3608ab1..cd908360dc 100644
--- a/deps/npm/node_modules/har-schema/package.json
+++ b/deps/npm/node_modules/har-schema/package.json
@@ -1,27 +1,27 @@
{
- "_from": "har-schema@^2.0.0",
- "_id": "har-schema@2.0.0",
+ "_from": "har-schema@^1.0.5",
+ "_id": "har-schema@1.0.5",
"_inBundle": false,
- "_integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
+ "_integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=",
"_location": "/har-schema",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "har-schema@^2.0.0",
+ "raw": "har-schema@^1.0.5",
"name": "har-schema",
"escapedName": "har-schema",
- "rawSpec": "^2.0.0",
+ "rawSpec": "^1.0.5",
"saveSpec": null,
- "fetchSpec": "^2.0.0"
+ "fetchSpec": "^1.0.5"
},
"_requiredBy": [
"/har-validator"
],
- "_resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
- "_shasum": "a94c2224ebcac04782a0d9035521f24735b7ec92",
- "_spec": "har-schema@^2.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/har-validator",
+ "_resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz",
+ "_shasum": "d263135f43307c02c602afc8fe95970c0151369e",
+ "_spec": "har-schema@^1.0.5",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/har-validator",
"author": {
"name": "Ahmad Nassri",
"email": "ahmad@ahmadnassri.com",
@@ -45,7 +45,7 @@
"deprecated": false,
"description": "JSON Schema for HTTP Archive (HAR)",
"devDependencies": {
- "ajv": "^5.0.0",
+ "ajv": "^4.9.1",
"codeclimate-test-reporter": "^0.4.0",
"cz-conventional-changelog": "^1.2.0",
"echint": "^2.1.0",
@@ -82,5 +82,5 @@
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
"test": "tap test --reporter spec"
},
- "version": "2.0.0"
+ "version": "1.0.5"
}
diff --git a/deps/npm/node_modules/har-validator/README.md b/deps/npm/node_modules/har-validator/README.md
index fc696349e4..77ff935018 100644
--- a/deps/npm/node_modules/har-validator/README.md
+++ b/deps/npm/node_modules/har-validator/README.md
@@ -1,4 +1,4 @@
-# HAR Validator [![version][npm-version]][npm-url] [![License][license-image]][license-url]
+# HAR Validator [![version][npm-version]][npm-url] [![License][npm-license]][license-url]
> Extremely fast HTTP Archive ([HAR](https://github.com/ahmadnassri/har-spec/blob/master/versions/1.2.md)) validator using JSON Schema.
@@ -15,13 +15,34 @@
npm install --only=production --save har-validator
```
+## Usage
+
+I recommend using an optimized build matching your Node.js environment version, otherwise, the standard `require` would work just fine with any version of Node `>= v4.0` .
+
+```js
+/*
+ * Node 7
+ */
+const validate = require('har-validator/lib/node7')
+
+/*
+ * Node 6
+ */
+const validate = require('har-validator/lib/node6')
+
+/*
+ * Node 4 (Default)
+ */
+var validate = require('har-validator')
+```
+
## CLI Usage
Please refer to [`har-cli`](https://github.com/ahmadnassri/har-cli) for more info.
## API
-**Note**: as of [`v2.0.0`](https://github.com/ahmadnassri/har-validator/releases/tag/v2.0.0) this module defaults to Promise based API. *For backward compatibility with `v1.x` an [async/callback API](docs/async.md) is also provided*
+**Note**: as of [`v2.0.0`](https://github.com/ahmadnassri/har-validator/releases/tag/v2.0.0) this module defaults to Promise based API. *For backward comptability with `v1.x` an [async/callback API](docs/async.md) is also provided*
- [async API](docs/async.md)
- [callback API](docs/async.md)
@@ -34,12 +55,12 @@ Please refer to [`har-cli`](https://github.com/ahmadnassri/har-cli) for more inf
> Twitter: [@ahmadnassri](https://twitter.com/ahmadnassri)
[license-url]: http://choosealicense.com/licenses/isc/
-[license-image]: https://img.shields.io/github/license/ahmadnassri/har-validator.svg?style=flat-square
[travis-url]: https://travis-ci.org/ahmadnassri/har-validator
[travis-image]: https://img.shields.io/travis/ahmadnassri/har-validator.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/har-validator
+[npm-license]: https://img.shields.io/npm/l/har-validator.svg?style=flat-square
[npm-version]: https://img.shields.io/npm/v/har-validator.svg?style=flat-square
[npm-downloads]: https://img.shields.io/npm/dm/har-validator.svg?style=flat-square
diff --git a/deps/npm/node_modules/har-validator/lib/browser/async.js b/deps/npm/node_modules/har-validator/lib/browser/async.js
new file mode 100644
index 0000000000..676356aafd
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/lib/browser/async.js
@@ -0,0 +1,96 @@
+import * as schemas from 'har-schema';
+import Ajv from 'ajv';
+import HARError from './error';
+
+let ajv;
+
+export function validate(name, data = {}, next) {
+ // validator config
+ ajv = ajv || new Ajv({
+ allErrors: true,
+ schemas: schemas
+ });
+
+ let validate = ajv.getSchema(name + '.json');
+
+ let valid = validate(data);
+
+ // callback?
+ if (typeof next === 'function') {
+ return next(!valid ? new HARError(validate.errors) : null, valid);
+ }
+
+ return valid;
+}
+
+export function afterRequest(data, next) {
+ return validate('afterRequest', data, next);
+}
+
+export function beforeRequest(data, next) {
+ return validate('beforeRequest', data, next);
+}
+
+export function browser(data, next) {
+ return validate('browser', data, next);
+}
+
+export function cache(data, next) {
+ return validate('cache', data, next);
+}
+
+export function content(data, next) {
+ return validate('content', data, next);
+}
+
+export function cookie(data, next) {
+ return validate('cookie', data, next);
+}
+
+export function creator(data, next) {
+ return validate('creator', data, next);
+}
+
+export function entry(data, next) {
+ return validate('entry', data, next);
+}
+
+export function har(data, next) {
+ return validate('har', data, next);
+}
+
+export function header(data, next) {
+ return validate('header', data, next);
+}
+
+export function log(data, next) {
+ return validate('log', data, next);
+}
+
+export function page(data, next) {
+ return validate('page', data, next);
+}
+
+export function pageTimings(data, next) {
+ return validate('pageTimings', data, next);
+}
+
+export function postData(data, next) {
+ return validate('postData', data, next);
+}
+
+export function query(data, next) {
+ return validate('query', data, next);
+}
+
+export function request(data, next) {
+ return validate('request', data, next);
+}
+
+export function response(data, next) {
+ return validate('response', data, next);
+}
+
+export function timings(data, next) {
+ return validate('timings', data, next);
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/har-validator/lib/browser/error.js b/deps/npm/node_modules/har-validator/lib/browser/error.js
new file mode 100644
index 0000000000..f49fcf231a
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/lib/browser/error.js
@@ -0,0 +1,15 @@
+export default function HARError(errors) {
+ let message = 'validation failed';
+
+ this.name = 'HARError';
+ this.message = message;
+ this.errors = errors;
+
+ if (typeof Error.captureStackTrace === 'function') {
+ Error.captureStackTrace(this, this.constructor);
+ } else {
+ this.stack = new Error(message).stack;
+ }
+}
+
+HARError.prototype = Error.prototype; \ No newline at end of file
diff --git a/deps/npm/node_modules/har-validator/lib/browser/promise.js b/deps/npm/node_modules/har-validator/lib/browser/promise.js
new file mode 100644
index 0000000000..bc1b18c3f7
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/lib/browser/promise.js
@@ -0,0 +1,93 @@
+import * as schemas from 'har-schema';
+import Ajv from 'ajv';
+import HARError from './error';
+
+let ajv;
+
+export function validate(name, data = {}) {
+ // validator config
+ ajv = ajv || new Ajv({
+ allErrors: true,
+ schemas: schemas
+ });
+
+ let validate = ajv.getSchema(name + '.json');
+
+ return new Promise((resolve, reject) => {
+ let valid = validate(data);
+
+ !valid ? reject(new HARError(validate.errors)) : resolve(data);
+ });
+}
+
+export function afterRequest(data) {
+ return validate('afterRequest', data);
+}
+
+export function beforeRequest(data) {
+ return validate('beforeRequest', data);
+}
+
+export function browser(data) {
+ return validate('browser', data);
+}
+
+export function cache(data) {
+ return validate('cache', data);
+}
+
+export function content(data) {
+ return validate('content', data);
+}
+
+export function cookie(data) {
+ return validate('cookie', data);
+}
+
+export function creator(data) {
+ return validate('creator', data);
+}
+
+export function entry(data) {
+ return validate('entry', data);
+}
+
+export function har(data) {
+ return validate('har', data);
+}
+
+export function header(data) {
+ return validate('header', data);
+}
+
+export function log(data) {
+ return validate('log', data);
+}
+
+export function page(data) {
+ return validate('page', data);
+}
+
+export function pageTimings(data) {
+ return validate('pageTimings', data);
+}
+
+export function postData(data) {
+ return validate('postData', data);
+}
+
+export function query(data) {
+ return validate('query', data);
+}
+
+export function request(data) {
+ return validate('request', data);
+}
+
+export function response(data) {
+ return validate('response', data);
+}
+
+export function timings(data) {
+ return validate('timings', data);
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/har-validator/lib/node4/async.js b/deps/npm/node_modules/har-validator/lib/node4/async.js
new file mode 100644
index 0000000000..e9c4854307
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/lib/node4/async.js
@@ -0,0 +1,136 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.validate = validate;
+exports.afterRequest = afterRequest;
+exports.beforeRequest = beforeRequest;
+exports.browser = browser;
+exports.cache = cache;
+exports.content = content;
+exports.cookie = cookie;
+exports.creator = creator;
+exports.entry = entry;
+exports.har = har;
+exports.header = header;
+exports.log = log;
+exports.page = page;
+exports.pageTimings = pageTimings;
+exports.postData = postData;
+exports.query = query;
+exports.request = request;
+exports.response = response;
+exports.timings = timings;
+
+var _harSchema = require('har-schema');
+
+var schemas = _interopRequireWildcard(_harSchema);
+
+var _ajv = require('ajv');
+
+var _ajv2 = _interopRequireDefault(_ajv);
+
+var _error = require('./error');
+
+var _error2 = _interopRequireDefault(_error);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+var ajv = void 0;
+
+function validate(name) {
+ var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+ var next = arguments[2];
+
+ // validator config
+ ajv = ajv || new _ajv2.default({
+ allErrors: true,
+ schemas: schemas
+ });
+
+ var validate = ajv.getSchema(name + '.json');
+
+ var valid = validate(data);
+
+ // callback?
+ if (typeof next === 'function') {
+ return next(!valid ? new _error2.default(validate.errors) : null, valid);
+ }
+
+ return valid;
+}
+
+function afterRequest(data, next) {
+ return validate('afterRequest', data, next);
+}
+
+function beforeRequest(data, next) {
+ return validate('beforeRequest', data, next);
+}
+
+function browser(data, next) {
+ return validate('browser', data, next);
+}
+
+function cache(data, next) {
+ return validate('cache', data, next);
+}
+
+function content(data, next) {
+ return validate('content', data, next);
+}
+
+function cookie(data, next) {
+ return validate('cookie', data, next);
+}
+
+function creator(data, next) {
+ return validate('creator', data, next);
+}
+
+function entry(data, next) {
+ return validate('entry', data, next);
+}
+
+function har(data, next) {
+ return validate('har', data, next);
+}
+
+function header(data, next) {
+ return validate('header', data, next);
+}
+
+function log(data, next) {
+ return validate('log', data, next);
+}
+
+function page(data, next) {
+ return validate('page', data, next);
+}
+
+function pageTimings(data, next) {
+ return validate('pageTimings', data, next);
+}
+
+function postData(data, next) {
+ return validate('postData', data, next);
+}
+
+function query(data, next) {
+ return validate('query', data, next);
+}
+
+function request(data, next) {
+ return validate('request', data, next);
+}
+
+function response(data, next) {
+ return validate('response', data, next);
+}
+
+function timings(data, next) {
+ return validate('timings', data, next);
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/har-validator/lib/node4/error.js b/deps/npm/node_modules/har-validator/lib/node4/error.js
new file mode 100644
index 0000000000..0ae01bd18c
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/lib/node4/error.js
@@ -0,0 +1,22 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = HARError;
+function HARError(errors) {
+ var message = 'validation failed';
+
+ this.name = 'HARError';
+ this.message = message;
+ this.errors = errors;
+
+ if (typeof Error.captureStackTrace === 'function') {
+ Error.captureStackTrace(this, this.constructor);
+ } else {
+ this.stack = new Error(message).stack;
+ }
+}
+
+HARError.prototype = Error.prototype;
+module.exports = exports['default']; \ No newline at end of file
diff --git a/deps/npm/node_modules/har-validator/lib/node4/promise.js b/deps/npm/node_modules/har-validator/lib/node4/promise.js
new file mode 100644
index 0000000000..d37ca52ad7
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/lib/node4/promise.js
@@ -0,0 +1,132 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.validate = validate;
+exports.afterRequest = afterRequest;
+exports.beforeRequest = beforeRequest;
+exports.browser = browser;
+exports.cache = cache;
+exports.content = content;
+exports.cookie = cookie;
+exports.creator = creator;
+exports.entry = entry;
+exports.har = har;
+exports.header = header;
+exports.log = log;
+exports.page = page;
+exports.pageTimings = pageTimings;
+exports.postData = postData;
+exports.query = query;
+exports.request = request;
+exports.response = response;
+exports.timings = timings;
+
+var _harSchema = require('har-schema');
+
+var schemas = _interopRequireWildcard(_harSchema);
+
+var _ajv = require('ajv');
+
+var _ajv2 = _interopRequireDefault(_ajv);
+
+var _error = require('./error');
+
+var _error2 = _interopRequireDefault(_error);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+var ajv = void 0;
+
+function validate(name) {
+ var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+ // validator config
+ ajv = ajv || new _ajv2.default({
+ allErrors: true,
+ schemas: schemas
+ });
+
+ var validate = ajv.getSchema(name + '.json');
+
+ return new Promise(function (resolve, reject) {
+ var valid = validate(data);
+
+ !valid ? reject(new _error2.default(validate.errors)) : resolve(data);
+ });
+}
+
+function afterRequest(data) {
+ return validate('afterRequest', data);
+}
+
+function beforeRequest(data) {
+ return validate('beforeRequest', data);
+}
+
+function browser(data) {
+ return validate('browser', data);
+}
+
+function cache(data) {
+ return validate('cache', data);
+}
+
+function content(data) {
+ return validate('content', data);
+}
+
+function cookie(data) {
+ return validate('cookie', data);
+}
+
+function creator(data) {
+ return validate('creator', data);
+}
+
+function entry(data) {
+ return validate('entry', data);
+}
+
+function har(data) {
+ return validate('har', data);
+}
+
+function header(data) {
+ return validate('header', data);
+}
+
+function log(data) {
+ return validate('log', data);
+}
+
+function page(data) {
+ return validate('page', data);
+}
+
+function pageTimings(data) {
+ return validate('pageTimings', data);
+}
+
+function postData(data) {
+ return validate('postData', data);
+}
+
+function query(data) {
+ return validate('query', data);
+}
+
+function request(data) {
+ return validate('request', data);
+}
+
+function response(data) {
+ return validate('response', data);
+}
+
+function timings(data) {
+ return validate('timings', data);
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/har-validator/lib/node6/async.js b/deps/npm/node_modules/har-validator/lib/node6/async.js
new file mode 100644
index 0000000000..e707043adf
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/lib/node6/async.js
@@ -0,0 +1,133 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.validate = validate;
+exports.afterRequest = afterRequest;
+exports.beforeRequest = beforeRequest;
+exports.browser = browser;
+exports.cache = cache;
+exports.content = content;
+exports.cookie = cookie;
+exports.creator = creator;
+exports.entry = entry;
+exports.har = har;
+exports.header = header;
+exports.log = log;
+exports.page = page;
+exports.pageTimings = pageTimings;
+exports.postData = postData;
+exports.query = query;
+exports.request = request;
+exports.response = response;
+exports.timings = timings;
+
+var _harSchema = require('har-schema');
+
+var schemas = _interopRequireWildcard(_harSchema);
+
+var _ajv = require('ajv');
+
+var _ajv2 = _interopRequireDefault(_ajv);
+
+var _error = require('./error');
+
+var _error2 = _interopRequireDefault(_error);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+let ajv;
+
+function validate(name, data = {}, next) {
+ // validator config
+ ajv = ajv || new _ajv2.default({
+ allErrors: true,
+ schemas: schemas
+ });
+
+ let validate = ajv.getSchema(name + '.json');
+
+ let valid = validate(data);
+
+ // callback?
+ if (typeof next === 'function') {
+ return next(!valid ? new _error2.default(validate.errors) : null, valid);
+ }
+
+ return valid;
+}
+
+function afterRequest(data, next) {
+ return validate('afterRequest', data, next);
+}
+
+function beforeRequest(data, next) {
+ return validate('beforeRequest', data, next);
+}
+
+function browser(data, next) {
+ return validate('browser', data, next);
+}
+
+function cache(data, next) {
+ return validate('cache', data, next);
+}
+
+function content(data, next) {
+ return validate('content', data, next);
+}
+
+function cookie(data, next) {
+ return validate('cookie', data, next);
+}
+
+function creator(data, next) {
+ return validate('creator', data, next);
+}
+
+function entry(data, next) {
+ return validate('entry', data, next);
+}
+
+function har(data, next) {
+ return validate('har', data, next);
+}
+
+function header(data, next) {
+ return validate('header', data, next);
+}
+
+function log(data, next) {
+ return validate('log', data, next);
+}
+
+function page(data, next) {
+ return validate('page', data, next);
+}
+
+function pageTimings(data, next) {
+ return validate('pageTimings', data, next);
+}
+
+function postData(data, next) {
+ return validate('postData', data, next);
+}
+
+function query(data, next) {
+ return validate('query', data, next);
+}
+
+function request(data, next) {
+ return validate('request', data, next);
+}
+
+function response(data, next) {
+ return validate('response', data, next);
+}
+
+function timings(data, next) {
+ return validate('timings', data, next);
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/har-validator/lib/node6/error.js b/deps/npm/node_modules/har-validator/lib/node6/error.js
new file mode 100644
index 0000000000..4149ed7371
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/lib/node6/error.js
@@ -0,0 +1,22 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = HARError;
+function HARError(errors) {
+ let message = 'validation failed';
+
+ this.name = 'HARError';
+ this.message = message;
+ this.errors = errors;
+
+ if (typeof Error.captureStackTrace === 'function') {
+ Error.captureStackTrace(this, this.constructor);
+ } else {
+ this.stack = new Error(message).stack;
+ }
+}
+
+HARError.prototype = Error.prototype;
+module.exports = exports['default']; \ No newline at end of file
diff --git a/deps/npm/node_modules/har-validator/lib/node6/promise.js b/deps/npm/node_modules/har-validator/lib/node6/promise.js
new file mode 100644
index 0000000000..be7017ae05
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/lib/node6/promise.js
@@ -0,0 +1,130 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.validate = validate;
+exports.afterRequest = afterRequest;
+exports.beforeRequest = beforeRequest;
+exports.browser = browser;
+exports.cache = cache;
+exports.content = content;
+exports.cookie = cookie;
+exports.creator = creator;
+exports.entry = entry;
+exports.har = har;
+exports.header = header;
+exports.log = log;
+exports.page = page;
+exports.pageTimings = pageTimings;
+exports.postData = postData;
+exports.query = query;
+exports.request = request;
+exports.response = response;
+exports.timings = timings;
+
+var _harSchema = require('har-schema');
+
+var schemas = _interopRequireWildcard(_harSchema);
+
+var _ajv = require('ajv');
+
+var _ajv2 = _interopRequireDefault(_ajv);
+
+var _error = require('./error');
+
+var _error2 = _interopRequireDefault(_error);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+let ajv;
+
+function validate(name, data = {}) {
+ // validator config
+ ajv = ajv || new _ajv2.default({
+ allErrors: true,
+ schemas: schemas
+ });
+
+ let validate = ajv.getSchema(name + '.json');
+
+ return new Promise((resolve, reject) => {
+ let valid = validate(data);
+
+ !valid ? reject(new _error2.default(validate.errors)) : resolve(data);
+ });
+}
+
+function afterRequest(data) {
+ return validate('afterRequest', data);
+}
+
+function beforeRequest(data) {
+ return validate('beforeRequest', data);
+}
+
+function browser(data) {
+ return validate('browser', data);
+}
+
+function cache(data) {
+ return validate('cache', data);
+}
+
+function content(data) {
+ return validate('content', data);
+}
+
+function cookie(data) {
+ return validate('cookie', data);
+}
+
+function creator(data) {
+ return validate('creator', data);
+}
+
+function entry(data) {
+ return validate('entry', data);
+}
+
+function har(data) {
+ return validate('har', data);
+}
+
+function header(data) {
+ return validate('header', data);
+}
+
+function log(data) {
+ return validate('log', data);
+}
+
+function page(data) {
+ return validate('page', data);
+}
+
+function pageTimings(data) {
+ return validate('pageTimings', data);
+}
+
+function postData(data) {
+ return validate('postData', data);
+}
+
+function query(data) {
+ return validate('query', data);
+}
+
+function request(data) {
+ return validate('request', data);
+}
+
+function response(data) {
+ return validate('response', data);
+}
+
+function timings(data) {
+ return validate('timings', data);
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/har-validator/lib/node7/async.js b/deps/npm/node_modules/har-validator/lib/node7/async.js
new file mode 100644
index 0000000000..e707043adf
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/lib/node7/async.js
@@ -0,0 +1,133 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.validate = validate;
+exports.afterRequest = afterRequest;
+exports.beforeRequest = beforeRequest;
+exports.browser = browser;
+exports.cache = cache;
+exports.content = content;
+exports.cookie = cookie;
+exports.creator = creator;
+exports.entry = entry;
+exports.har = har;
+exports.header = header;
+exports.log = log;
+exports.page = page;
+exports.pageTimings = pageTimings;
+exports.postData = postData;
+exports.query = query;
+exports.request = request;
+exports.response = response;
+exports.timings = timings;
+
+var _harSchema = require('har-schema');
+
+var schemas = _interopRequireWildcard(_harSchema);
+
+var _ajv = require('ajv');
+
+var _ajv2 = _interopRequireDefault(_ajv);
+
+var _error = require('./error');
+
+var _error2 = _interopRequireDefault(_error);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+let ajv;
+
+function validate(name, data = {}, next) {
+ // validator config
+ ajv = ajv || new _ajv2.default({
+ allErrors: true,
+ schemas: schemas
+ });
+
+ let validate = ajv.getSchema(name + '.json');
+
+ let valid = validate(data);
+
+ // callback?
+ if (typeof next === 'function') {
+ return next(!valid ? new _error2.default(validate.errors) : null, valid);
+ }
+
+ return valid;
+}
+
+function afterRequest(data, next) {
+ return validate('afterRequest', data, next);
+}
+
+function beforeRequest(data, next) {
+ return validate('beforeRequest', data, next);
+}
+
+function browser(data, next) {
+ return validate('browser', data, next);
+}
+
+function cache(data, next) {
+ return validate('cache', data, next);
+}
+
+function content(data, next) {
+ return validate('content', data, next);
+}
+
+function cookie(data, next) {
+ return validate('cookie', data, next);
+}
+
+function creator(data, next) {
+ return validate('creator', data, next);
+}
+
+function entry(data, next) {
+ return validate('entry', data, next);
+}
+
+function har(data, next) {
+ return validate('har', data, next);
+}
+
+function header(data, next) {
+ return validate('header', data, next);
+}
+
+function log(data, next) {
+ return validate('log', data, next);
+}
+
+function page(data, next) {
+ return validate('page', data, next);
+}
+
+function pageTimings(data, next) {
+ return validate('pageTimings', data, next);
+}
+
+function postData(data, next) {
+ return validate('postData', data, next);
+}
+
+function query(data, next) {
+ return validate('query', data, next);
+}
+
+function request(data, next) {
+ return validate('request', data, next);
+}
+
+function response(data, next) {
+ return validate('response', data, next);
+}
+
+function timings(data, next) {
+ return validate('timings', data, next);
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/har-validator/lib/node7/error.js b/deps/npm/node_modules/har-validator/lib/node7/error.js
new file mode 100644
index 0000000000..4149ed7371
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/lib/node7/error.js
@@ -0,0 +1,22 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = HARError;
+function HARError(errors) {
+ let message = 'validation failed';
+
+ this.name = 'HARError';
+ this.message = message;
+ this.errors = errors;
+
+ if (typeof Error.captureStackTrace === 'function') {
+ Error.captureStackTrace(this, this.constructor);
+ } else {
+ this.stack = new Error(message).stack;
+ }
+}
+
+HARError.prototype = Error.prototype;
+module.exports = exports['default']; \ No newline at end of file
diff --git a/deps/npm/node_modules/har-validator/lib/node7/promise.js b/deps/npm/node_modules/har-validator/lib/node7/promise.js
new file mode 100644
index 0000000000..be7017ae05
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/lib/node7/promise.js
@@ -0,0 +1,130 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.validate = validate;
+exports.afterRequest = afterRequest;
+exports.beforeRequest = beforeRequest;
+exports.browser = browser;
+exports.cache = cache;
+exports.content = content;
+exports.cookie = cookie;
+exports.creator = creator;
+exports.entry = entry;
+exports.har = har;
+exports.header = header;
+exports.log = log;
+exports.page = page;
+exports.pageTimings = pageTimings;
+exports.postData = postData;
+exports.query = query;
+exports.request = request;
+exports.response = response;
+exports.timings = timings;
+
+var _harSchema = require('har-schema');
+
+var schemas = _interopRequireWildcard(_harSchema);
+
+var _ajv = require('ajv');
+
+var _ajv2 = _interopRequireDefault(_ajv);
+
+var _error = require('./error');
+
+var _error2 = _interopRequireDefault(_error);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+let ajv;
+
+function validate(name, data = {}) {
+ // validator config
+ ajv = ajv || new _ajv2.default({
+ allErrors: true,
+ schemas: schemas
+ });
+
+ let validate = ajv.getSchema(name + '.json');
+
+ return new Promise((resolve, reject) => {
+ let valid = validate(data);
+
+ !valid ? reject(new _error2.default(validate.errors)) : resolve(data);
+ });
+}
+
+function afterRequest(data) {
+ return validate('afterRequest', data);
+}
+
+function beforeRequest(data) {
+ return validate('beforeRequest', data);
+}
+
+function browser(data) {
+ return validate('browser', data);
+}
+
+function cache(data) {
+ return validate('cache', data);
+}
+
+function content(data) {
+ return validate('content', data);
+}
+
+function cookie(data) {
+ return validate('cookie', data);
+}
+
+function creator(data) {
+ return validate('creator', data);
+}
+
+function entry(data) {
+ return validate('entry', data);
+}
+
+function har(data) {
+ return validate('har', data);
+}
+
+function header(data) {
+ return validate('header', data);
+}
+
+function log(data) {
+ return validate('log', data);
+}
+
+function page(data) {
+ return validate('page', data);
+}
+
+function pageTimings(data) {
+ return validate('pageTimings', data);
+}
+
+function postData(data) {
+ return validate('postData', data);
+}
+
+function query(data) {
+ return validate('query', data);
+}
+
+function request(data) {
+ return validate('request', data);
+}
+
+function response(data) {
+ return validate('response', data);
+}
+
+function timings(data) {
+ return validate('timings', data);
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/har-validator/lib/promise.js b/deps/npm/node_modules/har-validator/lib/promise.js
deleted file mode 100644
index 1ab308cf71..0000000000
--- a/deps/npm/node_modules/har-validator/lib/promise.js
+++ /dev/null
@@ -1,95 +0,0 @@
-var Ajv = require('ajv')
-var HARError = require('./error')
-var schemas = require('har-schema')
-
-var ajv
-
-function validate (name, data) {
- data = data || {}
-
- // validator config
- ajv = ajv || new Ajv({
- allErrors: true,
- schemas: schemas
- })
-
- var validate = ajv.getSchema(name + '.json')
-
- return new Promise(function (resolve, reject) {
- var valid = validate(data)
-
- !valid ? reject(new HARError(validate.errors)) : resolve(data)
- })
-}
-
-exports.afterRequest = function (data) {
- return validate('afterRequest', data)
-}
-
-exports.beforeRequest = function (data) {
- return validate('beforeRequest', data)
-}
-
-exports.browser = function (data) {
- return validate('browser', data)
-}
-
-exports.cache = function (data) {
- return validate('cache', data)
-}
-
-exports.content = function (data) {
- return validate('content', data)
-}
-
-exports.cookie = function (data) {
- return validate('cookie', data)
-}
-
-exports.creator = function (data) {
- return validate('creator', data)
-}
-
-exports.entry = function (data) {
- return validate('entry', data)
-}
-
-exports.har = function (data) {
- return validate('har', data)
-}
-
-exports.header = function (data) {
- return validate('header', data)
-}
-
-exports.log = function (data) {
- return validate('log', data)
-}
-
-exports.page = function (data) {
- return validate('page', data)
-}
-
-exports.pageTimings = function (data) {
- return validate('pageTimings', data)
-}
-
-exports.postData = function (data) {
- return validate('postData', data)
-}
-
-exports.query = function (data) {
- return validate('query', data)
-}
-
-exports.request = function (data) {
- return validate('request', data)
-}
-
-exports.response = function (data) {
- return validate('response', data)
-}
-
-exports.timings = function (data) {
- return validate('timings', data)
-}
diff --git a/deps/npm/node_modules/ajv/.tonic_example.js b/deps/npm/node_modules/har-validator/node_modules/ajv/.tonic_example.js
index aa11812d87..0c3cc86ce3 100644
--- a/deps/npm/node_modules/ajv/.tonic_example.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/.tonic_example.js
@@ -1,5 +1,5 @@
var Ajv = require('ajv');
-var ajv = new Ajv({allErrors: true});
+var ajv = Ajv({allErrors: true});
var schema = {
"properties": {
diff --git a/deps/npm/node_modules/ajv/LICENSE b/deps/npm/node_modules/har-validator/node_modules/ajv/LICENSE
index 09f090263b..09f090263b 100644
--- a/deps/npm/node_modules/ajv/LICENSE
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/LICENSE
diff --git a/deps/npm/node_modules/ajv/README.md b/deps/npm/node_modules/har-validator/node_modules/ajv/README.md
index 63a265f04d..a0a1ca2374 100644
--- a/deps/npm/node_modules/ajv/README.md
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/README.md
@@ -2,32 +2,20 @@
# Ajv: Another JSON Schema Validator
-The fastest JSON Schema validator for Node.js and browser with draft 6 support.
+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)
-[![npm@beta](https://img.shields.io/npm/v/ajv/beta.svg)](https://github.com/epoberezkin/ajv/tree/beta)
[![npm downloads](https://img.shields.io/npm/dm/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)
-[![Greenkeeper badge](https://badges.greenkeeper.io/epoberezkin/ajv.svg)](https://greenkeeper.io/)
[![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv)
-__Please note__: Ajv [version 6](https://github.com/epoberezkin/ajv/tree/beta) with [JSON Schema draft-07](http://json-schema.org/work-in-progress) support is released. Use `npm install ajv@beta` to install.
+__Please note__: You can start using NEW beta version [5.0.4](https://github.com/epoberezkin/ajv/releases/tag/5.0.4-beta.3) (see [migration guide from 4.x.x](https://github.com/epoberezkin/ajv/releases/tag/5.0.1-beta.0)) with the support of JSON-Schema draft-06 (not officially published yet): `npm install ajv@^5.0.4-beta`.
-
-## Using version 5
-
-[JSON Schema draft-06](https://trac.tools.ietf.org/html/draft-wright-json-schema-validation-01) is published.
-
-[Ajv version 5.0.0](https://github.com/epoberezkin/ajv/releases/tag/5.0.0) that supports draft-06 is released. It may require either migrating your schemas or updating your code (to continue using draft-04 and v5 schemas).
-
-__Please note__: To use Ajv with draft-04 schemas you need to explicitly add meta-schema to the validator instance:
-
-```javascript
-ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json'));
-```
+Also see [docs](https://github.com/epoberezkin/ajv/tree/5.0.4-beta.3) for 5.0.4.
## Contents
@@ -41,11 +29,10 @@ ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json'));
- Validation
- [Keywords](#validation-keywords)
- [Formats](#formats)
- - [Combining schemas with $ref](#ref)
- [$data reference](#data-reference)
- NEW: [$merge and $patch keywords](#merge-and-patch-keywords)
- [Defining custom keywords](#defining-custom-keywords)
- - [Asynchronous schema compilation](#asynchronous-schema-compilation)
+ - [Asynchronous schema compilation](#asynchronous-compilation)
- [Asynchronous validation](#asynchronous-validation)
- Modifying data during validation
- [Filtering data](#filtering-data)
@@ -72,22 +59,22 @@ Currently Ajv is the fastest and the most standard compliant validator according
- [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html)
-Performance of different validators by [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark):
+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:|djv|ajv|json-schema-validator-generator|jsen|is-my-json-valid|themis|z-schema|jsck|skeemas|json-schema-library|tv4&chd=t:100,98,72.1,66.8,50.1,15.1,6.1,3.8,1.2,0.7,0.2)](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance)
+[![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 6](http://json-schema.org/) and draft 4 standards:
- - all validation keywords (see [JSON Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md))
+- 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 Node.js 0.10-8.x
-- [asynchronous loading](#asynchronous-schema-compilation) of referenced schemas during compilation
+- 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
@@ -95,10 +82,9 @@ Performance of different validators by [json-schema-benchmark](https://github.co
- [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)
-- draft-6 keywords `const`, `contains` and `propertyNames`
-- draft-6 boolean schemas (`true`/`false` as a schema to always pass/fail).
-- keywords `switch`, `patternRequired`, `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` from [JSON-schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) with [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package
-- [$data reference](#data-reference) to use values from the validated data as values for the schema 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).
@@ -110,16 +96,16 @@ Currently Ajv is the only validator that passes all the tests from [JSON Schema
npm install ajv
```
-or to install [version 6](https://github.com/epoberezkin/ajv/tree/beta):
+To install a stable beta version [5.0.4](https://github.com/epoberezkin/ajv/releases/tag/5.0.4-beta.3) (see [migration guide from 4.x.x](https://github.com/epoberezkin/ajv/releases/tag/5.0.1-beta.0)):
```
-npm install ajv@beta
+npm install ajv@^5.0.4-beta
```
## <a name="usage"></a>Getting started
-Try it in the Node.js REPL: https://tonicdev.com/npm/ajv
+Try it in the node REPL: https://tonicdev.com/npm/ajv
The fastest validation call:
@@ -145,19 +131,19 @@ or
```javascript
// ...
-var valid = ajv.addSchema(schema, 'mySchema')
- .validate('mySchema', data);
+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 serialized with [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) or a custom function 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.
+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 a 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)
+__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
@@ -171,7 +157,7 @@ Then you need to load Ajv in the browser:
<script src="ajv.min.js"></script>
```
-This bundle can be used with different module systems; it creates global `Ajv` if no module system is found.
+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).
@@ -188,7 +174,6 @@ CLI is available as a separate npm package [ajv-cli](https://github.com/jessedc/
- 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))
-- migrate schemas to draft-06 (using [json-schema-migrate](https://github.com/epoberezkin/json-schema-migrate))
- validating data file(s) against JSON-schema
- testing expected validity of data against JSON-schema
- referenced schemas
@@ -205,18 +190,20 @@ 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, [contains](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#contains)
-- [for objects](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-objects) - maxProperties, minProperties, required, properties, patternProperties, additionalProperties, dependencies, [propertyNames](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#propertynames)
-- [for all types](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-all-types) - enum, [const](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#const)
-- [compound keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#compound-keywords) - not, oneOf, anyOf, allOf
+- [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 [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package Ajv also supports validation keywords from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) for JSON-schema standard:
+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-proposed) - conditional validation with a sequence of if/then clauses
-- [patternRequired](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#patternrequired-proposed) - 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-proposed) - setting limits for date, time, etc.
+- [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.
+See [JSON-Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md) for more details.
## Formats
@@ -227,10 +214,8 @@ The following formats are supported for string validation with "format" keyword:
- _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.
-- _url_: [URL record](https://url.spec.whatwg.org/#concept-url).
-- _uri-template_: URI template according to [RFC6570](https://tools.ietf.org/html/rfc6570)
- _email_: email address.
-- _hostname_: host name according to [RFC1034](http://tools.ietf.org/html/rfc1034#section-3.5).
+- _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.
@@ -242,68 +227,16 @@ There are two modes of format validation: `fast` and `full`. This mode affects f
You can add additional formats and replace any of the formats above using [addFormat](#api-addformat) method.
-The option `unknownFormats` allows changing the default behaviour when an unknown format is encountered. In this case Ajv can either fail schema compilation (default) or ignore it (default in versions before 5.0.0). You also can whitelist specific format(s) to be ignored. See [Options](#options) for details.
+The option `unknownFormats` allows to change the behaviour in case an unknown format is encountered - Ajv can either ignore them (default now) or fail schema compilation (will be the default in 5.0.0).
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).
-## <a name="ref"></a>Combining schemas with $ref
-
-You can structure your validation logic across multiple schema files and have schemas reference each other using `$ref` keyword.
-
-Example:
-
-```javascript
-var schema = {
- "$id": "http://example.com/schemas/schema.json",
- "type": "object",
- "properties": {
- "foo": { "$ref": "defs.json#/definitions/int" },
- "bar": { "$ref": "defs.json#/definitions/str" }
- }
-};
-
-var defsSchema = {
- "$id": "http://example.com/schemas/defs.json",
- "definitions": {
- "int": { "type": "integer" },
- "str": { "type": "string" }
- }
-};
-```
-
-Now to compile your schema you can either pass all schemas to Ajv instance:
-
-```javascript
-var ajv = new Ajv({schemas: [schema, defsSchema]});
-var validate = ajv.getSchema('http://example.com/schemas/schema.json');
-```
-
-or use `addSchema` method:
-
-```javascript
-var ajv = new Ajv;
-var validate = ajv.addSchema(defsSchema)
- .compile(schema);
-```
-
-See [Options](#options) and [addSchema](#api) method.
-
-__Please note__:
-- `$ref` is resolved as the uri-reference using schema $id as the base URI (see the example).
-- References can be recursive (and mutually recursive) to implement the schemas for different data structures (such as linked lists, trees, graphs, etc.).
-- You don't have to host your schema files at the URIs that you use as schema $id. These URIs are only used to identify the schemas, and according to JSON Schema specification validators should not expect to be able to download the schemas from these URIs.
-- The actual location of the schema file in the file system is not used.
-- You can pass the identifier of the schema as the second parameter of `addSchema` method or as a property name in `schemas` option. This identifier can be used instead of (or in addition to) schema $id.
-- You cannot have the same $id (or the schema identifier) used for more than one schema - the exception will be thrown.
-- You can implement dynamic resolution of the referenced schemas using `compileAsync` method. In this way you can store schemas in any system (files, web, database, etc.) and reference them without explicitly adding to Ajv instance. See [Asynchronous schema compilation](#asynchronous-schema-compilation).
-
-
## $data reference
-With `$data` option you can use values from the validated data as the values for the schema keywords. See [proposal](https://github.com/json-schema/json-schema/wiki/$data-(v5-proposal)) for more information about how it works.
+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: const, enum, format, maximum/minimum, exclusiveMaximum / exclusiveMinimum, maxLength / minLength, maxItems / minItems, maxProperties / minProperties, formatMaximum / formatMinimum, formatExclusiveMaximum / formatExclusiveMinimum, multipleOf, pattern, required, uniqueItems.
+`$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).
@@ -312,8 +245,6 @@ Examples.
This schema requires that the value in property `smaller` is less or equal than the value in the property larger:
```javascript
-var ajv = new Ajv({$data: true});
-
var schema = {
"properties": {
"smaller": {
@@ -328,8 +259,6 @@ var validData = {
smaller: 5,
larger: 7
};
-
-ajv.validate(schema, validData); // true
```
This schema requires that the properties have the same format as their field names:
@@ -348,12 +277,12 @@ var validData = {
}
```
-`$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 `const` keyword). If `$data` resolves to incorrect type (e.g. not "number" for maximum keyword) the validation fails.
+`$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 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).
+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:
@@ -419,7 +348,7 @@ See the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch
The advantages of using custom keywords are:
-- allow creating validation scenarios that cannot be expressed using JSON Schema
+- 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
@@ -440,17 +369,14 @@ Ajv allows defining keywords with:
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];
+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; }
- }
-});
+ 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);
@@ -465,26 +391,27 @@ Several custom keywords (typeof, instanceof, range and propertyNames) are define
See [Defining custom keywords](https://github.com/epoberezkin/ajv/blob/master/CUSTOM.md) for more details.
-## Asynchronous schema compilation
+## Asynchronous compilation
-During asynchronous compilation remote references are loaded using supplied function. See `compileAsync` [method](#api-compileAsync) and `loadSchema` [option](#options).
+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).then(function (validate) {
- var valid = validate(data);
- // ...
+ajv.compileAsync(schema, function (err, validate) {
+ if (err) return;
+ var valid = validate(data);
});
-function loadSchema(uri) {
- return request.json(uri).then(function (res) {
- if (res.statusCode >= 400)
- throw new Error('Loading error: ' + res.statusCode);
- return res.body;
- });
+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);
+ });
}
```
@@ -493,47 +420,37 @@ __Please note__: [Option](#options) `missingRefs` should NOT be set to `"ignore"
## Asynchronous validation
-Example in Node.js REPL: https://tonicdev.com/esp/ajv-asynchronous-validation
+Example in node REPL: https://tonicdev.com/esp/ajv-asynchronous-validation
-You can define custom formats and keywords that perform validation asynchronously by accessing database or some other service. You should add `async: true` in the keyword or format definition (see [addFormat](#api-addformat), [addKeyword](#api-addkeyword) and [Defining custom keywords](#defining-custom-keywords)).
+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 with `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 [es7 async functions](http://tc39.github.io/ecmascript-asyncawait/) that can optionally be transpiled with [nodent](https://github.com/MatAtBread/nodent) or with [regenerator](https://github.com/facebook/regenerator) or to [generator functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*) that can be optionally transpiled with regenerator as well. You can also supply any other transpiler as a function. See [Options](#options).
+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 synchronous and asynchronous schemas.
+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).
-Async functions are currently supported in Chrome 55, Firefox 52, Node.js 7 (with --harmony-async-await) and MS Edge 13 (with flag).
-
-Generator functions are currently supported in Chrome, Firefox and Node.js.
+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.
-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 with validated data or rejects with an exception `Ajv.ValidationError` that contains the array of validation errors in `errors` property.
+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
/**
- * Default mode is non-transpiled generator function wrapped with `co`.
- * Using package ajv-async (https://github.com/epoberezkin/ajv-async)
- * you can auto-detect the best async mode.
- * In this case, without "async" and "transpile" options
- * (or with option {async: true})
+ * without "async" and "transpile" options (or with option {async: true})
* Ajv will choose the first supported/installed option in this order:
- * 1. native async function
- * 2. native generator function wrapped with co
- * 3. es7 async functions transpiled with nodent
- * 4. es7 async functions transpiled with regenerator
+ * 1. native generator function wrapped with co
+ * 2. es7 async functions transpiled with nodent
+ * 3. es7 async functions transpiled with regenerator
*/
-var setupAsync = require('ajv-async');
-var ajv = setupAsync(new Ajv);
+var ajv = new Ajv;
ajv.addKeyword('idExists', {
async: true,
@@ -567,18 +484,20 @@ var schema = {
var validate = ajv.compile(schema);
-validate({ userId: 1, postId: 19 })
-.then(function (data) {
- console.log('Data is valid', data); // { userId: 1, postId: 19 }
+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 asynchronous validation functions.
+### Using transpilers with asyncronous validation functions.
To use a transpiler you should separately install it (or load its bundle in the browser).
@@ -588,9 +507,7 @@ Ajv npm package includes minified browser bundles of regenerator and nodent in d
#### Using nodent
```javascript
-var setupAsync = require('ajv-async');
var ajv = new Ajv({ /* async: 'es7', */ transpile: 'nodent' });
-setupAsync(ajv);
var validate = ajv.compile(schema); // transpiled es7 async function
validate(data).then(successFunc).catch(errorFunc);
```
@@ -601,9 +518,7 @@ validate(data).then(successFunc).catch(errorFunc);
#### Using regenerator
```javascript
-var setupAsync = require('ajv-async');
var ajv = new Ajv({ /* async: 'es7', */ transpile: 'regenerator' });
-setupAsync(ajv);
var validate = ajv.compile(schema); // transpiled es7 async function
validate(data).then(successFunc).catch(errorFunc);
```
@@ -614,7 +529,7 @@ validate(data).then(successFunc).catch(errorFunc);
#### Using other transpilers
```javascript
-var ajv = new Ajv({ async: 'es7', processCode: transpileFunc });
+var ajv = new Ajv({ async: 'es7', transpile: transpileFunc });
var validate = ajv.compile(schema); // transpiled es7 async function
validate(data).then(successFunc).catch(errorFunc);
```
@@ -626,21 +541,22 @@ See [Options](#options).
|mode|transpile<br>speed*|run-time<br>speed*|bundle<br>size|
|---|:-:|:-:|:-:|
-|es7 async<br>(native)|-|0.75|-|
|generators<br>(native)|-|1.0|-|
-|es7.nodent|1.35|1.1|215Kb|
-|es7.regenerator|1.0|2.7|1109Kb|
-|regenerator|1.0|3.2|1109Kb|
+|es7.nodent|1.35|1.1|183Kb|
+|es7.regenerator|1.0|2.7|322Kb|
+|regenerator|1.0|3.2|322Kb|
-\* Relative performance in Node.js 7.x — smaller is better.
+\* 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 Node.js and the latest Chrome
-- much better performance than native generators in other browsers
+- 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
@@ -815,7 +731,7 @@ console.log(data2); // { foo: { bar: 2 } }
- 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 `switch` keyword
+- in `if` subschema of v5 `switch` keyword
- in schemas generated by custom macro keywords
@@ -879,6 +795,8 @@ See [Coercion rules](https://github.com/epoberezkin/ajv/blob/master/COERCION.md)
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;
@@ -889,19 +807,17 @@ Validating function returns boolean and has properties `errors` with the errors
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).
-##### <a name="api-compileAsync"></a>.compileAsync(Object schema [, Boolean meta] [, Function callback]) -&gt; Promise
-
-Asynchronous version of `compile` method that loads missing remote schemas using asynchronous function in `options.loadSchema`. This function returns a Promise that resolves to a validation function. An optional callback passed to `compileAsync` will be called with 2 parameters: error (or null) and validating function. The returned promise will reject (and the callback will be called with an error) when:
+##### .compileAsync(Object schema, Function callback)
-- missing schema can't be loaded (`loadSchema` returns a Promise that rejects).
-- a schema containing a missing reference is loaded, but the reference cannot be resolved.
-- schema (or some loaded/referenced schema) is invalid.
+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:
-The function compiles schema and loads the first missing schema (or meta-schema) until all missing schemas are loaded.
+- 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.
-You can asynchronously compile meta-schema by passing `true` as the second parameter.
+The function compiles schema and loads the first missing schema multiple times, until all missing schemas are loaded.
-See example in [Asynchronous compilation](#asynchronous-schema-compilation).
+See example in [Asynchronous compilation](#asynchronous-compilation).
##### .validate(Object schema|String key|String ref, data) -&gt; Boolean
@@ -917,7 +833,7 @@ __Please note__: every time this method is called the errors are overwritten so
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]) -&gt; Ajv
+##### .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.
@@ -932,39 +848,35 @@ Although `addSchema` does not compile schemas, explicit compilation is not requi
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.
-__Please note__: Ajv uses the [method chaining syntax](https://en.wikipedia.org/wiki/Method_chaining) for all methods with the prefix `add*` and `remove*`.
-This allows you to do nice things like the following.
-```javascript
-var validate = new Ajv().addSchema(schema).addFormat(name, regex).getSchema(uri);
-```
-
-##### .addMetaSchema(Array&lt;Object&gt;|Object schema [, String key]) -&gt; Ajv
+##### .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 6 meta schema (http://json-schema.org/draft-06/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`.
+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.
+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 6 meta-schema (option `meta` should not be false).
+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.
+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). The returned validating function has `schema` property with the reference to the original schema.
+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]) -&gt; Ajv
+##### .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.
@@ -977,9 +889,9 @@ Schema can be removed using:
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) -&gt; Ajv
+##### <a name="api-addformat"></a>.addFormat(String name, String|RegExp|Function|Object format)
-Add custom format to validate strings or numbers. It can also be used to replace pre-defined formats for Ajv instance.
+Add custom format to validate strings. It can also be used to replace pre-defined formats for Ajv instance.
Strings are converted to RegExp.
@@ -988,14 +900,13 @@ 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` (defined in [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package). 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.
+- _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`.
-- _type_: an optional type of data that the format applies to. It can be `"string"` (default) or `"number"` (see https://github.com/epoberezkin/ajv/issues/291#issuecomment-259923858). If the type of data is different, the validation will pass.
Custom formats can be also added via `formats` option.
-##### <a name="api-addkeyword"></a>.addKeyword(String keyword, Object definition) -&gt; Ajv
+##### <a name="api-addkeyword"></a>.addKeyword(String keyword, Object definition)
Add custom validation keyword to Ajv instance.
@@ -1036,7 +947,7 @@ See [Defining custom keywords](#defining-custom-keywords) for more details.
Returns custom keyword definition, `true` for pre-defined keywords and `false` if the keyword is unknown.
-##### .removeKeyword(String keyword) -&gt; Ajv
+##### .removeKeyword(String keyword)
Removes custom or pre-defined keyword so you can redefine them.
@@ -1059,7 +970,7 @@ Defaults:
```javascript
{
// validation and reporting options:
- $data: false,
+ v5: false,
allErrors: false,
verbose: false,
jsonPointers: false,
@@ -1067,21 +978,19 @@ Defaults:
unicode: true,
format: 'fast',
formats: {},
- unknownFormats: true,
+ unknownFormats: 'ignore',
schemas: {},
- logger: undefined,
// referenced schema options:
- schemaId: undefined // recommended '$id'
missingRefs: true,
- extendRefs: 'ignore', // recommended 'fail'
- loadSchema: undefined, // function(uri: string): Promise {}
+ 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: 'co*',
- transpile: undefined, // requires ajv-async package
+ async: undefined,
+ transpile: undefined,
// advanced options:
meta: true,
validateSchema: true,
@@ -1092,49 +1001,41 @@ Defaults:
ownProperties: false,
multipleOfPrecision: false,
errorDataPath: 'object',
+ sourceCode: true,
messages: true,
- sourceCode: false,
- processCode: undefined, // function (str: string): string {}
- cache: new Cache,
- serialize: undefined
+ beautify: false,
+ cache: new Cache
}
```
##### Validation and reporting options
-- _$data_: support [$data references](#data-reference). Draft 6 meta-schema that is added by default will be extended to allow them. If you want to use another meta-schema you need to use $dataMetaSchema method to add support for $data reference. See [API](#api).
+- _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` property of errors using [JSON Pointers](https://tools.ietf.org/html/rfc6901) instead of JavaScript property access notation.
+- _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.
- _unknownFormats_: handling of unknown formats. Option values:
- - `true` (default) - if an unknown format is encountered the exception is thrown during schema compilation. If `format` keyword value is [$data reference](#data-reference) and it is unknown the validation will fail.
- - `[String]` - an array of unknown format names that will be ignored. This option can be used to allow usage of third party schemas with format(s) for which you don't have definitions, but still fail if another unknown format is used. If `format` keyword value is [$data reference](#data-reference) and it is not in this array the validation will fail.
- - `"ignore"` - to log warning during schema compilation and always pass validation (the default behaviour in versions before 5.0.0). This option is not recommended, as it allows to mistype format name and it won't be validated without any error message. This behaviour is required by JSON-schema specification.
-- _schemas_: an array or object of schemas that will be added to the instance. In case you pass the array the schemas must have IDs in them. When the object is passed the method `addSchema(value, key)` will be called for each schema in this object.
-- _logger_: sets the logging method. Default is the global `console` object that should have methods `log`, `warn` and `error`. Option values:
- - custom logger - it should have methods `log`, `warn` and `error`. If any of these methods is missing an exception will be thrown.
- - `false` - logging is disabled.
+ - `true` (will be default in 5.0.0) - if the unknown format is encountered the exception is thrown during schema compilation. If `format` keyword value is [v5 $data reference](#data-reference) and it is unknown the validation will fail.
+ - `[String]` - an array of unknown format names that will be ignored. This option can be used to allow usage of third party schemas with format(s) for which you don't have definitions, but still fail if some other unknown format is used. If `format` keyword value is [v5 $data reference](#data-reference) and it is not in this array the validation will fail.
+ - `"ignore"` (default now) - to log warning during schema compilation and always pass validation. This option is not recommended, as it allows to mistype format name. This behaviour is required by JSON-schema specification.
+- _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
-- _schemaId_: this option defines which keywords are used as schema URI. Option value:
- - `"$id"` (recommended) - only use `$id` keyword as schema URI (as specified in JSON Schema draft-06), ignore `id` keyword (if it is present a warning will be logged).
- - `"id"` - only use `id` keyword as schema URI (as specified in JSON Schema draft-04), ignore `$id` keyword (if it is present a warning will be logged).
- - `undefined` (default) - use both `$id` and `id` keywords as schema URI. If both are present (in the same schema object) and different the exception will be thrown during schema compilation.
- _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:
- - `"ignore"` (default) - 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"` (recommended) - if other validation keywords are used together with `$ref` the exception will be thrown when the schema is compiled. This option is recommended to make sure schema has no keywords that are ignored, which can be confusing.
- - `true` - validate all keywords in the schemas with `$ref` (the default behaviour in versions before 5.0.0).
-- _loadSchema_: asynchronous function that will be used to load remote schemas when `compileAsync` [method](#api-compileAsync) is used and some reference is missing (option `missingRefs` should NOT be 'fail' or 'ignore'). This function should accept remote schema uri as a parameter and return a Promise that resolves to a schema. See example in [Asynchronous compilation](#asynchronous-schema-compilation).
+ - `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
@@ -1157,54 +1058,42 @@ Defaults:
##### Asynchronous validation options
- _async_: determines how Ajv compiles asynchronous schemas (see [Asynchronous validation](#asynchronous-validation)) to functions. Option values:
- - `"*"` / `"co*"` (default) - compile to generator function ("co*" - wrapped with `co.wrap`). If generators are not supported and you don't provide `processCode` option (or `transpile` option if you use [ajv-async](https://github.com/epoberezkin/ajv-async) package), the exception will be thrown when async schema is compiled.
- - `"es7"` - compile to es7 async function. Unless your platform supports them you need to provide `processCode` or `transpile` option. According to [compatibility table](http://kangax.github.io/compat-table/es7/)) async functions are supported by:
- - Firefox 52,
- - Chrome 55,
- - Node.js 7 (with `--harmony-async-await`),
- - MS Edge 13 (with flag).
- - `undefined`/`true` - auto-detect async mode. It requires [ajv-async](https://github.com/epoberezkin/ajv-async) package. If `transpile` option is not passed, ajv-async will choose the first of supported/installed async/transpile modes in this order:
- - "es7" (native async functions),
- - "co*" (native generators 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.
-- _transpile_: Requires [ajv-async](https://github.com/epoberezkin/ajv-async) package. It determines whether Ajv transpiles compiled asynchronous validation function. 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. If you are passing a function, you can simply pass it to `processCode` option without using ajv-async.
+ - 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). 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.
+- _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` (or `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.
+- _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.
+- _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`.
-- _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)).
- _sourceCode_: add `sourceCode` property to validating function (for debugging; this code can be different from the result of toString call).
-- _processCode_: an optional function to process generated code before it is passed to Function constructor. It can be used to either beautify (the validating function is generated without line-breaks) or to transpile code. Starting from version 5.0.0 this option replaced options:
- - `beautify` that formatted the generated function using [js-beautify](https://github.com/beautify-web/js-beautify). If you want to beautify the generated code pass `require('js-beautify').js_beautify`.
- - `transpile` that transpiled asynchronous validation function. You can still use `transpile` option with [ajv-async](https://github.com/epoberezkin/ajv-async) package. See [Asynchronous validation](#asynchronous-validation) for more information.
+- _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()`.
-- _serialize_: an optional function to serialize schema to cache key. Pass `false` to use schema itself as a key (e.g., if WeakMap used as a cache). By default [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used.
## 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 when `validate` or `validateSchema` methods were called). In case of [asynchronous validation](#asynchronous-validation), the returned promise is rejected with exception `Ajv.ValidationError` that has `errors` property.
+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
@@ -1220,8 +1109,6 @@ Each error is an object with the following properties:
- _parentSchema_: the schema containing the keyword (added with `verbose` option)
- _data_: the data validated by the keyword (added with `verbose` option).
-__Please note__: `propertyNames` keyword schema validation errors have an additional property `propertyName`, `dataPath` points to the object. After schema validation for each property name, if it is invalid an additional error is added with the property `keyword` equal to `"propertyNames"`.
-
### Error parameters
@@ -1230,11 +1117,15 @@ Properties of `params` object in errors depend on the keyword that failed valida
- `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 dependencies).
+ - `depsCount` (the number of required dependedncies).
- `format` - property `format` (the schema of the keyword).
- `maximum`, `minimum` - properties:
- `limit` (number, the schema of the keyword),
@@ -1243,8 +1134,7 @@ Properties of `params` object in errors depend on the keyword that failed valida
- `multipleOf` - property `multipleOf` (the schema of the keyword)
- `pattern` - property `pattern` (the schema of the keyword)
- `required` - property `missingProperty` (required property that is missing).
-- `propertyNames` - property `propertyName` (an invalid property name).
-- `patternRequired` (in ajv-keywords) - property `missingPattern` (required pattern that did not match any property).
+- `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).
@@ -1254,14 +1144,10 @@ Properties of `params` object in errors depend on the keyword that failed valida
## Related packages
-- [ajv-async](https://github.com/epoberezkin/ajv-async) - configure async validation mode
-- [ajv-cli](https://github.com/jessedc/ajv-cli) - command line interface
-- [ajv-errors](https://github.com/epoberezkin/ajv-errors) - custom error messages
+- [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-istanbul](https://github.com/epoberezkin/ajv-istanbul) - instrument generated validation code to measure test coverage of your schemas
-- [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) - custom validation keywords (if/then/else, select, typeof, etc.)
-- [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) - keywords $merge and $patch
-- [ajv-pack](https://github.com/epoberezkin/ajv-pack) - produces a compact module exporting validation functions
+- [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
@@ -1272,7 +1158,7 @@ Properties of `params` object in errors depend on the keyword that failed valida
- [har-validator](https://github.com/ahmadnassri/har-validator) - HTTP Archive (HAR) validator
- [jsoneditor](https://github.com/josdejong/jsoneditor) - a web-based tool to view, edit, format, and validate JSON http://jsoneditoronline.org
- [JSON Schema Lint](https://github.com/nickcmaynard/jsonschemalint) - a web tool to validate JSON/YAML document against a single JSON-schema http://jsonschemalint.com
-- [objection](https://github.com/vincit/objection.js) - SQL-friendly ORM for Node.js
+- [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
@@ -1281,7 +1167,7 @@ Properties of `params` object in errors depend on the keyword that failed valida
- [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
+- [grunt-jsonschema-ajv](https://github.com/SignpostMarv/grunt-jsonschema-ajv) - Grunt plugin for validating files against JSON-Schema
- [extract-text-webpack-plugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) - extract text from bundle into a file
- [electron-builder](https://github.com/electron-userland/electron-builder) - a solution to package and build a ready for distribution Electron app
- [addons-linter](https://github.com/mozilla/addons-linter) - Mozilla Add-ons Linter
@@ -1311,7 +1197,7 @@ Please see [Contributing guidelines](https://github.com/epoberezkin/ajv/blob/mas
See https://github.com/epoberezkin/ajv/releases
-__Please note__: [Changes in version 5.0.0](https://github.com/epoberezkin/ajv/releases/tag/5.0.0).
+__Please note__: [Changes in version 5.0.1-beta](https://github.com/epoberezkin/ajv/releases/tag/5.0.1-beta.0).
[Changes in version 4.6.0](https://github.com/epoberezkin/ajv/releases/tag/4.6.0).
diff --git a/deps/npm/node_modules/ajv/dist/ajv.bundle.js b/deps/npm/node_modules/har-validator/node_modules/ajv/dist/ajv.bundle.js
index 25843d30c8..387d272a42 100644
--- a/deps/npm/node_modules/ajv/dist/ajv.bundle.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/dist/ajv.bundle.js
@@ -1,55 +1,224 @@
(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';
-var KEYWORDS = [
- 'multipleOf',
- 'maximum',
- 'exclusiveMaximum',
- 'minimum',
- 'exclusiveMinimum',
- 'maxLength',
- 'minLength',
- 'pattern',
- 'additionalItems',
- 'maxItems',
- 'minItems',
- 'uniqueItems',
- 'maxProperties',
- 'minProperties',
- 'required',
- 'additionalProperties',
- 'enum',
- 'format',
- 'const'
+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' }
];
-module.exports = function (metaSchema, keywordsJsonPointers) {
- for (var i=0; i<keywordsJsonPointers.length; i++) {
- metaSchema = JSON.parse(JSON.stringify(metaSchema));
- var segments = keywordsJsonPointers[i].split('/');
- var keywords = metaSchema;
- var j;
- for (j=1; j<segments.length; j++)
- keywords = keywords[segments[j]];
-
- for (j=0; j<KEYWORDS.length; j++) {
- var key = KEYWORDS[j];
- var schema = keywords[key];
- if (schema) {
- keywords[key] = {
- anyOf: [
- schema,
- { $ref: 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#' }
- ]
- };
+
+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) {
+ var name = 'regenerator';
+ regenerator = require(name);
+ 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) {
+ var name = 'nodent';
+ nodent = require(name)({ 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');
}
+}
- return metaSchema;
-};
-},{}],2:[function(require,module,exports){
+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';
@@ -85,8 +254,6 @@ module.exports = {
'$ref': require('../dotjs/ref'),
allOf: require('../dotjs/allOf'),
anyOf: require('../dotjs/anyOf'),
- const: require('../dotjs/const'),
- contains: require('../dotjs/contains'),
dependencies: require('../dotjs/dependencies'),
'enum': require('../dotjs/enum'),
format: require('../dotjs/format'),
@@ -104,141 +271,59 @@ module.exports = {
oneOf: require('../dotjs/oneOf'),
pattern: require('../dotjs/pattern'),
properties: require('../dotjs/properties'),
- propertyNames: require('../dotjs/propertyNames'),
required: require('../dotjs/required'),
uniqueItems: require('../dotjs/uniqueItems'),
validate: require('../dotjs/validate')
};
-},{"../dotjs/_limit":13,"../dotjs/_limitItems":14,"../dotjs/_limitLength":15,"../dotjs/_limitProperties":16,"../dotjs/allOf":17,"../dotjs/anyOf":18,"../dotjs/const":19,"../dotjs/contains":20,"../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":30,"../dotjs/propertyNames":31,"../dotjs/ref":32,"../dotjs/required":33,"../dotjs/uniqueItems":34,"../dotjs/validate":35}],4:[function(require,module,exports){
+},{"../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';
-var MissingRefError = require('./error_classes').MissingRef;
-
-module.exports = compileAsync;
-
+/*eslint complexity: 0*/
-/**
- * Creates validating function for passed schema with asynchronous loading of missing schemas.
- * `loadSchema` option should be a function that accepts schema uri and returns promise that resolves with the schema.
- * @this Ajv
- * @param {Object} schema schema object
- * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped
- * @param {Function} callback an optional node-style callback, it is called with 2 parameters: error (or null) and validating function.
- * @return {Promise} promise that resolves with a validating function.
- */
-function compileAsync(schema, meta, callback) {
- /* eslint no-shadow: 0 */
- /* global Promise */
- /* jshint validthis: true */
- var self = this;
- if (typeof this._opts.loadSchema != 'function')
- throw new Error('options.loadSchema should be a function');
-
- if (typeof meta == 'function') {
- callback = meta;
- meta = undefined;
- }
-
- var p = loadMetaSchemaOf(schema).then(function () {
- var schemaObj = self._addSchema(schema, undefined, meta);
- return schemaObj.validate || _compileAsync(schemaObj);
- });
-
- if (callback) {
- p.then(
- function(v) { callback(null, v); },
- callback
- );
- }
-
- return p;
+module.exports = function equal(a, b) {
+ if (a === b) return true;
+ var arrA = Array.isArray(a)
+ , arrB = Array.isArray(b)
+ , i;
- function loadMetaSchemaOf(sch) {
- var $schema = sch.$schema;
- return $schema && !self.getSchema($schema)
- ? compileAsync.call(self, { $ref: $schema }, true)
- : Promise.resolve();
+ 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;
- function _compileAsync(schemaObj) {
- try { return self._compile(schemaObj); }
- catch(e) {
- if (e instanceof MissingRefError) return loadMissingSchema(e);
- throw e;
- }
-
+ if (a && b && typeof a === 'object' && typeof b === 'object') {
+ var keys = Object.keys(a);
+ if (keys.length !== Object.keys(b).length) return false;
- function loadMissingSchema(e) {
- var ref = e.missingSchema;
- if (added(ref)) throw new Error('Schema ' + ref + ' is loaded but ' + e.missingRef + ' cannot be resolved');
+ var dateA = a instanceof Date
+ , dateB = b instanceof Date;
+ if (dateA && dateB) return a.getTime() == b.getTime();
+ if (dateA != dateB) return false;
- var schemaPromise = self._loadingSchemas[ref];
- if (!schemaPromise) {
- schemaPromise = self._loadingSchemas[ref] = self._opts.loadSchema(ref);
- schemaPromise.then(removePromise, removePromise);
- }
+ var regexpA = a instanceof RegExp
+ , regexpB = b instanceof RegExp;
+ if (regexpA && regexpB) return a.toString() == b.toString();
+ if (regexpA != regexpB) return false;
- return schemaPromise.then(function (sch) {
- if (!added(ref)) {
- return loadMetaSchemaOf(sch).then(function () {
- if (!added(ref)) self.addSchema(sch, ref, undefined, meta);
- });
- }
- }).then(function() {
- return _compileAsync(schemaObj);
- });
+ for (i = 0; i < keys.length; i++)
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
- function removePromise() {
- delete self._loadingSchemas[ref];
- }
+ for (i = 0; i < keys.length; i++)
+ if(!equal(a[keys[i]], b[keys[i]])) return false;
- function added(ref) {
- return self._refs[ref] || self._schemas[ref];
- }
- }
+ return true;
}
-}
-},{"./error_classes":5}],5:[function(require,module,exports){
-'use strict';
-
-var resolve = require('./resolve');
-
-module.exports = {
- Validation: errorSubclass(ValidationError),
- MissingRef: errorSubclass(MissingRefError)
-};
-
-
-function ValidationError(errors) {
- this.message = 'validation failed';
- this.errors = errors;
- this.ajv = this.validation = true;
-}
-
-
-MissingRefError.message = function (baseId, ref) {
- return 'can\'t resolve reference ' + ref + ' from id ' + baseId;
+ return false;
};
-
-function MissingRefError(baseId, ref, message) {
- this.message = message || MissingRefError.message(baseId, ref);
- this.missingRef = resolve.url(baseId, ref);
- this.missingSchema = resolve.normalizeId(resolve.fullPath(this.missingRef));
-}
-
-
-function errorSubclass(Subclass) {
- Subclass.prototype = Object.create(Error.prototype);
- Subclass.prototype.constructor = Subclass;
- return Subclass;
-}
-
-},{"./resolve":8}],6:[function(require,module,exports){
+},{}],5:[function(require,module,exports){
'use strict';
var util = require('./util');
@@ -247,25 +332,24 @@ 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 = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-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 URIREF = /^(?:[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;
-// uri-template: https://tools.ietf.org/html/rfc6570
-var URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;
-// For the source: https://gist.github.com/dperini/729294
-// For test cases: https://mathiasbynens.be/demo/url-regex
-// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983.
-// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu;
-var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/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)*)*)$/;
+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';
- return util.copy(formats[mode]);
+ var formatDefs = util.copy(formats[mode]);
+ for (var fName in formats.compare) {
+ formatDefs[fName] = {
+ validate: formatDefs[fName],
+ compare: formats.compare[fName]
+ };
+ }
+ return formatDefs;
}
@@ -276,14 +360,11 @@ formats.fast = {
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,
- 'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i,
- 'uri-template': URITEMPLATE,
- url: URL,
+ 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,
+ 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?)$/,
@@ -305,10 +386,7 @@ formats.full = {
time: time,
'date-time': date_time,
uri: uri,
- 'uri-reference': URIREF,
- 'uri-template': URITEMPLATE,
- url: URL,
- 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,
+ 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,
@@ -319,6 +397,13 @@ formats.full = {
};
+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);
@@ -357,16 +442,14 @@ function hostname(str) {
}
-var NOT_URI_FRAGMENT = /\/|:/;
+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);
}
-var Z_ANCHOR = /[^\\]\\Z/;
function regex(str) {
- if (Z_ANCHOR.test(str)) return false;
try {
new RegExp(str);
return true;
@@ -375,13 +458,54 @@ function regex(str) {
}
}
-},{"./util":12}],7:[function(require,module,exports){
+
+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')
- , errorClasses = require('./error_classes')
- , stableStringify = require('fast-json-stable-stringify');
+ , stableStringify = require('json-stable-stringify')
+ , async = require('../async');
+
+var beautify;
+
+function loadBeautify(){
+ if (beautify === undefined) {
+ var name = 'js-beautify';
+ try { beautify = require(name).js_beautify; }
+ catch(e) { beautify = false; }
+ }
+}
var validateGenerator = require('../dotjs/validate');
@@ -391,10 +515,10 @@ var validateGenerator = require('../dotjs/validate');
var co = require('co');
var ucs2length = util.ucs2length;
-var equal = require('fast-deep-equal');
+var equal = require('./equal');
// this error is thrown by async schemas to return validation errors via exception
-var ValidationError = errorClasses.Validation;
+var ValidationError = require('./validation_error');
module.exports = compile;
@@ -419,7 +543,8 @@ function compile(schema, root, localRefs, baseId) {
, patternsHash = {}
, defaults = []
, defaultsHash = {}
- , customRules = [];
+ , customRules = []
+ , keepSourceCode = opts.sourceCode !== false;
root = root || { schema: schema, refVal: refVal, refs: refs };
@@ -441,7 +566,7 @@ function compile(schema, root, localRefs, baseId) {
cv.refVal = v.refVal;
cv.root = v.root;
cv.$async = v.$async;
- if (opts.sourceCode) cv.source = v.source;
+ if (keepSourceCode) cv.sourceCode = v.sourceCode;
}
return v;
} finally {
@@ -461,6 +586,7 @@ function compile(schema, root, localRefs, baseId) {
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,
@@ -471,7 +597,6 @@ function compile(schema, root, localRefs, baseId) {
schemaPath: '',
errSchemaPath: '#',
errorPath: '""',
- MissingRefError: errorClasses.MissingRef,
RULES: RULES,
validate: validateGenerator,
util: util,
@@ -482,7 +607,6 @@ function compile(schema, root, localRefs, baseId) {
useCustomRule: useCustomRule,
opts: opts,
formats: formats,
- logger: self.logger,
self: self
});
@@ -490,10 +614,20 @@ function compile(schema, root, localRefs, baseId) {
+ vars(defaults, defaultCode) + vars(customRules, customRuleCode)
+ sourceCode;
- if (opts.processCode) sourceCode = opts.processCode(sourceCode);
- // console.log('\n\n\n *** \n', JSON.stringify(sourceCode));
- var validate;
+ if (opts.beautify) {
+ loadBeautify();
+ /* 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',
@@ -506,7 +640,7 @@ function compile(schema, root, localRefs, baseId) {
'equal',
'ucs2length',
'ValidationError',
- sourceCode
+ validateCode
);
validate = makeValidate(
@@ -525,7 +659,7 @@ function compile(schema, root, localRefs, baseId) {
refVal[0] = validate;
} catch(e) {
- self.logger.error('Error compiling schema, function code:', sourceCode);
+ console.error('Error compiling schema, function code:', validateCode);
throw e;
}
@@ -535,9 +669,9 @@ function compile(schema, root, localRefs, baseId) {
validate.refVal = refVal;
validate.root = isRoot ? validate : _root;
if ($async) validate.$async = true;
+ if (keepSourceCode) validate.sourceCode = sourceCode;
if (opts.sourceCode === true) {
validate.source = {
- code: sourceCode,
patterns: patterns,
defaults: defaults
};
@@ -566,7 +700,7 @@ function compile(schema, root, localRefs, baseId) {
refCode = addLocalRef(ref);
var v = resolve.call(self, localCompile, root, ref);
- if (v === undefined) {
+ if (!v) {
var localSchema = localRefs && localRefs[ref];
if (localSchema) {
v = resolve.inlineRef(localSchema, opts.inlineRefs)
@@ -575,9 +709,7 @@ function compile(schema, root, localRefs, baseId) {
}
}
- if (v === undefined) {
- removeLocalRef(ref);
- } else {
+ if (v) {
replaceLocalRef(ref, v);
return resolvedRef(v, refCode);
}
@@ -590,17 +722,13 @@ function compile(schema, root, localRefs, baseId) {
return 'refVal' + refId;
}
- function removeLocalRef(ref) {
- delete refs[ref];
- }
-
function replaceLocalRef(ref, v) {
var refId = refs[ref];
refVal[refId] = v;
}
function resolvedRef(refVal, code) {
- return typeof refVal == 'object' || typeof refVal == 'boolean'
+ return typeof refVal == 'object'
? { code: code, schema: refVal, inline: true }
: { code: code, $async: refVal && refVal.$async };
}
@@ -639,7 +767,7 @@ function compile(schema, root, localRefs, baseId) {
var valid = validateSchema(schema);
if (!valid) {
var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors);
- if (self._opts.validateSchema == 'log') self.logger.error(message);
+ if (self._opts.validateSchema == 'log') console.error(message);
else throw new Error(message);
}
}
@@ -658,12 +786,8 @@ function compile(schema, root, localRefs, baseId) {
validate = inline.call(self, it, rule.keyword, schema, parentSchema);
} else {
validate = rule.definition.validate;
- if (!validate) return;
}
- if (validate === undefined)
- throw new Error('custom keyword "' + rule.keyword + '"failed to compile');
-
var index = customRules.length;
customRules[index] = validate;
@@ -740,7 +864,7 @@ function defaultCode(i) {
function refValCode(i, refVal) {
- return refVal[i] === undefined ? '' : 'var refVal' + i + ' = refVal[' + i + '];';
+ return refVal[i] ? 'var refVal' + i + ' = refVal[' + i + '];' : '';
}
@@ -757,14 +881,13 @@ function vars(arr, statement) {
return code;
}
-},{"../dotjs/validate":35,"./error_classes":5,"./resolve":8,"./util":12,"co":40,"fast-deep-equal":41,"fast-json-stable-stringify":42}],8:[function(require,module,exports){
+},{"../async":1,"../dotjs/validate":36,"./equal":4,"./resolve":7,"./util":11,"./validation_error":12,"co":41,"json-stable-stringify":42}],7:[function(require,module,exports){
'use strict';
var url = require('url')
- , equal = require('fast-deep-equal')
+ , equal = require('./equal')
, util = require('./util')
- , SchemaObject = require('./schema_obj')
- , traverse = require('json-schema-traverse');
+ , SchemaObject = require('./schema_obj');
module.exports = resolve;
@@ -808,7 +931,7 @@ function resolve(compile, root, ref) {
if (schema instanceof SchemaObject) {
v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId);
- } else if (schema !== undefined) {
+ } else if (schema) {
v = inlineRef(schema, this._opts.inlineRefs)
? schema
: compile.call(this, schema, root, undefined, baseId);
@@ -829,7 +952,7 @@ function resolveSchema(root, ref) {
/* jshint validthis: true */
var p = url.parse(ref, false, true)
, refPath = _getFullPath(p)
- , baseId = getFullPath(this._getId(root.schema));
+ , baseId = getFullPath(root.schema.id);
if (refPath !== baseId) {
var id = normalizeId(refPath);
var refVal = this._refs[id];
@@ -850,7 +973,7 @@ function resolveSchema(root, ref) {
}
}
if (!root.schema) return;
- baseId = getFullPath(this._getId(root.schema));
+ baseId = getFullPath(root.schema.id);
}
return getJsonPointer.call(this, p, baseId, root.schema, root);
}
@@ -864,8 +987,7 @@ function resolveRecursive(root, ref, parsedRef) {
var schema = res.schema;
var baseId = res.baseId;
root = res.root;
- var id = this._getId(schema);
- if (id) baseId = resolveUrl(baseId, id);
+ if (schema.id) baseId = resolveUrl(baseId, schema.id);
return getJsonPointer.call(this, parsedRef, baseId, schema, root);
}
}
@@ -884,24 +1006,20 @@ function getJsonPointer(parsedRef, baseId, schema, root) {
if (part) {
part = util.unescapeFragment(part);
schema = schema[part];
- if (schema === undefined) break;
- var id;
- if (!PREVENT_SCOPE_CHANGE[part]) {
- id = this._getId(schema);
- if (id) baseId = resolveUrl(baseId, 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) 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 !== undefined && schema !== root.schema)
+ if (schema && schema != root.schema)
return { schema: schema, root: root, baseId: baseId };
}
@@ -991,46 +1109,48 @@ function resolveUrl(baseId, id) {
/* @this Ajv */
function resolveIds(schema) {
- var schemaId = normalizeId(this._getId(schema));
- var baseIds = {'': schemaId};
- var fullPaths = {'': getFullPath(schemaId, false)};
+ /* eslint no-shadow: 0 */
+ /* jshint validthis: true */
+ var id = normalizeId(schema.id);
var localRefs = {};
- var self = this;
+ _resolveIds.call(this, schema, getFullPath(id, false), id);
+ return localRefs;
- traverse(schema, {allKeys: true}, function(sch, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
- if (jsonPtr === '') return;
- var id = self._getId(sch);
- var baseId = baseIds[parentJsonPtr];
- var fullPath = fullPaths[parentJsonPtr] + '/' + parentKeyword;
- if (keyIndex !== undefined)
- fullPath += '/' + (typeof keyIndex == 'number' ? keyIndex : util.escapeFragment(keyIndex));
-
- if (typeof id == 'string') {
- id = baseId = normalizeId(baseId ? url.resolve(baseId, id) : id);
-
- var refVal = self._refs[id];
- if (typeof refVal == 'string') refVal = self._refs[refVal];
- if (refVal && refVal.schema) {
- if (!equal(sch, 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(sch, localRefs[id]))
+ /* @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');
- localRefs[id] = sch;
- } else {
- self._refs[id] = fullPath;
+ } 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);
}
- baseIds[jsonPtr] = baseId;
- fullPaths[jsonPtr] = fullPath;
- });
-
- return localRefs;
+ }
}
-},{"./schema_obj":10,"./util":12,"fast-deep-equal":41,"json-schema-traverse":43,"url":48}],9:[function(require,module,exports){
+},{"./equal":4,"./schema_obj":9,"./util":11,"url":50}],8:[function(require,module,exports){
'use strict';
var ruleModules = require('./_rules')
@@ -1039,58 +1159,40 @@ var ruleModules = require('./_rules')
module.exports = function rules() {
var RULES = [
{ type: 'number',
- rules: [ { 'maximum': ['exclusiveMaximum'] },
- { 'minimum': ['exclusiveMinimum'] }, 'multipleOf', 'format'] },
+ rules: [ 'maximum', 'minimum', 'multipleOf'] },
{ type: 'string',
rules: [ 'maxLength', 'minLength', 'pattern', 'format' ] },
{ type: 'array',
- rules: [ 'maxItems', 'minItems', 'uniqueItems', 'contains', 'items' ] },
+ rules: [ 'maxItems', 'minItems', 'uniqueItems', 'items' ] },
{ type: 'object',
- rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'propertyNames',
- { 'properties': ['additionalProperties', 'patternProperties'] } ] },
- { rules: [ '$ref', 'const', 'enum', 'not', 'anyOf', 'oneOf', 'allOf' ] }
+ rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'properties' ] },
+ { rules: [ '$ref', 'enum', 'not', 'anyOf', 'oneOf', 'allOf' ] }
];
- var ALL = [ 'type' ];
- var KEYWORDS = [
- 'additionalItems', '$schema', '$id', 'id', 'title',
- 'description', 'default', 'definitions'
- ];
+ 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.types = toHash(TYPES);
RULES.forEach(function (group) {
group.rules = group.rules.map(function (keyword) {
- var implKeywords;
- if (typeof keyword == 'object') {
- var key = Object.keys(keyword)[0];
- implKeywords = keyword[key];
- keyword = key;
- implKeywords.forEach(function (k) {
- ALL.push(k);
- RULES.all[k] = true;
- });
- }
ALL.push(keyword);
var rule = RULES.all[keyword] = {
keyword: keyword,
- code: ruleModules[keyword],
- implements: implKeywords
+ code: ruleModules[keyword]
};
return rule;
});
-
- if (group.type) RULES.types[group.type] = group;
});
RULES.keywords = toHash(ALL.concat(KEYWORDS));
+ RULES.types = toHash(TYPES);
RULES.custom = {};
return RULES;
};
-},{"./_rules":3,"./util":12}],10:[function(require,module,exports){
+},{"./_rules":3,"./util":11}],9:[function(require,module,exports){
'use strict';
var util = require('./util');
@@ -1101,7 +1203,7 @@ function SchemaObject(obj) {
util.copy(obj, this);
}
-},{"./util":12}],11:[function(require,module,exports){
+},{"./util":11}],10:[function(require,module,exports){
'use strict';
// https://mathiasbynens.be/notes/javascript-encoding
@@ -1123,7 +1225,7 @@ module.exports = function ucs2length(str) {
return length;
};
-},{}],12:[function(require,module,exports){
+},{}],11:[function(require,module,exports){
'use strict';
@@ -1135,20 +1237,19 @@ module.exports = {
toHash: toHash,
getProperty: getProperty,
escapeQuotes: escapeQuotes,
- equal: require('fast-deep-equal'),
ucs2length: require('./ucs2length'),
varOccurences: varOccurences,
varReplace: varReplace,
cleanUpCode: cleanUpCode,
- finalCleanUpCode: finalCleanUpCode,
+ cleanUpVarErrors: cleanUpVarErrors,
schemaHasRules: schemaHasRules,
schemaHasRulesExcept: schemaHasRulesExcept,
+ stableStringify: require('json-stable-stringify'),
toQuotedString: toQuotedString,
getPathExpr: getPathExpr,
getPath: getPath,
getData: getData,
unescapeFragment: unescapeFragment,
- unescapeJsonPointer: unescapeJsonPointer,
escapeFragment: escapeFragment,
escapeJsonPointer: escapeJsonPointer
};
@@ -1271,40 +1372,31 @@ function cleanUpCode(out) {
}
-var ERRORS_REGEXP = /[^v.]errors/g
+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 data;\s*else throw new ValidationError\(vErrors\);/
- , RETURN_DATA_ASYNC = 'return data;'
- , ROOTDATA_REGEXP = /[^A-Za-z_$]rootData[^A-Za-z0-9_$]/g
- , REMOVE_ROOTDATA = /if \(rootData === undefined\) rootData = data;/;
+ , RETURN_ASYNC = /if \(errors === 0\) return true;\s*else throw new ValidationError\(vErrors\);/
+ , RETURN_TRUE_ASYNC = 'return true;';
-function finalCleanUpCode(out, async) {
+function cleanUpVarErrors(out, async) {
var matches = out.match(ERRORS_REGEXP);
- if (matches && matches.length == 2) {
- out = async
+ if (!matches || matches.length !== 2) return out;
+ return async
? out.replace(REMOVE_ERRORS_ASYNC, '')
- .replace(RETURN_ASYNC, RETURN_DATA_ASYNC)
+ .replace(RETURN_ASYNC, RETURN_TRUE_ASYNC)
: out.replace(REMOVE_ERRORS, '')
.replace(RETURN_VALID, RETURN_TRUE);
- }
-
- matches = out.match(ROOTDATA_REGEXP);
- if (!matches || matches.length !== 3) return out;
- return out.replace(REMOVE_ROOTDATA, '');
}
function schemaHasRules(schema, rules) {
- if (typeof schema == 'boolean') return !schema;
for (var key in schema) if (rules[key]) return true;
}
function schemaHasRulesExcept(schema, rules, exceptKeyword) {
- if (typeof schema == 'boolean') return !schema && exceptKeyword != 'not';
for (var key in schema) if (key != exceptKeyword && rules[key]) return true;
}
@@ -1392,9 +1484,25 @@ function unescapeJsonPointer(str) {
return str.replace(/~1/g, '/').replace(/~0/g, '~');
}
-},{"./ucs2length":11,"fast-deep-equal":41}],13:[function(require,module,exports){
+},{"./ucs2length":10,"json-stable-stringify":42}],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__limit(it, $keyword, $ruleType) {
+module.exports = function generate__formatLimit(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -1404,7 +1512,185 @@ module.exports = function generate__limit(it, $keyword, $ruleType) {
var $breakOnError = !it.opts.allErrors;
var $errorKeyword;
var $data = 'data' + ($dataLvl || '');
- var $isData = it.opts.$data && $schema && $schema.$data,
+ 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 + it.util.getProperty($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)) + '; ';
@@ -1415,20 +1701,17 @@ module.exports = function generate__limit(it, $keyword, $ruleType) {
var $isMax = $keyword == 'maximum',
$exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum',
$schemaExcl = it.schema[$exclusiveKeyword],
- $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data,
+ $isDataExcl = it.opts.v5 && $schemaExcl && $schemaExcl.$data,
$op = $isMax ? '<' : '>',
- $notOp = $isMax ? '>' : '<',
- $errorKeyword = undefined;
+ $notOp = $isMax ? '>' : '<';
if ($isDataExcl) {
var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),
$exclusive = 'exclusive' + $lvl,
- $exclType = 'exclType' + $lvl,
- $exclIsNumber = 'exclIsNumber' + $lvl,
$opExpr = 'op' + $lvl,
$opStr = '\' + ' + $opExpr + ' + \'';
out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';
$schemaValueExcl = 'schemaExcl' + $lvl;
- out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { ';
+ out += ' var exclusive' + ($lvl) + '; if (typeof ' + ($schemaValueExcl) + ' != \'boolean\' && typeof ' + ($schemaValueExcl) + ' != \'undefined\') { ';
var $errorKeyword = $exclusiveKeyword;
var $$outStack = $$outStack || [];
$$outStack.push(out);
@@ -1456,49 +1739,27 @@ module.exports = function generate__limit(it, $keyword, $ruleType) {
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
- out += ' } else if ( ';
+ out += ' } else if( ';
if ($isData) {
out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
}
- out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';';
+ out += ' ((exclusive' + ($lvl) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ') || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = exclusive' + ($lvl) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';';
} else {
- var $exclIsNumber = typeof $schemaExcl == 'number',
+ var $exclusive = $schemaExcl === true,
$opStr = $op;
- if ($exclIsNumber && $isData) {
- var $opExpr = '\'' + $opStr + '\'';
- out += ' if ( ';
- if ($isData) {
- out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
- }
- out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { ';
- } else {
- if ($exclIsNumber && $schema === undefined) {
- $exclusive = true;
- $errorKeyword = $exclusiveKeyword;
- $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
- $schemaValue = $schemaExcl;
- $notOp += '=';
- } else {
- if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema);
- if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) {
- $exclusive = true;
- $errorKeyword = $exclusiveKeyword;
- $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
- $notOp += '=';
- } else {
- $exclusive = false;
- $opStr += '=';
- }
- }
- var $opExpr = '\'' + $opStr + '\'';
- out += ' if ( ';
- if ($isData) {
- out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
- }
- out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { ';
+ 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) + ') {';
}
- $errorKeyword = $errorKeyword || $keyword;
+ var $errorKeyword = $keyword;
var $$outStack = $$outStack || [];
$$outStack.push(out);
out = ''; /* istanbul ignore else */
@@ -1509,7 +1770,7 @@ module.exports = function generate__limit(it, $keyword, $ruleType) {
if ($isData) {
out += '\' + ' + ($schemaValue);
} else {
- out += '' + ($schemaValue) + '\'';
+ out += '' + ($schema) + '\'';
}
}
if (it.opts.verbose) {
@@ -1543,9 +1804,9 @@ module.exports = function generate__limit(it, $keyword, $ruleType) {
return out;
}
-},{}],14:[function(require,module,exports){
+},{}],15:[function(require,module,exports){
'use strict';
-module.exports = function generate__limitItems(it, $keyword, $ruleType) {
+module.exports = function generate__limitItems(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -1555,7 +1816,7 @@ module.exports = function generate__limitItems(it, $keyword, $ruleType) {
var $breakOnError = !it.opts.allErrors;
var $errorKeyword;
var $data = 'data' + ($dataLvl || '');
- var $isData = it.opts.$data && $schema && $schema.$data,
+ var $isData = it.opts.v5 && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
@@ -1621,9 +1882,9 @@ module.exports = function generate__limitItems(it, $keyword, $ruleType) {
return out;
}
-},{}],15:[function(require,module,exports){
+},{}],16:[function(require,module,exports){
'use strict';
-module.exports = function generate__limitLength(it, $keyword, $ruleType) {
+module.exports = function generate__limitLength(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -1633,7 +1894,7 @@ module.exports = function generate__limitLength(it, $keyword, $ruleType) {
var $breakOnError = !it.opts.allErrors;
var $errorKeyword;
var $data = 'data' + ($dataLvl || '');
- var $isData = it.opts.$data && $schema && $schema.$data,
+ var $isData = it.opts.v5 && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
@@ -1704,9 +1965,9 @@ module.exports = function generate__limitLength(it, $keyword, $ruleType) {
return out;
}
-},{}],16:[function(require,module,exports){
+},{}],17:[function(require,module,exports){
'use strict';
-module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
+module.exports = function generate__limitProperties(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -1716,7 +1977,7 @@ module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
var $breakOnError = !it.opts.allErrors;
var $errorKeyword;
var $data = 'data' + ($dataLvl || '');
- var $isData = it.opts.$data && $schema && $schema.$data,
+ var $isData = it.opts.v5 && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
@@ -1782,9 +2043,9 @@ module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
return out;
}
-},{}],17:[function(require,module,exports){
+},{}],18:[function(require,module,exports){
'use strict';
-module.exports = function generate_allOf(it, $keyword, $ruleType) {
+module.exports = function generate_allOf(it, $keyword) {
var out = ' ';
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
@@ -1827,9 +2088,9 @@ module.exports = function generate_allOf(it, $keyword, $ruleType) {
return out;
}
-},{}],18:[function(require,module,exports){
+},{}],19:[function(require,module,exports){
'use strict';
-module.exports = function generate_anyOf(it, $keyword, $ruleType) {
+module.exports = function generate_anyOf(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -1868,7 +2129,7 @@ module.exports = function generate_anyOf(it, $keyword, $ruleType) {
}
}
it.compositeRule = $it.compositeRule = $wasComposite;
- out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
+ out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
if (it.opts.messages !== false) {
@@ -1881,15 +2142,7 @@ module.exports = function generate_anyOf(it, $keyword, $ruleType) {
} 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; ';
- }
- }
- out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ 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 += ' } ';
}
@@ -1902,9 +2155,9 @@ module.exports = function generate_anyOf(it, $keyword, $ruleType) {
return out;
}
-},{}],19:[function(require,module,exports){
+},{}],20:[function(require,module,exports){
'use strict';
-module.exports = function generate_const(it, $keyword, $ruleType) {
+module.exports = function generate_constant(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -1914,7 +2167,7 @@ module.exports = function generate_const(it, $keyword, $ruleType) {
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
- var $isData = it.opts.$data && $schema && $schema.$data,
+ var $isData = it.opts.v5 && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
@@ -1930,7 +2183,7 @@ module.exports = function generate_const(it, $keyword, $ruleType) {
$$outStack.push(out);
out = ''; /* istanbul ignore else */
if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ out += ' { keyword: \'' + ('constant') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
if (it.opts.messages !== false) {
out += ' , message: \'should be equal to constant\' ';
}
@@ -1953,98 +2206,12 @@ module.exports = function generate_const(it, $keyword, $ruleType) {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += ' }';
- if ($breakOnError) {
- out += ' else { ';
- }
- return out;
-}
-
-},{}],20:[function(require,module,exports){
-'use strict';
-module.exports = function generate_contains(it, $keyword, $ruleType) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- var $errs = 'errs__' + $lvl;
- var $it = it.util.copy(it);
- var $closingBraces = '';
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- var $idx = 'i' + $lvl,
- $dataNxt = $it.dataLevel = it.dataLevel + 1,
- $nextData = 'data' + $dataNxt,
- $currentBaseId = it.baseId,
- $nonEmptySchema = it.util.schemaHasRules($schema, it.RULES.all);
- out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
- if ($nonEmptySchema) {
- var $wasComposite = it.compositeRule;
- it.compositeRule = $it.compositeRule = true;
- $it.schema = $schema;
- $it.schemaPath = $schemaPath;
- $it.errSchemaPath = $errSchemaPath;
- out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
- $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
- var $passData = $data + '[' + $idx + ']';
- $it.dataPathArr[$dataNxt] = $idx;
- 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 (' + ($nextValid) + ') break; } ';
- it.compositeRule = $it.compositeRule = $wasComposite;
- out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {';
- } else {
- out += ' if (' + ($data) + '.length == 0) {';
- }
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should contain a valid item\' ';
- }
- 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 ($nonEmptySchema) {
- out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
- }
- if (it.opts.allErrors) {
- out += ' } ';
- }
- out = it.util.cleanUpCode(out);
return out;
}
},{}],21:[function(require,module,exports){
'use strict';
-module.exports = function generate_custom(it, $keyword, $ruleType) {
+module.exports = function generate_custom(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -2056,7 +2223,7 @@ module.exports = function generate_custom(it, $keyword, $ruleType) {
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
var $errs = 'errs__' + $lvl;
- var $isData = it.opts.$data && $schema && $schema.$data,
+ var $isData = it.opts.v5 && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
@@ -2066,8 +2233,7 @@ module.exports = function generate_custom(it, $keyword, $ruleType) {
}
var $rule = this,
$definition = 'definition' + $lvl,
- $rDef = $rule.definition,
- $closingBraces = '';
+ $rDef = $rule.definition;
var $compile, $inline, $macro, $ruleValidate, $validateCode;
if ($isData && $rDef.$data) {
$validateCode = 'keywordValidate' + $lvl;
@@ -2075,7 +2241,6 @@ module.exports = function generate_custom(it, $keyword, $ruleType) {
out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;';
} else {
$ruleValidate = it.useCustomRule($rule, $schema, it.schema, it);
- if (!$ruleValidate) return;
$schemaValue = 'validate.schema' + $schemaPath;
$validateCode = $ruleValidate.code;
$compile = $rDef.compile;
@@ -2091,13 +2256,8 @@ module.exports = function generate_custom(it, $keyword, $ruleType) {
out += '' + ($ruleErrs) + ' = null;';
}
out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
- if ($isData && $rDef.$data) {
- $closingBraces += '}';
- out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { ';
- if ($validateSchema) {
- $closingBraces += '}';
- out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { ';
- }
+ if ($validateSchema) {
+ out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') {';
}
if ($inline) {
if ($rDef.statements) {
@@ -2107,7 +2267,6 @@ module.exports = function generate_custom(it, $keyword, $ruleType) {
}
} else if ($macro) {
var $it = it.util.copy(it);
- var $closingBraces = '';
$it.level++;
var $nextValid = 'valid' + $it.level;
$it.schema = $ruleValidate.validate;
@@ -2157,9 +2316,11 @@ module.exports = function generate_custom(it, $keyword, $ruleType) {
}
}
if ($rDef.modifying) {
- out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];';
+ out += ' ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];';
+ }
+ if ($validateSchema) {
+ out += ' }';
}
- out += '' + ($closingBraces);
if ($rDef.valid) {
if ($breakOnError) {
out += ' if (true) { ';
@@ -2272,7 +2433,7 @@ module.exports = function generate_custom(it, $keyword, $ruleType) {
},{}],22:[function(require,module,exports){
'use strict';
-module.exports = function generate_dependencies(it, $keyword, $ruleType) {
+module.exports = function generate_dependencies(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -2287,8 +2448,7 @@ module.exports = function generate_dependencies(it, $keyword, $ruleType) {
$it.level++;
var $nextValid = 'valid' + $it.level;
var $schemaDeps = {},
- $propertyDeps = {},
- $ownProperties = it.opts.ownProperties;
+ $propertyDeps = {};
for ($property in $schema) {
var $sch = $schema[$property];
var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps;
@@ -2299,115 +2459,100 @@ module.exports = function generate_dependencies(it, $keyword, $ruleType) {
out += 'var missing' + ($lvl) + ';';
for (var $property in $propertyDeps) {
$deps = $propertyDeps[$property];
- if ($deps.length) {
- out += ' if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
- if ($ownProperties) {
- out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') ';
- }
- if ($breakOnError) {
- out += ' && ( ';
- var arr1 = $deps;
- if (arr1) {
- var $propertyKey, $i = -1,
- l1 = arr1.length - 1;
- while ($i < l1) {
- $propertyKey = arr1[$i += 1];
- if ($i) {
- out += ' || ';
- }
- var $prop = it.util.getProperty($propertyKey),
- $useData = $data + $prop;
- out += ' ( ( ' + ($useData) + ' === undefined ';
- if ($ownProperties) {
- out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
- }
- out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $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: \'' + ('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 += ' 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 += ' || ';
}
- out += ' } ';
- } else {
- out += ' {} ';
+ var $prop = it.util.getProperty(_$property);
+ out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop)) + ') ) ';
}
- var __err = out;
- out = $$outStack.pop();
- if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
- if (it.async) {
- out += ' throw new ValidationError([' + (__err) + ']); ';
+ }
+ 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: \'' + ('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 += ' validate.errors = [' + (__err) + ']; return false; ';
+ 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 += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
- out += ' ) { ';
- var arr2 = $deps;
- if (arr2) {
- var $propertyKey, i2 = -1,
- l2 = arr2.length - 1;
- while (i2 < l2) {
- $propertyKey = arr2[i2 += 1];
- var $prop = it.util.getProperty($propertyKey),
- $missingProperty = it.util.escapeQuotes($propertyKey),
- $useData = $data + $prop;
- if (it.opts._errorDataPathProperty) {
- it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
- }
- out += ' if ( ' + ($useData) + ' === undefined ';
- if ($ownProperties) {
- out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
- }
- out += ') { var err = '; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('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 += ' 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: \'' + ('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 += ' } ';
- } else {
- out += ' {} ';
+ out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' ';
}
- out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
+ 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 { ';
- }
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ $closingBraces += '}';
+ out += ' else { ';
}
}
it.errorPath = $currentErrorPath;
@@ -2415,11 +2560,7 @@ module.exports = function generate_dependencies(it, $keyword, $ruleType) {
for (var $property in $schemaDeps) {
var $sch = $schemaDeps[$property];
if (it.util.schemaHasRules($sch, it.RULES.all)) {
- out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
- if ($ownProperties) {
- out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') ';
- }
- out += ') { ';
+ out += ' ' + ($nextValid) + ' = true; if (' + ($data) + (it.util.getProperty($property)) + ' !== undefined) { ';
$it.schema = $sch;
$it.schemaPath = $schemaPath + it.util.getProperty($property);
$it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);
@@ -2441,7 +2582,7 @@ module.exports = function generate_dependencies(it, $keyword, $ruleType) {
},{}],23:[function(require,module,exports){
'use strict';
-module.exports = function generate_enum(it, $keyword, $ruleType) {
+module.exports = function generate_enum(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -2451,7 +2592,7 @@ module.exports = function generate_enum(it, $keyword, $ruleType) {
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
- var $isData = it.opts.$data && $schema && $schema.$data,
+ var $isData = it.opts.v5 && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
@@ -2508,7 +2649,7 @@ module.exports = function generate_enum(it, $keyword, $ruleType) {
},{}],24:[function(require,module,exports){
'use strict';
-module.exports = function generate_format(it, $keyword, $ruleType) {
+module.exports = function generate_format(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -2523,7 +2664,7 @@ module.exports = function generate_format(it, $keyword, $ruleType) {
}
return out;
}
- var $isData = it.opts.$data && $schema && $schema.$data,
+ var $isData = it.opts.v5 && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
@@ -2534,10 +2675,8 @@ module.exports = function generate_format(it, $keyword, $ruleType) {
var $unknownFormats = it.opts.unknownFormats,
$allowUnknown = Array.isArray($unknownFormats);
if ($isData) {
- var $format = 'format' + $lvl,
- $isObject = 'isObject' + $lvl,
- $formatType = 'formatType' + $lvl;
- out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { ';
+ var $format = 'format' + $lvl;
+ out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var isObject' + ($lvl) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; if (isObject' + ($lvl) + ') { ';
if (it.async) {
out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; ';
}
@@ -2546,14 +2685,14 @@ module.exports = function generate_format(it, $keyword, $ruleType) {
out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
}
out += ' (';
- if ($unknownFormats != 'ignore') {
+ if ($unknownFormats === true || $allowUnknown) {
out += ' (' + ($schemaValue) + ' && !' + ($format) + ' ';
if ($allowUnknown) {
out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 ';
}
out += ') || ';
}
- out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? ';
+ out += ' (' + ($format) + ' && !(typeof ' + ($format) + ' == \'function\' ? ';
if (it.async) {
out += ' (async' + ($lvl) + ' ? ' + (it.yieldAwait) + ' ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) ';
} else {
@@ -2563,33 +2702,24 @@ module.exports = function generate_format(it, $keyword, $ruleType) {
} else {
var $format = it.formats[$schema];
if (!$format) {
- if ($unknownFormats == 'ignore') {
- it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"');
- if ($breakOnError) {
- out += ' if (true) { ';
+ if ($unknownFormats === true || ($allowUnknown && $unknownFormats.indexOf($schema) == -1)) {
+ throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"');
+ } else {
+ if (!$allowUnknown) {
+ console.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"');
+ if ($unknownFormats !== 'ignore') console.warn('In the next major version it will throw exception. See option unknownFormats for more information');
}
- return out;
- } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) {
if ($breakOnError) {
out += ' if (true) { ';
}
return out;
- } else {
- throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"');
}
}
var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate;
- var $formatType = $isObject && $format.type || 'string';
if ($isObject) {
var $async = $format.async === true;
$format = $format.validate;
}
- if ($formatType != $ruleType) {
- if ($breakOnError) {
- out += ' if (true) { ';
- }
- return out;
- }
if ($async) {
if (!it.async) throw new Error('async format in sync schema');
var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';
@@ -2659,7 +2789,7 @@ module.exports = function generate_format(it, $keyword, $ruleType) {
},{}],25:[function(require,module,exports){
'use strict';
-module.exports = function generate_items(it, $keyword, $ruleType) {
+module.exports = function generate_items(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -2790,7 +2920,11 @@ module.exports = function generate_items(it, $keyword, $ruleType) {
if ($breakOnError) {
out += ' if (!' + ($nextValid) + ') break; ';
}
- out += ' }';
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
}
if ($breakOnError) {
out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
@@ -2801,7 +2935,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) {
},{}],26:[function(require,module,exports){
'use strict';
-module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
+module.exports = function generate_multipleOf(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -2810,7 +2944,7 @@ module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
- var $isData = it.opts.$data && $schema && $schema.$data,
+ var $isData = it.opts.v5 && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
@@ -2843,7 +2977,7 @@ module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
if ($isData) {
out += '\' + ' + ($schemaValue);
} else {
- out += '' + ($schemaValue) + '\'';
+ out += '' + ($schema) + '\'';
}
}
if (it.opts.verbose) {
@@ -2879,7 +3013,7 @@ module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
},{}],27:[function(require,module,exports){
'use strict';
-module.exports = function generate_not(it, $keyword, $ruleType) {
+module.exports = function generate_not(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -2964,7 +3098,7 @@ module.exports = function generate_not(it, $keyword, $ruleType) {
},{}],28:[function(require,module,exports){
'use strict';
-module.exports = function generate_oneOf(it, $keyword, $ruleType) {
+module.exports = function generate_oneOf(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -3006,7 +3140,10 @@ module.exports = function generate_oneOf(it, $keyword, $ruleType) {
}
}
it.compositeRule = $it.compositeRule = $wasComposite;
- out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
+ out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
if (it.opts.messages !== false) {
@@ -3019,13 +3156,16 @@ module.exports = function generate_oneOf(it, $keyword, $ruleType) {
} else {
out += ' {} ';
}
- out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ var __err = out;
+ out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
if (it.async) {
- out += ' throw new ValidationError(vErrors); ';
+ out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
- out += ' validate.errors = vErrors; return false; ';
+ 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) {
@@ -3036,7 +3176,7 @@ module.exports = function generate_oneOf(it, $keyword, $ruleType) {
},{}],29:[function(require,module,exports){
'use strict';
-module.exports = function generate_pattern(it, $keyword, $ruleType) {
+module.exports = function generate_pattern(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -3045,7 +3185,7 @@ module.exports = function generate_pattern(it, $keyword, $ruleType) {
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
- var $isData = it.opts.$data && $schema && $schema.$data,
+ var $isData = it.opts.v5 && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
@@ -3112,7 +3252,60 @@ module.exports = function generate_pattern(it, $keyword, $ruleType) {
},{}],30:[function(require,module,exports){
'use strict';
-module.exports = function generate_properties(it, $keyword, $ruleType) {
+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 + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ 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: \'' + ('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;
@@ -3128,10 +3321,8 @@ module.exports = function generate_properties(it, $keyword, $ruleType) {
$it.level++;
var $nextValid = 'valid' + $it.level;
var $key = 'key' + $lvl,
- $idx = 'idx' + $lvl,
$dataNxt = $it.dataLevel = it.dataLevel + 1,
- $nextData = 'data' + $dataNxt,
- $dataProperties = 'dataProperties' + $lvl;
+ $nextData = 'data' + $dataNxt;
var $schemaKeys = Object.keys($schema || {}),
$pProperties = it.schema.patternProperties || {},
$pPropertyKeys = Object.keys($pProperties),
@@ -3145,19 +3336,15 @@ module.exports = function generate_properties(it, $keyword, $ruleType) {
$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.patternGroups) {
+ if (it.opts.v5) {
var $pgProperties = it.schema.patternGroups || {},
$pgPropertyKeys = Object.keys($pgProperties);
}
out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;';
- if ($ownProperties) {
- out += ' var ' + ($dataProperties) + ' = undefined;';
- }
if ($checkAdditional) {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
if ($ownProperties) {
- out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
- } else {
- out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; ';
}
if ($someProperties) {
out += ' var isAdditional' + ($lvl) + ' = !(false ';
@@ -3187,7 +3374,7 @@ module.exports = function generate_properties(it, $keyword, $ruleType) {
}
}
}
- if (it.opts.patternGroups && $pgPropertyKeys.length) {
+ if (it.opts.v5 && $pgPropertyKeys && $pgPropertyKeys.length) {
var arr3 = $pgPropertyKeys;
if (arr3) {
var $pgProperty, $i = -1,
@@ -3327,11 +3514,7 @@ module.exports = function generate_properties(it, $keyword, $ruleType) {
out += ' ' + ($code) + ' ';
} else {
if ($requiredHash && $requiredHash[$propertyKey]) {
- out += ' if ( ' + ($useData) + ' === undefined ';
- if ($ownProperties) {
- out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
- }
- out += ') { ' + ($nextValid) + ' = false; ';
+ out += ' if (' + ($useData) + ' === undefined) { ' + ($nextValid) + ' = false; ';
var $currentErrorPath = it.errorPath,
$currErrSchemaPath = $errSchemaPath,
$missingProperty = it.util.escapeQuotes($propertyKey);
@@ -3376,17 +3559,9 @@ module.exports = function generate_properties(it, $keyword, $ruleType) {
out += ' } else { ';
} else {
if ($breakOnError) {
- out += ' if ( ' + ($useData) + ' === undefined ';
- if ($ownProperties) {
- out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
- }
- out += ') { ' + ($nextValid) + ' = true; } else { ';
+ out += ' if (' + ($useData) + ' === undefined) { ' + ($nextValid) + ' = true; } else { ';
} else {
- out += ' if (' + ($useData) + ' !== undefined ';
- if ($ownProperties) {
- out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
- }
- out += ' ) { ';
+ out += ' if (' + ($useData) + ' !== undefined) { ';
}
}
out += ' ' + ($code) + ' } ';
@@ -3399,51 +3574,48 @@ module.exports = function generate_properties(it, $keyword, $ruleType) {
}
}
}
- if ($pPropertyKeys.length) {
- 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);
- if ($ownProperties) {
- out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
- } else {
- out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
- }
- out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { ';
- $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
- var $passData = $data + '[' + $key + ']';
- $it.dataPathArr[$dataNxt] = $key;
- 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 (!' + ($nextValid) + ') break; ';
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' else ' + ($nextValid) + ' = true; ';
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' if (' + ($nextValid) + ') { ';
- $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, it.opts.jsonPointers);
+ var $passData = $data + '[' + $key + ']';
+ $it.dataPathArr[$dataNxt] = $key;
+ 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 (!' + ($nextValid) + ') break; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else ' + ($nextValid) + ' = true; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
}
}
}
}
- if (it.opts.patternGroups && $pgPropertyKeys.length) {
+ if (it.opts.v5) {
var arr6 = $pgPropertyKeys;
if (arr6) {
var $pgProperty, i6 = -1,
@@ -3456,11 +3628,9 @@ module.exports = function generate_properties(it, $keyword, $ruleType) {
$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; ';
+ out += ' var pgPropCount' + ($lvl) + ' = 0; for (var ' + ($key) + ' in ' + ($data) + ') { ';
if ($ownProperties) {
- out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
- } else {
- out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ 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, it.opts.jsonPointers);
@@ -3580,92 +3750,9 @@ module.exports = function generate_properties(it, $keyword, $ruleType) {
return out;
}
-},{}],31:[function(require,module,exports){
-'use strict';
-module.exports = function generate_propertyNames(it, $keyword, $ruleType) {
- var out = ' ';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $data = 'data' + ($dataLvl || '');
- var $errs = 'errs__' + $lvl;
- var $it = it.util.copy(it);
- var $closingBraces = '';
- $it.level++;
- var $nextValid = 'valid' + $it.level;
- if (it.util.schemaHasRules($schema, it.RULES.all)) {
- $it.schema = $schema;
- $it.schemaPath = $schemaPath;
- $it.errSchemaPath = $errSchemaPath;
- var $key = 'key' + $lvl,
- $idx = 'idx' + $lvl,
- $i = 'i' + $lvl,
- $invalidName = '\' + ' + $key + ' + \'',
- $dataNxt = $it.dataLevel = it.dataLevel + 1,
- $nextData = 'data' + $dataNxt,
- $dataProperties = 'dataProperties' + $lvl,
- $ownProperties = it.opts.ownProperties,
- $currentBaseId = it.baseId;
- out += ' var ' + ($errs) + ' = errors; ';
- if ($ownProperties) {
- out += ' var ' + ($dataProperties) + ' = undefined; ';
- }
- if ($ownProperties) {
- out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
- } else {
- out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
- }
- out += ' var startErrs' + ($lvl) + ' = errors; ';
- var $passData = $key;
- var $wasComposite = it.compositeRule;
- it.compositeRule = $it.compositeRule = true;
- 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) + ' ';
- }
- it.compositeRule = $it.compositeRule = $wasComposite;
- out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + '<errors; ' + ($i) + '++) { vErrors[' + ($i) + '].propertyName = ' + ($key) + '; } var err = '; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('propertyNames') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { propertyName: \'' + ($invalidName) + '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'property name \\\'' + ($invalidName) + '\\\' is invalid\' ';
- }
- 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; ';
- }
- }
- if ($breakOnError) {
- out += ' break; ';
- }
- out += ' } }';
- }
- 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, $ruleType) {
+module.exports = function generate_ref(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -3686,9 +3773,9 @@ module.exports = function generate_ref(it, $keyword, $ruleType) {
} else {
var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot);
if ($refVal === undefined) {
- var $message = it.MissingRefError.message(it.baseId, $schema);
+ var $message = 'can\'t resolve reference ' + $schema + ' from id ' + it.baseId;
if (it.opts.missingRefs == 'fail') {
- it.logger.error($message);
+ console.log($message);
var $$outStack = $$outStack || [];
$$outStack.push(out);
out = ''; /* istanbul ignore else */
@@ -3719,12 +3806,15 @@ module.exports = function generate_ref(it, $keyword, $ruleType) {
out += ' if (false) { ';
}
} else if (it.opts.missingRefs == 'ignore') {
- it.logger.warn($message);
+ console.log($message);
if ($breakOnError) {
out += ' if (true) { ';
}
} else {
- throw new it.MissingRefError(it.baseId, $schema, $message);
+ 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);
@@ -3763,18 +3853,11 @@ module.exports = function generate_ref(it, $keyword, $ruleType) {
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 += 'var ' + ($valid) + ' =';
}
- out += ' try { ' + (it.yieldAwait) + ' ' + (__callValidate) + '; ';
- if ($breakOnError) {
- out += ' ' + ($valid) + ' = true; ';
- }
- out += ' } 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 += ' ' + ($valid) + ' = false; ';
- }
- out += ' } ';
+ 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) + ') { ';
}
@@ -3790,7 +3873,7 @@ module.exports = function generate_ref(it, $keyword, $ruleType) {
},{}],33:[function(require,module,exports){
'use strict';
-module.exports = function generate_required(it, $keyword, $ruleType) {
+module.exports = function generate_required(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -3800,7 +3883,7 @@ module.exports = function generate_required(it, $keyword, $ruleType) {
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
- var $isData = it.opts.$data && $schema && $schema.$data,
+ var $isData = it.opts.v5 && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
@@ -3830,8 +3913,7 @@ module.exports = function generate_required(it, $keyword, $ruleType) {
}
if ($isData || $required.length) {
var $currentErrorPath = it.errorPath,
- $loopRequired = $isData || $required.length >= it.opts.loopRequired,
- $ownProperties = it.opts.ownProperties;
+ $loopRequired = $isData || $required.length >= it.opts.loopRequired;
if ($breakOnError) {
out += ' var missing' + ($lvl) + '; ';
if ($loopRequired) {
@@ -3848,11 +3930,7 @@ module.exports = function generate_required(it, $keyword, $ruleType) {
if ($isData) {
out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';
}
- out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined ';
- if ($ownProperties) {
- out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) ';
- }
- out += '; if (!' + ($valid) + ') break; } ';
+ out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined; if (!' + ($valid) + ') break; } ';
if ($isData) {
out += ' } ';
}
@@ -3894,20 +3972,15 @@ module.exports = function generate_required(it, $keyword, $ruleType) {
out += ' if ( ';
var arr2 = $required;
if (arr2) {
- var $propertyKey, $i = -1,
+ var _$property, $i = -1,
l2 = arr2.length - 1;
while ($i < l2) {
- $propertyKey = arr2[$i += 1];
+ _$property = arr2[$i += 1];
if ($i) {
out += ' || ';
}
- var $prop = it.util.getProperty($propertyKey),
- $useData = $data + $prop;
- out += ' ( ( ' + ($useData) + ' === undefined ';
- if ($ownProperties) {
- out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
- }
- out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) ';
+ var $prop = it.util.getProperty(_$property);
+ out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop)) + ') ) ';
}
}
out += ') { ';
@@ -3983,11 +4056,7 @@ module.exports = function generate_required(it, $keyword, $ruleType) {
}
out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { ';
}
- out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined ';
- if ($ownProperties) {
- out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) ';
- }
- out += ') { var err = '; /* istanbul ignore else */
+ out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined) { var err = '; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
if (it.opts.messages !== false) {
@@ -4013,21 +4082,16 @@ module.exports = function generate_required(it, $keyword, $ruleType) {
} else {
var arr3 = $required;
if (arr3) {
- var $propertyKey, i3 = -1,
+ var $reqProperty, i3 = -1,
l3 = arr3.length - 1;
while (i3 < l3) {
- $propertyKey = arr3[i3 += 1];
- var $prop = it.util.getProperty($propertyKey),
- $missingProperty = it.util.escapeQuotes($propertyKey),
- $useData = $data + $prop;
+ $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, $propertyKey, it.opts.jsonPointers);
+ it.errorPath = it.util.getPath($currentErrorPath, $reqProperty, it.opts.jsonPointers);
}
- out += ' if ( ' + ($useData) + ' === undefined ';
- if ($ownProperties) {
- out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
- }
- out += ') { var err = '; /* istanbul ignore else */
+ out += ' if (' + ($data) + ($prop) + ' === undefined) { var err = '; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
if (it.opts.messages !== false) {
@@ -4060,7 +4124,137 @@ module.exports = function generate_required(it, $keyword, $ruleType) {
},{}],34:[function(require,module,exports){
'use strict';
-module.exports = function generate_uniqueItems(it, $keyword, $ruleType) {
+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 + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $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) + ' = ' + ($nextValid) + '; 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: \'' + ('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 ' + ($nextValid) + ' = ' + ($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: \'' + ('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 ' + ($nextValid) + ' = ' + ($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) + ' = ' + ($nextValid) + '; ';
+ 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;
@@ -4070,7 +4264,7 @@ module.exports = function generate_uniqueItems(it, $keyword, $ruleType) {
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
- var $isData = it.opts.$data && $schema && $schema.$data,
+ var $isData = it.opts.v5 && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
@@ -4131,25 +4325,31 @@ module.exports = function generate_uniqueItems(it, $keyword, $ruleType) {
return out;
}
-},{}],35:[function(require,module,exports){
+},{}],36:[function(require,module,exports){
'use strict';
-module.exports = function generate_validate(it, $keyword, $ruleType) {
+module.exports = function generate_validate(it, $keyword) {
var out = '';
- var $async = it.schema.$async === true,
- $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'),
- $id = it.self._getId(it.schema);
+ 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 != '*') {
+ if (it.opts.async == 'co*') {
out += 'co.wrap';
}
out += '(function* ';
@@ -4157,87 +4357,14 @@ module.exports = function generate_validate(it, $keyword, $ruleType) {
} else {
out += ' (function ';
}
- out += ' (data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; ';
- if ($id && (it.opts.sourceCode || it.opts.processCode)) {
- out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' ';
- }
- }
- if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) {
- var $keyword = 'false schema';
- var $lvl = it.level;
- var $dataLvl = it.dataLevel;
- var $schema = it.schema[$keyword];
- var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
- var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
- var $breakOnError = !it.opts.allErrors;
- var $errorKeyword;
- var $data = 'data' + ($dataLvl || '');
- var $valid = 'valid' + $lvl;
- if (it.schema === false) {
- if (it.isTop) {
- $breakOnError = true;
- } else {
- out += ' var ' + ($valid) + ' = false; ';
- }
- var $$outStack = $$outStack || [];
- $$outStack.push(out);
- out = ''; /* istanbul ignore else */
- if (it.createErrors !== false) {
- out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
- if (it.opts.messages !== false) {
- out += ' , message: \'boolean schema is false\' ';
- }
- 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++; ';
- }
- } else {
- if (it.isTop) {
- if ($async) {
- out += ' return data; ';
- } else {
- out += ' validate.errors = null; return true; ';
- }
- } else {
- out += ' var ' + ($valid) + ' = true; ';
- }
- }
- if (it.isTop) {
- out += ' }); return validate; ';
- }
- return out;
- }
- if (it.isTop) {
- var $top = it.isTop,
- $lvl = it.level = 0,
- $dataLvl = it.dataLevel = 0,
- $data = 'data';
- it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema));
- it.baseId = it.baseId || it.rootId;
- delete it.isTop;
- it.dataPathArr = [undefined];
- out += ' var vErrors = null; ';
+ out += ' (data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; var vErrors = null; ';
out += ' var errors = 0; ';
- out += ' if (rootData === undefined) rootData = data; ';
+ out += ' if (rootData === undefined) rootData = data;';
} else {
var $lvl = it.level,
$dataLvl = it.dataLevel,
$data = 'data' + ($dataLvl || '');
- if ($id) it.baseId = it.resolve.url(it.baseId, $id);
+ 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;';
}
@@ -4245,160 +4372,111 @@ module.exports = function generate_validate(it, $keyword, $ruleType) {
$breakOnError = !it.opts.allErrors,
$closingBraces1 = '',
$closingBraces2 = '';
- var $errorKeyword;
var $typeSchema = it.schema.type,
$typeIsArray = Array.isArray($typeSchema);
- if ($typeIsArray && $typeSchema.length == 1) {
- $typeSchema = $typeSchema[0];
- $typeIsArray = false;
- }
- if (it.schema.$ref && $refKeywords) {
- if (it.opts.extendRefs == 'fail') {
- throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)');
- } else if (it.opts.extendRefs !== true) {
- $refKeywords = false;
- it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
- }
- }
- if ($typeSchema) {
- if (it.opts.coerceTypes) {
- var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema);
- }
- var $rulesGroup = it.RULES.types[$typeSchema];
- if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) {
- var $schemaPath = it.schemaPath + '.type',
- $errSchemaPath = it.errSchemaPath + '/type';
+ 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)) + ') { ';
- if ($coerceToTypes) {
- 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 += ' 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 += '}';
}
- }
- 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);
+ if (it.opts.coerceTypes == 'array' && $type != 'array') {
+ out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } ';
}
- out += '\' } ';
- if (it.opts.messages !== false) {
- out += ' , message: \'should be ';
- if ($typeIsArray) {
- out += '' + ($typeSchema.join(","));
- } else {
- out += '' + ($typeSchema);
+ 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 += '\' ';
+ 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) + ']; ';
}
- 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; ';
- }
+ }
+ out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
} else {
- out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
- }
- out += ' } else { ';
- var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
- $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
- out += ' ' + ($data) + ' = ' + ($coerced) + '; ';
- if (!$dataLvl) {
- out += 'if (' + ($parentData) + ' !== undefined)';
+ out += '' + ($typeSchema);
}
- out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } ';
- } else {
- 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: \'';
+ out += '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ';
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 += ' {} ';
+ 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; ';
- }
+ 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 += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
}
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
- out += ' } ';
+ out += ' } else { ';
+ var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
+ $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
+ out += ' ' + ($data) + ' = ' + ($coerced) + '; ';
+ if (!$dataLvl) {
+ out += 'if (' + ($parentData) + ' !== undefined)';
+ }
+ out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } } ';
+ }
+ }
+ 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) {
@@ -4414,9 +4492,6 @@ module.exports = function generate_validate(it, $keyword, $ruleType) {
$closingBraces2 += '}';
}
} else {
- if (it.opts.v5 && it.schema.patternGroups) {
- it.logger.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.');
- }
var arr2 = it.RULES;
if (arr2) {
var $rulesGroup, i2 = -1,
@@ -4478,12 +4553,9 @@ module.exports = function generate_validate(it, $keyword, $ruleType) {
while (i5 < l5) {
$rule = arr5[i5 += 1];
if ($shouldUseRule($rule)) {
- var $code = $rule.code(it, $rule.keyword, $rulesGroup.type);
- if ($code) {
- out += ' ' + ($code) + ' ';
- if ($breakOnError) {
- $closingBraces1 += '}';
- }
+ out += ' ' + ($rule.code(it, $rule.keyword)) + ' ';
+ if ($breakOnError) {
+ $closingBraces1 += '}';
}
}
}
@@ -4495,6 +4567,7 @@ module.exports = function generate_validate(it, $keyword, $ruleType) {
if ($rulesGroup.type) {
out += ' } ';
if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) {
+ var $typeChecked = true;
out += ' else { ';
var $schemaPath = it.schemaPath + '.type',
$errSchemaPath = it.errSchemaPath + '/type';
@@ -4502,7 +4575,7 @@ module.exports = function generate_validate(it, $keyword, $ruleType) {
$$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: \'';
+ out += ' { keyword: \'' + ('type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
if ($typeIsArray) {
out += '' + ($typeSchema.join(","));
} else {
@@ -4553,12 +4626,57 @@ module.exports = function generate_validate(it, $keyword, $ruleType) {
}
}
}
+ if ($typeSchema && !$typeChecked && !$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: \'' + ('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 data; ';
+ out += ' if (errors === 0) return true; ';
out += ' else throw new ValidationError(vErrors); ';
} else {
out += ' validate.errors = vErrors; ';
@@ -4569,32 +4687,25 @@ module.exports = function generate_validate(it, $keyword, $ruleType) {
out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';';
}
out = it.util.cleanUpCode(out);
- if ($top) {
- out = it.util.finalCleanUpCode(out, $async);
+ if ($top && $breakOnError) {
+ out = it.util.cleanUpVarErrors(out, $async);
}
function $shouldUseGroup($rulesGroup) {
- var rules = $rulesGroup.rules;
- for (var i = 0; i < rules.length; i++)
- if ($shouldUseRule(rules[i])) return true;
+ 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.implements && $ruleImplementsSomeKeyword($rule));
- }
-
- function $ruleImplementsSomeKeyword($rule) {
- var impl = $rule.implements;
- for (var i = 0; i < impl.length; i++)
- if (it.schema[impl[i]] !== undefined) return true;
+ 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;
}
-},{}],36:[function(require,module,exports){
+},{}],37:[function(require,module,exports){
'use strict';
-var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;
+var IDENTIFIER = /^[a-z_$][a-z0-9_$\-]*$/i;
var customRuleCode = require('./dotjs/custom');
module.exports = {
@@ -4608,7 +4719,6 @@ module.exports = {
* @this Ajv
* @param {String} keyword custom keyword, should be unique (including 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`.
- * @return {Ajv} this for method chaining
*/
function addKeyword(keyword, definition) {
/* jshint validthis: true */
@@ -4635,7 +4745,7 @@ function addKeyword(keyword, definition) {
_addRule(keyword, dataType, definition);
}
- var $data = definition.$data === true && this._opts.$data;
+ var $data = definition.$data === true && this._opts.v5;
if ($data && !definition.validate)
throw new Error('$data support: "validate" function is not defined');
@@ -4645,7 +4755,7 @@ function addKeyword(keyword, definition) {
metaSchema = {
anyOf: [
metaSchema,
- { '$ref': 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#' }
+ { '$ref': 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#/definitions/$data' }
]
};
}
@@ -4675,8 +4785,7 @@ function addKeyword(keyword, definition) {
keyword: keyword,
definition: definition,
custom: true,
- code: customRuleCode,
- implements: definition.implements
+ code: customRuleCode
};
ruleGroup.rules.push(rule);
RULES.custom[keyword] = rule;
@@ -4686,8 +4795,6 @@ function addKeyword(keyword, definition) {
function checkDataType(dataType) {
if (!RULES.types[dataType]) throw new Error('Unknown type ' + dataType);
}
-
- return this;
}
@@ -4708,7 +4815,6 @@ function getKeyword(keyword) {
* Remove keyword
* @this Ajv
* @param {String} keyword pre-defined or custom keyword.
- * @return {Ajv} this for method chaining
*/
function removeKeyword(keyword) {
/* jshint validthis: true */
@@ -4725,119 +4831,46 @@ function removeKeyword(keyword) {
}
}
}
- return this;
}
-},{"./dotjs/custom":21}],37:[function(require,module,exports){
-'use strict';
-
-var META_SCHEMA_ID = 'http://json-schema.org/draft-06/schema';
-
-module.exports = function (ajv) {
- var defaultMeta = ajv._opts.defaultMeta;
- var metaSchemaRef = typeof defaultMeta == 'string'
- ? { $ref: defaultMeta }
- : ajv.getSchema(META_SCHEMA_ID)
- ? { $ref: META_SCHEMA_ID }
- : {};
-
- ajv.addKeyword('patternGroups', {
- // implemented in properties.jst
- metaSchema: {
- type: 'object',
- additionalProperties: {
- type: 'object',
- required: [ 'schema' ],
- properties: {
- maximum: {
- type: 'integer',
- minimum: 0
- },
- minimum: {
- type: 'integer',
- minimum: 0
- },
- schema: metaSchemaRef
- },
- additionalProperties: false
- }
- }
- });
- ajv.RULES.all.properties.implements.push('patternGroups');
-};
-
-},{}],38:[function(require,module,exports){
+},{"./dotjs/custom":21}],38:[function(require,module,exports){
module.exports={
- "$schema": "http://json-schema.org/draft-06/schema#",
- "$id": "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#",
- "description": "Meta-schema for $data reference (JSON-schema extension proposal)",
- "type": "object",
- "required": [ "$data" ],
- "properties": {
- "$data": {
- "type": "string",
- "anyOf": [
- { "format": "relative-json-pointer" },
- { "format": "json-pointer" }
- ]
- }
- },
- "additionalProperties": false
-}
-
-},{}],39:[function(require,module,exports){
-module.exports={
- "$schema": "http://json-schema.org/draft-06/schema#",
- "$id": "http://json-schema.org/draft-06/schema#",
- "title": "Core schema meta-schema",
+ "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": "#" }
},
- "nonNegativeInteger": {
+ "positiveInteger": {
"type": "integer",
"minimum": 0
},
- "nonNegativeIntegerDefault0": {
- "allOf": [
- { "$ref": "#/definitions/nonNegativeInteger" },
- { "default": 0 }
- ]
+ "positiveIntegerDefault0": {
+ "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]
},
"simpleTypes": {
- "enum": [
- "array",
- "boolean",
- "integer",
- "null",
- "number",
- "object",
- "string"
- ]
+ "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
},
"stringArray": {
"type": "array",
"items": { "type": "string" },
- "uniqueItems": true,
- "default": []
+ "minItems": 1,
+ "uniqueItems": true
}
},
- "type": ["object", "boolean"],
+ "type": "object",
"properties": {
- "$id": {
+ "id": {
"type": "string",
- "format": "uri-reference"
+ "format": "uri"
},
"$schema": {
"type": "string",
"format": "uri"
},
- "$ref": {
- "type": "string",
- "format": "uri-reference"
- },
"title": {
"type": "string"
},
@@ -4845,33 +4878,38 @@ module.exports={
"type": "string"
},
"default": {},
- "examples": {
- "type": "array",
- "items": {}
- },
"multipleOf": {
"type": "number",
- "exclusiveMinimum": 0
+ "minimum": 0,
+ "exclusiveMinimum": true
},
"maximum": {
"type": "number"
},
"exclusiveMaximum": {
- "type": "number"
+ "type": "boolean",
+ "default": false
},
"minimum": {
"type": "number"
},
"exclusiveMinimum": {
- "type": "number"
+ "type": "boolean",
+ "default": false
},
- "maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
- "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
+ "maxLength": { "$ref": "#/definitions/positiveInteger" },
+ "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
"pattern": {
"type": "string",
"format": "regex"
},
- "additionalItems": { "$ref": "#" },
+ "additionalItems": {
+ "anyOf": [
+ { "type": "boolean" },
+ { "$ref": "#" }
+ ],
+ "default": {}
+ },
"items": {
"anyOf": [
{ "$ref": "#" },
@@ -4879,17 +4917,22 @@ module.exports={
],
"default": {}
},
- "maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
- "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
+ "maxItems": { "$ref": "#/definitions/positiveInteger" },
+ "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" },
"uniqueItems": {
"type": "boolean",
"default": false
},
- "contains": { "$ref": "#" },
- "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
- "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
+ "maxProperties": { "$ref": "#/definitions/positiveInteger" },
+ "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
"required": { "$ref": "#/definitions/stringArray" },
- "additionalProperties": { "$ref": "#" },
+ "additionalProperties": {
+ "anyOf": [
+ { "type": "boolean" },
+ { "$ref": "#" }
+ ],
+ "default": {}
+ },
"definitions": {
"type": "object",
"additionalProperties": { "$ref": "#" },
@@ -4914,8 +4957,6 @@ module.exports={
]
}
},
- "propertyNames": { "$ref": "#" },
- "const": {},
"enum": {
"type": "array",
"minItems": 1,
@@ -4932,16 +4973,403 @@ module.exports={
}
]
},
- "format": { "type": "string" },
"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){
/**
* slice() reference.
@@ -5180,58 +5608,16 @@ function isObject(val) {
return Object == val.constructor;
}
-},{}],41:[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;
-
- var dateA = a instanceof Date
- , dateB = b instanceof Date;
- if (dateA && dateB) return a.getTime() == b.getTime();
- if (dateA != dateB) return false;
-
- var regexpA = a instanceof RegExp
- , regexpB = b instanceof RegExp;
- if (regexpA && regexpB) return a.toString() == b.toString();
- if (regexpA != regexpB) return false;
-
- for (i = 0; i < keys.length; i++)
- if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
-
- for (i = 0; i < keys.length; i++)
- if(!equal(a[keys[i]], b[keys[i]])) return false;
-
- return true;
- }
-
- return false;
-};
-
},{}],42:[function(require,module,exports){
-'use strict';
+var json = typeof JSON !== 'undefined' ? JSON : require('jsonify');
-module.exports = function (data, opts) {
+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) {
@@ -5244,132 +5630,506 @@ module.exports = function (data, opts) {
})(opts.cmp);
var seen = [];
- return (function stringify (node) {
+ 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();
}
- if (node === undefined) return;
- if (typeof node == 'number') return isFinite(node) ? '' + node : 'null';
- if (typeof node !== 'object') return JSON.stringify(node);
+ node = replacer.call(parent, key, node);
- var i, out;
- if (Array.isArray(node)) {
- out = '[';
- for (i = 0; i < node.length; i++) {
- if (i) out += ',';
- out += stringify(node[i]) || 'null';
+ 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 + ']';
+ 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);
- if (node === null) return 'null';
-
- if (seen.indexOf(node) !== -1) {
- if (cycles) return JSON.stringify('__cycle__');
- throw new TypeError('Converting circular structure to JSON');
- }
+ 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);
- var seenIndex = seen.push(node) - 1;
- var keys = Object.keys(node).sort(cmp && cmp(node));
- out = '';
- for (i = 0; i < keys.length; i++) {
- var key = keys[i];
- var value = stringify(node[key]);
+ if(!value) continue;
- if (!value) continue;
- if (out) out += ',';
- out += JSON.stringify(key) + ':' + value;
+ var keyValue = json.stringify(key)
+ + colonSeparator
+ + value;
+ ;
+ out.push(indent + space + keyValue);
+ }
+ seen.splice(seen.indexOf(node), 1);
+ return '{' + out.join(',') + indent + '}';
}
- seen.splice(seenIndex, 1);
- return '{' + out + '}';
- })(data);
+ })({ '': obj }, '', obj, 0);
};
-},{}],43:[function(require,module,exports){
-'use strict';
+var isArray = Array.isArray || function (x) {
+ return {}.toString.call(x) === '[object Array]';
+};
-var traverse = module.exports = function (schema, opts, cb) {
- if (typeof opts == 'function') {
- cb = opts;
- opts = {};
- }
- _traverse(opts, cb, schema, '', schema);
+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":43}],43:[function(require,module,exports){
+exports.parse = require('./lib/parse');
+exports.stringify = require('./lib/stringify');
+
+},{"./lib/parse":44,"./lib/stringify":45}],44:[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
+ };
+ },
-traverse.keywords = {
- additionalItems: true,
- items: true,
- contains: true,
- additionalProperties: true,
- propertyNames: true,
- not: true
-};
+ 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 + "'");
+ }
-traverse.arrayKeywords = {
- items: true,
- allOf: true,
- anyOf: true,
- oneOf: true
-};
+ // Get the next character. When there are no more characters,
+ // return the empty string.
-traverse.propsKeywords = {
- definitions: true,
- properties: true,
- patternProperties: true,
- dependencies: true
-};
+ ch = text.charAt(at);
+ at += 1;
+ return ch;
+ },
-traverse.skipKeywords = {
- enum: true,
- const: true,
- required: true,
- maximum: true,
- minimum: true,
- exclusiveMaximum: true,
- exclusiveMinimum: true,
- multipleOf: true,
- maxLength: true,
- minLength: true,
- pattern: true,
- format: true,
- maxItems: true,
- minItems: true,
- uniqueItems: true,
- maxProperties: true,
- minProperties: true
-};
+ 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;
+ }
+ },
-function _traverse(opts, cb, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
- if (schema && typeof schema == 'object' && !Array.isArray(schema)) {
- cb(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
- for (var key in schema) {
- var sch = schema[key];
- if (Array.isArray(sch)) {
- if (key in traverse.arrayKeywords) {
- for (var i=0; i<sch.length; i++)
- _traverse(opts, cb, sch[i], jsonPtr + '/' + key + '/' + i, rootSchema, jsonPtr, key, schema, i);
+ 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;
+ }
+ }
}
- } else if (key in traverse.propsKeywords) {
- if (sch && typeof sch == 'object') {
- for (var prop in sch)
- _traverse(opts, cb, sch[prop], jsonPtr + '/' + key + '/' + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);
+ error("Bad string");
+ },
+
+ white = function () {
+
+// Skip whitespace.
+
+ while (ch && ch <= ' ') {
+ next();
}
- } else if (key in traverse.keywords || (opts.allKeys && !(key in traverse.skipKeywords))) {
- _traverse(opts, cb, sch, jsonPtr + '/' + key, rootSchema, jsonPtr, key, schema);
- }
+ },
+
+ 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;
+};
+
+},{}],45:[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];
-function escapeJsonPtr(str) {
- return str.replace(/~/g, '~0').replace(/\//g, '~1');
+ // 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;
+ }
}
-},{}],44:[function(require,module,exports){
+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});
+};
+
+},{}],46:[function(require,module,exports){
(function (global){
/*! https://mths.be/punycode v1.4.1 by @mathias */
;(function(root) {
@@ -5906,7 +6666,7 @@ function escapeJsonPtr(str) {
}(this));
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{}],45:[function(require,module,exports){
+},{}],47:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -5992,7 +6752,7 @@ var isArray = Array.isArray || function (xs) {
return Object.prototype.toString.call(xs) === '[object Array]';
};
-},{}],46:[function(require,module,exports){
+},{}],48:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -6079,13 +6839,13 @@ var objectKeys = Object.keys || function (obj) {
return res;
};
-},{}],47:[function(require,module,exports){
+},{}],49:[function(require,module,exports){
'use strict';
exports.decode = exports.parse = require('./decode');
exports.encode = exports.stringify = require('./encode');
-},{"./decode":45,"./encode":46}],48:[function(require,module,exports){
+},{"./decode":47,"./encode":48}],50:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -6819,7 +7579,7 @@ Url.prototype.parseHost = function() {
if (host) this.hostname = host;
};
-},{"./util":49,"punycode":44,"querystring":47}],49:[function(require,module,exports){
+},{"./util":51,"punycode":46,"querystring":49}],51:[function(require,module,exports){
'use strict';
module.exports = {
@@ -6844,44 +7604,31 @@ var compileSchema = require('./compile')
, resolve = require('./compile/resolve')
, Cache = require('./cache')
, SchemaObject = require('./compile/schema_obj')
- , stableStringify = require('fast-json-stable-stringify')
+ , stableStringify = require('json-stable-stringify')
, formats = require('./compile/formats')
, rules = require('./compile/rules')
- , $dataMetaSchema = require('./$data')
- , patternGroups = require('./patternGroups')
+ , v5 = require('./v5')
, util = require('./compile/util')
+ , async = require('./async')
, co = require('co');
module.exports = Ajv;
-Ajv.prototype.validate = validate;
-Ajv.prototype.compile = compile;
-Ajv.prototype.addSchema = addSchema;
-Ajv.prototype.addMetaSchema = addMetaSchema;
-Ajv.prototype.validateSchema = validateSchema;
-Ajv.prototype.getSchema = getSchema;
-Ajv.prototype.removeSchema = removeSchema;
-Ajv.prototype.addFormat = addFormat;
-Ajv.prototype.errorsText = errorsText;
-
-Ajv.prototype._addSchema = _addSchema;
-Ajv.prototype._compile = _compile;
+Ajv.prototype.compileAsync = async.compile;
-Ajv.prototype.compileAsync = require('./compile/async');
var customKeyword = require('./keyword');
Ajv.prototype.addKeyword = customKeyword.add;
Ajv.prototype.getKeyword = customKeyword.get;
Ajv.prototype.removeKeyword = customKeyword.remove;
+Ajv.ValidationError = require('./compile/validation_error');
-var errorClasses = require('./compile/error_classes');
-Ajv.ValidationError = errorClasses.Validation;
-Ajv.MissingRefError = errorClasses.MissingRef;
-Ajv.$dataMetaSchema = $dataMetaSchema;
-
-var META_SCHEMA_ID = 'http://json-schema.org/draft-06/schema';
+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' ];
-var META_SUPPORT_DATA = ['/properties'];
/**
* Creates validator instance.
@@ -6891,455 +7638,386 @@ var META_SUPPORT_DATA = ['/properties'];
*/
function Ajv(opts) {
if (!(this instanceof Ajv)) return new Ajv(opts);
+ var self = this;
+
opts = this._opts = util.copy(opts) || {};
- setLogger(this);
this._schemas = {};
this._refs = {};
this._fragments = {};
this._formats = formats(opts.format);
- var schemaUriFormat = this._schemaUriFormat = this._formats['uri-reference'];
- this._schemaUriFormatFunc = function (str) { return schemaUriFormat.test(str); };
-
this._cache = opts.cache || new Cache;
this._loadingSchemas = {};
this._compilations = [];
this.RULES = rules();
- this._getId = chooseGetId(opts);
+
+ // 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;
- if (opts.serialize === undefined) opts.serialize = stableStringify;
- this._metaOpts = getMetaSchemaOptions(this);
-
- if (opts.formats) addInitialFormats(this);
- addDraft6MetaSchema(this);
- if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta);
- addInitialSchemas(this);
- if (opts.patternGroups) patternGroups(this);
-}
-
-
-
-/**
- * Validate data using schema
- * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize.
- * @this Ajv
- * @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 = this.getSchema(schemaKeyRef);
- if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"');
- } else {
- var schemaObj = this._addSchema(schemaKeyRef);
- v = schemaObj.validate || this._compile(schemaObj);
+ 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;
+ }
}
- var valid = v(data);
- if (v.$async === true)
- return this._opts.async == '*' ? co(valid) : valid;
- this.errors = v.errors;
- return valid;
-}
-
-
-/**
- * Create validating function for passed schema.
- * @this Ajv
- * @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 = this._addSchema(schema, undefined, _meta);
- return schemaObj.validate || this._compile(schemaObj);
-}
-
-/**
- * Adds schema to the instance.
- * @this Ajv
- * @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.
- * @return {Ajv} this for method chaining
- */
-function addSchema(schema, key, _skipValidation, _meta) {
- if (Array.isArray(schema)){
- for (var i=0; i<schema.length; i++) this.addSchema(schema[i], undefined, _skipValidation, _meta);
- return this;
- }
- var id = this._getId(schema);
- if (id !== undefined && typeof id != 'string')
- throw new Error('schema id must be string');
- key = resolve.normalizeId(key || id);
- checkUnique(this, key);
- this._schemas[key] = this._addSchema(schema, _skipValidation, _meta, true);
- return this;
-}
+ function _getSchemaObj(keyRef) {
+ keyRef = resolve.normalizeId(keyRef);
+ return self._schemas[keyRef] || self._refs[keyRef] || self._fragments[keyRef];
+ }
-/**
- * Add schema that will be used to validate other schemas
- * options in META_IGNORE_OPTIONS are alway set to false
- * @this Ajv
- * @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
- * @return {Ajv} this for method chaining
- */
-function addMetaSchema(schema, key, skipValidation) {
- this.addSchema(schema, key, skipValidation, true);
- return this;
-}
+ /**
+ * 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];
+ }
+ }
+ }
-/**
- * Validate schema
- * @this Ajv
- * @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;
- if ($schema !== undefined && typeof $schema != 'string')
- throw new Error('$schema must be a string');
- $schema = $schema || this._opts.defaultMeta || defaultMeta(this);
- if (!$schema) {
- this.logger.warn('meta-schema not available');
- this.errors = null;
- return true;
+ 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];
+ }
+ }
}
- var currentUriFormat = this._formats.uri;
- this._formats.uri = typeof currentUriFormat == 'function'
- ? this._schemaUriFormatFunc
- : this._schemaUriFormat;
- var valid;
- try { valid = this.validate($schema, schema); }
- finally { this._formats.uri = currentUriFormat; }
- if (!valid && throwOrLogError) {
- var message = 'schema is invalid: ' + this.errorsText();
- if (this._opts.validateSchema == 'log') this.logger.error(message);
- else throw new Error(message);
- }
- return valid;
-}
-function defaultMeta(self) {
- var meta = self._opts.meta;
- self._opts.defaultMeta = typeof meta == 'object'
- ? self._getId(meta) || meta
- : self.getSchema(META_SCHEMA_ID)
- ? META_SCHEMA_ID
- : undefined;
- return self._opts.defaultMeta;
-}
+ 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;
-/**
- * Get compiled schema from the instance by `key` or `ref`.
- * @this Ajv
- * @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(this, keyRef);
- switch (typeof schemaObj) {
- case 'object': return schemaObj.validate || this._compile(schemaObj);
- case 'string': return this.getSchema(schemaObj);
- case 'undefined': return _getSchemaFragment(this, keyRef);
- }
-}
+ 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);
-function _getSchemaFragment(self, 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,
+ var localRefs = resolve.ids.call(self, schema);
+
+ var schemaObj = new SchemaObject({
+ id: id,
schema: schema,
- root: root,
- baseId: baseId,
- validate: v
+ localRefs: localRefs,
+ jsonStr: jsonStr,
+ meta: meta
});
- return v;
- }
-}
-
-function _getSchemaObj(self, keyRef) {
- keyRef = resolve.normalizeId(keyRef);
- return self._schemas[keyRef] || self._refs[keyRef] || self._fragments[keyRef];
-}
+ if (id[0] != '#' && shouldAddSchema) self._refs[id] = schemaObj;
+ self._cache.put(jsonStr, schemaObj);
+ if (willValidate && recursiveMeta) validateSchema(schema, true);
-/**
- * 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.
- * @this Ajv
- * @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object
- * @return {Ajv} this for method chaining
- */
-function removeSchema(schemaKeyRef) {
- if (schemaKeyRef instanceof RegExp) {
- _removeAllSchemas(this, this._schemas, schemaKeyRef);
- _removeAllSchemas(this, this._refs, schemaKeyRef);
- return this;
- }
- switch (typeof schemaKeyRef) {
- case 'undefined':
- _removeAllSchemas(this, this._schemas);
- _removeAllSchemas(this, this._refs);
- this._cache.clear();
- return this;
- case 'string':
- var schemaObj = _getSchemaObj(this, schemaKeyRef);
- if (schemaObj) this._cache.del(schemaObj.cacheKey);
- delete this._schemas[schemaKeyRef];
- delete this._refs[schemaKeyRef];
- return this;
- case 'object':
- var serialize = this._opts.serialize;
- var cacheKey = serialize ? serialize(schemaKeyRef) : schemaKeyRef;
- this._cache.del(cacheKey);
- var id = this._getId(schemaKeyRef);
- if (id) {
- id = resolve.normalizeId(id);
- delete this._schemas[id];
- delete this._refs[id];
- }
+ return schemaObj;
}
- return this;
-}
-function _removeAllSchemas(self, schemas, regex) {
- for (var keyRef in schemas) {
- var schemaObj = schemas[keyRef];
- if (!schemaObj.meta && (!regex || regex.test(keyRef))) {
- self._cache.del(schemaObj.cacheKey);
- delete schemas[keyRef];
+ 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;
}
- }
-}
-
-
-/* @this Ajv */
-function _addSchema(schema, skipValidation, meta, shouldAddSchema) {
- if (typeof schema != 'object' && typeof schema != 'boolean')
- throw new Error('schema should be object or boolean');
- var serialize = this._opts.serialize;
- var cacheKey = serialize ? serialize(schema) : schema;
- var cached = this._cache.get(cacheKey);
- if (cached) return cached;
+ schemaObj.compiling = true;
- shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false;
-
- var id = resolve.normalizeId(this._getId(schema));
- if (id && shouldAddSchema) checkUnique(this, id);
-
- var willValidate = this._opts.validateSchema !== false && !skipValidation;
- var recursiveMeta;
- if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema.$schema)))
- this.validateSchema(schema, true);
+ var currentOpts;
+ if (schemaObj.meta) {
+ currentOpts = self._opts;
+ self._opts = self._metaOpts;
+ }
- var localRefs = resolve.ids.call(this, schema);
+ var v;
+ try { v = compileSchema.call(self, schemaObj.schema, root, schemaObj.localRefs); }
+ finally {
+ schemaObj.compiling = false;
+ if (schemaObj.meta) self._opts = currentOpts;
+ }
- var schemaObj = new SchemaObject({
- id: id,
- schema: schema,
- localRefs: localRefs,
- cacheKey: cacheKey,
- meta: meta
- });
+ schemaObj.validate = v;
+ schemaObj.refs = v.refs;
+ schemaObj.refVal = v.refVal;
+ schemaObj.root = v.root;
+ return v;
- if (id[0] != '#' && shouldAddSchema) this._refs[id] = schemaObj;
- this._cache.put(cacheKey, schemaObj);
- if (willValidate && recursiveMeta) this.validateSchema(schema, true);
+ function callValidate() {
+ var _validate = schemaObj.validate;
+ var result = _validate.apply(null, arguments);
+ callValidate.errors = _validate.errors;
+ return result;
+ }
+ }
- return schemaObj;
-}
+ /**
+ * 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;
-/* @this Ajv */
-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;
+ 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);
}
- schemaObj.compiling = true;
- var currentOpts;
- if (schemaObj.meta) {
- currentOpts = this._opts;
- this._opts = this._metaOpts;
- }
- var v;
- try { v = compileSchema.call(this, schemaObj.schema, root, schemaObj.localRefs); }
- finally {
- schemaObj.compiling = false;
- if (schemaObj.meta) this._opts = currentOpts;
+ /**
+ * 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;
}
- 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;
+ 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 chooseGetId(opts) {
- switch (opts.schemaId) {
- case '$id': return _get$Id;
- case 'id': return _getId;
- default: return _get$IdOrId;
+ 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);
}
-}
-
-/* @this Ajv */
-function _getId(schema) {
- if (schema.$id) this.logger.warn('schema $id ignored', schema.$id);
- return schema.id;
-}
-
-/* @this Ajv */
-function _get$Id(schema) {
- if (schema.id) this.logger.warn('schema id ignored', schema.id);
- return schema.$id;
-}
-
-
-function _get$IdOrId(schema) {
- if (schema.$id && schema.id && schema.$id != schema.id)
- throw new Error('schema $id is different from id');
- return schema.$id || schema.id;
-}
-/**
- * Convert array of error message objects to string
- * @this Ajv
- * @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 || this.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
- * @this Ajv
- * @param {String} name format name
- * @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
- * @return {Ajv} this for method chaining
- */
-function addFormat(name, format) {
- if (typeof format == 'string') format = new RegExp(format);
- this._formats[name] = format;
- return this;
-}
-
-
-function addDraft6MetaSchema(self) {
- var $dataSchema;
- if (self._opts.$data) {
- $dataSchema = require('./refs/$data.json');
- self.addMetaSchema($dataSchema, $dataSchema.$id, true);
+ function addInitialFormats() {
+ for (var name in self._opts.formats) {
+ var format = self._opts.formats[name];
+ addFormat(name, format);
+ }
}
- if (self._opts.meta === false) return;
- var metaSchema = require('./refs/json-schema-draft-06.json');
- if (self._opts.$data) metaSchema = $dataMetaSchema(metaSchema, META_SUPPORT_DATA);
- self.addMetaSchema(metaSchema, META_SCHEMA_ID, true);
- self._refs['http://json-schema.org/schema'] = META_SCHEMA_ID;
-}
-
-
-function addInitialSchemas(self) {
- var optsSchemas = self._opts.schemas;
- if (!optsSchemas) return;
- if (Array.isArray(optsSchemas)) self.addSchema(optsSchemas);
- else for (var key in optsSchemas) self.addSchema(optsSchemas[key], key);
-}
-function addInitialFormats(self) {
- for (var name in self._opts.formats) {
- var format = self._opts.formats[name];
- self.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 checkUnique(self, id) {
- if (self._schemas[id] || self._refs[id])
- throw new Error('schema with key or id "' + id + '" already exists');
-}
-function getMetaSchemaOptions(self) {
- var metaOpts = util.copy(self._opts);
- for (var i=0; i<META_IGNORE_OPTIONS.length; i++)
- delete metaOpts[META_IGNORE_OPTIONS[i]];
- return metaOpts;
-}
-
-
-function setLogger(self) {
- var logger = self._opts.logger;
- if (logger === false) {
- self.logger = {log: noop, warn: noop, error: noop};
- } else {
- if (logger === undefined) logger = console;
- if (!(typeof logger == 'object' && logger.log && logger.warn && logger.error))
- throw new Error('logger must implement log, warn and error methods');
- self.logger = logger;
+ 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;
}
}
-
-function noop() {}
-
-},{"./$data":1,"./cache":2,"./compile":7,"./compile/async":4,"./compile/error_classes":5,"./compile/formats":6,"./compile/resolve":8,"./compile/rules":9,"./compile/schema_obj":10,"./compile/util":12,"./keyword":36,"./patternGroups":37,"./refs/$data.json":38,"./refs/json-schema-draft-06.json":39,"co":40,"fast-json-stable-stringify":42}]},{},[])("ajv")
+},{"./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":41,"json-stable-stringify":42}]},{},[])("ajv")
}); \ No newline at end of file
diff --git a/deps/npm/node_modules/har-validator/node_modules/ajv/dist/ajv.min.js b/deps/npm/node_modules/har-validator/node_modules/ajv/dist/ajv.min.js
new file mode 100644
index 0000000000..cee0fee6c4
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/dist/ajv.min.js
@@ -0,0 +1,6 @@
+/* ajv 4.11.8: 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||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){!1!==r&&(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]))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{if(!u){u=e("regenerator"),u.runtime()}return r.async&&!0!==r.async||(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{if(!f){f=e("nodent")({log:!1,dontInstallRequireHook:!0})}return"es7"!=r.async&&(r.async&&!0!==r.async&&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(e,t){if(!a)return r(e,t);setTimeout(function(){r(e,t)})}var i;try{i=s.compile(e)}catch(a){return void(a.missingSchema?function(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)}))}(a):o(a))}o(null,i)}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;var n=r instanceof Date,l=t instanceof Date;if(n&&l)return r.getTime()==t.getTime();if(n!=l)return!1;var c=r instanceof RegExp,h=t instanceof RegExp;if(c&&h)return r.toString()==t.toString();if(c!=h)return!1;for(a=0;a<i.length;a++)if(!Object.prototype.hasOwnProperty.call(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(b);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 w.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(b),r=r.split(b);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=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-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;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":/^(?:0|[1-9][0-9]*)(?:\#|(?:\/(?:[^~\/]|~0|~1)*)*)$/},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":/^(?:0|[1-9][0-9]*)(?:\#|(?:\/(?:[^~\/]|~0|~1)*)*)$/},a.compare={date:h,time:u,"date-time":f};var b=/t|\s/i,w=/\/|\:/},{"./util":11}],6:[function(e,r,t){"use strict";function a(){if(void 0===d){try{d=e("js-beautify").js_beautify}catch(e){d=!1}}}function s(e,r,t,n){function j(){var e=N.validate,r=e.apply(null,arguments);return j.errors=e.errors,r}function S(e,t,o,i){var n=!t||t&&t.schema==e;if(t.schema!=r.schema)return s.call(k,e,t,o,i);var v=!0===e.$async;v&&!q.transpile&&y.setup(q);var j=g({isTop:!0,schema:e,isRoot:n,baseId:i,root:t,schemaPath:"",errSchemaPath:"#",errorPath:'""',RULES:H,validate:g,util:m,resolve:p,resolveRef:$,usePattern:R,useDefault:I,useCustomRule:A,opts:q,formats:F,self:k});j=f(D,h)+f(Q,l)+f(V,c)+f(U,u)+j,q.beautify&&(a(),d?j=d(j,q.beautify):console.error('"npm install js-beautify" to use beautify option'));var S,x,_=q._transpileFunc;try{x=v&&_?_(j):j;S=new Function("self","RULES","formats","root","refVal","defaults","customRules","co","equal","ucs2length","ValidationError",x)(k,H,F,r,D,V,U,P,b,E,w),D[0]=S}catch(e){throw console.error("Error compiling schema, function code:",x),e}return S.schema=e,S.errors=null,S.refs=L,S.refVal=D,S.root=n?S:t,v&&(S.$async=!0),T&&(S.sourceCode=j),!0===q.sourceCode&&(S.source={patterns:Q,defaults:V}),S}function $(e,a,o){a=p.url(e,a);var i,n,l=L[a];if(void 0!==l)return i=D[l],n="refVal["+l+"]",O(i,n);if(!o&&r.refs){var c=r.refs[a];if(void 0!==c)return i=r.refVal[c],n=x(a,i),O(i,n)}n=x(a);var h=p.call(k,S,r,a);if(!h){var u=t&&t[a];u&&(h=p.inlineRef(u,q.inlineRefs)?u:s.call(k,u,r,t,e))}return h?(_(a,h),O(h,n)):void 0}function x(e,r){var t=D.length;return D[t]=r,L[e]=t,"refVal"+t}function _(e,r){D[L[e]]=r}function O(e,r){return"object"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&e.$async}}function R(e){var r=C[e];return void 0===r&&(r=C[e]=Q.length,Q[r]=e),"pattern"+r}function I(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return m.toQuotedString(e);case"object":if(null===e)return"null";var r=v(e),t=z[r];return void 0===t&&(t=z[r]=V.length,V[t]=e),"default"+t}}function A(e,r,t,a){var s=e.definition.validateSchema;if(s&&!1!==k._opts.validateSchema){if(!s(r)){var o="keyword schema is invalid: "+k.errorsText(s.errors);if("log"!=k._opts.validateSchema)throw new Error(o);console.error(o)}}var i,n=e.definition.compile,l=e.definition.inline,c=e.definition.macro;n?i=n.call(k,r,t,a):c?(i=c.call(k,r,t,a),!1!==q.validateSchema&&k.validateSchema(i,!0)):i=l?l.call(k,a,e.keyword,r,t):e.definition.validate;var h=U.length;return U[h]=i,{code:"customRule"+h,validate:i}}var k=this,q=this._opts,D=[void 0],L={},Q=[],C={},V=[],z={},U=[],T=!1!==q.sourceCode;r=r||{schema:e,refVal:D,refs:L};var M=o.call(this,e,r,n),N=this._compilations[M.index];if(M.compiling)return N.callValidate=j;var F=this._formats,H=this.RULES;try{var J=S(e,r,t,n);N.validate=J;var G=N.callValidate;return G&&(G.schema=J.schema,G.errors=null,G.refs=J.refs,G.refVal=J.refVal,G.root=J.root,G.$async=J.$async,T&&(G.sourceCode=J.sourceCode)),J}finally{i.call(this,e,r,n)}}function o(e,r,t){var a=n.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 i(e,r,t){var a=n.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function n(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 l(e,r){return"var pattern"+e+" = new RegExp("+m.toQuotedString(r[e])+");"}function c(e){return"var default"+e+" = defaults["+e+"];"}function h(e,r){return r[e]?"var refVal"+e+" = refVal["+e+"];":""}function u(e){return"var customRule"+e+" = customRules["+e+"];"}function f(e,r){if(!e.length)return"";for(var t="",a=0;a<e.length;a++)t+=r(a,e);return t}var d,p=e("./resolve"),m=e("./util"),v=e("json-stable-stringify"),y=e("../async"),g=e("../dotjs/validate"),P=e("co"),E=m.ucs2length,b=e("./equal"),w=e("./validation_error");r.exports=s},{"../async":1,"../dotjs/validate":36,"./equal":4,"./resolve":7,"./util":11,"./validation_error":12,co:41,"json-stable-stringify":42}],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])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])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]))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!1!==r&&(void 0===r||!0===r?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("object"==typeof(r=e[t])&&!l(r))return!1}else for(var a in e){if("$ref"==a)return!1;if("object"==typeof(r=e[a])&&!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){return!1!==r&&(e=f(e)),u(m.parse(e,!1,!0))}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:50}],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){return r.push(t),e.all[t]={keyword:t,code:a[t]}})}),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++))>=55296&&r<=56319&&s<a&&56320==(64512&(r=e.charCodeAt(s)))&&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(D,L):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){return E(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")}function g(e,r,t){return E(e,v(t?"/"+j(r):l(r)))}function P(e,r,t){var a,s,o,i;if(""===e)return"rootData";if("/"==e[0]){if(!V.test(e))throw new Error("Invalid JSON-pointer: "+e);s=e,o="rootData"}else{if(!(i=e.match(z)))throw new Error("Invalid JSON-pointer: "+e);if(a=+i[1],"#"==(s=i[2])){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,D="return errors === 0;",L="validate.errors = null; return true;",Q=/if \(errors === 0\) return true;\s*else throw new ValidationError\(vErrors\);/,C="return true;",V=/^\/(?:[^~]|~0|~1)*$/,z=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/},{"./ucs2length":10,"json-stable-stringify":42}],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+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="valid"+s;if(a+="var "+u+" = undefined;",!1===e.opts.format)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="",!1!==e.createErrors?(a+=" { keyword: '"+(t||"_formatExclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(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 _=!0===b,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="",!1!==e.createErrors?(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: "+_+" } ",!1!==e.opts.messages&&(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+e.util.getProperty(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="",!1!==e.createErrors?(s+=" { keyword: '"+(t||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(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=!0===m,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="",!1!==e.createErrors?(s+=" { keyword: '"+(t||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+b+", limit: "+a+", exclusive: "+E+" } ",!1!==e.opts.messages&&(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+e.util.getProperty(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="",!1!==e.createErrors?(s+=" { keyword: '"+(t||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(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+e.util.getProperty(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+=!1===e.opts.unicode?" "+u+".length ":" ucs2length("+u+") ",s+=" "+d+" "+a+") { ";var t=r,p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(t||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(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+e.util.getProperty(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="",!1!==e.createErrors?(s+=" { keyword: '"+(t||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(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+e.util.getProperty(r),o=e.errSchemaPath+"/"+r,i=!e.opts.allErrors,n=e.util.copy(e),l="";n.level++;var c="valid"+n.level,h=n.baseId,u=!0,f=a;if(f)for(var d,p=-1,m=f.length-1;p<m;)d=f[p+=1],e.util.schemaHasRules(d,e.RULES.all)&&(u=!1,n.schema=d,n.schemaPath=s+"["+p+"]",n.errSchemaPath=o+"/"+p,t+=" "+e.validate(n)+" ",n.baseId=h,i&&(t+=" if ("+c+") { ",l+="}"));return i&&(t+=u?" if (true) { ":" "+l.slice(0,-1)+" "),t=e.util.cleanUpCode(t)}},{}],19:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="valid"+a,u="errs__"+a,f=e.util.copy(e),d="";f.level++;var p="valid"+f.level;if(o.every(function(r){return e.util.schemaHasRules(r,e.RULES.all)})){var m=f.baseId;t+=" var "+u+" = errors; var "+h+" = false; ";var v=e.compositeRule;e.compositeRule=f.compositeRule=!0;var y=o;if(y)for(var g,P=-1,E=y.length-1;P<E;)g=y[P+=1],f.schema=g,f.schemaPath=i+"["+P+"]",f.errSchemaPath=n+"/"+P,t+=" "+e.validate(f)+" ",f.baseId=m,t+=" "+h+" = "+h+" || "+p+"; if (!"+h+") { ",d+="}";e.compositeRule=f.compositeRule=v,t+=" "+d+" if (!"+h+") { var err = ",!1!==e.createErrors?(t+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: {} ",!1!==e.opts.messages&&(t+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else { errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; } ",e.opts.allErrors&&(t+=" } "),t=e.util.cleanUpCode(t)}else l&&(t+=" if (true) { ");return t}},{}],20:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="valid"+a,u=e.opts.v5&&o&&o.$data;u&&(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; "),u||(t+=" var schema"+a+" = validate.schema"+i+";"),t+="var "+h+" = equal("+c+", schema"+a+"); if (!"+h+") { ";var f=f||[];f.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'constant' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: {} ",!1!==e.opts.messages&&(t+=" , message: 'should be equal to constant' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var d=t;return t=f.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+d+"]); ":" validate.errors = ["+d+"]; return false; ":" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" }"}},{}],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+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(i||""),f="valid"+o,d="errs__"+o,p=e.opts.v5&&n&&n.$data;p?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var m,v,y,g,P,E=this,b="definition"+o,w=E.definition;if(p&&w.$data){P="keywordValidate"+o;var j=w.validateSchema;s+=" var "+b+" = RULES.custom['"+r+"'].definition; var "+P+" = "+b+".validate;"}else g=e.useCustomRule(E,n,e.schema,e),a="validate.schema"+l,P=g.code,m=w.compile,v=w.inline,y=w.macro;var S=P+".errors",$="i"+o,x="ruleErr"+o,_=w.async;if(_&&!e.async)throw new Error("async keyword in sync schema");if(v||y||(s+=S+" = null;"),s+="var "+d+" = errors;var "+f+";",j&&(s+=" "+f+" = "+b+".validateSchema("+a+"); if ("+f+") {"),v)s+=w.statements?" "+g.validate+" ":" "+f+" = "+g.validate+"; ";else if(y){var O=e.util.copy(e);O.level++;var R="valid"+O.level;O.schema=g.validate,O.schemaPath="";var I=e.compositeRule;e.compositeRule=O.compositeRule=!0;var A=e.validate(O).replace(/validate\.schema/g,P);e.compositeRule=O.compositeRule=I,s+=" "+A}else{var k=k||[];k.push(s),s="",s+=" "+P+".call( ",s+=e.opts.passContext?"this":"self",s+=m||!1===w.schema?" , "+u+" ":" , "+a+" , "+u+" , validate.schema"+e.schemaPath+" ",s+=" , (dataPath || '')",'""'!=e.errorPath&&(s+=" + "+e.errorPath);var q=i?"data"+(i-1||""):"parentData",D=i?e.dataPathArr[i]:"parentDataProperty";s+=" , "+q+" , "+D+" , rootData ) ";var L=s;s=k.pop(),!1===w.errors?(s+=" "+f+" = ",_&&(s+=""+e.yieldAwait),s+=L+"; "):_?(S="customErrors"+o,s+=" var "+S+" = null; try { "+f+" = "+e.yieldAwait+L+"; } catch (e) { "+f+" = false; if (e instanceof ValidationError) "+S+" = e.errors; else throw e; } "):s+=" "+S+" = null; "+f+" = "+L+"; "}if(w.modifying&&(s+=" "+u+" = "+q+"["+D+"];"),j&&(s+=" }"),w.valid)h&&(s+=" if (true) { ");else{s+=" if ( ",void 0===w.valid?(s+=" !",s+=y?""+R:""+f):s+=" "+!w.valid+" ",s+=") { ",t=E.keyword;var k=k||[];k.push(s),s="";var k=k||[];k.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(t||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { keyword: '"+E.keyword+"' } ",!1!==e.opts.messages&&(s+=" , message: 'should pass \""+E.keyword+"\" keyword validation' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var Q=s;s=k.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+Q+"]); ":" validate.errors = ["+Q+"]; return false; ":" var err = "+Q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var C=s;s=k.pop(),v?w.errors?"full"!=w.errors&&(s+=" for (var "+$+"="+d+"; "+$+"<errors; "+$+"++) { var "+x+" = vErrors["+$+"]; if ("+x+".dataPath === undefined) "+x+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+x+".schemaPath === undefined) { "+x+'.schemaPath = "'+c+'"; } ',e.opts.verbose&&(s+=" "+x+".schema = "+a+"; "+x+".data = "+u+"; "),s+=" } "):!1===w.errors?s+=" "+C+" ":(s+=" if ("+d+" == errors) { "+C+" } else { for (var "+$+"="+d+"; "+$+"<errors; "+$+"++) { var "+x+" = vErrors["+$+"]; if ("+x+".dataPath === undefined) "+x+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+x+".schemaPath === undefined) { "+x+'.schemaPath = "'+c+'"; } ',e.opts.verbose&&(s+=" "+x+".schema = "+a+"; "+x+".data = "+u+"; "),s+=" } } "):y?(s+=" var err = ",!1!==e.createErrors?(s+=" { keyword: '"+(t||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { keyword: '"+E.keyword+"' } ",!1!==e.opts.messages&&(s+=" , message: 'should pass \""+E.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; ")):!1===w.errors?s+=" "+C+" ":(s+=" if (Array.isArray("+S+")) { if (vErrors === null) vErrors = "+S+"; else vErrors = vErrors.concat("+S+"); errors = vErrors.length; for (var "+$+"="+d+"; "+$+"<errors; "+$+"++) { var "+x+" = vErrors["+$+"]; if ("+x+".dataPath === undefined) "+x+".dataPath = (dataPath || '') + "+e.errorPath+"; "+x+'.schemaPath = "'+c+'"; ',e.opts.verbose&&(s+=" "+x+".schema = "+a+"; "+x+".data = "+u+"; "),s+=" } } else { "+C+" } "),s+=" } ",h&&(s+=" else { ")}return s}},{}],22:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="errs__"+a,u=e.util.copy(e),f="";u.level++;var d="valid"+u.level,p={},m={};for(P in o){var v=o[P],y=Array.isArray(v)?m:p;y[P]=v}t+="var "+h+" = errors;";var g=e.errorPath;t+="var missing"+a+";";for(var P in m){if(y=m[P],t+=" if ("+c+e.util.getProperty(P)+" !== undefined ",l){t+=" && ( ";var E=y;if(E)for(var b,w=-1,j=E.length-1;w<j;){b=E[w+=1],w&&(t+=" || ");var S=e.util.getProperty(b);t+=" ( "+c+S+" === undefined && (missing"+a+" = "+e.util.toQuotedString(e.opts.jsonPointers?b:S)+") ) "}t+=")) { ";var $="missing"+a,x="' + "+$+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(g,$,!0):g+" + "+$);var _=_||[];_.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { property: '"+e.util.escapeQuotes(P)+"', missingProperty: '"+x+"', depsCount: "+y.length+", deps: '"+e.util.escapeQuotes(1==y.length?y[0]:y.join(", "))+"' } ",!1!==e.opts.messages&&(t+=" , message: 'should have ",t+=1==y.length?"property "+e.util.escapeQuotes(y[0]):"properties "+e.util.escapeQuotes(y.join(", ")),t+=" when property "+e.util.escapeQuotes(P)+" is present' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var O=t;t=_.pop(),t+=!e.compositeRule&&l?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{t+=" ) { ";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)),t+=" if ("+c+S+" === undefined) { var err = ",!1!==e.createErrors?(t+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { property: '"+e.util.escapeQuotes(P)+"', missingProperty: '"+x+"', depsCount: "+y.length+", deps: '"+e.util.escapeQuotes(1==y.length?y[0]:y.join(", "))+"' } ",!1!==e.opts.messages&&(t+=" , message: 'should have ",t+=1==y.length?"property "+e.util.escapeQuotes(y[0]):"properties "+e.util.escapeQuotes(y.join(", ")),t+=" when property "+e.util.escapeQuotes(P)+" is present' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}t+=" } ",l&&(f+="}",t+=" else { ")}e.errorPath=g;var q=u.baseId;for(var P in p){var v=p[P];e.util.schemaHasRules(v,e.RULES.all)&&(t+=" "+d+" = true; if ("+c+e.util.getProperty(P)+" !== undefined) { ",u.schema=v,u.schemaPath=i+e.util.getProperty(P),u.errSchemaPath=n+"/"+e.util.escapeFragment(P),t+=" "+e.validate(u)+" ",u.baseId=q,t+=" } ",l&&(t+=" if ("+d+") { ",f+="}"))}return l&&(t+=" "+f+" if ("+h+" == errors) {"),t=e.util.cleanUpCode(t)}},{}],23:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="valid"+a,u=e.opts.v5&&o&&o.$data;u&&(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ");var f="i"+a,d="schema"+a;u||(t+=" var "+d+" = validate.schema"+i+";"),t+="var "+h+";",u&&(t+=" if (schema"+a+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+a+")) "+h+" = false; else {"),t+=h+" = false;for (var "+f+"=0; "+f+"<"+d+".length; "+f+"++) if (equal("+c+", "+d+"["+f+"])) { "+h+" = true; break; }",u&&(t+=" } "),t+=" if (!"+h+") { ";var p=p||[];p.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { allowedValues: schema"+a+" } ",!1!==e.opts.messages&&(t+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var m=t;return t=p.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" }",l&&(t+=" else { "),t}},{}],24:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||"");if(!1===e.opts.format)return l&&(t+=" if (true) { "),t;var h,u=e.opts.v5&&o&&o.$data;u?(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",h="schema"+a):h=o;var f=e.opts.unknownFormats,d=Array.isArray(f);if(u){var p="format"+a;t+=" var "+p+" = formats["+h+"]; var isObject"+a+" = typeof "+p+" == 'object' && !("+p+" instanceof RegExp) && "+p+".validate; if (isObject"+a+") { ",e.async&&(t+=" var async"+a+" = "+p+".async; "),t+=" "+p+" = "+p+".validate; } if ( ",u&&(t+=" ("+h+" !== undefined && typeof "+h+" != 'string') || "),t+=" (",(!0===f||d)&&(t+=" ("+h+" && !"+p+" ",d&&(t+=" && self._opts.unknownFormats.indexOf("+h+") == -1 "),t+=") || "),t+=" ("+p+" && !(typeof "+p+" == 'function' ? ",t+=e.async?" (async"+a+" ? "+e.yieldAwait+" "+p+"("+c+") : "+p+"("+c+")) ":" "+p+"("+c+") ",t+=" : "+p+".test("+c+"))))) {"}else{var p=e.formats[o];if(!p){if(!0===f||d&&-1==f.indexOf(o))throw new Error('unknown format "'+o+'" is used in schema at path "'+e.errSchemaPath+'"');return d||(console.warn('unknown format "'+o+'" ignored in schema at path "'+e.errSchemaPath+'"'),"ignore"!==f&&console.warn("In the next major version it will throw exception. See option unknownFormats for more information")),l&&(t+=" if (true) { "),t}var m="object"==typeof p&&!(p instanceof RegExp)&&p.validate;if(m){var v=!0===p.async;p=p.validate}if(v){if(!e.async)throw new Error("async format in sync schema");var y="formats"+e.util.getProperty(o)+".validate";t+=" if (!("+e.yieldAwait+" "+y+"("+c+"))) { "}else{t+=" if (! ";var y="formats"+e.util.getProperty(o);m&&(y+=".validate"),t+="function"==typeof p?" "+y+"("+c+") ":" "+y+".test("+c+") ",t+=") { "}}var g=g||[];g.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { format: ",t+=u?""+h:""+e.util.toQuotedString(o),t+=" } ",!1!==e.opts.messages&&(t+=" , message: 'should match format \"",t+=u?"' + "+h+" + '":""+e.util.escapeQuotes(o),t+="\"' "),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+e.util.toQuotedString(o),t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var P=t;return t=g.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+P+"]); ":" validate.errors = ["+P+"]; return false; ":" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } ",l&&(t+=" else { "),t}},{}],25:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="valid"+a,u="errs__"+a,f=e.util.copy(e),d="";f.level++;var p="valid"+f.level,m="i"+a,v=f.dataLevel=e.dataLevel+1,y="data"+v,g=e.baseId;if(t+="var "+u+" = errors;var "+h+";",Array.isArray(o)){var P=e.schema.additionalItems;if(!1===P){t+=" "+h+" = "+c+".length <= "+o.length+"; ";var E=n;n=e.errSchemaPath+"/additionalItems",t+=" if (!"+h+") { ";var b=b||[];b.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { limit: "+o.length+" } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT have more than "+o.length+" items' "),e.opts.verbose&&(t+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var w=t;t=b.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+w+"]); ":" validate.errors = ["+w+"]; return false; ":" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } ",n=E,l&&(d+="}",t+=" else { ")}var j=o;if(j)for(var S,$=-1,x=j.length-1;$<x;)if(S=j[$+=1],e.util.schemaHasRules(S,e.RULES.all)){t+=" "+p+" = true; if ("+c+".length > "+$+") { ";var _=c+"["+$+"]";f.schema=S,f.schemaPath=i+"["+$+"]",f.errSchemaPath=n+"/"+$,f.errorPath=e.util.getPathExpr(e.errorPath,$,e.opts.jsonPointers,!0),f.dataPathArr[v]=$;var O=e.validate(f);f.baseId=g,e.util.varOccurences(O,y)<2?t+=" "+e.util.varReplace(O,y,_)+" ":t+=" var "+y+" = "+_+"; "+O+" ",t+=" } ",l&&(t+=" if ("+p+") { ",d+="}")}if("object"==typeof P&&e.util.schemaHasRules(P,e.RULES.all)){f.schema=P,f.schemaPath=e.schemaPath+".additionalItems",f.errSchemaPath=e.errSchemaPath+"/additionalItems",t+=" "+p+" = true; if ("+c+".length > "+o.length+") { for (var "+m+" = "+o.length+"; "+m+" < "+c+".length; "+m+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var _=c+"["+m+"]";f.dataPathArr[v]=m;var O=e.validate(f);f.baseId=g,e.util.varOccurences(O,y)<2?t+=" "+e.util.varReplace(O,y,_)+" ":t+=" var "+y+" = "+_+"; "+O+" ",l&&(t+=" if (!"+p+") break; "),t+=" } } ",l&&(t+=" if ("+p+") { ",d+="}")}}else if(e.util.schemaHasRules(o,e.RULES.all)){f.schema=o,f.schemaPath=i,f.errSchemaPath=n,t+=" for (var "+m+" = 0; "+m+" < "+c+".length; "+m+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var _=c+"["+m+"]";f.dataPathArr[v]=m;var O=e.validate(f);f.baseId=g,e.util.varOccurences(O,y)<2?t+=" "+e.util.varReplace(O,y,_)+" ":t+=" var "+y+" = "+_+"; "+O+" ",l&&(t+=" if (!"+p+") break; "),t+=" } ",l&&(t+=" if ("+p+") { ",d+="}")}return l&&(t+=" "+d+" if ("+u+" == errors) {"),t=e.util.cleanUpCode(t)}},{}],26:[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+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u=e.opts.v5&&i&&i.$data;u?(a+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; ",t="schema"+s):t=i,a+="var division"+s+";if (",u&&(a+=" "+t+" !== undefined && ( typeof "+t+" != 'number' || "),a+=" (division"+s+" = "+h+" / "+t+", ",a+=e.opts.multipleOfPrecision?" Math.abs(Math.round(division"+s+") - division"+s+") > 1e-"+e.opts.multipleOfPrecision+" ":" division"+s+" !== parseInt(division"+s+") ",a+=" ) ",u&&(a+=" ) "),a+=" ) { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { multipleOf: "+t+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be multiple of ",a+=u?"' + "+t:i+"'"),e.opts.verbose&&(a+=" , schema: ",a+=u?"validate.schema"+n:""+i,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var d=a;return a=f.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+d+"]); ":" validate.errors = ["+d+"]; return false; ":" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",c&&(a+=" else { "),a}},{}],27:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="errs__"+a,u=e.util.copy(e);u.level++;var f="valid"+u.level;if(e.util.schemaHasRules(o,e.RULES.all)){u.schema=o,u.schemaPath=i,u.errSchemaPath=n,t+=" var "+h+" = errors; ";var d=e.compositeRule;e.compositeRule=u.compositeRule=!0,u.createErrors=!1;var p;u.opts.allErrors&&(p=u.opts.allErrors,u.opts.allErrors=!1),t+=" "+e.validate(u)+" ",u.createErrors=!0,p&&(u.opts.allErrors=p),e.compositeRule=u.compositeRule=d,t+=" if ("+f+") { ";var m=m||[];m.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: {} ",!1!==e.opts.messages&&(t+=" , message: 'should NOT be valid' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var v=t;t=m.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+v+"]); ":" validate.errors = ["+v+"]; return false; ":" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(t+=" } ")}else t+=" var err = ",!1!==e.createErrors?(t+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: {} ",!1!==e.opts.messages&&(t+=" , message: 'should NOT be valid' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l&&(t+=" if (false) { ");return t}},{}],28:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="valid"+a,u="errs__"+a,f=e.util.copy(e),d="";f.level++;var p="valid"+f.level;t+="var "+u+" = errors;var prevValid"+a+" = false;var "+h+" = false;";var m=f.baseId,v=e.compositeRule;e.compositeRule=f.compositeRule=!0;var y=o;if(y)for(var g,P=-1,E=y.length-1;P<E;)g=y[P+=1],e.util.schemaHasRules(g,e.RULES.all)?(f.schema=g,f.schemaPath=i+"["+P+"]",f.errSchemaPath=n+"/"+P,t+=" "+e.validate(f)+" ",f.baseId=m):t+=" var "+p+" = true; ",P&&(t+=" if ("+p+" && prevValid"+a+") "+h+" = false; else { ",d+="}"),t+=" if ("+p+") "+h+" = prevValid"+a+" = true;";e.compositeRule=f.compositeRule=v,t+=d+"if (!"+h+") { ";var b=b||[];b.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: {} ",!1!==e.opts.messages&&(t+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var w=t;return t=b.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+w+"]); ":" validate.errors = ["+w+"]; return false; ":" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} else { errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; }",e.opts.allErrors&&(t+=" } "),t}},{}],29:[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+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u=e.opts.v5&&i&&i.$data;u?(a+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; ",t="schema"+s):t=i;var f=u?"(new RegExp("+t+"))":e.usePattern(i);a+="if ( ",u&&(a+=" ("+t+" !== undefined && typeof "+t+" != 'string') || "),a+=" !"+f+".test("+h+") ) { ";var d=d||[];d.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { pattern: ",a+=u?""+t:""+e.util.toQuotedString(i),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match pattern \"",a+=u?"' + "+t+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=u?"validate.schema"+n:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var p=a;return a=d.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",c&&(a+=" else { "),a}},{}],30:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="valid"+a,u="key"+a,f="patternMatched"+a,d="",p=e.opts.ownProperties;t+="var "+h+" = true;";var m=o;if(m)for(var v,y=-1,g=m.length-1;y<g;){v=m[y+=1],t+=" var "+f+" = false; for (var "+u+" in "+c+") { ",p&&(t+=" if (!Object.prototype.hasOwnProperty.call("+c+", "+u+")) continue; "),t+=" "+f+" = "+e.usePattern(v)+".test("+u+"); if ("+f+") break; } ";var P=e.util.escapeQuotes(v);t+=" if (!"+f+") { "+h+" = false; var err = ",!1!==e.createErrors?(t+=" { keyword: 'patternRequired' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { missingPattern: '"+P+"' } ",!1!==e.opts.messages&&(t+=" , message: 'should have property matching pattern \\'"+P+"\\'' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ",l&&(d+="}",t+=" else { ")}return t+=""+d}},{}],31:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="valid"+a,u="errs__"+a,f=e.util.copy(e),d="";f.level++;var p="valid"+f.level,m="key"+a,v=f.dataLevel=e.dataLevel+1,y="data"+v,g=Object.keys(o||{}),P=e.schema.patternProperties||{},E=Object.keys(P),b=e.schema.additionalProperties,w=g.length||E.length,j=!1===b,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(t+="var "+u+" = errors;var "+p+" = true;",x){if(t+=" for (var "+m+" in "+c+") { ",_&&(t+=" if (!Object.prototype.hasOwnProperty.call("+c+", "+m+")) continue; "),w){if(t+=" var isAdditional"+a+" = !(false ",g.length)if(g.length>5)t+=" || validate.schema"+i+"["+m+"] ";else{var q=g;if(q)for(var D,L=-1,Q=q.length-1;L<Q;)D=q[L+=1],t+=" || "+m+" == "+e.util.toQuotedString(D)+" "}if(E.length){var C=E;if(C)for(var V,z=-1,U=C.length-1;z<U;)V=C[z+=1],t+=" || "+e.usePattern(V)+".test("+m+") "}if(e.opts.v5&&k&&k.length){var T=k;if(T)for(var M,z=-1,N=T.length-1;z<N;)M=T[z+=1],t+=" || "+e.usePattern(M)+".test("+m+") "}t+=" ); if (isAdditional"+a+") { "}if("all"==$)t+=" delete "+c+"["+m+"]; ";else{var F=e.errorPath,H="' + "+m+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers)),j)if($)t+=" delete "+c+"["+m+"]; ";else{t+=" "+p+" = false; ";var J=n;n=e.errSchemaPath+"/additionalProperties";var G=G||[];G.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { additionalProperty: '"+H+"' } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT have additional properties' "),e.opts.verbose&&(t+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var K=t;t=G.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+K+"]); ":" validate.errors = ["+K+"]; return false; ":" var err = "+K+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n=J,l&&(t+=" break; ")}else if(S)if("failing"==$){t+=" var "+u+" = errors; ";var B=e.compositeRule;e.compositeRule=f.compositeRule=!0,f.schema=b,f.schemaPath=e.schemaPath+".additionalProperties",f.errSchemaPath=e.errSchemaPath+"/additionalProperties",f.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var Z=c+"["+m+"]";f.dataPathArr[v]=m;var Y=e.validate(f);f.baseId=O,e.util.varOccurences(Y,y)<2?t+=" "+e.util.varReplace(Y,y,Z)+" ":t+=" var "+y+" = "+Z+"; "+Y+" ",t+=" if (!"+p+") { errors = "+u+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+c+"["+m+"]; } ",e.compositeRule=f.compositeRule=B}else{f.schema=b,f.schemaPath=e.schemaPath+".additionalProperties",f.errSchemaPath=e.errSchemaPath+"/additionalProperties",f.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var Z=c+"["+m+"]";f.dataPathArr[v]=m;var Y=e.validate(f);f.baseId=O,e.util.varOccurences(Y,y)<2?t+=" "+e.util.varReplace(Y,y,Z)+" ":t+=" var "+y+" = "+Z+"; "+Y+" ",l&&(t+=" if (!"+p+") break; ")}e.errorPath=F}w&&(t+=" } "),t+=" } ",l&&(t+=" if ("+p+") { ",d+="}")}var W=e.opts.useDefaults&&!e.compositeRule;if(g.length){var X=g;if(X)for(var D,ee=-1,re=X.length-1;ee<re;){D=X[ee+=1];var te=o[D];if(e.util.schemaHasRules(te,e.RULES.all)){var ae=e.util.getProperty(D),Z=c+ae,se=W&&void 0!==te.default;f.schema=te,f.schemaPath=i+ae,f.errSchemaPath=n+"/"+e.util.escapeFragment(D),f.errorPath=e.util.getPath(e.errorPath,D,e.opts.jsonPointers),f.dataPathArr[v]=e.util.toQuotedString(D);var Y=e.validate(f);if(f.baseId=O,e.util.varOccurences(Y,y)<2){Y=e.util.varReplace(Y,y,Z);var oe=Z}else{var oe=y;t+=" var "+y+" = "+Z+"; "}if(se)t+=" "+Y+" ";else{if(I&&I[D]){t+=" if ("+oe+" === undefined) { "+p+" = false; ";var F=e.errorPath,J=n,ie=e.util.escapeQuotes(D);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(F,D,e.opts.jsonPointers)),n=e.errSchemaPath+"/required";var G=G||[];G.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { missingProperty: '"+ie+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+ie+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var K=t;t=G.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+K+"]); ":" validate.errors = ["+K+"]; return false; ":" var err = "+K+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n=J,e.errorPath=F,t+=" } else { "}else t+=l?" if ("+oe+" === undefined) { "+p+" = true; } else { ":" if ("+oe+" !== undefined) { "
+;t+=" "+Y+" } "}}l&&(t+=" if ("+p+") { ",d+="}")}}var ne=E;if(ne)for(var V,le=-1,ce=ne.length-1;le<ce;){V=ne[le+=1];var te=P[V];if(e.util.schemaHasRules(te,e.RULES.all)){f.schema=te,f.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(V),f.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(V),t+=" for (var "+m+" in "+c+") { ",_&&(t+=" if (!Object.prototype.hasOwnProperty.call("+c+", "+m+")) continue; "),t+=" if ("+e.usePattern(V)+".test("+m+")) { ",f.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var Z=c+"["+m+"]";f.dataPathArr[v]=m;var Y=e.validate(f);f.baseId=O,e.util.varOccurences(Y,y)<2?t+=" "+e.util.varReplace(Y,y,Z)+" ":t+=" var "+y+" = "+Z+"; "+Y+" ",l&&(t+=" if (!"+p+") break; "),t+=" } ",l&&(t+=" else "+p+" = true; "),t+=" } ",l&&(t+=" if ("+p+") { ",d+="}")}}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)){f.schema=te,f.schemaPath=e.schemaPath+".patternGroups"+e.util.getProperty(M)+".schema",f.errSchemaPath=e.errSchemaPath+"/patternGroups/"+e.util.escapeFragment(M)+"/schema",t+=" var pgPropCount"+a+" = 0; for (var "+m+" in "+c+") { ",_&&(t+=" if (!Object.prototype.hasOwnProperty.call("+c+", "+m+")) continue; "),t+=" if ("+e.usePattern(M)+".test("+m+")) { pgPropCount"+a+"++; ",f.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var Z=c+"["+m+"]";f.dataPathArr[v]=m;var Y=e.validate(f);f.baseId=O,e.util.varOccurences(Y,y)<2?t+=" "+e.util.varReplace(Y,y,Z)+" ":t+=" var "+y+" = "+Z+"; "+Y+" ",l&&(t+=" if (!"+p+") break; "),t+=" } ",l&&(t+=" else "+p+" = true; "),t+=" } ",l&&(t+=" if ("+p+") { ",d+="}");var pe=de.minimum,me=de.maximum;if(void 0!==pe||void 0!==me){t+=" var "+h+" = true; ";var J=n;if(void 0!==pe){var ve=pe,ye="minimum",ge="less";t+=" "+h+" = pgPropCount"+a+" >= "+pe+"; ",n=e.errSchemaPath+"/patternGroups/minimum",t+=" if (!"+h+") { ";var G=G||[];G.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { reason: '"+ye+"', limit: "+ve+", pattern: '"+e.util.escapeQuotes(M)+"' } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT have "+ge+" than "+ve+' properties matching pattern "'+e.util.escapeQuotes(M)+"\"' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var K=t;t=G.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+K+"]); ":" validate.errors = ["+K+"]; return false; ":" var err = "+K+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } ",void 0!==me&&(t+=" else ")}if(void 0!==me){var ve=me,ye="maximum",ge="more";t+=" "+h+" = pgPropCount"+a+" <= "+me+"; ",n=e.errSchemaPath+"/patternGroups/maximum",t+=" if (!"+h+") { ";var G=G||[];G.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { reason: '"+ye+"', limit: "+ve+", pattern: '"+e.util.escapeQuotes(M)+"' } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT have "+ge+" than "+ve+' properties matching pattern "'+e.util.escapeQuotes(M)+"\"' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var K=t;t=G.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+K+"]); ":" validate.errors = ["+K+"]; return false; ":" var err = "+K+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } "}n=J,l&&(t+=" if ("+h+") { ",d+="}")}}}}return l&&(t+=" "+d+" if ("+u+" == errors) {"),t=e.util.cleanUpCode(t)}},{}],32:[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.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(i||""),u="valid"+o;if("#"==n||"#/"==n)e.isRoot?(t=e.async,a="validate"):(t=!0===e.root.schema.$async,a="root.refVal[0]");else{var f=e.resolveRef(e.baseId,n,e.isRoot);if(void 0===f){var d="can't resolve reference "+n+" from id "+e.baseId;if("fail"==e.opts.missingRefs){console.log(d);var p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { ref: '"+e.util.escapeQuotes(n)+"' } ",!1!==e.opts.messages&&(s+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(n)+"' "),e.opts.verbose&&(s+=" , schema: "+e.util.toQuotedString(n)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var m=s;s=p.pop(),s+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(s+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs){var v=new Error(d);throw v.missingRef=e.resolve.url(e.baseId,n),v.missingSchema=e.resolve.normalizeId(e.resolve.fullPath(v.missingRef)),v}console.log(d),c&&(s+=" if (true) { ")}}else if(f.inline){var y=e.util.copy(e);y.level++;var g="valid"+y.level;y.schema=f.schema,y.schemaPath="",y.errSchemaPath=n;var P=e.validate(y).replace(/validate\.schema/g,f.code);s+=" "+P+" ",c&&(s+=" if ("+g+") { ")}else t=!0===f.$async,a=f.code}if(a){var p=p||[];p.push(s),s="",s+=e.opts.passContext?" "+a+".call(this, ":" "+a+"( ",s+=" "+h+", (dataPath || '')",'""'!=e.errorPath&&(s+=" + "+e.errorPath);s+=" , "+(i?"data"+(i-1||""):"parentData")+" , "+(i?e.dataPathArr[i]:"parentDataProperty")+", rootData) ";var E=s;if(s=p.pop(),t){if(!e.async)throw new Error("async schema referenced by sync schema");s+=" try { ",c&&(s+="var "+u+" ="),s+=" "+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; } ",c&&(s+=" if ("+u+") { ")}else s+=" if (!"+E+") { if (vErrors === null) vErrors = "+a+".errors; else vErrors = vErrors.concat("+a+".errors); errors = vErrors.length; } ",c&&(s+=" else { ")}return s}},{}],33:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="valid"+a,u=e.opts.v5&&o&&o.$data;u&&(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ");var f="schema"+a;if(!u)if(o.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var d=[],p=o;if(p)for(var m,v=-1,y=p.length-1;v<y;){m=p[v+=1];var g=e.schema.properties[m];g&&e.util.schemaHasRules(g,e.RULES.all)||(d[d.length]=m)}}else var d=o;if(u||d.length){var P=e.errorPath,E=u||d.length>=e.opts.loopRequired;if(l)if(t+=" var missing"+a+"; ",E){u||(t+=" var "+f+" = validate.schema"+i+"; ");var b="i"+a,w="schema"+a+"["+b+"]",j="' + "+w+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,w,e.opts.jsonPointers)),t+=" var "+h+" = true; ",u&&(t+=" if (schema"+a+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+a+")) "+h+" = false; else {"),t+=" for (var "+b+" = 0; "+b+" < "+f+".length; "+b+"++) { "+h+" = "+c+"["+f+"["+b+"]] !== undefined; if (!"+h+") break; } ",u&&(t+=" } "),t+=" if (!"+h+") { ";var S=S||[];S.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { missingProperty: '"+j+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+j+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var $=t;t=S.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+$+"]); ":" validate.errors = ["+$+"]; return false; ":" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } else { "}else{t+=" if ( ";var x=d;if(x)for(var _,b=-1,O=x.length-1;b<O;){_=x[b+=1],b&&(t+=" || ");var R=e.util.getProperty(_);t+=" ( "+c+R+" === undefined && (missing"+a+" = "+e.util.toQuotedString(e.opts.jsonPointers?_:R)+") ) "}t+=") { ";var w="missing"+a,j="' + "+w+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,w,!0):P+" + "+w);var S=S||[];S.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { missingProperty: '"+j+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+j+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var $=t;t=S.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+$+"]); ":" validate.errors = ["+$+"]; return false; ":" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } else { "}else if(E){u||(t+=" var "+f+" = validate.schema"+i+"; ");var b="i"+a,w="schema"+a+"["+b+"]",j="' + "+w+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,w,e.opts.jsonPointers)),u&&(t+=" if ("+f+" && !Array.isArray("+f+")) { var err = ",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { missingProperty: '"+j+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+j+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+f+" !== undefined) { "),t+=" for (var "+b+" = 0; "+b+" < "+f+".length; "+b+"++) { if ("+c+"["+f+"["+b+"]] === undefined) { var err = ",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { missingProperty: '"+j+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+j+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",u&&(t+=" } ")}else{var I=d;if(I)for(var A,k=-1,q=I.length-1;k<q;){A=I[k+=1];var R=e.util.getProperty(A),j=e.util.escapeQuotes(A);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,A,e.opts.jsonPointers)),t+=" if ("+c+R+" === undefined) { var err = ",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { missingProperty: '"+j+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+j+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=P}else l&&(t+=" if (true) {");return t}},{}],34:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="valid"+a,u="errs__"+a,f=e.util.copy(e),d="";f.level++;var p,m="valid"+f.level,v="ifPassed"+e.level,y=f.baseId;t+="var "+v+";";var g=o;if(g)for(var P,E=-1,b=g.length-1;E<b;){if(P=g[E+=1],E&&!p&&(t+=" if (!"+v+") { ",d+="}"),P.if&&e.util.schemaHasRules(P.if,e.RULES.all)){t+=" var "+u+" = errors; ";var w=e.compositeRule;if(e.compositeRule=f.compositeRule=!0,f.createErrors=!1,f.schema=P.if,f.schemaPath=i+"["+E+"].if",f.errSchemaPath=n+"/"+E+"/if",t+=" "+e.validate(f)+" ",f.baseId=y,f.createErrors=!0,e.compositeRule=f.compositeRule=w,t+=" "+v+" = "+m+"; if ("+v+") { ","boolean"==typeof P.then){if(!1===P.then){var j=j||[];j.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'switch' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { caseIndex: "+E+" } ",!1!==e.opts.messages&&(t+=" , message: 'should pass \"switch\" keyword validation' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var S=t;t=j.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+S+"]); ":" validate.errors = ["+S+"]; return false; ":" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}t+=" var "+m+" = "+P.then+"; "}else f.schema=P.then,f.schemaPath=i+"["+E+"].then",f.errSchemaPath=n+"/"+E+"/then",t+=" "+e.validate(f)+" ",f.baseId=y;t+=" } else { errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; } } "}else if(t+=" "+v+" = true; ","boolean"==typeof P.then){if(!1===P.then){var j=j||[];j.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'switch' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { caseIndex: "+E+" } ",!1!==e.opts.messages&&(t+=" , message: 'should pass \"switch\" keyword validation' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var S=t;t=j.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+S+"]); ":" validate.errors = ["+S+"]; return false; ":" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}t+=" var "+m+" = "+P.then+"; "}else f.schema=P.then,f.schemaPath=i+"["+E+"].then",f.errSchemaPath=n+"/"+E+"/then",t+=" "+e.validate(f)+" ",f.baseId=y;p=P.continue}return t+=d+"var "+h+" = "+m+"; ",t=e.util.cleanUpCode(t)}},{}],35:[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+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="valid"+s,f=e.opts.v5&&i&&i.$data;if(f?(a+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; ",t="schema"+s):t=i,(i||f)&&!1!==e.opts.uniqueItems){f&&(a+=" var "+u+"; if ("+t+" === false || "+t+" === undefined) "+u+" = true; else if (typeof "+t+" != 'boolean') "+u+" = false; else { "),a+=" var "+u+" = true; if ("+h+".length > 1) { var i = "+h+".length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+u+" = false; break outer; } } } } ",f&&(a+=" } "),a+=" if (!"+u+") { ";var d=d||[];d.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(a+=" , schema: ",a+=f?"validate.schema"+n:""+i,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var p=a;a=d.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(a+=" else { ")}else c&&(a+=" if (true) { ");return a}},{}],36:[function(e,r,t){"use strict";r.exports=function(e,r){function t(r){return void 0!==e.schema[r.keyword]||"properties"==r.keyword&&(!1===e.schema.additionalProperties||"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 a="",s=!0===e.schema.$async;if(e.isTop){var o=e.isTop,i=e.level=0,n=e.dataLevel=0,l="data";if(e.rootId=e.resolve.fullPath(e.root.schema.id),e.baseId=e.baseId||e.rootId,s){e.async=!0;var c="es7"==e.opts.async;e.yieldAwait=c?"await":"yield"}delete e.isTop,e.dataPathArr=[void 0],a+=" var validate = ",s?c?a+=" (async function ":("co*"==e.opts.async&&(a+="co.wrap"),a+="(function* "):a+=" (function ",a+=" (data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data;"}else{var i=e.level,n=e.dataLevel,l="data"+(n||"");if(e.schema.id&&(e.baseId=e.resolve.url(e.baseId,e.schema.id)),s&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+i+" = errors;"}var h="valid"+i,u=!e.opts.allErrors,f="",d="",p=e.schema.type,m=Array.isArray(p);if(p&&e.opts.coerceTypes){var v=e.util.coerceToTypes(e.opts.coerceTypes,p);if(v){var y=e.schemaPath+".type",g=e.errSchemaPath+"/type",P=m?"checkDataTypes":"checkDataType";a+=" if ("+e.util[P](p,l,!0)+") { ";var E="dataType"+i,b="coerced"+i;a+=" var "+E+" = typeof "+l+"; ","array"==e.opts.coerceTypes&&(a+=" if ("+E+" == 'object' && Array.isArray("+l+")) "+E+" = 'array'; "),a+=" var "+b+" = undefined; ";var w="",j=v;if(j)for(var S,$=-1,x=j.length-1;$<x;)S=j[$+=1],$&&(a+=" if ("+b+" === undefined) { ",w+="}"),"array"==e.opts.coerceTypes&&"array"!=S&&(a+=" if ("+E+" == 'array' && "+l+".length == 1) { "+b+" = "+l+" = "+l+"[0]; "+E+" = typeof "+l+"; } "),"string"==S?a+=" if ("+E+" == 'number' || "+E+" == 'boolean') "+b+" = '' + "+l+"; else if ("+l+" === null) "+b+" = ''; ":"number"==S||"integer"==S?(a+=" if ("+E+" == 'boolean' || "+l+" === null || ("+E+" == 'string' && "+l+" && "+l+" == +"+l+" ","integer"==S&&(a+=" && !("+l+" % 1)"),a+=")) "+b+" = +"+l+"; "):"boolean"==S?a+=" if ("+l+" === 'false' || "+l+" === 0 || "+l+" === null) "+b+" = false; else if ("+l+" === 'true' || "+l+" === 1) "+b+" = true; ":"null"==S?a+=" if ("+l+" === '' || "+l+" === 0 || "+l+" === false) "+b+" = null; ":"array"==e.opts.coerceTypes&&"array"==S&&(a+=" if ("+E+" == 'string' || "+E+" == 'number' || "+E+" == 'boolean' || "+l+" == null) "+b+" = ["+l+"]; ");a+=" "+w+" if ("+b+" === undefined) { ";var _=_||[];_.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(g)+" , params: { type: '",a+=m?""+p.join(","):""+p,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=m?""+p.join(","):""+p,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+y+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ";var O=a;a=_.pop(),a+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+O+"]); ":" validate.errors = ["+O+"]; return false; ":" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ";var R=n?"data"+(n-1||""):"parentData",I=n?e.dataPathArr[n]:"parentDataProperty";a+=" "+l+" = "+b+"; ",n||(a+="if ("+R+" !== undefined)"),a+=" "+R+"["+I+"] = "+b+"; } } "}}var A;if(e.schema.$ref&&(A=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?(A=!1,console.log('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"')):!0!==e.opts.extendRefs&&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&&!A)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",u&&(a+=" } if (errors === ",a+=o?"0":"errs_"+i,a+=") { ",d+="}");else{var k=e.RULES;if(k)for(var q,D=-1,L=k.length-1;D<L;)if(q=k[D+=1],function(e){for(var r=0;r<e.rules.length;r++)if(t(e.rules[r]))return!0}(q)){if(q.type&&(a+=" if ("+e.util.checkDataType(q.type,l)+") { "),e.opts.useDefaults&&!e.compositeRule)if("object"==q.type&&e.schema.properties){var Q=e.schema.properties,C=Object.keys(Q),V=C;if(V)for(var z,U=-1,T=V.length-1;U<T;){z=V[U+=1];var M=Q[z];if(void 0!==M.default){var N=l+e.util.getProperty(z);a+=" if ("+N+" === undefined) "+N+" = ",a+="shared"==e.opts.useDefaults?" "+e.useDefault(M.default)+" ":" "+JSON.stringify(M.default)+" ",a+="; "}}}else if("array"==q.type&&Array.isArray(e.schema.items)){var F=e.schema.items;if(F)for(var M,$=-1,H=F.length-1;$<H;)if(M=F[$+=1],void 0!==M.default){var N=l+"["+$+"]";a+=" if ("+N+" === undefined) "+N+" = ",a+="shared"==e.opts.useDefaults?" "+e.useDefault(M.default)+" ":" "+JSON.stringify(M.default)+" ",a+="; "}}var J=q.rules;if(J)for(var G,K=-1,B=J.length-1;K<B;)G=J[K+=1],t(G)&&(a+=" "+G.code(e,G.keyword)+" ",u&&(f+="}"));if(u&&(a+=" "+f+" ",f=""),q.type&&(a+=" } ",p&&p===q.type&&!v)){var Z=!0;a+=" else { ";var y=e.schemaPath+".type",g=e.errSchemaPath+"/type",_=_||[];_.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(g)+" , params: { type: '",a+=m?""+p.join(","):""+p,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=m?""+p.join(","):""+p,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+y+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ";var O=a;a=_.pop(),a+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+O+"]); ":" validate.errors = ["+O+"]; return false; ":" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}u&&(a+=" if (errors === ",a+=o?"0":"errs_"+i,a+=") { ",d+="}")}}if(p&&!Z&&!v){var y=e.schemaPath+".type",g=e.errSchemaPath+"/type",P=m?"checkDataTypes":"checkDataType";a+=" if ("+e.util[P](p,l,!0)+") { ";var _=_||[];_.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(g)+" , params: { type: '",a+=m?""+p.join(","):""+p,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=m?""+p.join(","):""+p,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+y+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ";var O=a;a=_.pop(),a+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+O+"]); ":" validate.errors = ["+O+"]; return false; ":" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }"}return u&&(a+=" "+d+" "),o?(s?(a+=" if (errors === 0) return true; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }); return validate;"):a+=" var "+h+" = errors === errs_"+i+";",a=e.util.cleanUpCode(a),o&&u&&(a=e.util.cleanUpVarErrors(a,s)),a}},{}],37:[function(e,r,t){"use strict";function a(e,r){function t(e,r,t){for(var a,o=0;o<s.length;o++){var i=s[o];if(i.type==r){a=i;break}}a||(a={type:r,rules:[]},s.push(a));var l={keyword:e,definition:t,custom:!0,code:n};a.rules.push(l),s.custom[e]=l}function a(e){if(!s.types[e])throw new Error("Unknown type "+e)}var s=this.RULES;if(s.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!i.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){if(r.macro&&void 0!==r.valid)throw new Error('"valid" option cannot be used with macro keywords');var o=r.type;if(Array.isArray(o)){var l,c=o.length;for(l=0;l<c;l++)a(o[l]);for(l=0;l<c;l++)t(e,o[l],r)}else o&&a(o),t(e,o,r);var h=!0===r.$data&&this._opts.v5;if(h&&!r.validate)throw new Error('$data support: "validate" function is not 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=this.compile(u,!0))}s.keywords[e]=s.all[e]=!0}function s(e){var r=this.RULES.custom[e];return r?r.definition:this.RULES.keywords[e]||!1}function o(e){var r=this.RULES;delete r.keywords[e],delete r.all[e],delete r.custom[e];for(var t=0;t<r.length;t++)for(var a=r[t].rules,s=0;s<a.length;s++)if(a[s].keyword==e){a.splice(s,1);break}}var i=/^[a-z_$][a-z0-9_$\-]*$/i,n=e("./dotjs/custom");r.exports={add:a,get:s,remove:o}},{"./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(!1!==r._opts.meta){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(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)+'"'))}if("function"==typeof e&&(e=e.apply(r,t)),!e||"function"!=typeof e.next)return a(e);i()})}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){if(e)return a(e);arguments.length>2&&(r=f.call(arguments,1)),t(r)})})}function i(e){return Promise.all(e.map(s,this))}function n(e){for(var r=new e.constructor,t=Object.keys(e),a=[],o=0;o<t.length;o++){var i=t[o],n=s.call(this,e[i]);n&&l(n)?function(e,t){r[t]=void 0,a.push(e.then(function(e){r[t]=e}))}(n,i):r[i]=e[i]}return Promise.all(a).then(function(){return r})}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}},{}],42:[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){return e({key:t,value:r[t]},{key:a,value:r[a]})}}}(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()),void 0!==(u=n.call(r,h,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(-1!==c.indexOf(u)){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:43}],43:[function(e,r,t){t.parse=e("./lib/parse"),t.stringify=e("./lib/stringify")},{"./lib/parse":44,"./lib/stringify":45}],44:[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();if(e=+r,isFinite(e))return e;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}},{}],45:[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)"string"==typeof(l=n[t])&&(c=s(l,d))&&u.push(a(l)+(o?": ":":")+c);else for(l in d)Object.prototype.hasOwnProperty.call(d,l)&&(c=s(l,d))&&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})}},{}],46:[function(r,t,a){(function(r){!function(s){function o(e){throw new RangeError(D[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="";return t.length>1&&(a=t[0]+"@",e=t[1]),e=e.replace(q,"."),a+i(e.split("."),r).join(".")}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>L*$>>1;a+=j)e=Q(e/L);return Q(a+(L+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])<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])>=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,D={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=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:{})},{}],47:[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;e=e.split(r);var n=1e3;o&&"number"==typeof o.maxKeys&&(n=o.maxKeys);var l=e.length;n>0&&l>n&&(l=n);for(var c=0;c<l;++c){var h,u,f,d,p=e[c].replace(/\+/g,"%20"),m=p.indexOf(t);m>=0?(h=p.substr(0,m),u=p.substr(m+1)):(h=p,u=""),f=decodeURIComponent(h),d=decodeURIComponent(u),a(i,f)?s(i[f])?i[f].push(d):i[f]=[i[f],d]:i[f]=d}return i};var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],48:[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}},{}],49:[function(e,r,t){"use strict";t.decode=t.parse=e("./decode"),t.encode=t.stringify=e("./encode")},{"./decode":47,"./encode":48}],50:[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={javascript:!0,"javascript:":!0},P={javascript:!0,"javascript:":!0},E={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=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=-1!==a&&a<e.indexOf("#")?"?":"#",o=e.split(s);o[0]=o[0].replace(/\\/g,"/"),e=o.join(s);var i=e;if(i=i.trim(),!t&&1===e.split("#").length){var n=f.exec(i);if(n)return this.path=i,this.href=i,this.pathname=n[1],n[2]?(this.search=n[2],this.query=r?b.parse(this.search.substr(1)):this.search.substr(1)):r&&(this.search="",this.query={}),this}var u=h.exec(i);if(u){u=u[0];var d=u.toLowerCase();this.protocol=d,i=i.substr(u.length)}if(t||u||i.match(/^\/\/[^@\/]+@[^@\/]+/)){var p="//"===i.substr(0,2);!p||u&&P[u]||(i=i.substr(2),this.slashes=!0)}if(!P[u]&&(p||u&&!E[u])){for(var w=-1,j=0;j<y.length;j++){var S=i.indexOf(y[j]);-1!==S&&(-1===w||S<w)&&(w=S)}var $,x;x=-1===w?i.lastIndexOf("@"):i.lastIndexOf("@",w),-1!==x&&($=i.slice(0,x),i=i.slice(x+1),this.auth=decodeURIComponent($)),w=-1;for(var j=0;j<v.length;j++){var S=i.indexOf(v[j]);-1!==S&&(-1===w||S<w)&&(w=S)}-1===w&&(w=i.length),this.host=i.slice(0,w),i=i.slice(w),this.parseHost(),this.hostname=this.hostname||"";var _="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!_)for(var O=this.hostname.split(/\./),j=0,R=O.length;j<R;j++){var I=O[j];if(I&&!I.match(/^[+a-z0-9A-Z_-]{0,63}$/)){for(var A="",k=0,q=I.length;k<q;k++)I.charCodeAt(k)>127?A+="x":A+=I[k];if(!A.match(/^[+a-z0-9A-Z_-]{0,63}$/)){var D=O.slice(0,j),L=O.slice(j+1),Q=I.match(/^([+a-z0-9A-Z_-]{0,63})(.*)$/);Q&&(D.push(Q[1]),L.unshift(Q[2])),L.length&&(i="/"+L.join(".")+i),this.hostname=D.join(".");break}}}this.hostname=this.hostname.length>255?"":this.hostname.toLowerCase(),_||(this.hostname=l.toASCII(this.hostname));var C=this.port?":"+this.port:"";this.host=(this.hostname||"")+C,this.href+=this.host,_&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==i[0]&&(i="/"+i))}if(!g[d])for(var j=0,R=m.length;j<R;j++){var V=m[j];if(-1!==i.indexOf(V)){var z=encodeURIComponent(V);z===V&&(z=escape(V)),i=i.split(V).join(z)}}var U=i.indexOf("#");-1!==U&&(this.hash=i.substr(U),i=i.slice(0,U));var T=i.indexOf("?");if(-1!==T?(this.search=i.substr(T),this.query=i.substr(T+1),r&&(this.query=b.parse(this.query)),i=i.slice(0,T)):r&&(this.search="",this.query={}),i&&(this.pathname=i),E[d]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var C=this.pathname||"";this.path=C+(this.search||"")}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+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(s+=":"+this.port)),this.query&&c.isObject(this.query)&&Object.keys(this.query).length&&(o=b.stringify(this.query));var i=this.search||o&&"?"+o||"";return r&&":"!==r.substr(-1)&&(r+=":"),this.slashes||(!r||E[r])&&!1!==s?(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 E[t.protocol]&&t.hostname&&!t.pathname&&(t.path=t.pathname="/"),t.href=t.format(),t}if(e.protocol&&e.protocol!==t.protocol){if(!E[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||P[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){t.path=(t.pathname||"")+(t.search||"")}return t.slashes=t.slashes||e.slashes,t.href=t.format(),t}var m=t.pathname&&"/"===t.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),y=v||m||t.host&&e.pathname,g=y,b=t.pathname&&t.pathname.split("/")||[],p=e.pathname&&e.pathname.split("/")||[],w=t.protocol&&!E[t.protocol];if(w&&(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),y=y&&(""===p[0]||""===b[0])),v)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(w){t.hostname=t.host=b.shift();var j=!!(t.host&&t.host.indexOf("@")>0)&&t.host.split("@");j&&(t.auth=j.shift(),t.host=t.hostname=j.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 S=b.slice(-1)[0],$=(t.host||e.host||b.length>1)&&("."===S||".."===S)||""===S,x=0,_=b.length;_>=0;_--)S=b[_],"."===S?b.splice(_,1):".."===S?(b.splice(_,1),x++):x&&(b.splice(_,1),x--);if(!y&&!g)for(;x--;x)b.unshift("..");!y||""===b[0]||b[0]&&"/"===b[0].charAt(0)||b.unshift(""),$&&"/"!==b.join("/").substr(-1)&&b.push("");var O=""===b[0]||b[0]&&"/"===b[0].charAt(0);if(w){t.hostname=t.host=O?"":b.length?b.shift():"";var j=!!(t.host&&t.host.indexOf("@")>0)&&t.host.split("@");j&&(t.auth=j.shift(),t.host=t.hostname=j.shift())}return y=y||t.host&&b.length,y&&!O&&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":51,punycode:46,querystring:49}],51:[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}}},{}],ajv:[function(e,r,t){"use strict";function a(e){return g.test(e)}function s(r){function t(e,r){var t;if("string"==typeof e){if(!(t=S(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=R(e);t=a.validate||I(a)}var s=t(r);return!0===t.$async?"*"==D._opts.async?m(s):s:(D.errors=t.errors,s)}function v(e,r){var t=R(e,void 0,r);return t.validate||I(t)}function E(e,r,t,a){if(Array.isArray(e))for(var s=0;s<e.length;s++)E(e[s],void 0,t,a);else r=i.normalizeId(r||e.id),q(r),D._schemas[r]=R(e,t,a,!0)}function b(e,r,t){E(e,r,t,!0)}function w(e,r){var s=e.$schema||D._opts.defaultMeta||j(),o=D._formats.uri;D._formats.uri="function"==typeof o?a:g;var i;try{i=t(s,e)}finally{D._formats.uri=o}if(!i&&r){var n="schema is invalid: "+A();if("log"!=D._opts.validateSchema)throw new Error(n);console.error(n)}return i}function j(){var e=D._opts.meta;return D._opts.defaultMeta="object"==typeof e?e.id||e:D._opts.v5?f.META_SCHEMA_ID:y}function S(e){var r=x(e);switch(typeof r){case"object":return r.validate||I(r);case"string":return S(r);case"undefined":return $(e)}}function $(e){var r=i.schema.call(D,{schema:{}},e);if(r){var t=r.schema,a=r.root,s=r.baseId,n=o.call(D,t,a,void 0,s);return D._fragments[e]=new l({ref:e,fragment:!0,schema:t,root:a,baseId:s,validate:n}),n}}function x(e){return e=i.normalizeId(e),D._schemas[e]||D._refs[e]||D._fragments[e]}function _(e){if(e instanceof RegExp)return O(D._schemas,e),void O(D._refs,e);switch(typeof e){case"undefined":return O(D._schemas),O(D._refs),void D._cache.clear();case"string":var r=x(e);return r&&D._cache.del(r.jsonStr),delete D._schemas[e],void delete D._refs[e];case"object":var t=c(e);D._cache.del(t);var a=e.id;a&&(a=i.normalizeId(a),delete D._schemas[a],delete D._refs[a])}}function O(e,r){for(var t in e){var a=e[t];a.meta||r&&!r.test(t)||(D._cache.del(a.jsonStr),delete e[t])}}function R(e,r,t,a){if("object"!=typeof e)throw new Error("schema should be object");var s=c(e),o=D._cache.get(s);if(o)return o;a=a||!1!==D._opts.addUsedSchema;var n=i.normalizeId(e.id);n&&a&&q(n);var h,u=!1!==D._opts.validateSchema&&!r;u&&!(h=e.id&&e.id==e.$schema)&&w(e,!0);var f=i.ids.call(D,e),d=new l({id:n,schema:e,localRefs:f,jsonStr:s,meta:t});return"#"!=n[0]&&a&&(D._refs[n]=d),D._cache.put(s,d),u&&h&&w(e,!0),d}function I(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||t,!0===e.schema.$async&&(t.$async=!0),t;e.compiling=!0;var a;e.meta&&(a=D._opts,D._opts=D._metaOpts);var s;try{s=o.call(D,e.schema,r,e.localRefs)}finally{e.compiling=!1,e.meta&&(D._opts=a)}return e.validate=s,e.refs=s.refs,e.refVal=s.refVal,e.root=s.root,s}function A(e,r){if(!(e=e||D.errors))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 k(e,r){"string"==typeof r&&(r=new RegExp(r)),D._formats[e]=r}function q(e){if(D._schemas[e]||D._refs[e])throw new Error('schema with key or id "'+e+'" already exists')}if(!(this instanceof s))return new s(r);var D=this;r=this._opts=d.copy(r)||{},this._schemas={},this._refs={},this._fragments={},this._formats=h(r.format),this._cache=r.cache||new n,this._loadingSchemas={},this._compilations=[],this.RULES=u(),this.validate=t,this.compile=v,this.addSchema=E,this.addMetaSchema=b,this.validateSchema=w,this.getSchema=S,this.removeSchema=_,this.addFormat=k,this.errorsText=A,this._addSchema=R,this._compile=I,r.loopRequired=r.loopRequired||1/0,(r.async||r.transpile)&&p.setup(r),!0===r.beautify&&(r.beautify={indent_size:2}),"property"==r.errorDataPath&&(r._errorDataPathProperty=!0),this._metaOpts=function(){for(var e=d.copy(D._opts),r=0;r<P.length;r++)delete e[P[r]];return e}(),r.formats&&function(){for(var e in D._opts.formats)k(e,D._opts.formats[e])}(),function(){!1!==D._opts.meta&&(b(e("./refs/json-schema-draft-04.json"),y,!0),D._refs["http://json-schema.org/schema"]=y)}(),r.v5&&f.enable(this),"object"==typeof r.meta&&b(r.meta),function(){var e=D._opts.schemas;if(e)if(Array.isArray(e))E(e);else for(var r in e)E(e[r],r)}()}var o=e("./compile"),i=e("./compile/resolve"),n=e("./cache"),l=e("./compile/schema_obj"),c=e("json-stable-stringify"),h=e("./compile/formats"),u=e("./compile/rules"),f=e("./v5"),d=e("./compile/util"),p=e("./async"),m=e("co");r.exports=s,s.prototype.compileAsync=p.compile;var v=e("./keyword");s.prototype.addKeyword=v.add,s.prototype.getKeyword=v.get,s.prototype.removeKeyword=v.remove,s.ValidationError=e("./compile/validation_error");var y="http://json-schema.org/draft-04/schema",g=/^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i,P=["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:41,"json-stable-stringify":42}]},{},[])("ajv")});
+//# sourceMappingURL=ajv.min.js.map \ No newline at end of file
diff --git a/deps/npm/node_modules/har-validator/node_modules/ajv/dist/ajv.min.js.map b/deps/npm/node_modules/har-validator/node_modules/ajv/dist/ajv.min.js.map
new file mode 100644
index 0000000000..69073a99d8
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/dist/ajv.min.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["/Users/evgenypoberezkin/JSON/ajv-v4/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","deferCallback","err","validate","setTimeout","missingSchema","schemaLoaded","sch","_refs","ref","_schemas","addSchema","missingRef","_callbacks","_loadingSchemas","loadSchema","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","dateA","Date","dateB","getTime","regexpA","RegExp","regexpB","toString","hasOwnProperty","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","compareDate","d1","d2","compareTime","t1","t2","compareDateTime","dt1","dt2","res","undefined","UUID","JSON_POINTER","fast","date-time","email","ipv4","ipv6","uuid","json-pointer","relative-json-pointer","./util","6","loadBeautify","beautify","js_beautify","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","error","validateCode","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","message","errorsText","macro","keyword","c","checkCompiling","_compilations","compiling","_formats","cv","endCompiling","compIndex","splice","arr","statement","../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","RELATIVE_JSON_POINTER","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","$nextValid","$currentBaseId","$allSchemasEmpty","arr1","$sch","$i","l1","19","$errs","every","$wasComposite","20","21","$compile","$inline","$macro","$ruleValidate","$validateCode","$rule","$definition","$rDef","$validateSchema","$ruleErrs","$ruleErr","$asyncKeyword","statements","$code","passContext","$parentData","$parentDataProperty","def_callRuleValidate","modifying","valid","def_customError","22","$schemaDeps","$propertyDeps","$property","$deps","$currentErrorPath","_$property","$prop","$propertyPath","$missingProperty","_errorDataPathProperty","join","arr2","$reqProperty","i2","l2","23","$vSchema","24","$unknownFormats","unknownFormats","$allowUnknown","indexOf","$isObject","$formatRef","25","$idx","$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","$shouldUseRule","$top","rootId","$es7","yieldAwait","$closingBraces1","$closingBraces2","$typeSchema","$typeIsArray","coerceTypes","$coerceToTypes","$method","$dataType","$coerced","$bracesCoercion","$type","$refKeywords","extendRefs","$rulesGroup","JSON","stringify","$typeChecked","37","addKeyword","_addRule","ruleGroup","rg","metaSchema","getKeyword","removeKeyword","j","add","remove","./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","_formatLimit","patternRequired","meta","addMetaSchema","META_SCHEMA_ID","containsMacro","enable","./dotjs/_formatLimit","./dotjs/constant","./dotjs/patternRequired","./dotjs/switch","./refs/json-schema-v5.json","41","gen","ctx","args","Promise","reject","onFulfilled","ret","next","onRejected","throw","done","toPromise","isPromise","TypeError","String","isGeneratorFunction","isGenerator","thunkToPromise","arrayToPromise","isObject","objectToPromise","fn","results","promise","name","displayName","val","wrap","createPromise","__generatorFunction__","42","json","cmp","space","cycles","replacer","node","seen","parent","indent","colonSeparator","toJSON","objectKeys","sort","keyValue","","x","has","jsonify","43","./lib/parse","./lib/stringify","44","at","ch","text","escapee","\"","\\","/","m","charAt","string","isFinite","hex","uffff","parseInt","fromCharCode","white","word","reviver","walk","holder","k","45","quote","escapable","lastIndex","partial","mind","gap","rep","\b","\t","\n","\f","\r","46","RangeError","mapDomain","regexSeparators","ucs2decode","extra","output","counter","ucs2encode","stringFromCharCode","basicToDigit","codePoint","base","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","floor","damp","baseMinusTMin","tMax","skew","decode","input","basic","oldi","w","baseMinusT","inputLength","initialN","bias","initialBias","lastIndexOf","delimiter","maxInt","tMin","encode","handledCPCount","basicLength","q","currentValue","handledCPCountPlusOne","qMinusT","toUnicode","regexPunycode","toLowerCase","toASCII","regexNonASCII","freeExports","nodeType","freeModule","freeGlobal","punycode","overflow","not-basic","invalid-input","Math","version","ucs2","47","qs","sep","eq","options","maxKeys","kstr","vstr","idx","substr","xs","48","stringifyPrimitive","ks","49","./decode","./encode","50","Url","slashes","auth","port","search","query","pathname","urlParse","parseQueryString","slashesDenoteHost","urlFormat","isString","urlResolve","relative","urlResolveObject","resolveObject","protocolPattern","portPattern","simplePathPattern","delims","unwise","autoEscape","nonHostChars","hostEndingChars","unsafeProtocol","javascript","javascript:","hostlessProtocol","slashedProtocol","http","https","ftp","gopher","file","http:","https:","ftp:","gopher:","file:","querystring","queryIndex","splitter","uSplit","rest","trim","simplePath","exec","proto","lowerProto","hostEnd","hec","atSign","parseHost","ipv6Hostname","hostparts","newpart","validParts","notHost","bit","unshift","ae","esc","escape","qm","rel","tkeys","tk","tkey","rkeys","rk","rkey","relPath","shift","isSourceAbs","isRelAbs","mustEndAbs","removeAllDots","srcPath","psychotic","isNullOrUndefined","authInHost","isNull","last","hasTrailingSlash","isAbsolute","51","arg","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","cache","indent_size","errorDataPath","metaOpts","META_IGNORE_OPTIONS","optsSchemas","customKeyword","./async","./cache","./compile","./compile/formats","./compile/resolve","./compile/rules","./compile/schema_obj","./compile/validation_error","./keyword","./refs/json-schema-draft-04.json","./v5"],"mappings":"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","file":"ajv.min.js"} \ No newline at end of file
diff --git a/deps/npm/node_modules/har-validator/node_modules/ajv/dist/nodent.min.js b/deps/npm/node_modules/har-validator/node_modules/ajv/dist/nodent.min.js
new file mode 100644
index 0000000000..c54c5f55b1
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/dist/nodent.min.js
@@ -0,0 +1,8 @@
+/* nodent 3.0.17: 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||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){t.exports=function(t){switch(parseInt(t.version)){case 2:case 3:t.plugins.asyncawait=e("./acorn-v3");break;case 4:case 5:t.plugins.asyncawait=e("./acorn-v4");break;default:throw new Error("acorn-es7-plugin requires Acorn v2, 3, 4 or 5")}return t}},{"./acorn-v3":2,"./acorn-v4":3}],2:[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(p,"$1 $3")),e.test(r)}function s(e,t,n,r){var i=new e.constructor(e.options,e.input,t);if(n)for(var s in n)i[s]=n[s];var o=e,a=i;return["inFunction","inAsyncFunction","inAsync","inGenerator","inModule"].forEach(function(e){e in o&&(a[e]=o[e])}),r&&(i.options.preserveParens=!0),i.nextToken(),i}function o(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(c,this))||e.apply(this,arguments)}}),e.extend("parseStatement",function(e){return function(n,r){var s=this.start,o=this.startLoc;if("name"===this.type.label)if(i(c,this,!0)){var a=this.inAsyncFunction;try{this.inAsyncFunction=!0,this.next();var l=this.parseStatement(n,r);return l.async=!0,l.start=s,l.loc&&(l.loc.start=o),l.range&&(l.range[0]=s),l}finally{this.inAsyncFunction=a}}else if("object"==typeof t&&t.asyncExits&&i(u,this)){this.next();var l=this.parseStatement(n,r);return l.async=!0,l.start=s,l.loc&&(l.loc.start=o),l.range&&(l.range[0]=s),l}return e.apply(this,arguments)}}),e.extend("parseIdent",function(e){return function(t){var n=e.apply(this,arguments);return this.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 o,u=this.start,c=this.startLoc,p=e.apply(this,arguments);if("Identifier"===p.type)if("async"!==p.name||r(this,p.end)){if("await"===p.name){var h=this.startNodeAt(p.start,p.loc&&p.loc.start);if(this.inAsyncFunction)return o=this.parseExprSubscripts(),h.operator="await",h.argument=o,h=this.finishNodeAt(h,"AwaitExpression",o.end,o.loc&&o.loc.end),n(h),h;if(this.input.slice(p.end).match(l))return t.awaitAnywhere||"module"!==this.options.sourceType?p:this.raise(p.start,"'await' is reserved within modules");if("object"==typeof t&&t.awaitAnywhere&&(u=this.start,o=s(this,u-4).parseExprSubscripts(),o.end<=u))return o=s(this,u).parseExprSubscripts(),h.operator="await",h.argument=o,h=this.finishNodeAt(h,"AwaitExpression",o.end,o.loc&&o.loc.end),this.pos=o.end,this.end=o.end,this.endLoc=o.endLoc,this.next(),n(h),h;if(!t.awaitAnywhere&&"module"===this.options.sourceType)return this.raise(p.start,"'await' is reserved within modules")}}else{var f=this.inAsyncFunction;try{this.inAsyncFunction=!0;var d=this,y=!1,m={parseFunctionBody:function(e,t){try{var n=y;return y=!0,d.parseFunctionBody.apply(this,arguments)}finally{y=n}},raise:function(){try{return d.raise.apply(this,arguments)}catch(e){throw y?e:a}}};if(o=s(this,this.start,m,!0).parseExpression(),"SequenceExpression"===o.type&&(o=o.expressions[0]),"CallExpression"===o.type&&(o=o.callee),"FunctionExpression"===o.type||"FunctionDeclaration"===o.type||"ArrowFunctionExpression"===o.type)return o=s(this,this.start,m).parseExpression(),"SequenceExpression"===o.type&&(o=o.expressions[0]),"CallExpression"===o.type&&(o=o.callee),o.async=!0,o.start=u,o.loc&&(o.loc.start=c),o.range&&(o.range[0]=u),this.pos=o.end,this.end=o.end,this.endLoc=o.endLoc,this.next(),n(o),o}catch(e){if(e!==a)throw e}finally{this.inAsyncFunction=f}}return p}}),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=(t.key&&t.key.name,e.apply(this,arguments));return"Identifier"!==i.type||"async"!==i.name||r(this,i.end)||this.input.slice(i.end).match(l)||(h.test(this.input.slice(i.end))?(i=e.apply(this,arguments),t.__asyncValue=!0):(n(t),"set"===t.kind&&this.raise(i.start,"'set <member>(value)' cannot be be async"),i=e.apply(this,arguments),"Identifier"===i.type&&"set"===i.name&&this.raise(i.start,"'set <member>(value)' cannot be be async"),t.__asyncValue=!0)),i}}),e.extend("parseClassMethod",function(e){return function(t,n,r){var i;n.__asyncValue&&("constructor"===n.kind&&this.raise(n.start,"class constructor() cannot be be async"),i=this.inAsyncFunction,this.inAsyncFunction=!0);var s=e.apply(this,arguments);return this.inAsyncFunction=i,s}}),e.extend("parseMethod",function(e){return function(t){var n;this.__currentProperty&&this.__currentProperty.__asyncValue&&(n=this.inAsyncFunction,this.inAsyncFunction=!0);var r=e.apply(this,arguments);return this.inAsyncFunction=n,r}}),e.extend("parsePropertyValue",function(e){return function(t,n,r,i,s,o){var a=this.__currentProperty;this.__currentProperty=t;var u;t.__asyncValue&&(u=this.inAsyncFunction,this.inAsyncFunction=!0);var c=e.apply(this,arguments);return this.inAsyncFunction=u,this.__currentProperty=a,c}})}var a={},u=/^async[\t ]+(return|throw)/,c=/^async[\t ]+function/,l=/^\s*[():;]/,p=/([^\n])\/\*(\*(?!\/)|[^\n*])*\*\/([^\n])/g,h=/\s*(get|set)\s*\(/;t.exports=o},{}],3:[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(c,"$1 $3")),e.test(r)}function s(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 s=e,o=r;return["inFunction","inAsync","inGenerator","inModule"].forEach(function(e){e in s&&(o[e]=s[e])}),r.nextToken(),r}function o(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 s=this.start,o=this.startLoc;if("name"===this.type.label&&t.asyncExits&&i(a,this)){this.next();var u=this.parseStatement(n,r);return u.async=!0,u.start=s,u.loc&&(u.loc.start=o),u.range&&(u.range[0]=s),u}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,o=this.start,a=(this.startLoc,e.apply(this,arguments));if("Identifier"===a.type&&"await"===a.name&&!this.inAsync&&t.awaitAnywhere){var u=this.startNodeAt(a.start,a.loc&&a.loc.start);o=this.start;var c={raise:function(){try{return pp.raise.apply(this,arguments)}catch(e){throw n}}};try{if(i=s(this,o-4,c).parseExprSubscripts(),i.end<=o)return i=s(this,o,c).parseExprSubscripts(),u.argument=i,u=this.finishNodeAt(u,"AwaitExpression",i.end,i.loc&&i.loc.end),this.pos=i.end,this.end=i.end,this.endLoc=i.endLoc,this.next(),u}catch(e){if(e===n)return a;throw e}}return a}});var n={undefined:!0,get:!0,set:!0,static:!0,async:!0,constructor:!0};e.extend("parsePropertyName",function(e){return function(t){var i=t.key&&t.key.name,s=e.apply(this,arguments);"get"===this.value&&(t.__maybeStaticAsyncGetter=!0);return n[this.value]?s:("Identifier"!==s.type||"async"!==s.name&&"async"!==i||r(this,s.end)||this.input.slice(s.end).match(u)?delete t.__maybeStaticAsyncGetter:"set"===t.kind||"set"===s.name?this.raise(s.start,"'set <member>(value)' cannot be be async"):(this.__isAsyncProp=!0,s=e.apply(this,arguments),"Identifier"===s.type&&"set"===s.name&&this.raise(s.start,"'set <member>(value)' cannot be be async")),s)}}),e.extend("parseClassMethod",function(e){return function(t,n,r){var i=e.apply(this,arguments);return n.__maybeStaticAsyncGetter&&(delete n.__maybeStaticAsyncGetter,"get"!==n.key.name&&(n.kind="get")),i}}),e.extend("parseFunctionBody",function(e){return function(t,n){var r=this.inAsync;this.__isAsyncProp&&(t.async=!0,this.inAsync=!0,delete this.__isAsyncProp);var i=e.apply(this,arguments);return this.inAsync=r,i}})}var a=/^async[\t ]+(return|throw)/,u=/^\s*[):;]/,c=/([^\n])\/\*(\*(?!\/)|[^\n*])*\*\/([^\n])/g;t.exports=o},{}],4:[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=0,u=n-r;o<u;o+=16383)s.push(a(e,o,o+16383>u?u:o+16383));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},{}],5:[function(e,t,n){},{}],6:[function(e,t,n){"use strict";function r(e){if(e>H)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=i.prototype,t}function i(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 u(e)}return s(e,t,n)}function s(e,t,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return e instanceof ArrayBuffer?p(e,t,n):"string"==typeof e?c(e,t):h(e)}function o(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 a(e,t,n){return o(e),e<=0?r(e):void 0!==t?"string"==typeof n?r(e).fill(t,n):r(e).fill(t):r(e)}function u(e){return o(e),r(e<0?0:0|f(e))}function c(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!i.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var n=0|y(e,t),s=r(n),o=s.write(e,t);return o!==n&&(s=s.slice(0,o)),s}function l(e){for(var t=e.length<0?0:0|f(e.length),n=r(t),i=0;i<t;i+=1)n[i]=255&e[i];return n}function p(e,t,n){if(t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(n||0))throw new RangeError("'length' is out of bounds");var r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),r.__proto__=i.prototype,r}function h(e){if(i.isBuffer(e)){var t=0|f(e.length),n=r(t);return 0===n.length?n:(e.copy(n,0,0,t),n)}if(e){if(ArrayBuffer.isView(e)||"length"in e)return"number"!=typeof e.length||G(e.length)?r(0):l(e);if("Buffer"===e.type&&Array.isArray(e.data))return l(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function f(e){if(e>=H)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+H.toString(16)+" bytes");return 0|e}function d(e){return+e!=e&&(e=0),i.alloc(+e)}function y(e,t){if(i.isBuffer(e))return e.length;if(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 V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return V(e).length;t=(""+t).toLowerCase(),r=!0}}function m(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 T(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return P(this,t,n);case"latin1":case"binary":return N(this,t,n);case"base64":return _(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,s){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=s?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(s)return-1;n=e.length-1}else if(n<0){if(!s)return-1;n=0}if("string"==typeof t&&(t=i.from(t,r)),i.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,s);throw new TypeError("val must be string, number or Buffer")}function b(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&&("ucs2"===(r=String(r).toLowerCase())||"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,-1===l?0:c-l)){if(-1===l&&(l=c),c-l+1===u)return l*o}else-1!==l&&(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 x(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(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(G(a))return o;e[n+o]=a}return o}function w(e,t,n,r){return W(V(t,e.length-n),e,n,r)}function E(e,t,n,r){return W(q(t),e,n,r)}function S(e,t,n,r){return E(e,t,n,r)}function k(e,t,n,r){return W(z(t),e,n,r)}function A(e,t,n,r){return W(U(t,e.length-n),e,n,r)}function _(e,t,n){return 0===t&&n===e.length?J.fromByteArray(e):J.fromByteArray(e.slice(t,n))}function C(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)>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)>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)>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 L(r)}function L(e){var t=e.length;if(t<=Z)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Z));return n}function P(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 N(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 T(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+=D(e[s]);return i}function F(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 $(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 O(e,t,n,r,s,o){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function B(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 R(e,t,n,r,i){return t=+t,n>>>=0,i||B(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Y.write(e,t,n,r,23,4),n+4}function I(e,t,n,r,i){return t=+t,n>>>=0,i||B(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Y.write(e,t,n,r,52,8),n+8}function j(e){if(e=M(e).replace(Q,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function M(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function D(e){return e<16?"0"+e.toString(16):e.toString(16)}function V(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))>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=65536+(i-55296<<10|n-56320)}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 q(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function U(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 z(e){return J.toByteArray(j(e))}function W(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 G(e){return e!==e}var J=e("base64-js"),Y=e("ieee754");n.Buffer=i,n.SlowBuffer=d,n.INSPECT_MAX_BYTES=50;var H=2147483647;n.kMaxLength=H,i.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),i.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(e,t,n){return s(e,t,n)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(e,t,n){return a(e,t,n)},i.allocUnsafe=function(e){return u(e)},i.allocUnsafeSlow=function(e){return u(e)},i.isBuffer=function(e){return null!=e&&!0===e._isBuffer},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,s=0,o=Math.min(n,r);s<o;++s)if(e[s]!==t[s]){n=e[s],r=t[s];break}return n<r?-1:r<n?1:0},i.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}},i.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return i.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=i.allocUnsafe(t),s=0;for(n=0;n<e.length;++n){var o=e[n];if(!i.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,s),s+=o.length}return r},i.byteLength=y,i.prototype._isBuffer=!0,i.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)g(this,t,t+1);return this},i.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)g(this,t,t+3),g(this,t+1,t+2);return this},i.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)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},i.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?C(this,0,e):m.apply(this,arguments)},i.prototype.equals=function(e){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===i.compare(this,e)},i.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+">"},i.prototype.compare=function(e,t,n,r,s){if(!i.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===s&&(s=this.length),t<0||n>e.length||r<0||s>this.length)throw new RangeError("out of range index");if(r>=s&&t>=n)return 0;if(r>=s)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,s>>>=0,this===e)return 0;for(var o=s-r,a=n-t,u=Math.min(o,a),c=this.slice(r,s),l=e.slice(t,n),p=0;p<u;++p)if(c[p]!==l[p]){o=c[p],a=l[p];break}return o<a?-1:a<o?1:0},i.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},i.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},i.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},i.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,isFinite(n)?(n>>>=0,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 x(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return E(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;i.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return r.__proto__=i.prototype,r},i.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||$(e,t,this.length);for(var r=this[e],i=1,s=0;++s<t&&(i*=256);)r+=this[e+s]*i;return r},i.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||$(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},i.prototype.readUInt8=function(e,t){return e>>>=0,t||$(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||$(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||$(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||$(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||$(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||$(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},i.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||$(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},i.prototype.readInt8=function(e,t){return e>>>=0,t||$(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||$(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt16BE=function(e,t){e>>>=0,t||$(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||$(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||$(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e>>>=0,t||$(e,4,this.length),Y.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||$(e,4,this.length),Y.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||$(e,8,this.length),Y.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||$(e,8,this.length),Y.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){O(this,e,t,n,Math.pow(2,8*n)-1,0)}var i=1,s=0;for(this[t]=255&e;++s<n&&(i*=256);)this[t+s]=e/i&255;return t+n},i.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){O(this,e,t,n,Math.pow(2,8*n)-1,0)}var i=n-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+n},i.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},i.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);O(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},i.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);O(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},i.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){return I(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){return I(this,e,t,!1,n)},i.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)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},i.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 s=e.charCodeAt(0);s<256&&(e=s)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!i.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);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 o;if("number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=i.isBuffer(e)?e:new i(e,r),u=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%u]}return this};var Q=/[^+\/0-9A-Za-z-_]/g},{"base64-js":4,ieee754:7}],7:[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:1/0*(f?-1:1);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}},{}],8:[function(e,t,n){"use strict";function r(e,t){if(Function.prototype.$asyncspawn||Object.defineProperty(Function.prototype,"$asyncspawn",{value:r,enumerable:!1,configurable:!0,writable:!0}),this instanceof Function){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=function(e,t){for(var n=t.toString(),r="return "+n,i=n.match(/.*\(([^)]*)\)/)[1],s=/['"]!!!([^'"]*)['"]/g,o=[];;){var a=s.exec(r);if(!a)break;o.push(a)}return o.reverse().forEach(function(t){r=r.slice(0,t.index)+e[t[1]]+r.substr(t.index+t[0].length)}),r=r.replace(/\/\*[^*]*\*\//g," ").replace(/\s+/g," "),new Function(i,r)()}({zousan:e("./zousan").toString(),thenable:e("./thenableFactory").toString()},function e(t,n){function r(){return i.apply(t,arguments)}Function.prototype.$asyncbind||Object.defineProperty(Function.prototype,"$asyncbind",{value:e,enumerable:!1,configurable:!0,writable:!0}),e.trampoline||(e.trampoline=function(e,t,n,r,i){return function s(o){for(;o;){if(o.then)return o=o.then(s,r),i?void 0:o;try{
+if(o.pop){if(o.length)return o.pop()?t.call(e):o;o=n}else o=o.call(e)}catch(e){return r(e)}}}}),e.LazyThenable||(e.LazyThenable="!!!thenable"(),e.EagerThenable=e.Thenable=(e.EagerThenableFactory="!!!zousan")());var i=this;switch(n){case!0:return new e.Thenable(r);case 0:return new e.LazyThenable(r);case void 0:return r.then=r,r;default:return function(){try{return i.apply(t,arguments)}catch(e){return n(e)}}}});i(),r(),t.exports={$asyncbind:i,$asyncspawn:r}},{"./thenableFactory":9,"./zousan":10}],9:[function(e,t,n){t.exports=function(){function e(e){return e&&e instanceof Object&&"function"==typeof e.then}function t(n,r,i){try{var s=i?i(r):r;if(n===s)return n.reject(new TypeError("Promise resolution loop"));e(s)?s.then(function(e){t(n,e)},function(e){n.reject(e)}):n.resolve(s)}catch(e){n.reject(e)}}function n(){}function r(e){}function i(e,t){this.resolve=e,this.reject=t}function s(r,i){var s=new n;try{this._resolver(function(n){return e(n)?n.then(r,i):t(s,n,r)},function(e){t(s,e,i)})}catch(e){t(s,e,i)}return s}function o(e){this._resolver=e,this.then=s}return n.prototype={resolve:r,reject:r,then:i},o.resolve=function(e){return o.isThenable(e)?e:{then:function(t){return t(e)}}},o.isThenable=e,o}},{}],10:[function(e,t,n){(function(e){"use strict";t.exports=function(t){function n(e){if(e){var t=this;e(function(e){t.resolve(e)},function(e){t.reject(e)})}}function r(e,t){if("function"==typeof e.y)try{var n=e.y.call(void 0,t);e.p.resolve(n)}catch(t){e.p.reject(t)}else e.p.resolve(t)}function i(e,t){if("function"==typeof e.n)try{var n=e.n.call(void 0,t);e.p.resolve(n)}catch(t){e.p.reject(t)}else e.p.reject(t)}t=t||"object"==typeof e&&e.nextTick||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,0)};var s=function(){function e(){for(;n.length-r;){try{n[r]()}catch(e){}n[r++]=void 0,r===i&&(n.splice(0,i),r=0)}}var n=[],r=0,i=1024;return function(i){n.push(i),n.length-r==1&&t(e)}}();return n.prototype={resolve:function(e){if(void 0===this.state){if(e===this)return this.reject(new TypeError("Attempt to resolve promise with self"));var t=this;if(e&&("function"==typeof e||"object"==typeof e))try{var n=0,i=e.then;if("function"==typeof i)return void i.call(e,function(e){n++||t.resolve(e)},function(e){n++||t.reject(e)})}catch(e){return void(n||this.reject(e))}this.state=r,this.v=e,t.c&&s(function(){for(var n=0,i=t.c.length;n<i;n++)r(t.c[n],e)})}},reject:function(e){if(void 0===this.state){this.state=i,this.v=e;var t=this.c;t&&s(function(){for(var n=0,r=t.length;n<r;n++)i(t[n],e)})}},then:function(e,t){var r=new n,i={y:e,n:t,p:r};if(void 0===this.state)this.c?this.c.push(i):this.c=[i];else{var o=this.state,a=this.v;s(function(){o(i,a)})}return r}},n.resolve=function(e){if(e&&e instanceof n)return e;var t=new n;return t.resolve(e),t},n.reject=function(e){if(e&&e instanceof n)return e;var t=new n;return t.reject(e),t},n.version="2.3.3-nodent",n}}).call(this,e("_process"))},{_process:31}],11:[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")}},{}],12:[function(e,t,n){(function(n){"use strict";function r(e){if(Array.isArray(e))return e.map(function(e){return r(e)});var t={};return Object.keys(e).forEach(function(n){t[n]=e[n]}),t}function i(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 s(){}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(!0===e||!1===e)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(e,t){if(n.es6target&&!e.id&&!t&&0===e.type.indexOf("Function"))return e.type="ArrowFunctionExpression",e;if(n.noRuntime){if(t){if(o(t).isLiteral)throw new Error("Nodent: 'noRuntime' option only compatible with -promise and -engine modes");e.body.body=y.part("try {$:0} catch($2) {return $1($2)}",[r(e.body),t,h("$boundEx")]).body}else if(n.es6target&&!e.id&&0===e.type.indexOf("Function"))return e.type="ArrowFunctionExpression",e;return n.es6target&&!e.id?(e.type="ArrowFunctionExpression",e):y.part("$0.bind(this)",[e]).expr}return t?y.part("$0.$1(this,$2)",[e,me.asyncbind,t]).expr:y.part("$0.$1(this)",[e,me.asyncbind]).expr}function g(e,t,n,r){return y.part("var $0 = $1",[h(e),m({type:"FunctionExpression",id:null,generator:!1,expression:!1,params:n||[],body:Array.isArray(t)?{type:"BlockStatement",body:t}:t},r)]).body[0]}function v(t){return e.filename+(t&&t.loc&&t.loc.start?"("+t.loc.start.line+":"+t.loc.start.column+")\t":"\t")}function b(e){return n.babelTree?p(e):{type:"Literal",value:e,raw:JSON.stringify(e)}}function x(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 w(e,t){if(!o(e).isFunction)throw new Error("Can only replace 'arguments' in functions");return"$usesArguments"in e||(y.treeWalker(e,function(t,r,i){"Identifier"===t.type&&"arguments"===t.name?(i[0].parent.shorthand&&(i[0].parent.shorthand=!1,i[0].parent.key=h("arguments"),e.$usesArguments=!0),"key"!==i[0].field&&(t.name=n.$arguments,e.$usesArguments=!0)):t!==e&&o(t).isFunction?"ArrowFunctionExpression"===t.type&&(w(t),e.$usesArguments=e.$usesArguments||t.$usesArguments):r()}),e.$usesArguments=e.$usesArguments||!1),e.$usesArguments&&"ArrowFunctionExpression"!==e.type}function E(e){return"string"!=typeof e&&(e=e.type.replace(/Statement|Expression/g,"")),n.generatedSymbolPrefix+e+"_"+ye++}function S(e,t){return e&&(e.$exit=f({$error:t.$error,$return:t.$return})),e}function k(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 A(e,t){var n=k(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 _(e,t){var r=!(n.promises||n.generators||n.engine)&&n.lazyThenables;ce(e),oe(e),M(e),Q(e),Z(e),(r?Y:s)(e),O(e),$(e),U(e,[q,r?s:J,R,I,B]),z(e,t),le(e),fe(e)}function C(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:r(t)}};return e&&(de[e]={def:n}),n}function L(e){return{type:"AwaitExpression",argument:Q({type:"FunctionExpression",generator:!1,expression:!1,async:!0,params:[],body:{type:"BlockStatement",body:e}}).body.body[0].argument}}function P(e,t){"string"==typeof e&&(e=h(e));var n=y.part("$0.call($1)",[e,[{type:"ThisExpression"}].concat(t||[])]).expr;return e.$thisCall=n,n.$thisCallName=e.name,n}function N(e,t){return{type:"ReturnStatement",argument:P(e,t)}}function T(e,t){return{type:"CallExpression",callee:h(e.$seh+"Finally"),arguments:t?[t]:[]}}function F(e,t){if(Array.isArray(e))return e.map(function(e){return F(e,t)});var r=0,i=0;return y.treeWalker(e,function(e,t,s){if("ReturnStatement"!==e.type||e.$mapped){if("ThrowStatement"===e.type){var a=o(e).isAsync;if(r>0){if(!a)return t(e);delete e.async}return void(!a&&i?t():(e.type="ReturnStatement",e.$mapped=!0,e.argument={type:"CallExpression",callee:A(s,[n]).$error,arguments:[e.argument]}))}return"TryStatement"===e.type?(i++,t(e),void i--):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:A(s,[n]).$return,arguments:e.argument?[e.argument]:[]})},t)}function $(e,t){return Array.isArray(e)?e.map(function(e){return $(e,t)}):(y.treeWalker(e,function(e,t,n){if(t(),"ConditionalExpression"===e.type&&(u(e.alternate)||u(e.consequent))){h(E("condOp"));i(e,L(y.part("if ($0) return $1 ; return $2",[e.test,e.consequent,e.alternate]).body))}},t),e)}function O(e,t){return Array.isArray(e)?e.map(function(e){return O(e,t)}):(y.treeWalker(e,function(e,t,n){if(t(),"LogicalExpression"===e.type&&u(e.right)){var r,s=h(E("logical"+("&&"===e.operator?"And":"Or")));if("||"===e.operator)r="var $0; if (!($0 = $1)) {$0 = $2} return $0";else{if("&&"!==e.operator)throw new Error(v(e)+"Illegal logical operator: "+e.operator);r="var $0; if ($0 = $1) {$0 = $2} return $0"}i(e,L(y.part(r,[s,e.left,e.right]).body))}},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=he(i.body);if(s)if(c(i)){var a=E(i),u=e.body.splice(r+1,e.body.length-(r+1));if(u.length){var l=C(a,u);delete de[a],i.body.push(N(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 R(e,t,n){if("IfStatement"===e.type&&u([e.consequent,e.alternate])){var s=E(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=N(s);c.body.push(n(C(s,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&&i(e,{type:"BlockStatement",body:[r(e)]}),e.$deferred=!0,e.body.push(r(h))),n(e)}}),e.consequent&&e.alternate&&e.consequent.$deferred&&e.alternate.$deferred||c.body.push(r(h))}}else a.parent[a.field]=c}}function I(e,t,n){if(!e.$switched&&"SwitchStatement"===e.type&&u(e.cases)){e.$switched=!0;var i,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()),i=E(e),s=N(i),a.parent[a.field].unshift(C(i,o)),a.parent[a.field].push(r(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]=r(s):"ReturnStatement"===n.type||"ThrowStatement"===n.type||(d(v(e)+"switch-case fall-through not supported - added break. See https://github.com/MatAtBread/nodent#differences-from-the-es7-specification"),e.consequent.push(r(s)))}}),!0}}function j(e){return"ReturnStatement"===e.type||"ThrowStatement"===e.type}function M(t,r){return y.treeWalker(t,function(t,i,s){if("TryStatement"===t.type&&!t.$seh&&(o(s[0].parent).isBlockStatement||(s[0].parent[s[0].field]={type:"BlockStatement",body:[t]}),t.$seh=E("Try")+"_",t.$containedAwait=!!u(t),t.$finallyExit=t.finalizer&&V(s)&&!!a(t.finalizer.body,j),t.$containedAwait||t.$finallyExit)){t.$needsMapping=!r||!t.$finallyExit;var c=A(s,[n]);if(t.finalizer&&!t.handler){var l=h(E("exception"));t.handler={type:"CatchClause",param:l,body:{type:"BlockStatement",body:[{type:"ThrowStatement",argument:l}]}}}if(!t.handler&&!t.finalizer){var p=new SyntaxError(v(t.value)+"try requires catch and/or finally clause",e.filename,t.start);throw p.pos=t.start,p.loc=t.loc.start,p}t.finalizer?(S(t.block,{$error:t.$seh+"Catch",$return:T(t,c.$return)}),S(t.handler,{$error:T(t,c.$error),$return:T(t,c.$return)})):S(t.block,{$error:t.$seh+"Catch",$return:c.$return})}i()}),t}function D(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 V(e){for(var t=0;t<e.length;t++)if(o(e[t].self).isFunction)return e[t].self.async||e[t].self.$wasAsync;return!1}function q(t,i,s){if(t.$needsMapping){var o,a,u,c=i[0];if(!("index"in c))throw new Error(e.filename+" - malformed try/catch blocks");var l=c.index+1,p=c.parent[c.field].splice(l,c.parent[c.field].length-l);if(p.length){a=t.$seh+"Post";var f=s(g(a,p,[],A(i,[n]).$error));c.parent[c.field].splice(c.index,0,f),o=y.part("return $0()",[t.finalizer?T(t,h(a)):h(a)]).body[0]}else t.finalizer&&(o=N(T(t)));t.$mapped=!0,o&&(t.block.body.push(r(o)),t.handler.body.body.push(r(o)));var d=A(i,[n]);if(t.handler){var v=h(t.$seh+"Catch");u=r(t.handler.body);var b=g(v.name,u,[r(t.handler.param)],t.finalizer?T(t,d.$error):d.$error);t.handler.body.body=[{type:"CallExpression",callee:v,arguments:[r(t.handler.param)]}],c.parent[c.field].splice(c.index,0,b)}if(t.finalizer){var x={exit:h(t.$seh+"Exit"),value:h(t.$seh+"Value"),body:r(t.finalizer.body)},w=y.part("(function ($value) { {$:body} return $exit && ($exit.call(this, $value)); })",x).expr,E={type:"VariableDeclaration",kind:"var",declarations:[{type:"VariableDeclarator",id:h(t.$seh+"Finally"),init:m({type:"FunctionExpression",params:[x.exit],id:null,body:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:m(w,d.$error)}]}})}]};D(c.parent[c.field],[E]);var S=y.part("return $0()",[t.finalizer?T(t,h(a)):h(a)]).body[0];u.body[u.length-1]=S,t.block.body[t.block.body.length-1]=S,delete t.finalizer}}}function U(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 z(e,t,s){return y.treeWalker(e,function(e,a,c){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]})),a(),o(e).isAwait){var l=e.loc;if(!(t=t||c.some(function(e){return e.self&&e.self.$wasAsync}))||"warn"===t){var p=v(e)+"'await' used inside non-async function. ";n.promises?p+="'return' value Promise runtime-specific":p+="'return' value from await is synchronous",d(p+". See https://github.com/MatAtBread/nodent#differences-from-the-es7-specification")}var f=c[0].parent;"LogicalExpression"===f.type&&f.right===e&&d(v(e.argument)+"'"+printNode(f)+"' on right of "+f.operator+" will always evaluate '"+printNode(e.argument)+"'"),"ConditionalExpression"===f.type&&f.test!==e&&d(v(e.argument)+"'"+printNode(f)+"' will always evaluate '"+printNode(e.argument)+"'");var y=h(E("await")),g=r(e.argument);i(e,y);for(var b,x,w=1;w<c.length;w++)if(x=o(c[w].self).isBlockStatement){b=c[w-1];break}if(!b)throw new Error(v(e)+"Illegal await not contained in a statement");var S,k,_=A(c,[s,n]),C=b.index,L=x.splice(C,x.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===y.name?k=S=b.self.argument.callee:"Identifier"===b.self.type||b.self.name===y.name||"ExpressionStatement"===b.self.type&&"Identifier"===b.self.expression.type&&b.self.expression.name===y.name?S=L.length?{type:"FunctionExpression",params:[r(y)],body:z({type:"BlockStatement",body:r(L)},t,_)}:{type:"FunctionExpression",params:[],body:{type:"BlockStatement",body:[]}}:(L.unshift(b.self),S={type:"FunctionExpression",params:[r(y)],body:z({type:"BlockStatement",body:r(L)},t,_)}),k||(k=S?m(S,_.$error):{type:"FunctionExpression",params:[],body:{type:"BlockStatement",body:[]}}),n.wrapAwait&&(g={type:"CallExpression",arguments:[g],callee:n.promises||n.generators?{type:"MemberExpression",object:h("Promise"),property:h("resolve")}:{type:"MemberExpression",object:h("Object"),property:h("$makeThenable")}});var P={type:"CallExpression",callee:{type:"MemberExpression",object:g,property:h("then",l),computed:!1},arguments:[k,_.$error]};x.push({loc:l,type:"ReturnStatement",argument:P})}return!0}),e}function W(e,t){var n=e.$label;delete e.$label;var r=h(E("idx")),s=h(E("in")),a=y.part("var $0,$1 = [];for ($0 in $2) $1.push($0)",[r,s,e.right]).body,u=y.part("for ($0; $1.length;){ $2 = $1.shift(); $:3 ; }",[e.left,s,"VariableDeclaration"===e.left.type?e.left.declarations[0].id:e.left,e.body]).body[0];u.$label=n;for(var c=0;c<t.length;c++)if(o(t[c].parent).isBlockStatement){t[c].parent[t[c].field].splice(t[c].index,0,a[0],a[1]);break}i(e,u)}function G(e,t){"BlockStatement"!==e.body.type&&(e.body={type:"BlockStatement",body:[e.body]});var n,r,i=y.part("[$0[Symbol.iterator]()]",[e.right]).expr;if("VariableDeclaration"===e.left.type){"const"===e.left.kind&&(e.left.kind="let"),n=e.left.declarations[0].id;var s=ie(e.left.declarations[0].id);r=h(E("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(E("iterator_"+n.name));var o={type:"VariableDeclaration",kind:"var",declarations:[{type:"VariableDeclarator",id:r,init:i}]};e.init=o}e.type="ForStatement",e.test=y.part("!($0[1] = $0[0].next()).done && (($1 = $0[1].value) || true)",[r,n]).expr,delete e.left,delete e.right}function J(e,t,r){function i(e){return"AwaitExpression"===e.type&&!e.$hidden||c&&("BreakStatement"===e.type||"ContinueStatement"===e.type)&&e.label}var s=e.$depth;"ForInStatement"===e.type&&u(e)?W(e,t):"ForOfStatement"===e.type&&u(e)&&G(e,t);var c=t.some(function(e){return"$label"in e.self&&"ForStatement"===e.self.type&&e.self.$mapped});if(!e.$mapped&&o(e).isLoop&&a(e,i)){t[0].self.$mapped=!0;var l=[],p=e.init,f=e.test||b(!0),d=e.update,m=e.body;d&&(d={type:"ExpressionStatement",expression:d}),p&&(o(p).isStatement||(p={type:"ExpressionStatement",expression:p}),l.push(p));var g,v;e.$label?(v=e.$label.name,g=t[1]):(v=ye++,g=t[0]),v=n.generatedSymbolPrefix+"Loop_"+v;var x,w,E=h(v+"_trampoline"),S=h(v),k=d?h(v+"_step"):S,_=h(v+"_exit");h("q"),h("$exception");if("index"in g){var L=g.index;w=g.parent[g.field].splice(L+1,g.parent[g.field].length-(L+1))}else w=[];x=C(_,w);var P={type:"ReturnStatement",argument:S},N={type:"ReturnStatement",argument:k},T={type:"ReturnStatement",argument:{type:"ArrayExpression",elements:[b(1)]}};y.treeWalker(m,function(e,t,n){if(o(e).isFunction||o(e).isLoop)return!0;if("BreakStatement"===e.type||"ContinueStatement"===e.type)if(e.label)for(var r=(n.filter(function(e){return"$label"in e.self}).map(function(e,t){return e.self.$label&&e.self.$label.name})),i=[],s=0;s<r.length;s++){if(r[s]===e.label.name){"BreakStatement"===e.type&&i.push(b(1)),n[0].replace({type:"ReturnStatement",argument:{type:"ArrayExpression",elements:i.reverse()}});break}i.push(b(0))}else"BreakStatement"===e.type?n[0].replace(T):n[0].replace(N);else t()},t),m="BlockStatement"===m.type?m.body.slice(0):[m],m="DoWhileStatement"===e.type?m.concat({type:"IfStatement",test:{type:"UnaryExpression",argument:f,prefix:!0,operator:"!"},consequent:T,alternate:N}):[{type:"IfStatement",test:f,consequent:{type:"BlockStatement",body:m.concat(N)},alternate:T}],n.noRuntime&&l.push({type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:E}],kind:"var"});var F,$=A(t,[n]).$error;F=n.noRuntime?y.part(n.es6target?"($idTrampoline = ((q) => { $$setMapped: while (q) { if (q.then) "+(1===s?" return void q.then($idTrampoline, $exit); ":" return q.then($idTrampoline, $exit); ")+" try { if (q.pop) if (q.length) return q.pop() ? $idContinuation.call(this) : q; else q = $idStep; else q = q.call(this) } catch (_exception) { return $exit(_exception); } } }))($idIter)":"($idTrampoline = (function (q) { $$setMapped: while (q) { if (q.then) "+(1===s?" return void q.then($idTrampoline, $exit); ":" return q.then($idTrampoline, $exit); ")+" try { if (q.pop) if (q.length) return q.pop() ? $idContinuation.call(this) : q; else q = $idStep; else q = q.call(this) } catch (_exception) { return $exit(_exception); } } }).bind(this))($idIter)",{setMapped:function(e){return e.$mapped=!0,e},idTrampoline:E,exit:$,idIter:S,idContinuation:_,idStep:k}).expr:y.part("(Function.$0.trampoline(this,$1,$2,$3,$5)($4))",[me.asyncbind,_,k,$,S,b(1===s)]).expr,l.push({type:"ReturnStatement",argument:F}),l.push({$label:e.$label,type:"FunctionDeclaration",id:S,params:[],body:{type:"BlockStatement",body:m}}),d&&l.push({type:"FunctionDeclaration",id:k,params:[],body:{type:"BlockStatement",body:[d,P]}}),!p||"VariableDeclaration"!==p.type||"let"!==p.kind&&"const"!==p.kind?(l.push(x),t[0].replace(l.map(r))):("const"===p.kind&&(p.kind="let"),t[0].replace([{type:"BlockStatement",body:l.map(r)},r(x)]))}}function Y(e,t){return y.treeWalker(e,function(e,t,s){function a(e){return{type:"ReturnStatement",argument:{type:"UnaryExpression",operator:"void",prefix:!0,argument:P(e||S)}}}function c(e,t){if("BreakStatement"===e.type)i(e,r(A(e.label&&n.generatedSymbolPrefix+"Loop_"+e.label.name+"_exit")));else if("ContinueStatement"===e.type)i(e,r(a(e.label&&n.generatedSymbolPrefix+"Loop_"+e.label.name+"_next")));else if(o(e).isFunction)return!0;t()}"ForInStatement"===e.type&&u(e)?W(e,s):"ForOfStatement"===e.type&&u(e)&&G(e,s),t();var p;if(o(e).isLoop&&u(e)){var f=e.init,d=e.test||b(!0),g=e.update,v=e.body,x=l(v);f&&(o(f).isStatement||(f={type:"ExpressionStatement",expression:f})),g=g&&{type:"ExpressionStatement",expression:g},v=o(v).isBlockStatement?r(v).body:[r(v)];var w=e.$label&&e.$label.name;w="Loop_"+(w||ye++);var E=n.generatedSymbolPrefix+(w+"_exit"),S=n.generatedSymbolPrefix+(w+"_next"),k=h(n.generatedSymbolPrefix+w),A=function(e){return{type:"ReturnStatement",argument:{type:"UnaryExpression",operator:"void",prefix:!0,argument:{type:"CallExpression",callee:h(e||E),arguments:[]}}}},_=C(S,[{type:"ReturnStatement",argument:{type:"CallExpression",callee:x?m(k):k,arguments:[h(E),me.error]}}]);g&&_.body.body.unshift(g);for(var L=0;L<v.length;L++)y.treeWalker(v[L],c);v.push(r(a()));var N={type:"FunctionExpression",id:k,params:[h(E),me.error],body:{type:"BlockStatement",body:[_]}};if("DoWhileStatement"===e.type)_.body.body=[{type:"IfStatement",test:r(d),consequent:{type:"BlockStatement",body:r(_.body.body)},alternate:{type:"ReturnStatement",argument:{type:"CallExpression",callee:h(E),arguments:[]}}}],N.body.body=[_].concat(v);else{var T={type:"IfStatement",test:r(d),consequent:{type:"BlockStatement",body:v},alternate:r(A())};N.body.body.push(T)}var F={type:"ExpressionStatement",expression:{type:"AwaitExpression",argument:m(N,b(0))}};for(!f||"VariableDeclaration"!==f.type||"let"!==f.kind&&"const"!==f.kind||("const"===f.kind&&(f.kind="let"),F={type:"BlockStatement",body:[r(f),F]},f=null),p=0;p<s.length;p++){var $=s[p];if("index"in $)return f?$.parent[$.field].splice($.index,1,r(f),F):$.parent[$.field][$.index]=F,!0}}return!0},t),e}function H(e){if(!o(e).isFunction)throw new Error("Cannot examine non-Function node types for async exits");return a(e.body,function(e){return"Identifier"===e.type&&(e.name===n.$return||e.name===n.$error)||j(e)&&o(e).isAsync},function(e){return!(o(e).isFunction&&(e.$wasAsync||o(e).isAsync))})}function Z(t){return y.treeWalker(t,function(t,r,i){var s=x(t);if(r(),s&&o(s).isAsync){if("set"==t.kind){var a=new SyntaxError(v(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=w(s);H(s)||0!==s.body.body.length&&"ReturnStatement"===s.body.body[s.body.body.length-1].type||s.body.body.push({type:"ReturnStatement"});var c=m(S({type:"FunctionExpression",params:[me.return,me.error],body:Z(F(s.body,i)),$wasAsync:!0},n),n.promises||n.generators||n.engine?null:b(!n.lazyThenables||0));n.promises?s.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"NewExpression",callee:h("Promise"),arguments:[c]}}]}:s.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:c}]},u&&D(s.body.body,[ge])}})}function Q(e){return y.treeWalker(e,function(e,t,r){if(t(),o(e).isAsync&&o(e).isFunction){var i;(i=x(r[0].parent))&&o(i).isAsync&&"get"===r[0].parent.kind&&ee(r[0].parent.key),delete e.async;var s,a=w(e);return o(e.body).isBlockStatement?(H(e)||0!==e.body.body.length&&"ReturnStatement"===e.body.body[e.body.body.length-1].type||e.body.body.push({type:"ReturnStatement"}),s={type:"BlockStatement",body:e.body.body.map(function(e){return F(e,r)})}):(s={type:"BlockStatement",body:[F({type:"ReturnStatement",argument:e.body},r)]},e.expression=!1),s=m(S({type:"FunctionExpression",params:[me.return,me.error],body:s,$wasAsync:!0},n),n.promises||n.generators||n.engine?null:b(!n.lazyThenables||0)),n.promises&&(s={type:"NewExpression",callee:h("Promise"),arguments:[s]}),s={type:"BlockStatement",body:[{type:"ReturnStatement",loc:e.loc,argument:s}]},a&&D(s.body,[ge]),void(e.body=s)}}),e}function X(e){if(Array.isArray(e))return e.map(X);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?me.error:me.return,arguments:e.argument?[e.argument]:[]},void(e.type="ReturnStatement");n(e)})}function K(e,t){if(n.noRuntime)throw new Error("Nodent: 'noRuntime' option only compatible with -promise and -engine modes");return y.part("{ return (function*($return,$error){ $:body }).$asyncspawn(Promise,this) }",{return:me.return,error:me.error,asyncspawn:me.asyncspawn,body:X(e).concat(t?[{type:"ReturnStatement",argument:me.return}]:[])}).body[0]}function ee(e){e.$asyncgetwarninig||(e.$asyncgetwarninig=!0,d(v(e)+"'async get "+printNode(e)+"(){...}' is non-standard. See https://github.com/MatAtBread/nodent#differences-from-the-es7-specification"))}function te(e,t){function s(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 a(e){var t=n.promises;n.promises=!0,_(e,!0),n.promises=t}function u(e){return"BlockStatement"!==e.body.type&&(e.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:e.body}]}),e}function c(e,n){n.$asyncexitwarninig||(n.$asyncexitwarninig=!0,d(v(e)+"'async "+{ReturnStatement:"return",ThrowStatement:"throw"}[e.type]+"' not possible in "+(t?"engine":"generator")+" mode. Using Promises for function at "+v(n)))}y.treeWalker(e,function(e,n,r){n();var l,p,h;if(o(e).isAsync&&o(e).isFunction){var f;(f=x(r[0].parent))&&o(f).isAsync&&"get"===r[0].parent.kind&&ee(r[0].parent.key),(p=H(e))?(c(p,e.body),a(e)):t?"get"!==r[0].parent.kind&&s(e,!0):(l=e,delete l.async,h=w(l),s(l,!1),l=u(l),l.body=K(l.body.body,p),h&&D(l.body.body,[ge]),l.id&&"ExpressionStatement"===r[0].parent.type?(l.type="FunctionDeclaration",r[1].replace(l)):r[0].replace(l))}else(l=x(e))&&o(l).isAsync&&((p=H(l))?(c(p,l),a(e)):t&&"get"!==e.kind||(t?a(e):(e.async=!1,h=w(l),s(l,!1),i(l,u(l)),l.body=K(l.body.body,p)),h&&D(l.body.body,[ge])))});var l=r(n);return n.engine=!1,n.generators=!1,ce(e),oe(e),M(e,l.engine),O(e),$(e),U(e,[q,J,R,I,B]),z(e,"warn"),n.engine=l.engine,n.generators=l.generators,e}function ne(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 re(e,t){var n=[],i={};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?i[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(ie(c.id).forEach(t),c.init){var l={type:"AssignmentExpression",left:r(c.id),operator:"=",right:r(c.init)};a.push(l)}}if(0==a.length)n.remove();else{var p=a.length>1?{type:"SequenceExpression",expressions:a}:a[0];"For"!==n.parent.type.slice(0,3)&&(p={type:"ExpressionStatement",expression:p}),n.replace(p)}});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:i}}function ie(e){if(!e)return[];if(Array.isArray(e))return e.reduce(function(e,t){return e.concat(ie(t.id))},[]);switch(e.type){case"Identifier":return[e.name];case"AssignmentPattern":return ie(e.left);case"ArrayPattern":return e.elements.reduce(function(e,t){return e.concat(ie(t))},[]);case"ObjectPattern":return e.properties.reduce(function(e,t){return e.concat(ie(t))},[]);case"ObjectProperty":case"Property":return ie(e.value);case"RestElement":case"RestProperty":return ie(e.argument)}}function se(e){function t(e){d(v(e)+"Possible assignment to 'const "+printNode(e)+"'")}function n(e){switch(e.type){case"Identifier":"const"===r[e.name]&&t(e);break;case"ArrayPattern":e.elements.forEach(function(e){"const"===r[e.name]&&t(e)});break;case"ObjectPattern":e.properties.forEach(function(e){"const"===r[e.key.name]&&t(e)})}}var r={};y.treeWalker(e,function(e,t,i){var s=o(e).isBlockStatement;if(s){r=Object.create(r);for(var a=0;a<s.length;a++)if("VariableDeclaration"===s[a].type)for(var u=0;u<s[a].declarations.length;u++)ie(s[a].declarations[u].id).forEach(function(e){r[e]=s[a].kind})}t(),"AssignmentExpression"===e.type?n(e.left):"UpdateExpression"===e.type&&n(e.argument),s&&(r=Object.getPrototypeOf(r))})}function oe(e){function t(e){return a(e,function(e){return"AssignmentExpression"===e.type})}function n(e){return function(t,n){if("VariableDeclaration"===t.type&&(t.kind=t.kind||"var")&&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 s(e,t){return!("FunctionDeclaration"!==e.type||!e.id)&&(o(e).isAsync||!e.$continuation)}var c={TemplateLiteral:function(e){return e.expressions},NewExpression:function(e){return e.arguments},CallExpression:function(e){return e.arguments},SequenceExpression:function(e){return e.expressions},ArrayExpression:function(e){return e.elements},ObjectExpression:function(e){return e.properties.map(function(e){return e.value})}};y.treeWalker(e,function(e,n,s){var a;if(n(),e.type in c&&!e.$hoisted){var s,l=c[e.type](e),p=[];for(a=0;a<l.length;a++)if(!o(l[a]).isScope){if((s=u(l[a]))&&function(e){p.length&&(e.argument={type:"SequenceExpression",
+expressions:p.map(function(e){var t=r(e);return i(e,e.left),t}).concat(e.argument)},p=[])}(s[0].self),!u(l.slice(a+1)))break;(s=t(l[a]))&&p.push(s[0].self)}}else if("VariableDeclaration"===e.type)for(a=e.declarations.length-1;a>0;a--)if(e.declarations[a]&&e.declarations[a].init&&u(e.declarations[a].init)){var h={type:"VariableDeclaration",kind:e.kind,declarations:e.declarations.splice(a)},f=s[0];if(!("index"in f))throw new Error("VariableDeclaration not in a block");f.parent[f.field].splice(f.index+1,0,h)}}),se(e);var l=!1;return y.treeWalker(e,function(e,t,r){var i=l;if(l=l||pe(e),o(e).isBlockStatement){if(u(e)){var a,c,p,f,y,m=!r[0].parent||o(r[0].parent).isScope;if(m){c=ne(e,n(["const"]),!1);var g={},b={};c.forEach(function(e){e[0].self.declarations.forEach(function(e){ie(e.id).forEach(function(t){g[t]||b[t]?(delete g[t],b[t]=e):g[t]=e})})}),c.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=ie(e[0].self.declarations),i=r.filter(function(e){return e in b});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 g}),i.length?e[0].self.declarations=i.map(function(e){return{type:"VariableDeclarator",id:h(e)}}):n.remove()}),p=ne(e,n(["var"]),!1),f=[]}else f=ne(e,n(["const"]),!0);f=f.concat(ne(e,n(["let"]),!0)),a=ne(e,function(e){return o(e).isDirective},!0),y=ne(e,s,l),p=p?re(p,"var"):{duplicates:{},decls:[]},f=f?re(f,"let"):{duplicates:{},decls:[]},Object.keys(p.duplicates).forEach(function(e){d(v(p.duplicates[e])+"Duplicate declaration '"+printNode(p.duplicates[e])+"'")}),Object.keys(f.duplicates).forEach(function(e){d(v(f.duplicates[e])+"Duplicate declaration '"+printNode(f.duplicates[e])+"'")}),y=y.map(function(e){var t,n=e[0];return o(n.self).isAsync?(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,"FunctionDeclaration"===n.self.type?n.remove():n.replace(h(t)))}),a=a.map(function(e){return e[0].remove()}),(a.length||p.decls.length||f.decls.length||y.length)&&(e.body=a.concat(p.decls).concat(f.decls).concat(y).concat(e.body))}l=i}if(t(),"ForOfStatement"===e.type||"ForInStatement"===e.type||o(e).isLoop){for(var x=0,w=0;w<r.length;w++)if("ForOfStatement"===r[w].self.type||"ForInStatement"===r[w].self.type||o(r[w].self).isLoop)x+=1;else if(o(r[w].self).isFunction)break;e.$depth=x,"LabeledStatement"===r[0].parent.type?e.$label=r[0].parent.label:e.$label=null}return!0}),e}function ae(e,t){function n(){return e.$superID=e.$superID||h("$super$"+ye++)}return function(e){(e=x(e))&&o(e).isAsync&&(!t||"get"===e.kind||a(e,function(e){return o(e).isFunction&&a(e,function(e){return"Super"===e.type})&&a(e,function(e){return e.async&&("ReturnStatement"===e.type||"ThrowStatement"===e.type)})},!0))&&y.treeWalker(e.body,function(e,t,r){var i;o(e).isClass||(t(),"Super"===e.type&&("MemberExpression"===r[0].parent.type?"CallExpression"===r[1].parent.type&&"callee"===r[1].field?(i=y.part("this.$super($field).call(this,$args)",{super:n(),field:r[0].parent.computed?r[0].parent.property:b(r[0].parent.property.name),args:r[1].parent.arguments}).expr,r[2].replace(i)):(i=y.part("this.$super($field)",{super:n(),field:r[0].parent.computed?r[0].parent.property:b(r[0].parent.property.name)}).expr,r[1].replace(i)):d(v(e)+"'super' in async methods must be deferenced. 'async constructor()'/'await super()' not valid.")))})}}function ue(e,t){return y.treeWalker(e,function(e,r,i){if(r(),("ClassDeclaration"===e.type||"ClassExpression"===e.type)&&(e.body.body.forEach(ae(e,t)),e.$superID)){var s=y.part("(function($field) { return super[$field] })",{field:h("$field")}).expr;n.babelTree?(s.type="ClassMethod",s.key=e.$superID,s.kind="method",e.body.body.push(s)):e.body.body.push({type:"MethodDefinition",key:e.$superID,kind:"method",value:s})}})}function ce(e){return y.treeWalker(e,function(e,t,n){return u(e)&&"ArrowFunctionExpression"===e.type&&"BlockStatement"!==e.body.type&&(e.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:e.body}]}),t(),!0}),e}function le(e){return y.treeWalker(e,function(e,t,r){t(),"Identifier"===e.type&&"__nodent"===e.name&&i(e,b(n))}),e}function pe(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 he(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 fe(e){y.treeWalker(e,function(e,t,n){if(t(),"ArrowFunctionExpression"===e.type&&"BlockStatement"===e.body.type&&1===e.body.body.length&&"ReturnStatement"===e.body.body[0].type)e.body=e.body.body[0].argument;else{var r,i;if(r=o(e).isBlockStatement)for(var s=0;s<r.length;s++)(i=o(r[s]).isBlockStatement)&&!he(i)&&(he(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&&de[e.name]&&(de[e.name].ref?delete de[e.name]:de[e.name].ref=e.$thisCall)});var t=Object.keys(de).map(function(e){return de[e].ref});if(t.length){y.treeWalker(e,function(e,n,i){if(n(),t.indexOf(e)>=0&&"ReturnStatement"===i[1].self.type){var s=e.$thisCallName,a=r(de[s].def.body.body);de[s].$inlined=!0,o(i[1].self).isJump||a.push({type:"ReturnStatement"}),i[1].replace(a)}});var n=Object.keys(de).map(function(e){return de[e].$inlined&&de[e].def});y.treeWalker(e,function(e,t,r){t(),n.indexOf(e)>=0&&r[0].remove()})}if(!("Program"===e.type&&"module"===e.sourceType||a(e,function(e){return o(e).isES6},!0))){var i=pe(e);!function(e){y.treeWalker(e,function(e,t,n){if("Program"===e.type||"FunctionDeclaration"===e.type||"FunctionExpression"===e.type){var r=i;if(i=i||pe(e)){t();var s="Program"===e.type?e:e.body,o=ne(s,function(e,t){if("FunctionDeclaration"===e.type)return t[0].parent!==s});o=o.map(function(e){return e[0].remove()}),[].push.apply(s.body,o)}else t();i=r}else t()})}(e)}return y.treeWalker(e,function(e,t,n){t(),Object.keys(e).filter(function(e){return"$"===e[0]}).forEach(function(t){delete e[t]})}),e}var de={},ye=1,me={};Object.keys(n).filter(function(e){return"$"===e[0]}).forEach(function(e){me[e.slice(1)]=h(n[e])});var ge=y.part("var $0 = arguments",[me.arguments]).body[0];return n.engine?(e.ast=ue(e.ast,!0),e.ast=te(e.ast,n.engine),e.ast=le(e.ast),fe(e.ast)):n.generators?(e.ast=ue(e.ast),e.ast=te(e.ast),e.ast=le(e.ast),fe(e.ast)):(e.ast=ue(e.ast),_(e.ast)),n.babelTree&&y.treeWalker(e.ast,function(e,t,n){t(),"Literal"===e.type&&i(e,b(e.value))}),e}var y=e("./parser"),m=e("./output");n.printNode=function e(t){if(!t)return"";if(Array.isArray(t))return t.map(e).join("|\n");try{return m(t)}catch(e){return e.message+": "+(t&&t.type)}};var 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={printNode:printNode,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}}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./output":13,"./parser":14}],13:[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,"/*"+e.type+"?*/ "+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,"{"),null!=(n=e.body)&&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){t.write(e,"try "),this.out(e.block,t,e.block.type),e.handler&&this.out(e.handler,t,e.handler.type),e.finalizer&&(t.write(e.finalizer," finally "),this.out(e.finalizer,t,e.finalizer.type))},CatchClause:function(e,t){t.write(e," catch ("),this.out(e.param,t,e.param.type),t.write(null,") "),this.out(e.body,t,e.body.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 "),1===e.params.length&&"Identifier"===e.params[0].type?(this.out(e.params[0],t,e.params[0].type),t.write(e," => ")):(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){"ObjectExpression"===e.object.type||e.object.type.match(/Literal$/)&&e.object.raw.match(/^[0-9]/)||!("ArrayExpression"===e.object.type||"CallExpression"===e.object.type||"NewExpression"===e.object.type||r(e)<=r(e.object))?(t.write(null,"("),this.out(e.object,t,e.object.type),t.write(null,")")):this.out(e.object,t,e.object.type),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){c.addMapping({source:t.map.file,original:{line:e.loc.start.line,column:e.loc.start.column},generated:{line:t.map.startLine+u.length+1,column: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 r=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(r),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.out(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":27}],14:[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=p.replace,e.append=p.append,e.index?(Object.defineProperties(e,{index:{enumerable:!0,get:p.index}}),e.remove=p.removeElement):e.remove=p.removeNode,n.unshift(e),i(e.self,t,n),n.shift()}function s(){e.type in l&&l[e.type](e,n,function t(i,s,o){if(i===e)return l[o||e.type](e,n,t);for(var a=Object.keys(e),u=0;u<a.length;u++){var c=e[a[u]];Array.isArray(c)?c.indexOf(i)>=0&&r({self:i,parent:e,field:a[u],index:!0}):c instanceof Object&&i===c&&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(t,n){var r=[],s={ecmaVersion:8,allowHashBang:!0,allowReturnOutsideFunction:!0,allowImportExportEverywhere:!0,locations:!0,onComment:r};if((!n||!n.noNodentExtensions||parseInt(a.version)<4)&&(h||(parseInt(a.version)<4&&console.warn("Nodent: Warning - noNodentExtensions option requires acorn >=v4.x. Extensions installed."),e("acorn-es7-plugin")(a),h=!0),s.plugins=s.plugins||{},s.plugins.asyncawait={asyncExits:!0,awaitAnywhere:!0}),n)for(var o in n)"noNodentExtensions"!==o&&(s[o]=n[o]);var u=a.parse(t,s);return i(u,function(e,t,n){for(t();r.length&&e.loc&&e.loc.start.line>=r[0].loc.start.line&&e.loc.end.line>=r[0].loc.end.line;)e.$comments=e.$comments||[],e.$comments.push(r.shift())}),u}function o(e,t){function n(e,r){if(Array.isArray(r)&&!Array.isArray(e))throw new Error("Can't substitute an array for a node");return r=r||{},Object.keys(e).forEach(function(i){function s(e){return"function"==typeof e&&(e=e()),r=r.concat(e)}function o(e){return"function"==typeof e&&(e=e()),r[i]=e,r}if(!(e[i]instanceof Object))return r[i]=e[i];if(Array.isArray(e[i]))return r[i]=n(e[i],[]);var a;if(a=Array.isArray(r)?s:o,"Identifier"===e[i].type&&"$"===e[i].name[0])return a(t[e[i].name.slice(1)]);if("LabeledStatement"===e[i].type&&"$"===e[i].label.name){var u=e[i].body.expression;return a(t[u.name||u.value])}return a("LabeledStatement"===e[i].type&&"$$"===e[i].label.name.slice(0,2)?t[e[i].label.name.slice(2)](n(e[i]).body):n(e[i]))}),r}f[e]||(f[e]=s(e,{noNodentExtensions:!0,locations:!1,ranges:!1,onComment:null}));var r=n(f[e]);return{body:r.body,expr:"ExpressionStatement"===r.body[0].type?r.body[0].expression:null}}var a=e("acorn"),u=e("acorn/dist/walk"),c={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")}},l=u.make(c),p={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}},h=!1,f={};t.exports={part:o,parse:s,treeWalker:i}},{acorn:15,"acorn-es7-plugin":1,"acorn/dist/walk":16}],15:[function(e,t,n){!function(e,r){"object"==typeof n&&void 0!==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])>e)return!1;if((n+=t[r+1])>=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)):!1!==n&&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)):!1!==n&&(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,T[e]=new L(e,t)}function o(e){return 10===e||13===e||8232===e||8233===e}function a(e,t){return j.call(e,t)}function u(e,t){for(var n=1,r=0;;){O.lastIndex=r;var i=O.exec(e);if(!(i&&i.index<t))return new V(n,t-r);++n,r=i.index+i[0].length}}function c(e){var t={};for(var n in U)t[n]=e&&a(e,n)?e[n]:U[n];if(t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),D(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return D(t.onComment)&&(t.onComment=l(t,t.onComment)),t}function l(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 q(this,o,a)),e.ranges&&(u.range=[i,s]),t.push(u)}}function p(e){return new RegExp("^("+e.replace(/ /g,"|")+")$")}function h(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 f(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 d(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function y(e,t){return new W(t,e).parse()}function m(e,t,n){var r=new W(n,e,t);return r.nextToken(),r.parseExpression()}function g(e,t){return new W(t,e)}function v(t,n,r){e.parse_dammit=t,e.LooseParser=n,e.pluginsLoose=r}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",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},P={beforeExpr:!0},N={startsExpr:!0},T={},F={num:new L("num",N),regexp:new L("regexp",N),string:new L("string",N),name:new L("name",N),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(",",P),semi:new L(";",P),colon:new L(":",P),dot:new L("."),question:new L("?",P),arrow:new L("=>",P),template:new L("template"),ellipsis:new L("...",P),backQuote:new L("`",N),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",P),_catch:s("catch"),_continue:s("continue"),_debugger:s("debugger"),_default:s("default",P),_do:s("do",{isLoop:!0,beforeExpr:!0}),_else:s("else",P),_finally:s("finally"),_for:s("for",{isLoop:!0}),_function:s("function",N),_if:s("if"),_return:s("return",P),_switch:s("switch"),_throw:s("throw",P),_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",N),_super:s("super",N),_class:s("class"),_extends:s("extends",P),_export:s("export"),_import:s("import"),_null:s("null",N),_true:s("true",N),_false:s("false",N),_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})},$=/\r\n?|\n|\u2028|\u2029/,O=new RegExp($.source,"g"),B=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,R=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,I=Object.prototype,j=I.hasOwnProperty,M=I.toString,D=Array.isArray||function(e){return"[object Array]"===M.call(e)},V=function(e,t){this.line=e,this.column=t};V.prototype.offset=function(e){return new V(this.line,this.column+e)};var q=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)},U={ecmaVersion:7,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:{}},z={},W=function(e,t,n){this.options=e=c(e),this.sourceFile=e.sourceFile,this.keywords=p(w[e.ecmaVersion>=6?6:5]);var r="";if(!e.allowReserved){for(var i=e.ecmaVersion;!(r=b[i]);i--);"module"==e.sourceType&&(r+=" await")}this.reservedWords=p(r);var s=(r?r+" ":"")+b.strict;this.reservedWordsStrict=p(s),this.reservedWordsStrictBind=p(s+" "+b.strictBind),this.input=String(t),this.containsEsc=!1,this.loadPlugins(e.plugins),n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split($).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=F.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.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.inFunction=this.inGenerator=this.inAsync=!1,this.yieldPos=this.awaitPos=0,this.labels=[],0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterFunctionScope()};W.prototype.isKeyword=function(e){return this.keywords.test(e)},W.prototype.isReservedWord=function(e){return this.reservedWords.test(e)},W.prototype.extend=function(e,t){this[e]=t(this[e])},W.prototype.loadPlugins=function(e){var t=this;for(var n in e){var r=z[n];if(!r)throw new Error("Plugin '"+n+"' not found");r(t,e[n])}},W.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)};var G=W.prototype,J=/^(?:'((?:[^']|\.)*)'|"((?:[^"]|\.)*)"|;)/;G.strictDirective=function(e){for(var t=this;;){R.lastIndex=e,e+=R.exec(t.input)[0].length;var n=J.exec(t.input.slice(e));if(!n)return!1;if("use strict"==(n[1]||n[2]))return!0;e+=n[0].length}},G.eat=function(e){return this.type===e&&(this.next(),!0)},G.isContextual=function(e){return this.type===F.name&&this.value===e},G.eatContextual=function(e){return this.value===e&&this.eat(F.name)},G.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},G.canInsertSemicolon=function(){return this.type===F.eof||this.type===F.braceR||$.test(this.input.slice(this.lastTokEnd,this.start))},G.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},G.semicolon=function(){this.eat(F.semi)||this.insertSemicolon()||this.unexpected()},G.afterTrailingComma=function(e,t){if(this.type==e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},G.expect=function(e){this.eat(e)||this.unexpected()},G.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var Y=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=-1};G.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,"Parenthesized pattern")}},G.checkExpressionErrors=function(e,t){var n=e?e.shorthandAssign:-1;if(!t)return n>=0;n>-1&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns")},G.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},G.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var H=W.prototype;H.parseTopLevel=function(e){var t=this,n={};for(e.body||(e.body=[]);this.type!==F.eof;){var r=t.parseStatement(!0,!0,n);e.body.push(r)}return this.next(),this.options.ecmaVersion>=6&&(e.sourceType=this.options.sourceType),this.finishNode(e,"Program")};var Z={kind:"loop"},Q={kind:"switch"};H.isLet=function(){if(this.type!==F.name||this.options.ecmaVersion<6||"let"!=this.value)return!1;R.lastIndex=this.pos;var e=R.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},H.isAsyncFunction=function(){if(this.type!==F.name||this.options.ecmaVersion<8||"async"!=this.value)return!1;R.lastIndex=this.pos;var e=R.exec(this.input),t=this.pos+e[0].length;return!($.test(this.input.slice(this.pos,t))||"function"!==this.input.slice(t,t+8)||t+8!=this.input.length&&r(this.input.charAt(t+8)))},H.parseStatement=function(e,t,n){var r,i=this.type,s=this.startNode();switch(this.isLet()&&(i=F._var,r="let"),i){case F._break:case F._continue:return this.parseBreakContinueStatement(s,i.keyword);case F._debugger:return this.parseDebuggerStatement(s);case F._do:return this.parseDoStatement(s);case F._for:return this.parseForStatement(s);case F._function:return!e&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1);case F._class:return e||this.unexpected(),this.parseClass(s,!0);case F._if:return this.parseIfStatement(s);case F._return:return this.parseReturnStatement(s);case F._switch:return this.parseSwitchStatement(s);case F._throw:return this.parseThrowStatement(s);case F._try:return this.parseTryStatement(s);case F._const:case F._var:return r=r||this.value,e||"var"==r||this.unexpected(),this.parseVarStatement(s,r);case F._while:return this.parseWhileStatement(s);case F._with:return this.parseWithStatement(s);case F.braceL:return this.parseBlock();case F.semi:return this.parseEmptyStatement(s);case F._export:case F._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'")),i===F._import?this.parseImport(s):this.parseExport(s,n);default:if(this.isAsyncFunction()&&e)return this.next(),this.parseFunctionStatement(s,!0);var o=this.value,a=this.parseExpression();return i===F.name&&"Identifier"===a.type&&this.eat(F.colon)?this.parseLabeledStatement(s,o,a):this.parseExpressionStatement(s,a)}},H.parseBreakContinueStatement=function(e,t){var n=this,r="break"==t;this.next(),this.eat(F.semi)||this.insertSemicolon()?e.label=null:this.type!==F.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")},H.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},H.parseDoStatement=function(e){return this.next(),this.labels.push(Z),e.body=this.parseStatement(!1),this.labels.pop(),this.expect(F._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(F.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},H.parseForStatement=function(e){if(this.next(),this.labels.push(Z),this.enterLexicalScope(),this.expect(F.parenL),this.type===F.semi)return this.parseFor(e,null);var t=this.isLet();if(this.type===F._var||this.type===F._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===F._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 Y,s=this.parseExpression(!0,i);return this.type===F._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.toAssignable(s),this.checkLVal(s),this.checkPatternErrors(i,!0),this.parseForIn(e,s)):(this.checkExpressionErrors(i,!0),this.parseFor(e,s))},H.parseFunctionStatement=function(e,t){return this.next(),this.parseFunction(e,!0,!1,t)},H.isFunction=function(){return this.type===F._function||this.isAsyncFunction()},H.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!this.strict&&this.isFunction()),e.alternate=this.eat(F._else)?this.parseStatement(!this.strict&&this.isFunction()):null,this.finishNode(e,"IfStatement")},H.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(F.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},H.parseSwitchStatement=function(e){var t=this;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(F.braceL),this.labels.push(Q),this.enterLexicalScope();for(var n,r=!1;this.type!=F.braceR;)if(t.type===F._case||t.type===F._default){var i=t.type===F._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(F.colon)}else n||t.unexpected(),n.consequent.push(t.parseStatement(!0));return this.exitLexicalScope(),n&&this.finishNode(n,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},H.parseThrowStatement=function(e){return this.next(),$.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 X=[];H.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===F._catch){var t=this.startNode();this.next(),this.expect(F.parenL),t.param=this.parseBindingAtom(),this.enterLexicalScope(),this.checkLVal(t.param,"let"),this.expect(F.parenR),t.body=this.parseBlock(!1),this.exitLexicalScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(F._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},H.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},H.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")},H.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")},H.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},H.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===F._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),("ClassDeclaration"==e.body.type||"VariableDeclaration"==e.body.type&&"var"!=e.body.kind||"FunctionDeclaration"==e.body.type&&(this.strict||e.body.generator))&&this.raiseRecoverable(e.body.start,"Invalid labeled declaration"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},H.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},H.parseBlock=function(e){var t=this;void 0===e&&(e=!0);var n=this.startNode();for(n.body=[],this.expect(F.braceL),e&&this.enterLexicalScope();!this.eat(F.braceR);){var r=t.parseStatement(!0);n.body.push(r)}return e&&this.exitLexicalScope(),this.finishNode(n,"BlockStatement")},H.parseFor=function(e,t){return e.init=t,this.expect(F.semi),e.test=this.type===F.semi?null:this.parseExpression(),this.expect(F.semi),e.update=this.type===F.parenR?null:this.parseExpression(),this.expect(F.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"ForStatement")},H.parseForIn=function(e,t){var n=this.type===F._in?"ForInStatement":"ForOfStatement";return this.next(),e.left=t,e.right=this.parseExpression(),this.expect(F.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,n)},H.parseVar=function(e,t,n){var r=this;for(e.declarations=[],e.kind=n;;){var i=r.startNode();if(r.parseVarId(i,n),r.eat(F.eq)?i.init=r.parseMaybeAssign(t):"const"!==n||r.type===F._in||r.options.ecmaVersion>=6&&r.isContextual("of")?"Identifier"==i.id.type||t&&(r.type===F._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(F.comma))break}return e},H.parseVarId=function(e,t){e.id=this.parseBindingAtom(t),this.checkLVal(e.id,t,!1)},H.parseFunction=function(e,t,n,r){this.initFunction(e),this.options.ecmaVersion>=6&&!r&&(e.generator=this.eat(F.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&&(e.id="nullableID"===t&&this.type!=F.name?null:this.parseIdent(),e.id&&this.checkLVal(e.id,"var"));var i=this.inGenerator,s=this.inAsync,o=this.yieldPos,a=this.awaitPos,u=this.inFunction;return this.inGenerator=e.generator,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),t||(e.id=this.type==F.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n),this.inGenerator=i,this.inAsync=s,this.yieldPos=o,this.awaitPos=a,this.inFunction=u,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},H.parseFunctionParams=function(e){this.expect(F.parenL),e.params=this.parseBindingList(F.parenR,!1,this.options.ecmaVersion>=8,!0),this.checkYieldAwaitInDefaultParams()},H.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(F.braceL);!this.eat(F.braceR);)if(!n.eat(F.semi)){var s=n.startNode(),o=n.eat(F.star),a=!1,u=n.type===F.name&&"static"===n.value;n.parsePropertyName(s),s.static=u&&n.type!==F.parenL,s.static&&(o&&n.unexpected(),o=n.eat(F.star),n.parsePropertyName(s)),n.options.ecmaVersion>=8&&!o&&!s.computed&&"Identifier"===s.key.type&&"async"===s.key.name&&n.type!==F.parenL&&!n.canInsertSemicolon()&&(a=!0,n.parsePropertyName(s)),s.kind="method";var c=!1;if(!s.computed){var l=s.key;o||a||"Identifier"!==l.type||n.type===F.parenL||"get"!==l.name&&"set"!==l.name||(c=!0,s.kind=l.name,l=n.parsePropertyName(s)),!s.static&&("Identifier"===l.type&&"constructor"===l.name||"Literal"===l.type&&"constructor"===l.value)&&(i&&n.raise(l.start,"Duplicate constructor in the same class"),c&&n.raise(l.start,"Constructor can't have get/set modifier"),o&&n.raise(l.start,"Constructor can't be a generator"),a&&n.raise(l.start,"Constructor can't be an async method"),s.kind="constructor",i=!0)}if(n.parseClassMethod(r,s,o,a),c){var p="get"===s.kind?0:1;if(s.value.params.length!==p){var h=s.value.start;"get"===s.kind?n.raiseRecoverable(h,"getter should have no params"):n.raiseRecoverable(h,"setter should have exactly one param")}else"set"===s.kind&&"RestElement"===s.value.params[0].type&&n.raiseRecoverable(s.value.params[0].start,"Setter cannot use rest params")}}return e.body=this.finishNode(r,"ClassBody"),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},H.parseClassMethod=function(e,t,n,r){t.value=this.parseMethod(n,r),e.body.push(this.finishNode(t,"MethodDefinition"))},H.parseClassId=function(e,t){e.id=this.type===F.name?this.parseIdent():!0===t?this.unexpected():null},H.parseClassSuper=function(e){e.superClass=this.eat(F._extends)?this.parseExprSubscripts():null},H.parseExport=function(e,t){var n=this;if(this.next(),this.eat(F.star))return this.expectContextual("from"),e.source=this.type===F.string?this.parseExprAtom():this.unexpected(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(F._default)){this.checkExport(t,"default",this.lastTokStart);var r;if(this.type===F._function||(r=this.isAsyncFunction())){var i=this.startNode();this.next(),r&&this.next(),e.declaration=this.parseFunction(i,"nullableID",!1,r)}else if(this.type===F._class){var s=this.startNode();e.declaration=this.parseClass(s,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(!0),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))e.source=this.type===F.string?this.parseExprAtom():this.unexpected();else{for(var o=0;o<e.specifiers.length;o++)(n.keywords.test(e.specifiers[o].local.name)||n.reservedWords.test(e.specifiers[o].local.name))&&n.unexpected(e.specifiers[o].local.start);e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},H.checkExport=function(e,t,n){e&&(a(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},H.checkPatternExport=function(e,t){var n=this,r=t.type;if("Identifier"==r)this.checkExport(e,t.name,t.start);else if("ObjectPattern"==r)for(var i=0;i<t.properties.length;++i)n.checkPatternExport(e,t.properties[i].value);else if("ArrayPattern"==r)for(var s=0;s<t.elements.length;++s){var o=t.elements[s];o&&n.checkPatternExport(e,o)}else"AssignmentPattern"==r?this.checkPatternExport(e,t.left):"ParenthesizedExpression"==r&&this.checkPatternExport(e,t.expression)},H.checkVariableExport=function(e,t){var n=this;if(e)for(var r=0;r<t.length;r++)n.checkPatternExport(e,t[r].id)},H.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},H.parseExportSpecifiers=function(e){var t=this,n=[],r=!0;for(this.expect(F.braceL);!this.eat(F.braceR);){if(r)r=!1;else if(t.expect(F.comma),t.afterTrailingComma(F.braceR))break;var i=t.startNode();i.local=t.parseIdent(!0),i.exported=t.eatContextual("as")?t.parseIdent(!0):i.local,t.checkExport(e,i.exported.name,i.exported.start),n.push(t.finishNode(i,"ExportSpecifier"))}return n},H.parseImport=function(e){return this.next(),this.type===F.string?(e.specifiers=X,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===F.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},H.parseImportSpecifiers=function(){var e=this,t=[],n=!0;if(this.type===F.name){var r=this.startNode();if(r.local=this.parseIdent(),this.checkLVal(r.local,"let"),t.push(this.finishNode(r,"ImportDefaultSpecifier")),!this.eat(F.comma))return t}if(this.type===F.star){var i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdent(),this.checkLVal(i.local,"let"),t.push(this.finishNode(i,"ImportNamespaceSpecifier")),t}for(this.expect(F.braceL);!this.eat(F.braceR);){if(n)n=!1;else if(e.expect(F.comma),e.afterTrailingComma(F.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.raiseRecoverable(s.local.start,"The keyword '"+s.local.name+"' is reserved")),e.checkLVal(s.local,"let"),t.push(e.finishNode(s,"ImportSpecifier"))}return t};var K=W.prototype;K.toAssignable=function(e,t){var n=this;if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Can not use 'await' as identifier inside an async function");break;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,this.toAssignable(e.left,t);case"AssignmentPattern":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},K.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},K.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},K.parseRest=function(e){var t=this.startNode();return this.next(),t.argument=e?this.type===F.name?this.parseIdent():this.unexpected():this.type===F.name||this.type===F.bracketL?this.parseBindingAtom():this.unexpected(),this.finishNode(t,"RestElement")},K.parseBindingAtom=function(){if(this.options.ecmaVersion<6)return this.parseIdent();switch(this.type){case F.name:return this.parseIdent();case F.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(F.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case F.braceL:return this.parseObj(!0);default:this.unexpected()}},K.parseBindingList=function(e,t,n,r){for(var i=this,s=[],o=!0;!this.eat(e);)if(o?o=!1:i.expect(F.comma),t&&i.type===F.comma)s.push(null);else{if(n&&i.afterTrailingComma(e))break;if(i.type===F.ellipsis){var a=i.parseRest(r);i.parseBindingListItem(a),s.push(a),i.type===F.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},K.parseBindingListItem=function(e){return e},K.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(F.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},K.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&&(a(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),t&&"none"!==t&&(("var"===t&&!this.canDeclareVarName(e.name)||"var"!==t&&!this.canDeclareLexicalName(e.name))&&this.raiseRecoverable(e.start,"Identifier '"+e.name+"' has already been declared"),"var"===t?this.declareVarName(e.name):this.declareLexicalName(e.name));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 ee=W.prototype;ee.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;o="init"===i?this.strict&&s.init||s.get||s.set:s.init||s[i],o&&this.raiseRecoverable(r.start,"Redefinition of property")}else s=t[n]={init:!1,get:!1,set:!1};s[i]=!0}},ee.parseExpression=function(e,t){var n=this,r=this.start,i=this.startLoc,s=this.parseMaybeAssign(e,t);if(this.type===F.comma){var o=this.startNodeAt(r,i);for(o.expressions=[s];this.eat(F.comma);)o.expressions.push(n.parseMaybeAssign(e,t));return this.finishNode(o,"SequenceExpression")}return s},ee.parseMaybeAssign=function(e,t,n){if(this.inGenerator&&this.isContextual("yield"))return this.parseYield();var r=!1,i=-1,s=-1;t?(i=t.parenthesizedAssign,s=t.trailingComma,t.parenthesizedAssign=t.trailingComma=-1):(t=new Y,r=!0);var o=this.start,a=this.startLoc;this.type!=F.parenL&&this.type!=F.name||(this.potentialArrowAt=this.start);var u=this.parseMaybeConditional(e,t);if(n&&(u=n.call(this,u,o,a)),this.type.isAssign){this.checkPatternErrors(t,!0),r||Y.call(t);var c=this.startNodeAt(o,a);return c.operator=this.value,c.left=this.type===F.eq?this.toAssignable(u):u,t.shorthandAssign=-1,this.checkLVal(u),this.next(),c.right=this.parseMaybeAssign(e),this.finishNode(c,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),s>-1&&(t.trailingComma=s),u},ee.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(F.question)){var s=this.startNodeAt(n,r);return s.test=i,s.consequent=this.parseMaybeAssign(),this.expect(F.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return i},ee.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)?i:i.start==n&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,n,r,-1,e)},ee.parseExprOp=function(e,t,n,r,i){var s=this.type.binop;if(null!=s&&(!i||this.type!==F._in)&&s>r){var o=this.type===F.logicalOR||this.type===F.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},ee.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")},ee.parseMaybeUnary=function(e,t){var n,r=this,i=this.start,s=this.startLoc;if(this.inAsync&&this.isContextual("await"))n=this.parseAwait(e),t=!0;else if(this.type.prefix){var o=this.startNode(),a=this.type===F.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(F.starstar)?this.buildBinary(i,s,n,this.parseMaybeUnary(null,!1),"**",!1):n},ee.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);if(this.checkExpressionErrors(e)||i)return r;var s=this.parseSubscripts(r,t,n);return e&&"MemberExpression"===s.type&&(e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1)),s},ee.parseSubscripts=function(e,t,n,r){for(var i,s=this,o=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd==e.end&&!this.canInsertSemicolon();;)if((i=s.eat(F.bracketL))||s.eat(F.dot)){var a=s.startNodeAt(t,n);a.object=e,a.property=i?s.parseExpression():s.parseIdent(!0),a.computed=!!i,i&&s.expect(F.bracketR),e=s.finishNode(a,"MemberExpression")}else if(!r&&s.eat(F.parenL)){var u=new Y,c=s.yieldPos,l=s.awaitPos;s.yieldPos=0,s.awaitPos=0;var p=s.parseExprList(F.parenR,s.options.ecmaVersion>=8,!1,u);if(o&&!s.canInsertSemicolon()&&s.eat(F.arrow))return s.checkPatternErrors(u,!1),s.checkYieldAwaitInDefaultParams(),s.yieldPos=c,s.awaitPos=l,s.parseArrowExpression(s.startNodeAt(t,n),p,!0);s.checkExpressionErrors(u,!0),s.yieldPos=c||s.yieldPos,s.awaitPos=l||s.awaitPos;var h=s.startNodeAt(t,n);h.callee=e,h.arguments=p,e=s.finishNode(h,"CallExpression")}else{if(s.type!==F.backQuote)return e;var f=s.startNodeAt(t,n);f.tag=e,f.quasi=s.parseTemplate(),e=s.finishNode(f,"TaggedTemplateExpression")}},ee.parseExprAtom=function(e){var t,n=this.potentialArrowAt==this.start;switch(this.type){case F._super:this.inFunction||this.raise(this.start,"'super' outside of function or class");case F._this:var r=this.type===F._this?"ThisExpression":"Super";return t=this.startNode(),this.next(),this.finishNode(t,r);case F.name:var i=this.start,s=this.startLoc,o=this.parseIdent(this.type!==F.name);if(this.options.ecmaVersion>=8&&"async"===o.name&&!this.canInsertSemicolon()&&this.eat(F._function))return this.parseFunction(this.startNodeAt(i,s),!1,!1,!0);if(n&&!this.canInsertSemicolon()){if(this.eat(F.arrow))return this.parseArrowExpression(this.startNodeAt(i,s),[o],!1);if(this.options.ecmaVersion>=8&&"async"===o.name&&this.type===F.name)return o=this.parseIdent(),!this.canInsertSemicolon()&&this.eat(F.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(i,s),[o],!0)}return o;case F.regexp:var a=this.value;return t=this.parseLiteral(a.value),t.regex={pattern:a.pattern,flags:a.flags},t;case F.num:case F.string:return this.parseLiteral(this.value);case F._null:case F._true:case F._false:return t=this.startNode(),t.value=this.type===F._null?null:this.type===F._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case F.parenL:var u=this.start,c=this.parseParenAndDistinguishExpression(n);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(c)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),c;case F.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(F.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case F.braceL:return this.parseObj(!1,e);case F._function:return t=this.startNode(),this.next(),this.parseFunction(t,!1);case F._class:return this.parseClass(this.startNode(),!1);case F._new:return this.parseNew();case F.backQuote:return this.parseTemplate();default:this.unexpected()}},ee.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")},ee.parseParenExpression=function(){this.expect(F.parenL);var e=this.parseExpression();return this.expect(F.parenR),e},ee.parseParenAndDistinguishExpression=function(e){var t,n=this,r=this.start,i=this.startLoc,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o,a,u=this.start,c=this.startLoc,l=[],p=!0,h=!1,f=new Y,d=this.yieldPos,y=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==F.parenR;){if(p?p=!1:n.expect(F.comma),s&&n.afterTrailingComma(F.parenR,!0)){h=!0;break}if(n.type===F.ellipsis){o=n.start,l.push(n.parseParenItem(n.parseRest())),n.type===F.comma&&n.raise(n.start,"Comma is not permitted after the rest element");break}n.type!==F.parenL||a||(a=n.start),l.push(n.parseMaybeAssign(!1,f,n.parseParenItem))}var m=this.start,g=this.startLoc;if(this.expect(F.parenR),e&&!this.canInsertSemicolon()&&this.eat(F.arrow))return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),a&&this.unexpected(a),this.yieldPos=d,this.awaitPos=y,this.parseParenArrowList(r,i,l);l.length&&!h||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(f,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=y||this.awaitPos,l.length>1?(t=this.startNodeAt(u,c),t.expressions=l,this.finishNodeAt(t,"SequenceExpression",m,g)):t=l[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var v=this.startNodeAt(r,i);return v.expression=t,this.finishNode(v,"ParenthesizedExpression")}return t},ee.parseParenItem=function(e){return e},ee.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var te=[];ee.parseNew=function(){var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(F.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(F.parenL)?e.arguments=this.parseExprList(F.parenR,this.options.ecmaVersion>=8,!1):e.arguments=te,this.finishNode(e,"NewExpression")},ee.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===F.backQuote,this.finishNode(e,"TemplateElement")},ee.parseTemplate=function(){var e=this,t=this.startNode();this.next(),t.expressions=[];var n=this.parseTemplateElement();for(t.quasis=[n];!n.tail;)e.expect(F.dollarBraceL),t.expressions.push(e.parseExpression()),e.expect(F.braceR),t.quasis.push(n=e.parseTemplateElement());return this.next(),this.finishNode(t,"TemplateLiteral")},ee.parseObj=function(e,t){var n=this,r=this.startNode(),i=!0,s={};for(r.properties=[],this.next();!this.eat(F.braceR);){if(i)i=!1;else if(n.expect(F.comma),n.afterTrailingComma(F.braceR))break;var o,a,u,c,l=n.startNode();n.options.ecmaVersion>=6&&(l.method=!1,l.shorthand=!1,(e||t)&&(u=n.start,c=n.startLoc),e||(o=n.eat(F.star))),n.parsePropertyName(l),e||!(n.options.ecmaVersion>=8)||o||l.computed||"Identifier"!==l.key.type||"async"!==l.key.name||n.type===F.parenL||n.type===F.colon||n.canInsertSemicolon()?a=!1:(a=!0,n.parsePropertyName(l,t)),n.parsePropertyValue(l,e,o,a,u,c,t),n.checkPropClash(l,s),r.properties.push(n.finishNode(l,"Property"))}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")},ee.parsePropertyValue=function(e,t,n,r,i,s,o){if((n||r)&&this.type===F.colon&&this.unexpected(),this.eat(F.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===F.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,r);else if(this.options.ecmaVersion>=5&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&this.type!=F.comma&&this.type!=F.braceR){(n||r||t)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var a="get"===e.kind?0:1;if(e.value.params.length!==a){var u=e.value.start;"get"===e.kind?this.raiseRecoverable(u,"getter should have no params"):this.raiseRecoverable(u,"setter should have exactly one param")}else"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.reservedWordsStrict:this.reservedWords).test(e.key.name)||this.inGenerator&&"yield"==e.key.name||this.inAsync&&"await"==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(i,s,e.key):this.type===F.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,s,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected()},ee.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(F.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(F.bracketR),e.key;e.computed=!1}return e.key=this.type===F.num||this.type===F.string?this.parseExprAtom():this.parseIdent(!0)},ee.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=!1,e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},ee.parseMethod=function(e,t){var n=this.startNode(),r=this.inGenerator,i=this.inAsync,s=this.yieldPos,o=this.awaitPos,a=this.inFunction;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.inGenerator=n.generator,this.inAsync=n.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),this.expect(F.parenL),n.params=this.parseBindingList(F.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1),this.inGenerator=r,this.inAsync=i,this.yieldPos=s,this.awaitPos=o,this.inFunction=a,this.finishNode(n,"FunctionExpression")},ee.parseArrowExpression=function(e,t,n){var r=this.inGenerator,i=this.inAsync,s=this.yieldPos,o=this.awaitPos,a=this.inFunction;return this.enterFunctionScope(),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.inGenerator=!1,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0),this.inGenerator=r,this.inAsync=i,this.yieldPos=s,this.awaitPos=o,this.inFunction=a,this.finishNode(e,"ArrowFunctionExpression")},ee.parseFunctionBody=function(e,t){var n=t&&this.type!==F.braceL,r=this.strict,i=!1;if(n)e.body=this.parseMaybeAssign(),e.expression=!0,this.checkParams(e,!1);else{var s=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);r&&!s||(i=this.strictDirective(this.end))&&s&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var o=this.labels;this.labels=[],i&&(this.strict=!0),this.checkParams(e,!r&&!i&&!t&&this.isSimpleParamList(e.params)),e.body=this.parseBlock(!1),e.expression=!1,this.labels=o}this.exitFunctionScope(),this.strict&&e.id&&this.checkLVal(e.id,"none"),this.strict=r},ee.isSimpleParamList=function(e){for(var t=0;t<e.length;t++)if("Identifier"!==e[t].type)return!1;return!0},ee.checkParams=function(e,t){for(var n=this,r={},i=0;i<e.params.length;i++)n.checkLVal(e.params[i],"var",t?null:r)},ee.parseExprList=function(e,t,n,r){for(var i=this,s=[],o=!0;!this.eat(e);){if(o)o=!1;else if(i.expect(F.comma),t&&i.afterTrailingComma(e))break;var a;n&&i.type===F.comma?a=null:i.type===F.ellipsis?(a=i.parseSpread(r),r&&i.type===F.comma&&r.trailingComma<0&&(r.trailingComma=i.start)):a=i.parseMaybeAssign(!1,r),s.push(a)}return s},ee.parseIdent=function(e){var t=this.startNode();return e&&"never"==this.options.allowReserved&&(e=!1),this.type===F.name?(!e&&(this.strict?this.reservedWordsStrict:this.reservedWords).test(this.value)&&(this.options.ecmaVersion>=6||-1==this.input.slice(this.start,this.end).indexOf("\\"))&&this.raiseRecoverable(this.start,"The keyword '"+this.value+"' is reserved"),this.inGenerator&&"yield"===this.value&&this.raiseRecoverable(this.start,"Can not use 'yield' as identifier inside a generator"),this.inAsync&&"await"===this.value&&this.raiseRecoverable(this.start,"Can not use 'await' as identifier inside an async function"),t.name=this.value):e&&this.type.keyword?t.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(t,"Identifier")},ee.parseYield=function(){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type==F.semi||this.canInsertSemicolon()||this.type!=F.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(F.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")},ee.parseAwait=function(){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0),this.finishNode(e,"AwaitExpression")};var ne=W.prototype;ne.raise=function(e,t){var n=u(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},ne.raiseRecoverable=ne.raise,ne.curPosition=function(){if(this.options.locations)return new V(this.curLine,this.pos-this.lineStart)};var re=W.prototype,ie=Object.assign||function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];for(var r=0;r<t.length;r++){var i=t[r];for(var s in i)a(i,s)&&(e[s]=i[s])}return e};re.enterFunctionScope=function(){this.scopeStack.push({var:{},lexical:{},childVar:{},parentLexical:{}})},re.exitFunctionScope=function(){this.scopeStack.pop()},re.enterLexicalScope=function(){var e=this.scopeStack[this.scopeStack.length-1],t={var:{},lexical:{},childVar:{},parentLexical:{}};this.scopeStack.push(t),ie(t.parentLexical,e.lexical,e.parentLexical)},re.exitLexicalScope=function(){var e=this.scopeStack.pop(),t=this.scopeStack[this.scopeStack.length-1];ie(t.childVar,e.var,e.childVar)},re.canDeclareVarName=function(e){var t=this.scopeStack[this.scopeStack.length-1];return!a(t.lexical,e)&&!a(t.parentLexical,e)},re.canDeclareLexicalName=function(e){var t=this.scopeStack[this.scopeStack.length-1];return!a(t.lexical,e)&&!a(t.var,e)&&!a(t.childVar,e)},re.declareVarName=function(e){this.scopeStack[this.scopeStack.length-1].var[e]=!0},re.declareLexicalName=function(e){this.scopeStack[this.scopeStack.length-1].lexical[e]=!0};var se=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new q(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},oe=W.prototype;oe.startNode=function(){return new se(this,this.start,this.startLoc)},oe.startNodeAt=function(e,t){return new se(this,e,t)},oe.finishNode=function(e,t){return h.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},oe.finishNodeAt=function(e,t,n,r){return h.call(this,e,t,n,r)};var ae=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},ue={b_stat:new ae("{",!1),b_expr:new ae("{",!0),b_tmpl:new ae("${",!0),p_stat:new ae("(",!1),p_expr:new ae("(",!0),q_tmpl:new ae("`",!0,!0,function(e){return e.readTmplToken()}),f_expr:new ae("function",!0),f_expr_gen:new ae("function",!0,!1,null,!0),f_gen:new ae("function",!1,!1,null,!0)},ce=W.prototype;ce.initialContext=function(){return[ue.b_stat]},ce.braceIsBlock=function(e){if(e===F.colon){var t=this.curContext();if(t===ue.b_stat||t===ue.b_expr)return!t.isExpr}return e===F._return?$.test(this.input.slice(this.lastTokEnd,this.start)):e===F._else||e===F.semi||e===F.eof||e===F.parenR||e==F.arrow||(e==F.braceL?this.curContext()===ue.b_stat:!this.exprAllowed)},ce.inGeneratorContext=function(){for(var e=this,t=this.context.length-1;t>=0;t--)if(e.context[t].generator)return!0;return!1},ce.updateContext=function(e){var t,n=this.type;n.keyword&&e==F.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},F.parenR.updateContext=F.braceR.updateContext=function(){if(1==this.context.length)return void(this.exprAllowed=!0);var e,t=this.context.pop();t===ue.b_stat&&(e=this.curContext())&&"function"===e.token?(this.context.pop(),this.exprAllowed=!1):t===ue.b_tmpl?this.exprAllowed=!0:this.exprAllowed=!t.isExpr},F.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?ue.b_stat:ue.b_expr),this.exprAllowed=!0},F.dollarBraceL.updateContext=function(){this.context.push(ue.b_tmpl),this.exprAllowed=!0},F.parenL.updateContext=function(e){var t=e===F._if||e===F._for||e===F._with||e===F._while;this.context.push(t?ue.p_stat:ue.p_expr),this.exprAllowed=!0},F.incDec.updateContext=function(){},F._function.updateContext=function(e){e.beforeExpr&&e!==F.semi&&e!==F._else&&(e!==F.colon&&e!==F.braceL||this.curContext()!==ue.b_stat)&&this.context.push(ue.f_expr),this.exprAllowed=!1},F.backQuote.updateContext=function(){this.curContext()===ue.q_tmpl?this.context.pop():this.context.push(ue.q_tmpl),this.exprAllowed=!1},F.star.updateContext=function(e){e==F._function&&(this.curContext()===ue.f_expr?this.context[this.context.length-1]=ue.f_expr_gen:this.context.push(ue.f_gen)),this.exprAllowed=!0},F.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&("of"==this.value&&!this.exprAllowed||"yield"==this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var le=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new q(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},pe=W.prototype,he="object"==typeof Packages&&"[object JavaPackage]"==Object.prototype.toString.call(Packages);pe.next=function(){this.options.onToken&&this.options.onToken(new le(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},pe.getToken=function(){return this.next(),new le(this)},"undefined"!=typeof Symbol&&(pe[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===F.eof,value:t}}}}),pe.curContext=function(){return this.context[this.context.length-1]},pe.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(F.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},pe.readToken=function(e){return n(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},pe.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);return e<=55295||e>=57344?e:(e<<10)+this.input.charCodeAt(this.pos+1)-56613888},pe.skipBlockComment=function(){var e=this,t=this.options.onComment&&this.curPosition(),n=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(-1===r&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations){O.lastIndex=n;for(var i;(i=O.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())},pe.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())},pe.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&&B.test(String.fromCharCode(t))))break e;++e.pos}}},pe.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)},pe.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(F.ellipsis)):(++this.pos,this.finishToken(F.dot))},pe.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(F.assign,2):this.finishOp(F.slash,1)},pe.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?F.star:F.modulo;return this.options.ecmaVersion>=7&&42===t&&(++n,r=F.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(F.assign,n+1):this.finishOp(r,n)},pe.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.finishOp(124===e?F.logicalOR:F.logicalAND,2):61===t?this.finishOp(F.assign,2):this.finishOp(124===e?F.bitwiseOR:F.bitwiseAND,1)},pe.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(F.assign,2):this.finishOp(F.bitwiseXOR,1)},pe.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)&&$.test(this.input.slice(this.lastTokEnd,this.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(F.incDec,2):61===t?this.finishOp(F.assign,2):this.finishOp(F.plusMin,1)},pe.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(F.assign,n+1):this.finishOp(F.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(F.relational,n))},pe.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(F.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(F.arrow)):this.finishOp(61===e?F.eq:F.prefix,1)},pe.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(F.parenL);case 41:return++this.pos,this.finishToken(F.parenR);case 59:return++this.pos,this.finishToken(F.semi);case 44:return++this.pos,this.finishToken(F.comma);case 91:return++this.pos,this.finishToken(F.bracketL);case 93:return++this.pos,this.finishToken(F.bracketR);case 123:return++this.pos,this.finishToken(F.braceL);case 125:return++this.pos,this.finishToken(F.braceR);case 58:return++this.pos,this.finishToken(F.colon);case 63:return++this.pos,this.finishToken(F.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(F.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(F.prefix,1)}this.raise(this.pos,"Unexpected character '"+d(e)+"'")},pe.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};var fe=!!f("￿","u");pe.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($.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&&(fe?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 he||(f(a,u,r,this),l=f(s,o)),this.finishToken(F.regexp,{pattern:s,flags:o,value:l})},pe.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)>=e)break;++n.pos,i=i*e+a}return this.pos===r||null!=t&&this.pos-r!==t?null:i},pe.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(F.num,t)},pe.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"),i&&this.pos==t+1&&(i=!1);var s=this.input.charCodeAt(this.pos);46!==s||i||(++this.pos,this.readInt(10),r=!0,s=this.input.charCodeAt(this.pos)),69!==s&&101!==s||i||(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(F.num,o)},pe.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},pe.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(F.string,n)},pe.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===F.template?36===r?(e.pos+=2,e.finishToken(F.dollarBraceL)):(++e.pos,e.finishToken(F.backQuote)):(t+=e.input.slice(n,e.pos),e.finishToken(F.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}},pe.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 d(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)}},pe.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.raise(t,"Bad character escape sequence"),n},pe.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+=d(c),s=e.pos}i=!1}return t+this.input.slice(s,this.pos)},pe.readWord=function(){var e=this.readWord1(),t=F.name;return this.keywords.test(e)&&(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+e),t=T[e]),this.finishToken(t,e)};e.version="5.0.3",e.parse=y,e.parseExpressionAt=m,e.tokenizer=g,e.addLooseExports=v,e.Parser=W,e.plugins=z,e.defaultOptions=U,e.Position=V,e.SourceLocation=q,e.getLineInfo=u,e.Node=se,e.TokenType=L,e.tokTypes=F,e.keywordTypes=T,e.TokContext=ae,e.tokContexts=ue,e.isIdentifierChar=r,e.isIdentifierStart=n,e.Token=le,e.isNewLine=o,e.lineBreak=$,e.lineBreakG=O,e.nonASCIIwhitespace=B,Object.defineProperty(e,"__esModule",{value:!0})})},{}],16:[function(e,t,n){!function(e,r){"object"==typeof n&&void 0!==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||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=d.AwaitExpression=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})})},{}],17:[function(e,t,n){function r(){this._array=[],this._set=Object.create(null)}var i=e("./util"),s=Object.prototype.hasOwnProperty;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=s.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 s.call(this._set,t)},r.prototype.indexOf=function(e){var t=i.toSetString(e);if(s.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":26}],18:[function(e,t,n){function r(e){return e<0?1+(-e<<1):0+(e<<1)}function i(e){var t=1==(1&e),n=e>>1;return t?-n:n}var s=e("./base64");n.encode=function(e){var t,n="",i=r(e);do{t=31&i,i>>>=5,i>0&&(t|=32),n+=s.encode(t)}while(i>0);return n},n.decode=function(e,t,n){var r,o,a=e.length,u=0,c=0;do{if(t>=a)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(o=s.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));r=!!(32&o),o&=31,u+=o<<c,c+=5}while(r);n.value=i(u),n.rest=t}},{"./base64":19}],19:[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){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}},{}],20:[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}},{}],21:[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":26}],22:[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)}},{}],23:[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(String).map(a.normalize).map(function(e){return s&&a.isAbsolute(s)&&a.isAbsolute(e)?a.relative(s,e):e}),this._names=c.fromArray(i.map(String),!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||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(-1!==n.consumer.sources.indexOf(a.getArg(e,"source"))){var r=n.consumer.generatedPositionFor(e);if(r){return{line:r.line+(n.generatedOffset.generatedLine-1),column:r.column+(n.generatedOffset.generatedLine===r.line?n.generatedOffset.generatedColumn-1:0)}}}}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":17,"./base64-vlq":18,"./binary-search":20,"./quick-sort":22,"./util":26}],24:[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&&(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=s.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),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,o=0,a=1,u=0,c=0,l=0,p=0,h="",f=this._mappings.toArray(),d=0,y=f.length;d<y;d++){if(t=f[d],e="",t.generatedLine!==a)for(o=0;t.generatedLine!==a;)e+=";",a++;else if(d>0){if(!s.compareByGeneratedPositionsInflated(t,f[d-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-c),c=t.originalLine-1,e+=i.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=i.encode(n-l),l=n)),h+=e}return h},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":17,"./base64-vlq":18,"./mapping-list":21,"./util":26}],25:[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[o]=!0,null!=r&&this.add(r)}var i=e("./source-map-generator").SourceMapGenerator,s=e("./util"),o="$$$isSourceNode$$$";r.fromStringWithSourceMap=function(e,t,n){function i(e,t){if(null===e||void 0===e.source)o.add(t);else{var i=n?s.join(n,e.source):e.source;o.add(new r(e.originalLine,e.originalColumn,i,t,e.name))}}var o=new r,a=e.split(/(\r?\n)/),u=function(){return a.shift()+(a.shift()||"")},c=1,l=0,p=null;return t.eachMapping(function(e){if(null!==p){if(!(c<e.generatedLine)){var t=a[0],n=t.substr(0,e.generatedColumn-l);return a[0]=t.substr(e.generatedColumn-l),l=e.generatedColumn,i(p,n),void(p=e)}i(p,u()),c++,l=0}for(;c<e.generatedLine;)o.add(u()),c++;if(l<e.generatedColumn){var t=a[0];o.add(t.substr(0,e.generatedColumn)),a[0]=t.substr(e.generatedColumn),l=e.generatedColumn}p=e},this),a.length>0&&(p&&i(p,u()),o.add(a.join(""))),t.sources.forEach(function(e){var r=t.sourceContentFor(e);null!=r&&(null!=n&&(e=s.join(n,e)),o.setSourceContent(e,r))}),o},r.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[o]&&"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[o]&&"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[o]?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[o]?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][o]&&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,a=null,u=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&&a===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}),s=i.source,o=i.line,a=i.column,u=i.name,r=!0):r&&(n.addMapping({generated:{line:t.line,column:t.column}}),s=null,r=!1);for(var c=0,l=e.length;c<l;c++)10===e.charCodeAt(c)?(t.line++,t.column=0,c+1===l?(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":24,"./util":26}],26:[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 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(v))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 h(e)?"$"+e:e}function p(e){return h(e)?e.slice(1):e}function h(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 f(e,t,n){var r=e.source-t.source;return 0!==r?r:0!==(r=e.originalLine-t.originalLine)?r:0!==(r=e.originalColumn-t.originalColumn)||n?r:0!==(r=e.generatedColumn-t.generatedColumn)?r:(r=e.generatedLine-t.generatedLine,0!==r?r:e.name-t.name)}function d(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!==(r=e.generatedColumn-t.generatedColumn)||n?r:0!==(r=e.source-t.source)?r:0!==(r=e.originalLine-t.originalLine)?r:(r=e.originalColumn-t.originalColumn,0!==r?r:e.name-t.name)}function y(e,t){return e===t?0:e>t?1:-1}function m(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!==(n=e.generatedColumn-t.generatedColumn)?n:0!==(n=y(e.source,t.source))?n:0!==(n=e.originalLine-t.originalLine)?n:(n=e.originalColumn-t.originalColumn,0!==n?n:y(e.name,t.name))}n.getArg=r;var g=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,v=/^data:.+\,.+$/;n.urlParse=i,n.urlGenerate=s,n.normalize=o,n.join=a,n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(g)},n.relative=u;var b=function(){return!("__proto__"in Object.create(null))}();n.toSetString=b?c:l,n.fromSetString=b?c:p,n.compareByOriginalPositions=f,n.compareByGeneratedPositionsDeflated=d,n.compareByGeneratedPositionsInflated=m},{}],27:[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":23,"./lib/source-map-generator":24,"./lib/source-node":25}],28:[function(e,t,n){t.exports={_args:[[{raw:"nodent@^3.0.17",scope:null,escapedName:"nodent",name:"nodent",rawSpec:"^3.0.17",spec:">=3.0.17 <4.0.0",type:"range"},"/Users/evgenypoberezkin/JSON/ajv-v4"]],_from:"nodent@>=3.0.17 <4.0.0",_id:"nodent@3.0.17",_inCache:!0,_location:"/nodent",_nodeVersion:"6.9.1",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/nodent-3.0.17.tgz_1490780005669_0.5196401283610612"},_npmUser:{name:"matatbread",email:"npm@mailed.me.uk"},_npmVersion:"3.10.8",_phantomChildren:{},_requested:{raw:"nodent@^3.0.17",scope:null,escapedName:"nodent",name:"nodent",rawSpec:"^3.0.17",spec:">=3.0.17 <4.0.0",type:"range"},_requiredBy:["#DEV:/"],_resolved:"https://registry.npmjs.org/nodent/-/nodent-3.0.17.tgz",_shasum:"22df57d33c5346d6acc3722d9d69fa68bff518e4",_shrinkwrap:null,_spec:"nodent@^3.0.17",_where:"/Users/evgenypoberezkin/JSON/ajv-v4",author:{name:"Mat At Bread",email:"nodent@mailed.me.uk"},bin:{nodentjs:"./nodent.js"},bugs:{url:"https://github.com/MatAtBread/nodent/issues"},dependencies:{acorn:">=2.5.2","acorn-es7-plugin":">=1.1.6","nodent-runtime":">=3.0.4",resolve:"^1.2.0","source-map":"^0.5.6"},description:"NoDent - Asynchronous Javascript language extensions",devDependencies:{},directories:{},dist:{shasum:"22df57d33c5346d6acc3722d9d69fa68bff518e4",tarball:"https://registry.npmjs.org/nodent/-/nodent-3.0.17.tgz"},engines:"node >= 0.10.0",gitHead:"1a48bd0e8d0b4df69aa7b4b3cf8483c03c1cfbd5",homepage:"https://github.com/MatAtBread/nodent#readme",keywords:["Javascript","ES7","async","await","language","extensions","Node","callback","generator","Promise","asynchronous"],license:"BSD-2-Clause",main:"nodent.js",maintainers:[{name:"matatbread",email:"npm@mailed.me.uk"}],name:"nodent",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+https://github.com/MatAtBread/nodent.git"},scripts:{cover:"istanbul cover ./nodent.js tests -- --quick --syntax ; open ./coverage/lcov-report/index.html",start:"./nodent.js",test:"cd tests && npm i --prod && cd .. && node --expose-gc ./nodent.js tests --syntax --quick && node --expose-gc ./nodent.js tests --quick --notStrict","test-loader":"cd tests/loader/app && npm test && cd ../../.."},version:"3.0.17"}},{}],29:[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:31}],30:[function(e,t,n){(function(e){"use strict";function n(e){var t=s.exec(e),n=(t[1]||"")+(t[2]||""),r=t[3]||"",i=o.exec(r);return[n,i[1],i[2],i[3]]}function r(e){return u.exec(e).slice(1)}var i="win32"===e.platform,s=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,o=/^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/,a={};a.parse=function(e){if("string"!=typeof e)throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=n(e);if(!t||4!==t.length)throw new TypeError("Invalid path '"+e+"'");return{root:t[0],dir:t[0]+t[1].slice(0,-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}};var u=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,c={};c.parse=function(e){if("string"!=typeof e)throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=r(e);if(!t||4!==t.length)throw new TypeError("Invalid path '"+e+"'");return t[1]=t[1]||"",t[2]=t[2]||"",t[3]=t[3]||"",{root:t[0],dir:t[0]+t[1].slice(0,-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}},t.exports=i?a.parse:c.parse,t.exports.posix=c.parse,t.exports.win32=a.parse}).call(this,e("_process"))},{_process:31}],31:[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}},{}],32:[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":33,"./lib/core":36,"./lib/sync":38}],33:[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");t.exports=function(e,t,u){function c(t,n,r){t?d(t):n?d(null,n,r):h(w,function(t,n,r){if(t)d(t);else if(n)d(null,n,r);else{var i=new Error("Cannot find module '"+e+"' from '"+x+"'");i.code="MODULE_NOT_FOUND",d(i)}})}function l(e,t,n){function r(e,t,n){function o(o,c,l){if(n=c,o)return i(o);if(l&&n&&y.pathFilter){var p=s.relative(l,u),h=p.slice(0,p.length-e[0].length),f=y.pathFilter(n,t,h);if(f)return r([""].concat(b.slice()),s.resolve(l,f),n)}g(u,a)}function a(s,o){s?i(s):o?i(null,u,n):r(e.slice(1),t,n)}if(0===e.length)return i(null,void 0,n);var u=t+e[0];n?o(null,n):p(s.dirname(u),o)}var i=n;"function"==typeof t&&(i=t,t=void 0),r([""].concat(b),e,t)}function p(e,t){if(""===e||"/"===e)return t(null);if("win32"===n.platform&&/^\w:[\\\/]*$/.test(e))return t(null);if(/[\\\/]node_modules[\\\/]*$/.test(e))return t(null);var r=s.join(e,"package.json");g(r,function(n,i){if(!i)return p(s.dirname(e),t);v(r,function(n,i){n&&t(n);try{var s=JSON.parse(i)}catch(e){}s&&y.packageFilter&&(s=y.packageFilter(s,r)),t(null,s,e)})})}function h(e,t,n){var r=n;"function"==typeof t&&(r=t,t=y.package);var i=s.join(e,"package.json");g(i,function(n,o){return n?r(n):o?void v(i,function(t,n){if(t)return r(t);try{var o=JSON.parse(n)}catch(e){}if(y.packageFilter&&(o=y.packageFilter(o,i)),o.main)return"."!==o.main&&"./"!==o.main||(o.main="index"),void l(s.resolve(e,o.main),o,function(t,n,i){return t?r(t):n?r(null,n,i):i?void h(s.resolve(e,i.main),i,function(t,n,i){return t?r(t):n?r(null,n,i):void l(s.join(e,"index"),i,r)}):l(s.join(e,"index"),i,r)});l(s.join(e,"/index"),o,r)}):l(s.join(e,"index"),t,r)})}function f(t,n){function r(n,r,a){return n?t(n):r?t(null,r,a):void h(s.join(o,e),void 0,i)}function i(e,r,i){return e?t(e):r?t(null,r,i):void f(t,n.slice(1))}if(0===n.length)return t(null,void 0);var o=n[0];l(s.join(o,e),void 0,r)}var d=u,y=t||{};if("function"==typeof y&&(d=y,y={}),"string"!=typeof e){var m=new TypeError("path must be a string");return n.nextTick(function(){d(m)})}var g=y.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())})},v=y.readFile||i.readFile,b=y.extensions||[".js"],x=y.basedir||s.dirname(o());if(y.paths=y.paths||[],/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[\\\/])/.test(e)){var w=s.resolve(x,e);".."===e&&(w+="/"),/\/$/.test(e)&&w===x?h(w,y.package,c):l(w,y.package,c)}else!function(e,t,n){f(n,a(t,y))}(0,x,function(t,n,i){if(t)d(t);else if(n)d(null,n,i);else{if(r[e])return d(null,e);var s=new Error("Cannot find module '"+e+"' from '"+x+"'");s.code="MODULE_NOT_FOUND",d(s)}})}}).call(this,e("_process"))},{"./caller.js":34,"./core":36,"./node-modules-paths.js":37,_process:31,fs:5,path:29}],34:[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()}},{}],35:[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"],.11:["_http_server"],"1.0":["process","v8"]}},{}],36:[function(e,t,n){(function(n){var r=n.versions&&n.versions.node&&n.versions.node.split(".")||[],i=e("./core.json"),s={};for(var o in i)if(Object.prototype.hasOwnProperty.call(i,o)&&function(e){if("*"===e)return!0;for(var t=e.split("."),n=0;n<3;++n)if((r[n]||0)>=(t[n]||0))return!0;return!1}(o))for(var a=0;a<i[o].length;++a)s[i[o][a]]=!0;t.exports=s}).call(this,e("_process"))},{"./core.json":35,_process:31}],37:[function(e,t,n){var r=e("path"),i=r.parse||e("path-parse");t.exports=function(e,t){var n=t&&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=[e],a=i(e);a.dir!==o[o.length-1];)o.push(a.dir),a=i(a.dir);var u=o.reduce(function(e,t){return e.concat(n.map(function(e){return r.join(s,t,e)}))},[]);return t&&t.paths?u.concat(t.paths):u}},{path:29,"path-parse":30}],38:[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 t=s.join(e,"/package.json");if(l(t)){var r=p(t,"utf8");try{var i=JSON.parse(r);if(c.packageFilter&&(i=c.packageFilter(i,e)),i.main){var o=n(s.resolve(e,i.main));if(o)return o;var a=u(s.resolve(e,i.main));if(a)return a}}catch(e){}}return n(s.join(e,"/index"))}var c=t||{},l=c.isFile||function(e){try{var t=i.statSync(e)}catch(e){if(e&&"ENOENT"===e.code)return!1;throw e}return t.isFile()||t.isFIFO()},p=c.readFileSync||i.readFileSync,h=c.extensions||[".js"],f=c.basedir||s.dirname(o());if(c.paths=c.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=function(e,t){for(var r=a(t,c),i=0;i<r.length;i++){var o=r[i],l=n(s.join(o,"/",e));if(l)return l;var p=u(s.join(o,"/",e));if(p)return p}}(e,f);if(m)return m}if(r[e])return e;var g=new Error("Cannot find module '"+e+"' from '"+f+"'");throw g.code="MODULE_NOT_FOUND",g}},{"./caller.js":34,"./core":36,"./node-modules-paths.js":37,fs:5,path:29}],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){n||(n=console.warn.bind(console));var i,s,o={};if("string"==typeof t)(i=t.match(j))&&(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(j)){s=i[1]||"default";break}}if(!i){if(!R.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([I[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=I.es7),(o.generators||o.engine)&&(o.promises=!0),o.promises&&(o.es7=!0),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){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 v(e){return e=e||q,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);return new e(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)})},s[i+r].isAsync=!0)}catch(e){}}();return s.super=t,s}}function b(t,n){var r=t.filename.split("/"),i=r.pop(),s=T(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 x(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($.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 w(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 E(e,t,n,r){"object"==typeof n&&void 0===r&&(r=n),r=r||{};for(var i in R)i in r||(r[i]=R[i]);var s=this.parse(e,t,null,r);return this.asynchronize(s,null,r,this.log||h),this.prettyPrint(s,r),s}function S(t,n,r){var i={},s=this;n||(n=/\.njs$/),r?r.compiler||(r.compiler={}):r={compiler:{}};var o=l([B,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+" = "+D.toString()+";",o.generators&&(c+="Function.prototype."+o.$asyncspawn+" = "+V.toString()+";"),o.wrapAwait&&!o.promises&&(c+="Object."+o.$makeThenable+" = "+q.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 k(e){this.covers={},this._ident=k.prototype.version+"_"+Math.random(),this.setOptions(e)}function A(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 _(e){var t={};t[R.$asyncbind]={value:D,writable:!0,enumerable:!1,configurable:!0},t[R.$asyncspawn]={value:V,writable:!0,enumerable:!1,configurable:!0};try{Object.defineProperties(Function.prototype,t)}catch(t){e.log("Function prototypes already assigned: ",t.messsage)}R[R.$error]in r||(r[R[R.$error]]=p),e.augmentObject&&Object.defineProperties(Object.prototype,{asyncify:{value:function(e,t,n){return v(e)(this,t,n)},writable:!0,configurable:!0},isThenable:{value:function(){return q.isThenable(this)},writable:!0,configurable:!0}}),Object[R.$makeThenable]=q.resolve}function C(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$/)){if(s.match(/node_modules\/nodent\/.*\.js$/))return L(i,s);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 L(i,s)}var c=y(N.readFileSync(s,"utf8")),l=d(c,t.log,s);return l?a(i,s,l):L(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,L(i,s),n(p.version,k.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,_(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]){Object.keys(t).filter(function(e){return U[e]!=t[e]}).length&&t.log("File extension "+n+" already configured for async/await compilation.")}e.extensions[n]=g(U,t.log)}if(t){for(var s in t)if("use"!==s&&!O.hasOwnProperty(s))throw new Error("NoDent: unknown option: "+s+"="+JSON.stringify(t[s]))}else t={};U?U.setOptions(t):(Object.keys(O).forEach(function(e){e in t||(t[e]=O[e])}),U=new k(t)),t.dontMapStackTraces||(Error.prepareStackTrace=A),_(t);var o=[];if(!t.dontInstallRequireHook){if(!L){L=e.extensions[".js"];var a=g(U,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){U[e]=U.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){U[e]=U.require(e,t.use[e])}))),U}var L,P={},N=e("fs"),T=e("./lib/output"),F=e("./lib/parser"),$=e("./lib/arboriculture"),O={log:function(e){console.warn("Nodent: "+e)},augmentObject:!1,extension:".njs",dontMapStackTraces:!1,asyncStackTrace:!1,babelTree:!1,dontInstallRequireHook:!1},B={noRuntime:!1,lazyThenables:!1,es6target:!1,noUseDirective:!1,wrapAwait:null,mapStartLine:0,sourcemap:!0,engine:!1,parser:{sourceType:"script"},$return:"$return",$error:"$error",$arguments:"$args",$asyncspawn:"$asyncspawn",$asyncbind:"$asyncbind",generatedSymbolPrefix:"$",$makeThenable:"$makeThenable"},R=Object.create(B,{es7:{value:!0,writable:!0,enumerable:!0}}),I={default:R,es7:Object.create(R),promise:Object.create(R,{promises:{value:!0,writable:!0,enumerable:!0}}),generator:Object.create(R,{generators:{value:!0,writable:!0,enumerable:!0},es7:{value:!1,writable:!0,enumerable:!0}}),engine:Object.create(R,{engine:{value:!0,writable:!0,enumerable:!0},promises:{value:!0,writable:!0,enumerable:!0}})};I.promises=I.promise,I.generators=I.generator;var j=/^\s*['"]use\s+nodent-?([a-zA-Z0-9]*)?(\s*.*)?['"]\s*;/,M=e("nodent-runtime"),D=M.$asyncbind,V=M.$asyncspawn,q=D.Thenable;k.prototype.setOptions=function(e){return this.log=!1===e.log?h:e.log||this.log,this.options=l([this.options,e]),delete this.options.log,this},D.call(D),k.prototype.version=e("./package.json").version,k.prototype.Thenable=q,k.prototype.EagerThenable=D.EagerThenableFactory,k.prototype.isThenable=function(e){return e&&e instanceof Object&&"function"==typeof e.then},k.prototype.asyncify=v,k.prototype.require=w,k.prototype.generateRequestHandler=S,k.prototype.$asyncspawn=V,k.prototype.$asyncbind=D,k.prototype.parse=x,k.prototype.compile=E,k.prototype.asynchronize=$.asynchronize,k.prototype.prettyPrint=b,k.prototype.parseCompilerOptions=d,k.prototype.getDefaultCompileOptions=void 0,Object.defineProperty(k.prototype,"Promise",{get:function(){return initOpts.log("Warning: nodent.Promise is deprecated. Use nodent.Thenable instead"),q},enumerable:!1,configurable:!1});var U;C.setDefaultCompileOptions=function(e,t){return e&&Object.keys(e).forEach(function(t){if(!(t in R))throw new Error("NoDent: unknown compiler option: "+t);R[t]=e[t]}),t&&Object.keys(t).forEach(function(e){if(!(e in t))throw new Error("NoDent: unknown configuration option: "+e);O[e]=t[e]}),C},C.setCompileOptions=function(e,t){return optionSet[e]=optionSet[e]||l([R]),t&&Object.keys(t).forEach(function(n){if(!(n in R))throw new Error("NoDent: unknown compiler option: "+n);optionSet[e][n]=t[n]}),C},C.asyncify=v,C.Thenable=D.Thenable,C.EagerThenable=D.EagerThenableFactory,t.exports=C,e.main===t&&n.argv.length>=3&&function(){function t(e,t){try{var n,s;if(o.fromast){if(e=JSON.parse(e),n={origCode:"",filename:i,ast:e},!(s=d(e,a.log))){var u=o.use?'"use nodent-'+o.use+'";':'"use nodent";';s=d(u,a.log),console.warn("/* "+i+": No 'use nodent*' directive, assumed "+u+" */")}}else s=d(o.use?'"use nodent-'+o.use+'";':e,a.log),s||(s=d('"use nodent";',a.log),o.dest||console.warn("/* "+i+": 'use nodent*' directive missing/ignored, assumed 'use nodent;' */")),n=a.parse(e,i,s);if(o.parseast||o.pretty||a.asynchronize(n,void 0,s,a.log),a.prettyPrint(n,s),o.out||o.pretty||o.dest){if(o.dest&&!t)throw new Error("Can't write unknown file to "+o.dest);var c="";o.runtime&&(c+="Function.prototype.$asyncbind = "+Function.prototype.$asyncbind.toString()+";\n",c+="global.$error = global.$error || "+r.$error.toString()+";\n"),c+=n.code,t&&o.dest?(N.writeFileSync(o.dest+t,c),console.log("Compiled",o.dest+t)):console.log(c)}(o.minast||o.parseast)&&console.log(JSON.stringify(n.ast,function(e,t){return"$"===e[0]||e.match(/^(start|end|loc)$/)?void 0:t},2,null)),o.ast&&console.log(JSON.stringify(n.ast,function(e,t){return"$"===e[0]?void 0:t},0)),o.exec&&new Function(n.code)()}catch(e){console.error(e)}}var i,s=e("path"),o=(n.env.NODENT_OPTS&&JSON.parse(n.env.NODENT_OPTS),function(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}());C.setDefaultCompileOptions({sourcemap:o.sourcemap,wrapAwait:o.wrapAwait,lazyThenables:o.lazyThenables,noRuntime:o.noruntime,es6target:o.es6target,parser:o.noextensions?{noNodentExtensions:!0}:void 0});var a=C({augmentObject:!0});if(!(o.fromast||o.parseast||o.pretty||o.out||o.dest||o.ast||o.minast||o.exec))try{var u=s.resolve(o[0]);return e(u)}catch(e){throw e&&(e.message=o[0]+": "+e.message),e}if(0==o.length||"-"===o[0])return i="(stdin)",function(e){return new q(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))}(n.stdin).then(t,p);for(var c=0;c<o.length;c++)i=s.resolve(o[c]),t(y(N.readFileSync(i,"utf8")),o[c])}()}).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":11,"./lib/arboriculture":12,"./lib/output":13,"./lib/parser":14,"./package.json":28,_process:31,buffer:6,fs:5,"nodent-runtime":8,path:29,resolve:32,"source-map":27}]},{},[]); \ No newline at end of file
diff --git a/deps/npm/node_modules/har-validator/node_modules/ajv/dist/regenerator.min.js b/deps/npm/node_modules/har-validator/node_modules/ajv/dist/regenerator.min.js
new file mode 100644
index 0000000000..aade2b467b
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/dist/regenerator.min.js
@@ -0,0 +1,32 @@
+/* regenerator 0.9.7: Source transformer enabling ECMAScript 6 generator functions (yield) in JavaScript-of-today (ES5) */
+require=function e(t,r,n){function i(a,o){if(!r[a]){if(!t[a]){var u="function"==typeof require&&require;if(!o&&u)return u(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[a]={exports:{}};t[a][0].call(c.exports,function(e){var r=t[a][1][e];return i(r||e)},c,c.exports,e,t,r,n)}return r[a].exports}for(var s="function"==typeof require&&require,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(e,t,r){"use strict";t.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g}},{}],2:[function(e,t,r){"use strict";function n(){var e={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};return e.colors.grey=e.colors.gray,Object.keys(e).forEach(function(t){var r=e[t];Object.keys(r).forEach(function(t){var n=r[t];e[t]=r[t]={open:"["+n[0]+"m",close:"["+n[1]+"m"}}),Object.defineProperty(e,t,{value:r,enumerable:!1})}),e}Object.defineProperty(t,"exports",{enumerable:!0,get:n})},{}],3:[function(e,t,r){(function(r){"use strict";function n(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}function i(e){return r.Buffer&&"function"==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}function s(e){return Object.prototype.toString.call(e)}function a(e){return!i(e)&&("function"==typeof r.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}function o(e){if(x.isFunction(e)){if(D)return e.name;var t=e.toString(),r=t.match(S);return r&&r[1]}}function u(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function l(e){if(D||!x.isFunction(e))return x.inspect(e);var t=o(e);return"[Function"+(t?": "+t:"")+"]"}function c(e){return u(l(e.actual),128)+" "+e.operator+" "+u(l(e.expected),128)}function p(e,t,r,n,i){throw new C.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:i})}function h(e,t){e||p(e,!0,t,"==",C.ok)}function f(e,t,r,o){if(e===t)return!0;if(i(e)&&i(t))return 0===n(e,t);if(x.isDate(e)&&x.isDate(t))return e.getTime()===t.getTime();if(x.isRegExp(e)&&x.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(a(e)&&a(t)&&s(e)===s(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===n(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(i(e)!==i(t))return!1;o=o||{actual:[],expected:[]};var u=o.actual.indexOf(e);return-1!==u&&u===o.expected.indexOf(t)||(o.actual.push(e),o.expected.push(t),m(e,t,r,o))}return r?e===t:e==t}function d(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function m(e,t,r,n){if(null===e||void 0===e||null===t||void 0===t)return!1;if(x.isPrimitive(e)||x.isPrimitive(t))return e===t;if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=d(e),s=d(t);if(i&&!s||!i&&s)return!1;if(i)return e=A.call(e),t=A.call(t),f(e,t,r);var a,o,u=_(e),l=_(t);if(u.length!==l.length)return!1;for(u.sort(),l.sort(),o=u.length-1;o>=0;o--)if(u[o]!==l[o])return!1;for(o=u.length-1;o>=0;o--)if(a=u[o],!f(e[a],t[a],r,n))return!1;return!0}function y(e,t,r){f(e,t,!0)&&p(e,t,r,"notDeepStrictEqual",y)}function g(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function b(e){var t;try{e()}catch(e){t=e}return t}function v(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=b(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&p(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!e&&x.isError(i),o=!e&&i&&!r;if((a&&s&&g(i,r)||o)&&p(i,r,"Got unwanted exception"+n),e&&i&&r&&!g(i,r)||!e&&i)throw i}var x=e("util/"),E=Object.prototype.hasOwnProperty,A=Array.prototype.slice,D=function(){return"foo"===function(){}.name}(),C=t.exports=h,S=/\s*function\s+([^\(\s]*)\s*/;C.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=c(this),this.generatedMessage=!0);var t=e.stackStartFunction||p;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=o(t),s=n.indexOf("\n"+i);if(s>=0){var a=n.indexOf("\n",s+1);n=n.substring(a+1)}this.stack=n}}},x.inherits(C.AssertionError,Error),C.fail=p,C.ok=h,C.equal=function(e,t,r){e!=t&&p(e,t,r,"==",C.equal)},C.notEqual=function(e,t,r){e==t&&p(e,t,r,"!=",C.notEqual)},C.deepEqual=function(e,t,r){f(e,t,!1)||p(e,t,r,"deepEqual",C.deepEqual)},C.deepStrictEqual=function(e,t,r){f(e,t,!0)||p(e,t,r,"deepStrictEqual",C.deepStrictEqual)},C.notDeepEqual=function(e,t,r){f(e,t,!1)&&p(e,t,r,"notDeepEqual",C.notDeepEqual)},C.notDeepStrictEqual=y,C.strictEqual=function(e,t,r){e!==t&&p(e,t,r,"===",C.strictEqual)},C.notStrictEqual=function(e,t,r){e===t&&p(e,t,r,"!==",C.notStrictEqual)},C.throws=function(e,t,r){v(!0,e,t,r)},C.doesNotThrow=function(e,t,r){v(!1,e,t,r)},C.ifError=function(e){if(e)throw e};var _=Object.keys||function(e){var t=[];for(var r in e)E.call(e,r)&&t.push(r);return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":601}],4:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=t.use(e("../lib/shared")).defaults,i=r.Type.def,s=r.Type.or;i("Noop").bases("Node").build(),i("DoExpression").bases("Expression").build("body").field("body",[i("Statement")]),i("Super").bases("Expression").build(),i("BindExpression").bases("Expression").build("object","callee").field("object",s(i("Expression"),null)).field("callee",i("Expression")),i("Decorator").bases("Node").build("expression").field("expression",i("Expression")),i("Property").field("decorators",s([i("Decorator")],null),n.null),i("MethodDefinition").field("decorators",s([i("Decorator")],null),n.null),i("MetaProperty").bases("Expression").build("meta","property").field("meta",i("Identifier")).field("property",i("Identifier")),i("ParenthesizedExpression").bases("Expression").build("expression").field("expression",i("Expression")),i("ImportSpecifier").bases("ModuleSpecifier").build("imported","local").field("imported",i("Identifier")),i("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local"),i("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local"),i("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",s(i("Declaration"),i("Expression"))),i("ExportNamedDeclaration").bases("Declaration").build("declaration","specifiers","source").field("declaration",s(i("Declaration"),null)).field("specifiers",[i("ExportSpecifier")],n.emptyArray).field("source",s(i("Literal"),null),n.null),i("ExportSpecifier").bases("ModuleSpecifier").build("local","exported").field("exported",i("Identifier")),i("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported",i("Identifier")),i("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported",i("Identifier")),i("ExportAllDeclaration").bases("Declaration").build("exported","source").field("exported",s(i("Identifier"),null)).field("source",i("Literal")),i("CommentBlock").bases("Comment").build("value","leading","trailing"),i("CommentLine").bases("Comment").build("value","leading","trailing")}},{"../lib/shared":20,"../lib/types":21,"./es7":9}],5:[function(e,t,r){t.exports=function(t){t.use(e("./babel")),t.use(e("./flow"));var r=t.use(e("../lib/types")),n=t.use(e("../lib/shared")).defaults,i=r.Type.def,s=r.Type.or;i("Directive").bases("Node").build("value").field("value",i("DirectiveLiteral")),i("DirectiveLiteral").bases("Node","Expression").build("value").field("value",String,n["use strict"]),i("BlockStatement").bases("Statement").build("body").field("body",[i("Statement")]).field("directives",[i("Directive")],n.emptyArray),i("Program").bases("Node").build("body").field("body",[i("Statement")]).field("directives",[i("Directive")],n.emptyArray),i("StringLiteral").bases("Literal").build("value").field("value",String),i("NumericLiteral").bases("Literal").build("value").field("value",Number),i("NullLiteral").bases("Literal").build(),i("BooleanLiteral").bases("Literal").build("value").field("value",Boolean),i("RegExpLiteral").bases("Literal").build("pattern","flags").field("pattern",String).field("flags",String);var a=s(i("Property"),i("ObjectMethod"),i("ObjectProperty"),i("SpreadProperty"));i("ObjectExpression").bases("Expression").build("properties").field("properties",[a]),i("ObjectMethod").bases("Node","Function").build("kind","key","params","body","computed").field("kind",s("method","get","set")).field("key",s(i("Literal"),i("Identifier"),i("Expression"))).field("params",[i("Pattern")]).field("body",i("BlockStatement")).field("computed",Boolean,n.false).field("generator",Boolean,n.false).field("async",Boolean,n.false).field("decorators",s([i("Decorator")],null),n.null),i("ObjectProperty").bases("Node").build("key","value").field("key",s(i("Literal"),i("Identifier"),i("Expression"))).field("value",s(i("Expression"),i("Pattern"))).field("computed",Boolean,n.false);var o=s(i("MethodDefinition"),i("VariableDeclarator"),i("ClassPropertyDefinition"),i("ClassProperty"),i("ClassMethod"));i("ClassBody").bases("Declaration").build("body").field("body",[o]),i("ClassMethod").bases("Declaration","Function").build("kind","key","params","body","computed","static").field("kind",s("get","set","method","constructor")).field("key",s(i("Literal"),i("Identifier"),i("Expression"))).field("params",[i("Pattern")]).field("body",i("BlockStatement")).field("computed",Boolean,n.false).field("static",Boolean,n.false).field("generator",Boolean,n.false).field("async",Boolean,n.false).field("decorators",s([i("Decorator")],null),n.null);var u=s(i("Property"),i("PropertyPattern"),i("SpreadPropertyPattern"),i("SpreadProperty"),i("ObjectProperty"),i("RestProperty"));i("ObjectPattern").bases("Pattern").build("properties").field("properties",[u]).field("decorators",s([i("Decorator")],null),n.null),i("SpreadProperty").bases("Node").build("argument").field("argument",i("Expression")),i("RestProperty").bases("Node").build("argument").field("argument",i("Expression")),i("ForAwaitStatement").bases("Statement").build("left","right","body").field("left",s(i("VariableDeclaration"),i("Expression"))).field("right",i("Expression")).field("body",i("Statement")),i("Import").bases("Expression").build()}},{"../lib/shared":20,"../lib/types":21,"./babel":4,"./flow":11}],6:[function(e,t,r){t.exports=function(t){var r=t.use(e("../lib/types")),n=r.Type,i=n.def,s=n.or,a=t.use(e("../lib/shared")),o=a.defaults,u=a.geq;i("Printable").field("loc",s(i("SourceLocation"),null),o.null,!0),i("Node").bases("Printable").field("type",String).field("comments",s([i("Comment")],null),o.null,!0),i("SourceLocation").build("start","end","source").field("start",i("Position")).field("end",i("Position")).field("source",s(String,null),o.null),i("Position").build("line","column").field("line",u(1)).field("column",u(0)),i("File").bases("Node").build("program","name").field("program",i("Program")).field("name",s(String,null),o.null),i("Program").bases("Node").build("body").field("body",[i("Statement")]),i("Function").bases("Node").field("id",s(i("Identifier"),null),o.null).field("params",[i("Pattern")]).field("body",i("BlockStatement")),i("Statement").bases("Node"),i("EmptyStatement").bases("Statement").build(),i("BlockStatement").bases("Statement").build("body").field("body",[i("Statement")]),i("ExpressionStatement").bases("Statement").build("expression").field("expression",i("Expression")),i("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",i("Expression")).field("consequent",i("Statement")).field("alternate",s(i("Statement"),null),o.null),i("LabeledStatement").bases("Statement").build("label","body").field("label",i("Identifier")).field("body",i("Statement")),i("BreakStatement").bases("Statement").build("label").field("label",s(i("Identifier"),null),o.null),i("ContinueStatement").bases("Statement").build("label").field("label",s(i("Identifier"),null),o.null),i("WithStatement").bases("Statement").build("object","body").field("object",i("Expression")).field("body",i("Statement")),i("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",i("Expression")).field("cases",[i("SwitchCase")]).field("lexical",Boolean,o.false),i("ReturnStatement").bases("Statement").build("argument").field("argument",s(i("Expression"),null)),i("ThrowStatement").bases("Statement").build("argument").field("argument",i("Expression")),i("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",i("BlockStatement")).field("handler",s(i("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[i("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[i("CatchClause")],o.emptyArray).field("finalizer",s(i("BlockStatement"),null),o.null),i("CatchClause").bases("Node").build("param","guard","body").field("param",i("Pattern")).field("guard",s(i("Expression"),null),o.null).field("body",i("BlockStatement")),i("WhileStatement").bases("Statement").build("test","body").field("test",i("Expression")).field("body",i("Statement")),i("DoWhileStatement").bases("Statement").build("body","test").field("body",i("Statement")).field("test",i("Expression")),i("ForStatement").bases("Statement").build("init","test","update","body").field("init",s(i("VariableDeclaration"),i("Expression"),null)).field("test",s(i("Expression"),null)).field("update",s(i("Expression"),null)).field("body",i("Statement")),i("ForInStatement").bases("Statement").build("left","right","body").field("left",s(i("VariableDeclaration"),i("Expression"))).field("right",i("Expression")).field("body",i("Statement")),i("DebuggerStatement").bases("Statement").build(),i("Declaration").bases("Statement"),i("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",i("Identifier")),i("FunctionExpression").bases("Function","Expression").build("id","params","body"),i("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",s("var","let","const")).field("declarations",[i("VariableDeclarator")]),i("VariableDeclarator").bases("Node").build("id","init").field("id",i("Pattern")).field("init",s(i("Expression"),null)),i("Expression").bases("Node","Pattern"),i("ThisExpression").bases("Expression").build(),i("ArrayExpression").bases("Expression").build("elements").field("elements",[s(i("Expression"),null)]),i("ObjectExpression").bases("Expression").build("properties").field("properties",[i("Property")]),i("Property").bases("Node").build("kind","key","value").field("kind",s("init","get","set")).field("key",s(i("Literal"),i("Identifier"))).field("value",i("Expression")),i("SequenceExpression").bases("Expression").build("expressions").field("expressions",[i("Expression")]);var l=s("-","+","!","~","typeof","void","delete");i("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",l).field("argument",i("Expression")).field("prefix",Boolean,o.true);var c=s("==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof","..");i("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",c).field("left",i("Expression")).field("right",i("Expression"));var p=s("=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=");i("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",p).field("left",i("Pattern")).field("right",i("Expression"));var h=s("++","--");i("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",h).field("argument",i("Expression")).field("prefix",Boolean);var f=s("||","&&");i("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",f).field("left",i("Expression")).field("right",i("Expression")),i("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",i("Expression")).field("consequent",i("Expression")).field("alternate",i("Expression")),i("NewExpression").bases("Expression").build("callee","arguments").field("callee",i("Expression")).field("arguments",[i("Expression")]),i("CallExpression").bases("Expression").build("callee","arguments").field("callee",i("Expression")).field("arguments",[i("Expression")]),i("MemberExpression").bases("Expression").build("object","property","computed").field("object",i("Expression")).field("property",s(i("Identifier"),i("Expression"))).field("computed",Boolean,function(){var e=this.property.type;return"Literal"===e||"MemberExpression"===e||"BinaryExpression"===e}),i("Pattern").bases("Node"),i("SwitchCase").bases("Node").build("test","consequent").field("test",s(i("Expression"),null)).field("consequent",[i("Statement")]),i("Identifier").bases("Node","Expression","Pattern").build("name").field("name",String),i("Literal").bases("Node","Expression").build("value").field("value",s(String,Boolean,null,Number,RegExp)).field("regex",s({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}),i("Comment").bases("Printable").field("value",String).field("leading",Boolean,o.true).field("trailing",Boolean,o.false)}},{"../lib/shared":20,"../lib/types":21}],7:[function(e,t,r){t.exports=function(t){t.use(e("./core"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or;n("XMLDefaultDeclaration").bases("Declaration").field("namespace",n("Expression")),n("XMLAnyName").bases("Expression"),n("XMLQualifiedIdentifier").bases("Expression").field("left",i(n("Identifier"),n("XMLAnyName"))).field("right",i(n("Identifier"),n("Expression"))).field("computed",Boolean),n("XMLFunctionQualifiedIdentifier").bases("Expression").field("right",i(n("Identifier"),n("Expression"))).field("computed",Boolean),n("XMLAttributeSelector").bases("Expression").field("attribute",n("Expression")),n("XMLFilterExpression").bases("Expression").field("left",n("Expression")).field("right",n("Expression")),n("XMLElement").bases("XML","Expression").field("contents",[n("XML")]),n("XMLList").bases("XML","Expression").field("contents",[n("XML")]),n("XML").bases("Node"),n("XMLEscape").bases("XML").field("expression",n("Expression")),n("XMLText").bases("XML").field("text",String),n("XMLStartTag").bases("XML").field("contents",[n("XML")]),n("XMLEndTag").bases("XML").field("contents",[n("XML")]),n("XMLPointTag").bases("XML").field("contents",[n("XML")]),n("XMLName").bases("XML").field("contents",i(String,[n("XML")])),n("XMLAttribute").bases("XML").field("value",String),n("XMLCdata").bases("XML").field("contents",String),n("XMLComment").bases("XML").field("contents",String),n("XMLProcessingInstruction").bases("XML").field("target",String).field("contents",i(String,null))}},{"../lib/types":21,"./core":6}],8:[function(e,t,r){t.exports=function(t){t.use(e("./core"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")).defaults;n("Function").field("generator",Boolean,s.false).field("expression",Boolean,s.false).field("defaults",[i(n("Expression"),null)],s.emptyArray).field("rest",i(n("Identifier"),null),s.null),n("RestElement").bases("Pattern").build("argument").field("argument",n("Pattern")),n("SpreadElementPattern").bases("Pattern").build("argument").field("argument",n("Pattern")),n("FunctionDeclaration").build("id","params","body","generator","expression"),n("FunctionExpression").build("id","params","body","generator","expression"),n("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,s.null).field("body",i(n("BlockStatement"),n("Expression"))).field("generator",!1,s.false),n("YieldExpression").bases("Expression").build("argument","delegate").field("argument",i(n("Expression"),null)).field("delegate",Boolean,s.false),n("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",n("Expression")).field("blocks",[n("ComprehensionBlock")]).field("filter",i(n("Expression"),null)),n("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",n("Expression")).field("blocks",[n("ComprehensionBlock")]).field("filter",i(n("Expression"),null)),n("ComprehensionBlock").bases("Node").build("left","right","each").field("left",n("Pattern")).field("right",n("Expression")).field("each",Boolean),n("Property").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("value",i(n("Expression"),n("Pattern"))).field("method",Boolean,s.false).field("shorthand",Boolean,s.false).field("computed",Boolean,s.false),n("PropertyPattern").bases("Pattern").build("key","pattern").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("pattern",n("Pattern")).field("computed",Boolean,s.false),n("ObjectPattern").bases("Pattern").build("properties").field("properties",[i(n("PropertyPattern"),n("Property"))]),n("ArrayPattern").bases("Pattern").build("elements").field("elements",[i(n("Pattern"),null)]),n("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",i("constructor","method","get","set")).field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("value",n("Function")).field("computed",Boolean,s.false).field("static",Boolean,s.false),n("SpreadElement").bases("Node").build("argument").field("argument",n("Expression")),n("ArrayExpression").field("elements",[i(n("Expression"),n("SpreadElement"),n("RestElement"),null)]),n("NewExpression").field("arguments",[i(n("Expression"),n("SpreadElement"))]),n("CallExpression").field("arguments",[i(n("Expression"),n("SpreadElement"))]),n("AssignmentPattern").bases("Pattern").build("left","right").field("left",n("Pattern")).field("right",n("Expression"));var a=i(n("MethodDefinition"),n("VariableDeclarator"),n("ClassPropertyDefinition"),n("ClassProperty"));n("ClassProperty").bases("Declaration").build("key").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("computed",Boolean,s.false),n("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",a),n("ClassBody").bases("Declaration").build("body").field("body",[a]),n("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",i(n("Identifier"),null)).field("body",n("ClassBody")).field("superClass",i(n("Expression"),null),s.null),n("ClassExpression").bases("Expression").build("id","body","superClass").field("id",i(n("Identifier"),null),s.null).field("body",n("ClassBody")).field("superClass",i(n("Expression"),null),s.null).field("implements",[n("ClassImplements")],s.emptyArray),n("ClassImplements").bases("Node").build("id").field("id",n("Identifier")).field("superClass",i(n("Expression"),null),s.null),n("Specifier").bases("Node"),n("ModuleSpecifier").bases("Specifier").field("local",i(n("Identifier"),null),s.null).field("id",i(n("Identifier"),null),s.null).field("name",i(n("Identifier"),null),s.null),n("TaggedTemplateExpression").bases("Expression").build("tag","quasi").field("tag",n("Expression")).field("quasi",n("TemplateLiteral")),n("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[n("TemplateElement")]).field("expressions",[n("Expression")]),n("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:String,raw:String}).field("tail",Boolean)}},{"../lib/shared":20,"../lib/types":21,"./core":6}],9:[function(e,t,r){t.exports=function(t){t.use(e("./es6"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=(r.builtInTypes,t.use(e("../lib/shared")).defaults);n("Function").field("async",Boolean,s.false),n("SpreadProperty").bases("Node").build("argument").field("argument",n("Expression")),n("ObjectExpression").field("properties",[i(n("Property"),n("SpreadProperty"))]),n("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",n("Pattern")),n("ObjectPattern").field("properties",[i(n("Property"),n("PropertyPattern"),n("SpreadPropertyPattern"))]),n("AwaitExpression").bases("Expression").build("argument","all").field("argument",i(n("Expression"),null)).field("all",Boolean,s.false)}},{"../lib/shared":20,"../lib/types":21,"./es6":8}],10:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=t.use(e("../lib/shared")).defaults,i=r.Type.def,s=r.Type.or;i("VariableDeclaration").field("declarations",[s(i("VariableDeclarator"),i("Identifier"))]),i("Property").field("value",s(i("Expression"),i("Pattern"))),i("ArrayPattern").field("elements",[s(i("Pattern"),i("SpreadElement"),null)]),i("ObjectPattern").field("properties",[s(i("Property"),i("PropertyPattern"),i("SpreadPropertyPattern"),i("SpreadProperty"))]),i("ExportSpecifier").bases("ModuleSpecifier").build("id","name"),i("ExportBatchSpecifier").bases("Specifier").build(),i("ImportSpecifier").bases("ModuleSpecifier").build("id","name"),i("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("id"),i("ImportDefaultSpecifier").bases("ModuleSpecifier").build("id"),i("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",s(i("Declaration"),i("Expression"),null)).field("specifiers",[s(i("ExportSpecifier"),i("ExportBatchSpecifier"))],n.emptyArray).field("source",s(i("Literal"),null),n.null),i("ImportDeclaration").bases("Declaration").build("specifiers","source","importKind").field("specifiers",[s(i("ImportSpecifier"),i("ImportNamespaceSpecifier"),i("ImportDefaultSpecifier"))],n.emptyArray).field("source",i("Literal")).field("importKind",s("value","type"),function(){return"value"}),i("Block").bases("Comment").build("value","leading","trailing"),i("Line").bases("Comment").build("value","leading","trailing")}},{"../lib/shared":20,"../lib/types":21,"./es7":9}],11:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")).defaults;n("Type").bases("Node"),n("AnyTypeAnnotation").bases("Type").build(),n("EmptyTypeAnnotation").bases("Type").build(),n("MixedTypeAnnotation").bases("Type").build(),n("VoidTypeAnnotation").bases("Type").build(),n("NumberTypeAnnotation").bases("Type").build(),n("NumberLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Number).field("raw",String),n("NumericLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Number).field("raw",String),n("StringTypeAnnotation").bases("Type").build(),n("StringLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",String).field("raw",String),n("BooleanTypeAnnotation").bases("Type").build(),n("BooleanLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Boolean).field("raw",String),n("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",n("Type")),n("NullableTypeAnnotation").bases("Type").build("typeAnnotation").field("typeAnnotation",n("Type")),n("NullLiteralTypeAnnotation").bases("Type").build(),n("NullTypeAnnotation").bases("Type").build(),n("ThisTypeAnnotation").bases("Type").build(),n("ExistsTypeAnnotation").bases("Type").build(),n("ExistentialTypeParam").bases("Type").build(),n("FunctionTypeAnnotation").bases("Type").build("params","returnType","rest","typeParameters").field("params",[n("FunctionTypeParam")]).field("returnType",n("Type")).field("rest",i(n("FunctionTypeParam"),null)).field("typeParameters",i(n("TypeParameterDeclaration"),null)),n("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",n("Identifier")).field("typeAnnotation",n("Type")).field("optional",Boolean),n("ArrayTypeAnnotation").bases("Type").build("elementType").field("elementType",n("Type")),n("ObjectTypeAnnotation").bases("Type").build("properties","indexers","callProperties").field("properties",[n("ObjectTypeProperty")]).field("indexers",[n("ObjectTypeIndexer")],s.emptyArray).field("callProperties",[n("ObjectTypeCallProperty")],s.emptyArray).field("exact",Boolean,s.false),n("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",i(n("Literal"),n("Identifier"))).field("value",n("Type")).field("optional",Boolean).field("variance",i("plus","minus",null),s.null),n("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",n("Identifier")).field("key",n("Type")).field("value",n("Type")).field("variance",i("plus","minus",null),s.null),n("ObjectTypeCallProperty").bases("Node").build("value").field("value",n("FunctionTypeAnnotation")).field("static",Boolean,s.false),n("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",i(n("Identifier"),n("QualifiedTypeIdentifier"))).field("id",n("Identifier")),n("GenericTypeAnnotation").bases("Type").build("id","typeParameters").field("id",i(n("Identifier"),n("QualifiedTypeIdentifier"))).field("typeParameters",i(n("TypeParameterInstantiation"),null)),n("MemberTypeAnnotation").bases("Type").build("object","property").field("object",n("Identifier")).field("property",i(n("MemberTypeAnnotation"),n("GenericTypeAnnotation"))),n("UnionTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("IntersectionTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("TypeofTypeAnnotation").bases("Type").build("argument").field("argument",n("Type")),n("Identifier").field("typeAnnotation",i(n("TypeAnnotation"),null),s.null),n("TypeParameterDeclaration").bases("Node").build("params").field("params",[n("TypeParameter")]),n("TypeParameterInstantiation").bases("Node").build("params").field("params",[n("Type")]),n("TypeParameter").bases("Type").build("name","variance","bound").field("name",String).field("variance",i("plus","minus",null),s.null).field("bound",i(n("TypeAnnotation"),null),s.null),n("Function").field("returnType",i(n("TypeAnnotation"),null),s.null).field("typeParameters",i(n("TypeParameterDeclaration"),null),s.null),n("ClassProperty").build("key","value","typeAnnotation","static").field("value",i(n("Expression"),null)).field("typeAnnotation",i(n("TypeAnnotation"),null)).field("static",Boolean,s.false).field("variance",i("plus","minus",null),s.null),n("ClassImplements").field("typeParameters",i(n("TypeParameterInstantiation"),null),s.null),n("InterfaceDeclaration").bases("Declaration").build("id","body","extends").field("id",n("Identifier")).field("typeParameters",i(n("TypeParameterDeclaration"),null),s.null).field("body",n("ObjectTypeAnnotation")).field("extends",[n("InterfaceExtends")]),n("DeclareInterface").bases("InterfaceDeclaration").build("id","body","extends"),n("InterfaceExtends").bases("Node").build("id").field("id",n("Identifier")).field("typeParameters",i(n("TypeParameterInstantiation"),null)),n("TypeAlias").bases("Declaration").build("id","typeParameters","right").field("id",n("Identifier")).field("typeParameters",i(n("TypeParameterDeclaration"),null)).field("right",n("Type")),n("DeclareTypeAlias").bases("TypeAlias").build("id","typeParameters","right"),
+n("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TypeAnnotation")),n("TupleTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("DeclareVariable").bases("Statement").build("id").field("id",n("Identifier")),n("DeclareFunction").bases("Statement").build("id").field("id",n("Identifier")),n("DeclareClass").bases("InterfaceDeclaration").build("id"),n("DeclareModule").bases("Statement").build("id","body").field("id",i(n("Identifier"),n("Literal"))).field("body",n("BlockStatement")),n("DeclareModuleExports").bases("Statement").build("typeAnnotation").field("typeAnnotation",n("Type")),n("DeclareExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",i(n("DeclareVariable"),n("DeclareFunction"),n("DeclareClass"),n("Type"),null)).field("specifiers",[i(n("ExportSpecifier"),n("ExportBatchSpecifier"))],s.emptyArray).field("source",i(n("Literal"),null),s.null),n("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source",i(n("Literal"),null),s.null)}},{"../lib/shared":20,"../lib/types":21,"./es7":9}],12:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")).defaults;n("JSXAttribute").bases("Node").build("name","value").field("name",i(n("JSXIdentifier"),n("JSXNamespacedName"))).field("value",i(n("Literal"),n("JSXExpressionContainer"),null),s.null),n("JSXIdentifier").bases("Identifier").build("name").field("name",String),n("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",n("JSXIdentifier")).field("name",n("JSXIdentifier")),n("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",i(n("JSXIdentifier"),n("JSXMemberExpression"))).field("property",n("JSXIdentifier")).field("computed",Boolean,s.false);var a=i(n("JSXIdentifier"),n("JSXNamespacedName"),n("JSXMemberExpression"));n("JSXSpreadAttribute").bases("Node").build("argument").field("argument",n("Expression"));var o=[i(n("JSXAttribute"),n("JSXSpreadAttribute"))];n("JSXExpressionContainer").bases("Expression").build("expression").field("expression",n("Expression")),n("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",n("JSXOpeningElement")).field("closingElement",i(n("JSXClosingElement"),null),s.null).field("children",[i(n("JSXElement"),n("JSXExpressionContainer"),n("JSXText"),n("Literal"))],s.emptyArray).field("name",a,function(){return this.openingElement.name},!0).field("selfClosing",Boolean,function(){return this.openingElement.selfClosing},!0).field("attributes",o,function(){return this.openingElement.attributes},!0),n("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",a).field("attributes",o,s.emptyArray).field("selfClosing",Boolean,s.false),n("JSXClosingElement").bases("Node").build("name").field("name",a),n("JSXText").bases("Literal").build("value").field("value",String),n("JSXEmptyExpression").bases("Expression").build()}},{"../lib/shared":20,"../lib/types":21,"./es7":9}],13:[function(e,t,r){t.exports=function(t){t.use(e("./core"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")),a=s.geq,o=s.defaults;n("Function").field("body",i(n("BlockStatement"),n("Expression"))),n("ForInStatement").build("left","right","body","each").field("each",Boolean,o.false),n("ForOfStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("LetStatement").bases("Statement").build("head","body").field("head",[n("VariableDeclarator")]).field("body",n("Statement")),n("LetExpression").bases("Expression").build("head","body").field("head",[n("VariableDeclarator")]).field("body",n("Expression")),n("GraphExpression").bases("Expression").build("index","expression").field("index",a(0)).field("expression",n("Literal")),n("GraphIndexExpression").bases("Expression").build("index").field("index",a(0))}},{"../lib/shared":20,"../lib/types":21,"./core":6}],14:[function(e,t,r){t.exports=function(t){function r(e){var t=n.indexOf(e);return-1===t&&(t=n.length,n.push(e),i[t]=e(s)),i[t]}var n=[],i=[],s={};s.use=r;var a=r(e("./lib/types"));t.forEach(r),a.finalize();var o={Type:a.Type,builtInTypes:a.builtInTypes,namedTypes:a.namedTypes,builders:a.builders,defineMethod:a.defineMethod,getFieldNames:a.getFieldNames,getFieldValue:a.getFieldValue,eachField:a.eachField,someField:a.someField,getSupertypeNames:a.getSupertypeNames,astNodesAreEquivalent:r(e("./lib/equiv")),finalize:a.finalize,Path:r(e("./lib/path")),NodePath:r(e("./lib/node-path")),PathVisitor:r(e("./lib/path-visitor")),use:r};return o.visit=o.PathVisitor.visit,o}},{"./lib/equiv":15,"./lib/node-path":16,"./lib/path":18,"./lib/path-visitor":17,"./lib/types":21}],15:[function(e,t,r){t.exports=function(t){function r(e,t,r){return c.check(r)?r.length=0:r=null,i(e,t,r)}function n(e){return/[_$a-z][_$a-z0-9]*/i.test(e)?"."+e:"["+JSON.stringify(e)+"]"}function i(e,t,r){return e===t||(c.check(e)?s(e,t,r):p.check(e)?a(e,t,r):h.check(e)?h.check(t)&&+e==+t:f.check(e)?f.check(t)&&e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.ignoreCase===t.ignoreCase:e==t)}function s(e,t,r){c.assert(e);var n=e.length;if(!c.check(t)||t.length!==n)return r&&r.push("length"),!1;for(var s=0;s<n;++s){if(r&&r.push(s),s in e!=s in t)return!1;if(!i(e[s],t[s],r))return!1;if(r){var a=r.pop();if(a!==s)throw new Error(""+a)}}return!0}function a(e,t,r){if(p.assert(e),!p.check(t))return!1;if(e.type!==t.type)return r&&r.push("type"),!1;var n=u(e),s=n.length,a=u(t),o=a.length;if(s===o){for(var c=0;c<s;++c){var h=n[c],f=l(e,h),m=l(t,h);if(r&&r.push(h),!i(f,m,r))return!1;if(r){var y=r.pop();if(y!==h)throw new Error(""+y)}}return!0}if(!r)return!1;var g=Object.create(null);for(c=0;c<s;++c)g[n[c]]=!0;for(c=0;c<o;++c){if(h=a[c],!d.call(g,h))return r.push(h),!1;delete g[h]}for(h in g){r.push(h);break}return!1}var o=t.use(e("../lib/types")),u=o.getFieldNames,l=o.getFieldValue,c=o.builtInTypes.array,p=o.builtInTypes.object,h=o.builtInTypes.Date,f=o.builtInTypes.RegExp,d=Object.prototype.hasOwnProperty;return r.assert=function(e,t){var i=[];if(!r(e,t,i)){if(0!==i.length)throw new Error("Nodes differ in the following path: "+i.map(n).join(""));if(e!==t)throw new Error("Nodes must be equal")}},r}},{"../lib/types":21}],16:[function(e,t,r){t.exports=function(t){function r(e,t,n){if(!(this instanceof r))throw new Error("NodePath constructor cannot be invoked without 'new'");f.call(this,e,t,n)}function n(e){return l.BinaryExpression.check(e)||l.LogicalExpression.check(e)}function i(e){return!!l.CallExpression.check(e)||(h.check(e)?e.some(i):!!l.Node.check(e)&&u.someField(e,function(e,t){return i(t)}))}function s(e){for(var t,r;e.parent;e=e.parent){if(t=e.node,r=e.parent.node,l.BlockStatement.check(r)&&"body"===e.parent.name&&0===e.name){if(r.body[0]!==t)throw new Error("Nodes must be equal");return!0}if(l.ExpressionStatement.check(r)&&"expression"===e.name){if(r.expression!==t)throw new Error("Nodes must be equal");return!0}if(l.SequenceExpression.check(r)&&"expressions"===e.parent.name&&0===e.name){if(r.expressions[0]!==t)throw new Error("Nodes must be equal")}else if(l.CallExpression.check(r)&&"callee"===e.name){if(r.callee!==t)throw new Error("Nodes must be equal")}else if(l.MemberExpression.check(r)&&"object"===e.name){if(r.object!==t)throw new Error("Nodes must be equal")}else if(l.ConditionalExpression.check(r)&&"test"===e.name){if(r.test!==t)throw new Error("Nodes must be equal")}else if(n(r)&&"left"===e.name){if(r.left!==t)throw new Error("Nodes must be equal")}else{if(!l.UnaryExpression.check(r)||r.prefix||"argument"!==e.name)return!1;if(r.argument!==t)throw new Error("Nodes must be equal")}}return!0}function a(e){if(l.VariableDeclaration.check(e.node)){var t=e.get("declarations").value;if(!t||0===t.length)return e.prune()}else if(l.ExpressionStatement.check(e.node)){if(!e.get("expression").value)return e.prune()}else l.IfStatement.check(e.node)&&o(e);return e}function o(e){var t=e.get("test").value,r=e.get("alternate").value,n=e.get("consequent").value;if(n||r){if(!n&&r){var i=c.unaryExpression("!",t,!0);l.UnaryExpression.check(t)&&"!"===t.operator&&(i=t.argument),e.get("test").replace(i),e.get("consequent").replace(r),e.get("alternate").replace()}}else{var s=c.expressionStatement(t);e.replace(s)}}var u=t.use(e("./types")),l=u.namedTypes,c=u.builders,p=u.builtInTypes.number,h=u.builtInTypes.array,f=t.use(e("./path")),d=t.use(e("./scope")),m=r.prototype=Object.create(f.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}});Object.defineProperties(m,{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}}}),m.replace=function(){return delete this.node,delete this.parent,delete this.scope,f.prototype.replace.apply(this,arguments)},m.prune=function(){var e=this.parent;return this.replace(),a(e)},m._computeNode=function(){var e=this.value;if(l.Node.check(e))return e;var t=this.parentPath;return t&&t.node||null},m._computeParent=function(){var e=this.value,t=this.parentPath;if(!l.Node.check(e)){for(;t&&!l.Node.check(t.value);)t=t.parentPath;t&&(t=t.parentPath)}for(;t&&!l.Node.check(t.value);)t=t.parentPath;return t||null},m._computeScope=function(){var e=this.value,t=this.parentPath,r=t&&t.scope;return l.Node.check(e)&&d.isEstablishedBy(e)&&(r=new d(this,r)),r||null},m.getValueProperty=function(e){return u.getFieldValue(this.value,e)},m.needsParens=function(e){var t=this.parentPath;if(!t)return!1;var r=this.value;if(!l.Expression.check(r))return!1;if("Identifier"===r.type)return!1;for(;!l.Node.check(t.value);)if(!(t=t.parentPath))return!1;var n=t.value;switch(r.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return"MemberExpression"===n.type&&"object"===this.name&&n.object===r;case"BinaryExpression":case"LogicalExpression":switch(n.type){case"CallExpression":return"callee"===this.name&&n.callee===r;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return"object"===this.name&&n.object===r;case"BinaryExpression":case"LogicalExpression":var s=n.operator,t=y[s],a=r.operator,o=y[a];if(t>o)return!0;if(t===o&&"right"===this.name){if(n.right!==r)throw new Error("Nodes must be equal");return!0}default:return!1}case"SequenceExpression":switch(n.type){case"ForStatement":return!1;case"ExpressionStatement":return"expression"!==this.name;default:return!0}case"YieldExpression":switch(n.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"===n.type&&p.check(r.value)&&"object"===this.name&&n.object===r;case"AssignmentExpression":case"ConditionalExpression":switch(n.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return"callee"===this.name&&n.callee===r;case"ConditionalExpression":return"test"===this.name&&n.test===r;case"MemberExpression":return"object"===this.name&&n.object===r;default:return!1}default:if("NewExpression"===n.type&&"callee"===this.name&&n.callee===r)return i(r)}return!(!0===e||this.canBeFirstInStatement()||!this.firstInStatement())};var y={};return[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(e,t){e.forEach(function(e){y[e]=t})}),m.canBeFirstInStatement=function(){var e=this.node;return!l.FunctionExpression.check(e)&&!l.ObjectExpression.check(e)},m.firstInStatement=function(){return s(this)},r}},{"./path":18,"./scope":19,"./types":21}],17:[function(e,t,r){var n=Object.prototype.hasOwnProperty;t.exports=function(t){function r(){if(!(this instanceof r))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=i(this),this._shouldVisitComments=n.call(this._methodNameTable,"Block")||n.call(this._methodNameTable,"Line"),this.Context=o(this),this._visiting=!1,this._changeReported=!1}function i(e){var t=Object.create(null);for(var r in e)/^visit[A-Z]/.test(r)&&(t[r.slice("visit".length)]=!0);for(var n=u.computeSupertypeLookupTable(t),i=Object.create(null),t=Object.keys(n),s=t.length,a=0;a<s;++a){var o=t[a];r="visit"+n[o],h.check(e[r])&&(i[o]=r)}return i}function s(e,t){for(var r in t)n.call(t,r)&&(e[r]=t[r]);return e}function a(e,t){if(!(e instanceof l))throw new Error("");if(!(t instanceof r))throw new Error("");var i=e.value;if(c.check(i))e.each(t.visitWithoutReset,t);else if(p.check(i)){var s=u.getFieldNames(i);t._shouldVisitComments&&i.comments&&s.indexOf("comments")<0&&s.push("comments");for(var a=s.length,o=[],h=0;h<a;++h){var f=s[h];n.call(i,f)||(i[f]=u.getFieldValue(i,f)),o.push(e.get(f))}for(var h=0;h<a;++h)t.visitWithoutReset(o[h])}else;return e.value}function o(e){function t(n){if(!(this instanceof t))throw new Error("");if(!(this instanceof r))throw new Error("");if(!(n instanceof l))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,s(n,d),t}var u=t.use(e("./types")),l=t.use(e("./node-path")),c=(u.namedTypes.Printable,u.builtInTypes.array),p=u.builtInTypes.object,h=u.builtInTypes.function;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(!p.check(e))return new r;var n=t.prototype=Object.create(f);return n.constructor=t,s(n,e),s(t,r),h.assert(t.fromMethodsObject),h.assert(t.visit),new t},r.visit=function(e,t){return r.fromMethodsObject(t).visit(e)};var f=r.prototype;f.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),r=0;r<e;++r)t[r]=arguments[r];t[0]instanceof l||(t[0]=new l({root:t[0]}).get("root")),this.reset.apply(this,t);try{var n=this.visitWithoutReset(t[0])}finally{this._visiting=!1}return n},f.AbortRequest=function(){},f.abort=function(){var e=this;e._abortRequested=!0;var t=new e.AbortRequest;throw t.cancel=function(){e._abortRequested=!1},t},f.reset=function(e){},f.visitWithoutReset=function(e){if(this instanceof this.Context)return this.visitor.visitWithoutReset(e);if(!(e instanceof l))throw new Error("");var t=e.value,r=t&&"object"==typeof t&&"string"==typeof t.type&&this._methodNameTable[t.type];if(!r)return a(e,this);var n=this.acquireContext(e);try{return n.invokeVisitorMethod(r)}finally{this.releaseContext(n)}},f.acquireContext=function(e){return 0===this._reusableContextStack.length?new this.Context(e):this._reusableContextStack.pop().reset(e)},f.releaseContext=function(e){if(!(e instanceof this.Context))throw new Error("");this._reusableContextStack.push(e),e.currentPath=null},f.reportChanged=function(){this._changeReported=!0},f.wasChangeReported=function(){return this._changeReported};var d=Object.create(null);return d.reset=function(e){if(!(this instanceof this.Context))throw new Error("");if(!(e instanceof l))throw new Error("");return this.currentPath=e,this.needToCallTraverse=!0,this},d.invokeVisitorMethod=function(e){if(!(this instanceof this.Context))throw new Error("");if(!(this.currentPath instanceof l))throw new Error("");var t=this.visitor[e].call(this,this.currentPath);if(!1===t?this.needToCallTraverse=!1:void 0!==t&&(this.currentPath=this.currentPath.replace(t)[0],this.needToCallTraverse&&this.traverse(this.currentPath)),!1!==this.needToCallTraverse)throw new Error("Must either call this.traverse or return false in "+e);var r=this.currentPath;return r&&r.value},d.traverse=function(e,t){if(!(this instanceof this.Context))throw new Error("");if(!(e instanceof l))throw new Error("");if(!(this.currentPath instanceof l))throw new Error("");return this.needToCallTraverse=!1,a(e,r.fromMethodsObject(t||this.visitor))},d.visit=function(e,t){if(!(this instanceof this.Context))throw new Error("");if(!(e instanceof l))throw new Error("");if(!(this.currentPath instanceof l))throw new Error("");return this.needToCallTraverse=!1,r.fromMethodsObject(t||this.visitor).visitWithoutReset(e)},d.reportChanged=function(){this.visitor.reportChanged()},d.abort=function(){this.needToCallTraverse=!1,this.visitor.abort()},r}},{"./node-path":16,"./types":21}],18:[function(e,t,r){var n=Array.prototype,i=(n.slice,n.map,Object.prototype),s=i.hasOwnProperty;t.exports=function(t){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 n(e){return e.__childCache||(e.__childCache=Object.create(null))}function i(e,t){var r=n(e),i=e.getValueProperty(t),a=r[t];return s.call(r,t)&&a.value===i||(a=r[t]=new e.constructor(i,e,t)),a}function a(){}function o(e,t,r,i){if(c.assert(e.value),0===t)return a;var o=e.value.length;if(o<1)return a;var u=arguments.length;2===u?(r=0,i=o):3===u?(r=Math.max(r,0),i=o):(r=Math.max(r,0),i=Math.min(i,o)),p.assert(r),p.assert(i);for(var l=Object.create(null),h=n(e),f=r;f<i;++f)if(s.call(e.value,f)){var d=e.get(f);if(d.name!==f)throw new Error("");var m=f+t;d.name=m,l[m]=d,delete h[f]}return delete h.length,function(){for(var t in l){var r=l[t];if(r.name!==+t)throw new Error("");h[t]=r,e.value[t]=r.value}}}function u(e){if(!(e instanceof r))throw new Error("");var t=e.parentPath;if(!t)return e;var i=t.value,s=n(t);if(i[e.name]===e.value)s[e.name]=e;else if(c.check(i)){var a=i.indexOf(e.value);a>=0&&(s[e.name=a]=e)}else i[e.name]=e.value,s[e.name]=e;if(i[e.name]!==e.value)throw new Error("");if(e.parentPath.get(e.name)!==e)throw new Error("");return e}var l=t.use(e("./types")),c=l.builtInTypes.array,p=l.builtInTypes.number,h=r.prototype;return h.getValueProperty=function(e){return this.value[e]},h.get=function(e){for(var t=this,r=arguments,n=r.length,s=0;s<n;++s)t=i(t,r[s]);return t},h.each=function(e,t){for(var r=[],n=this.value.length,i=0,i=0;i<n;++i)s.call(this.value,i)&&(r[i]=this.get(i));for(t=t||this,i=0;i<n;++i)s.call(r,i)&&e.call(t,r[i])},h.map=function(e,t){var r=[];return this.each(function(t){r.push(e.call(this,t))},t),r},h.filter=function(e,t){var r=[];return this.each(function(t){e.call(this,t)&&r.push(t)},t),r},h.shift=function(){var e=o(this,-1),t=this.value.shift();return e(),t},h.unshift=function(e){var t=o(this,arguments.length),r=this.value.unshift.apply(this.value,arguments);return t(),r},h.push=function(e){return c.assert(this.value),delete n(this).length,this.value.push.apply(this.value,arguments)},h.pop=function(){c.assert(this.value);var e=n(this);return delete e[this.value.length-1],delete e.length,this.value.pop()},h.insertAt=function(e,t){var r=arguments.length,n=o(this,r-1,e);if(n===a)return this;e=Math.max(e,0);for(var i=1;i<r;++i)this.value[e+i-1]=arguments[i];return n(),this},h.insertBefore=function(e){for(var t=this.parentPath,r=arguments.length,n=[this.name],i=0;i<r;++i)n.push(arguments[i]);return t.insertAt.apply(t,n)},h.insertAfter=function(e){for(var t=this.parentPath,r=arguments.length,n=[this.name+1],i=0;i<r;++i)n.push(arguments[i]);return t.insertAt.apply(t,n)},h.replace=function(e){var t=[],r=this.parentPath.value,i=n(this.parentPath),s=arguments.length;if(u(this),c.check(r)){for(var a=r.length,l=o(this.parentPath,s-1,this.name+1),p=[this.name,1],h=0;h<s;++h)p.push(arguments[h]);if(r.splice.apply(r,p)[0]!==this.value)throw new Error("");if(r.length!==a-1+s)throw new Error("");if(l(),0===s)delete this.value,delete i[this.name],this.__childCache=null;else{if(r[this.name]!==e)throw new Error("");for(this.value!==e&&(this.value=e,this.__childCache=null),h=0;h<s;++h)t.push(this.parentPath.get(this.name+h));if(t[0]!==this)throw new Error("")}}else if(1===s)this.value!==e&&(this.__childCache=null),this.value=r[this.name]=e,t.push(this);else{if(0!==s)throw new Error("Could not replace path");delete r[this.name],delete this.value,this.__childCache=null}return t},r}},{"./types":21}],19:[function(e,t,r){var n=Object.prototype.hasOwnProperty;t.exports=function(t){function r(n,i){if(!(this instanceof r))throw new Error("Scope constructor cannot be invoked without 'new'");if(!(n instanceof t.use(e("./node-path"))))throw new Error("");b.assert(n.value);var s;if(i){if(!(i instanceof r))throw new Error("");s=i.depth+1}else i=null,s=0;Object.defineProperties(this,{path:{value:n},node:{value:n.value},isGlobal:{value:!i,enumerable:!0},depth:{value:s},parent:{value:i},bindings:{value:{}},types:{value:{}}})}function i(e,t,r){var n=e.value;b.assert(n),h.CatchClause.check(n)?u(e.get("param"),t):s(e,t,r)}function s(e,t,r){var n=e.value;e.parent&&h.FunctionExpression.check(e.parent.node)&&e.parent.node.id&&u(e.parent.get("id"),t),n&&(m.check(n)?e.each(function(e){o(e,t,r)}):h.Function.check(n)?(e.get("params").each(function(e){u(e,t)}),o(e.get("body"),t,r)):h.TypeAlias&&h.TypeAlias.check(n)?l(e.get("id"),r):h.VariableDeclarator.check(n)?(u(e.get("id"),t),o(e.get("init"),t,r)):"ImportSpecifier"===n.type||"ImportNamespaceSpecifier"===n.type||"ImportDefaultSpecifier"===n.type?u(e.get(n.local?"local":n.name?"name":"id"),t):f.check(n)&&!d.check(n)&&c.eachField(n,function(n,i){var s=e.get(n);if(!a(s,i))throw new Error("");o(s,t,r)}))}function a(e,t){return e.value===t||!(!Array.isArray(e.value)||0!==e.value.length||!Array.isArray(t)||0!==t.length)}function o(e,t,r){var i=e.value;if(!i||d.check(i));else if(h.FunctionDeclaration.check(i)&&null!==i.id)u(e.get("id"),t);else if(h.ClassDeclaration&&h.ClassDeclaration.check(i))u(e.get("id"),t);else if(b.check(i)){if(h.CatchClause.check(i)){var a=i.param.name,o=n.call(t,a);s(e.get("body"),t,r),o||delete t[a]}}else s(e,t,r)}function u(e,t){var r=e.value;h.Pattern.assert(r),h.Identifier.check(r)?n.call(t,r.name)?t[r.name].push(e):t[r.name]=[e]:h.ObjectPattern&&h.ObjectPattern.check(r)?e.get("properties").each(function(e){var r=e.value;h.Pattern.check(r)?u(e,t):h.Property.check(r)?u(e.get("value"),t):h.SpreadProperty&&h.SpreadProperty.check(r)&&u(e.get("argument"),t)}):h.ArrayPattern&&h.ArrayPattern.check(r)?e.get("elements").each(function(e){var r=e.value;h.Pattern.check(r)?u(e,t):h.SpreadElement&&h.SpreadElement.check(r)&&u(e.get("argument"),t)}):h.PropertyPattern&&h.PropertyPattern.check(r)?u(e.get("pattern"),t):(h.SpreadElementPattern&&h.SpreadElementPattern.check(r)||h.SpreadPropertyPattern&&h.SpreadPropertyPattern.check(r))&&u(e.get("argument"),t)}function l(e,t){var r=e.value;h.Pattern.assert(r),h.Identifier.check(r)&&(n.call(t,r.name)?t[r.name].push(e):t[r.name]=[e])}var c=t.use(e("./types")),p=c.Type,h=c.namedTypes,f=h.Node,d=h.Expression,m=c.builtInTypes.array,y=c.builders,g=[h.Program,h.Function,h.CatchClause],b=p.or.apply(p,g);r.isEstablishedBy=function(e){return b.check(e)};var v=r.prototype;return v.didScan=!1,v.declares=function(e){return this.scan(),n.call(this.bindings,e)},v.declaresType=function(e){return this.scan(),n.call(this.types,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 r=e+t;return this.bindings[r]=c.builders.identifier(r)},v.injectTemporary=function(e,t){e||(e=this.declareTemporary());var r=this.path.get("body");return h.BlockStatement.check(r.value)&&(r=r.get("body")),r.unshift(y.variableDeclaration("var",[y.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.types),this.didScan=!0}},v.getBindings=function(){return this.scan(),this.bindings},v.getTypes=function(){return this.scan(),this.types},v.lookup=function(e){for(var t=this;t&&!t.declares(e);t=t.parent);return t},v.lookupType=function(e){for(var t=this;t&&!t.declaresType(e);t=t.parent);return t},v.getGlobalScope=function(){for(var e=this;!e.isGlobal;)e=e.parent;return e},r}},{"./node-path":16,"./types":21}],20:[function(e,t,r){t.exports=function(t){var r={},n=t.use(e("../lib/types")),i=n.Type,s=n.builtInTypes,a=s.number;r.geq=function(e){return new i(function(t){return a.check(t)&&t>=e},a+" >= "+e)},r.defaults={null:function(){return null},emptyArray:function(){return[]},false:function(){return!1},true:function(){return!0},undefined:function(){}};var o=i.or(s.string,s.number,s.boolean,s.null,s.undefined);return r.isPrimitive=new i(function(e){if(null===e)return!0;var t=typeof e;return!("object"===t||"function"===t)},o.toString()),r}},{"../lib/types":21}],21:[function(e,t,r){var n=Array.prototype,i=n.slice,s=(n.map,n.forEach,Object.prototype),a=s.toString,o=a.call(function(){}),u=a.call(""),l=s.hasOwnProperty;t.exports=function(){function e(t,r){var n=this;if(!(n instanceof e))throw new Error("Type constructor cannot be invoked without 'new'");if(a.call(t)!==o)throw new Error(t+" is not a function");var i=a.call(r);if(i!==o&&i!==u)throw new Error(r+" is neither a function nor a string");Object.defineProperties(n,{name:{value:r},check:{value:function(e,r){var i=t.call(n,e,r);return!i&&r&&a.call(r)===o&&r(n,e),i}}})}function t(e){return _.check(e)?"{"+Object.keys(e).map(function(t){return t+": "+e[t]}).join(", ")+"}":S.check(e)?"["+e.map(t).join(", ")+"]":JSON.stringify(e)}function r(t,r){var n=a.call(t),i=new e(function(e){return a.call(e)===n},r);return A[r]=i,t&&"function"==typeof t.constructor&&(x.push(t.constructor),E.push(i)),i}function n(t,r){if(t instanceof e)return t;if(t instanceof c)return t.type;if(S.check(t))return e.fromArray(t);if(_.check(t))return e.fromObject(t);if(C.check(t)){var n=x.indexOf(t);return n>=0?E[n]:new e(t,r)}return new e(function(e){return e===t},k.check(r)?function(){return t+""}:r)}function s(e,t,r,i){var a=this;if(!(a instanceof s))throw new Error("Field constructor cannot be invoked without 'new'");D.assert(e),t=n(t);var o={name:{value:e},type:{value:t},hidden:{value:!!i}};C.check(r)&&(o.defaultFn={value:r}),Object.defineProperties(a,o)}function c(t){var r=this;if(!(r instanceof c))throw new Error("Def constructor cannot be invoked without 'new'");Object.defineProperties(r,{typeName:{value:t},baseNames:{value:[]},ownFields:{value:Object.create(null)},allSupertypes:{value:Object.create(null)},supertypeList:{value:[]},allFields:{value:Object.create(null)},fieldNames:{value:[]},type:{value:new e(function(e,t){return r.check(e,t)},t)}})}function p(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 h(e){return e=p(e),e.replace(/(Expression)?$/,"Statement")}function f(e){var t=c.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 d(e,t){var r=c.fromValue(e);if(r){var n=r.allFields[t];if(n)return n.getValue(e)}return e&&e[t]}function m(e){var t=h(e);if(!B[t]){var r=B[p(e)];r&&(B[t]=function(){return B.expressionStatement(r.apply(B,arguments))})}}function y(e,t){t.length=0,t.push(e);for(var r=Object.create(null),n=0;n<t.length;++n){e=t[n];var i=T[e];if(!0!==i.finalized)throw new Error("");l.call(r,e)&&delete t[r[e]],r[e]=n,t.push.apply(t,i.baseNames)}for(var s=0,a=s,o=t.length;a<o;++a)l.call(t,a)&&(t[s++]=t[a]);t.length=s}function g(e,t){return Object.keys(t).forEach(function(r){e[r]=t[r]}),e}var b={},v=e.prototype;b.Type=e,v.assert=function(e,r){if(!this.check(e,r)){var n=t(e);throw new Error(n+" does not match type "+this)}return!0},v.toString=function(){var e=this.name;return D.check(e)?e:C.check(e)?e.call(this)+"":e+" type"};var x=[],E=[],A={};b.builtInTypes=A;var D=r("truthy","string"),C=r(function(){},"function"),S=r([],"array"),_=r({},"object"),w=(r(/./,"RegExp"),r(new Date,"Date"),r(3,"number")),k=(r(!0,"boolean"),r(null,"null"),r(void 0,"undefined"));e.or=function(){for(var t=[],r=arguments.length,i=0;i<r;++i)t.push(n(arguments[i]));return new e(function(e,n){for(var i=0;i<r;++i)if(t[i].check(e,n))return!0;return!1},function(){return t.join(" | ")})},e.fromArray=function(e){if(!S.check(e))throw new Error("");if(1!==e.length)throw new Error("only one element type is permitted for typed arrays");return n(e[0]).arrayOf()},v.arrayOf=function(){var t=this;return new e(function(e,r){return S.check(e)&&e.every(function(e){return t.check(e,r)})},function(){return"["+t+"]"})},e.fromObject=function(t){var r=Object.keys(t).map(function(e){return new s(e,t[e])});return new e(function(e,t){return _.check(e)&&r.every(function(r){return r.type.check(e[r.name],t)})},function(){return"{ "+r.join(", ")+" }"})};var F=s.prototype;F.toString=function(){return JSON.stringify(this.name)+": "+this.type},F.getValue=function(e){var t=e[this.name];return k.check(t)?(this.defaultFn&&(t=this.defaultFn.call(e)),t):t},e.def=function(e){return D.assert(e),l.call(T,e)?T[e]:T[e]=new c(e)};var T=Object.create(null);c.fromValue=function(e){if(e&&"object"==typeof e){var t=e.type;if("string"==typeof t&&l.call(T,t)){var r=T[t];if(r.finalized)return r}}return null};var P=c.prototype;P.isSupertypeOf=function(e){if(e instanceof c){if(!0!==this.finalized||!0!==e.finalized)throw new Error("");return l.call(e.allSupertypes,this.typeName)}throw new Error(e+" is not a Def")},b.getSupertypeNames=function(e){if(!l.call(T,e))throw new Error("");var t=T[e];if(!0!==t.finalized)throw new Error("");return t.supertypeList.slice(1)},b.computeSupertypeLookupTable=function(e){for(var t={},r=Object.keys(T),n=r.length,i=0;i<n;++i){var s=r[i],a=T[s];if(!0!==a.finalized)throw new Error(""+s);for(var o=0;o<a.supertypeList.length;++o){var u=a.supertypeList[o];if(l.call(e,u)){t[s]=u;break}}}return t},P.checkAllFields=function(e,t){function r(r){var i=n[r],s=i.type,a=i.getValue(e);return s.check(a,t)}var n=this.allFields;if(!0!==this.finalized)throw new Error(""+this.typeName);return _.check(e)&&Object.keys(n).every(r)},P.check=function(e,t){if(!0!==this.finalized)throw new Error("prematurely checking unfinalized type "+this.typeName);if(!_.check(e))return!1;var r=c.fromValue(e);return r?t&&r===this?this.checkAllFields(e,t):!!this.isSupertypeOf(r)&&(!t||r.checkAllFields(e,t)&&this.checkAllFields(e,!1)):("SourceLocation"===this.typeName||"Position"===this.typeName)&&this.checkAllFields(e,t)},P.bases=function(){var e=i.call(arguments),t=this.baseNames;if(this.finalized){if(e.length!==t.length)throw new Error("");for(var r=0;r<e.length;r++)if(e[r]!==t[r])throw new Error("");return this}return e.forEach(function(e){D.assert(e),t.indexOf(e)<0&&t.push(e)}),this},Object.defineProperty(P,"buildable",{value:!1});var B={};b.builders=B;var O={};b.defineMethod=function(e,t){var r=O[e];return k.check(t)?delete O[e]:(C.assert(t),Object.defineProperty(O,e,{enumerable:!0,configurable:!0,value:t})),r};var j=D.arrayOf();P.build=function(){var e=this,r=i.call(arguments);return j.assert(r),Object.defineProperty(e,"buildParams",{value:r,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(B,p(e.typeName),{enumerable:!0,value:function(){function r(r,a){if(!l.call(s,r)){var o=e.allFields;if(!l.call(o,r))throw new Error(""+r);var u,c=o[r],p=c.type;if(w.check(a)&&a<i)u=n[a];else{if(!c.defaultFn){var h="no value or default function given for field "+JSON.stringify(r)+" of "+e.typeName+"("+e.buildParams.map(function(e){return o[e]}).join(", ")+")";throw new Error(h)}u=c.defaultFn.call(s)}if(!p.check(u))throw new Error(t(u)+" does not match field "+c+" of type "+e.typeName);s[r]=u}}var n=arguments,i=n.length,s=Object.create(O);if(!e.finalized)throw new Error("attempting to instantiate unfinalized type "+e.typeName);if(e.buildParams.forEach(function(e,t){r(e,t)}),Object.keys(e.allFields).forEach(function(e){r(e)}),s.type!==e.typeName)throw new Error("");return s}}),e)},b.getBuilderName=p,b.getStatementBuilderName=h,P.field=function(e,t,r,n){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,r,n),this)};var N={};return b.namedTypes=N,b.getFieldNames=f,b.getFieldValue=d,b.eachField=function(e,t,r){f(e).forEach(function(r){t.call(this,r,d(e,r))},r)},b.someField=function(e,t,r){return f(e).some(function(r){return t.call(this,r,d(e,r))},r)},Object.defineProperty(P,"finalized",{value:!1}),P.finalize=function(){var e=this;if(!e.finalized){var t=e.allFields,r=e.allSupertypes;e.baseNames.forEach(function(n){var i=T[n];if(!(i instanceof c)){var s="unknown supertype name "+JSON.stringify(n)+" for subtype "+JSON.stringify(e.typeName);throw new Error(s)}i.finalize(),g(t,i.allFields),g(r,i.allSupertypes)}),g(t,e.ownFields),r[e.typeName]=e,e.fieldNames.length=0;for(var n in t)l.call(t,n)&&!t[n].hidden&&e.fieldNames.push(n);Object.defineProperty(N,e.typeName,{enumerable:!0,value:e.type}),Object.defineProperty(e,"finalized",{value:!0}),y(e.typeName,e.supertypeList),e.buildable&&e.supertypeList.lastIndexOf("Expression")>=0&&m(e.typeName)}},b.finalize=function(){Object.keys(T).forEach(function(e){T[e].finalize()})},b}},{}],22:[function(e,t,r){t.exports=e("./fork")([e("./def/core"),e("./def/es6"),e("./def/es7"),e("./def/mozilla"),e("./def/e4x"),e("./def/jsx"),e("./def/flow"),e("./def/esprima"),e("./def/babel"),e("./def/babel6")])},{"./def/babel":4,"./def/babel6":5,"./def/core":6,"./def/e4x":7,"./def/es6":8,"./def/es7":9,"./def/esprima":10,"./def/flow":11,"./def/jsx":12,"./def/mozilla":13,"./fork":14}],23:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return{keyword:e.cyan,capitalized:e.yellow,jsx_tag:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.grey,invalid:e.white.bgRed.bold,gutter:e.grey,marker:e.red.bold}}function s(e){var t=e.slice(-2),r=t[0],n=t[1],i=(0,o.matchToToken)(e);if("name"===i.type){if(c.default.keyword.isReservedWordES6(i.value))return"keyword";if(d.test(i.value)&&("<"===n[r-1]||"</"==n.substr(r-2,2)))return"jsx_tag";if(i.value[0]!==i.value[0].toLowerCase())return"capitalized"}return"punctuator"===i.type&&m.test(i.value)?"bracket":i.type}function a(e,t){return t.replace(u.default,function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=s(r),a=e[i];return a?r[0].split(f).map(function(e){return a(e)}).join("\n"):r[0]})}r.__esModule=!0,r.default=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};r=Math.max(r,0);var s=n.highlightCode&&h.default.supportsColor||n.forceColor,o=h.default;n.forceColor&&(o=new h.default.constructor({enabled:!0}));var u=function(e,t){return s?e(t):t},l=i(o);s&&(e=a(l,e));var c=n.linesAbove||2,p=n.linesBelow||3,d=e.split(f),m=Math.max(t-(c+1),0),y=Math.min(d.length,t+p);t||r||(m=0,y=d.length);var g=String(y).length,b=d.slice(m,y).map(function(e,n){var i=m+1+n,s=(" "+i).slice(-g),a=" "+s+" | ";if(i===t){var o="";if(r){var c=e.slice(0,r-1).replace(/[^\t]/g," ");o=["\n ",u(l.gutter,a.replace(/\d/g," ")),c,u(l.marker,"^")].join("")}return[u(l.marker,">"),u(l.gutter,a),e,o].join("")}return" "+u(l.gutter,a)+e}).join("\n");return s?o.reset(b):b};var o=e("js-tokens"),u=n(o),l=e("esutils"),c=n(l),p=e("chalk"),h=n(p),f=/\r\n|[\n\r\u2028\u2029]/,d=/^[a-z][\w-]*$/i,m=/^[()\[\]{}]$/;t.exports=r.default},{chalk:185,esutils:27,"js-tokens":311}],24:[function(e,t,r){!function(){"use strict";function e(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function r(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function n(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function i(e){return n(e)||null!=e&&"FunctionDeclaration"===e.type}function s(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}function a(e){var t;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;t=e.consequent;do{if("IfStatement"===t.type&&null==t.alternate)return!0;t=s(t)}while(t);return!1}t.exports={isExpression:e,isStatement:n,isIterationStatement:r,isSourceElement:i,isProblematicIfStatement:a,trailingStatement:s}}()},{}],25:[function(e,t,r){!function(){"use strict";function e(e){return 48<=e&&e<=57}function r(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70}function n(e){return e>=48&&e<=55}function i(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&f.indexOf(e)>=0}function s(e){return 10===e||13===e||8232===e||8233===e}function a(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(Math.floor((e-65536)/1024)+55296)+String.fromCharCode((e-65536)%1024+56320)}function o(e){return e<128?d[e]:h.NonAsciiIdentifierStart.test(a(e))}function u(e){return e<128?m[e]:h.NonAsciiIdentifierPart.test(a(e))}function l(e){return e<128?d[e]:p.NonAsciiIdentifierStart.test(a(e))}function c(e){return e<128?m[e]:p.NonAsciiIdentifierPart.test(a(e))}var p,h,f,d,m,y;for(h={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\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\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\u0C59\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\u0D60\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-\u13F4\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\u19C1-\u19C7\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\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},p={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\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\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\u0C59\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\u0D60\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-\u13F4\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\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},f=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],d=new Array(128),y=0;y<128;++y)d[y]=y>=97&&y<=122||y>=65&&y<=90||36===y||95===y;for(m=new Array(128),y=0;y<128;++y)m[y]=y>=97&&y<=122||y>=65&&y<=90||y>=48&&y<=57||36===y||95===y;t.exports={isDecimalDigit:e,isHexDigit:r,isOctalDigit:n,isWhiteSpace:i,isLineTerminator:s,isIdentifierStartES5:o,isIdentifierPartES5:u,isIdentifierStartES6:l,isIdentifierPartES6:c}}()},{}],26:[function(e,t,r){!function(){"use strict";function r(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function n(e,t){return!(!t&&"yield"===e)&&i(e,t)}function i(e,t){if(t&&r(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;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||"yield"===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 s(e,t){return"null"===e||"true"===e||"false"===e||n(e,t)}function a(e,t){return"null"===e||"true"===e||"false"===e||i(e,t)}function o(e){return"eval"===e||"arguments"===e}function u(e){var t,r,n;if(0===e.length)return!1;if(n=e.charCodeAt(0),!f.isIdentifierStartES5(n))return!1
+;for(t=1,r=e.length;t<r;++t)if(n=e.charCodeAt(t),!f.isIdentifierPartES5(n))return!1;return!0}function l(e,t){return 1024*(e-55296)+(t-56320)+65536}function c(e){var t,r,n,i,s;if(0===e.length)return!1;for(s=f.isIdentifierStartES6,t=0,r=e.length;t<r;++t){if(55296<=(n=e.charCodeAt(t))&&n<=56319){if(++t>=r)return!1;if(!(56320<=(i=e.charCodeAt(t))&&i<=57343))return!1;n=l(n,i)}if(!s(n))return!1;s=f.isIdentifierPartES6}return!0}function p(e,t){return u(e)&&!s(e,t)}function h(e,t){return c(e)&&!a(e,t)}var f=e("./code");t.exports={isKeywordES5:n,isKeywordES6:i,isReservedWordES5:s,isReservedWordES6:a,isRestrictedWord:o,isIdentifierNameES5:u,isIdentifierNameES6:c,isIdentifierES5:p,isIdentifierES6:h}}()},{"./code":25}],27:[function(e,t,r){!function(){"use strict";r.ast=e("./ast"),r.code=e("./code"),r.keyword=e("./keyword")}()},{"./ast":24,"./code":25,"./keyword":26}],28:[function(e,t,r){t.exports=e("./lib/api/node.js")},{"./lib/api/node.js":29}],29:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){throw new Error("The ("+e+") Babel 5 plugin is being run with Babel 6.")}function a(e,t,r){"function"==typeof t&&(r=t,t={}),t.filename=e,y.default.readFile(e,function(e,n){var i=void 0;if(!e)try{i=T(n,t)}catch(t){e=t}e?r(e):r(null,i)})}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.filename=e,T(y.default.readFileSync(e,"utf8"),t)}r.__esModule=!0,r.transformFromAst=r.transform=r.analyse=r.Pipeline=r.OptionManager=r.traverse=r.types=r.messages=r.util=r.version=r.resolvePreset=r.resolvePlugin=r.template=r.buildExternalHelpers=r.options=r.File=void 0;var u=e("../transformation/file");Object.defineProperty(r,"File",{enumerable:!0,get:function(){return i(u).default}});var l=e("../transformation/file/options/config");Object.defineProperty(r,"options",{enumerable:!0,get:function(){return i(l).default}});var c=e("../tools/build-external-helpers");Object.defineProperty(r,"buildExternalHelpers",{enumerable:!0,get:function(){return i(c).default}});var p=e("babel-template");Object.defineProperty(r,"template",{enumerable:!0,get:function(){return i(p).default}});var h=e("../helpers/resolve-plugin");Object.defineProperty(r,"resolvePlugin",{enumerable:!0,get:function(){return i(h).default}});var f=e("../helpers/resolve-preset");Object.defineProperty(r,"resolvePreset",{enumerable:!0,get:function(){return i(f).default}});var d=e("../../package");Object.defineProperty(r,"version",{enumerable:!0,get:function(){return d.version}}),r.Plugin=s,r.transformFile=a,r.transformFileSync=o;var m=e("fs"),y=i(m),g=e("../util"),b=n(g),v=e("babel-messages"),x=n(v),E=e("babel-types"),A=n(E),D=e("babel-traverse"),C=i(D),S=e("../transformation/file/options/option-manager"),_=i(S),w=e("../transformation/pipeline"),k=i(w);r.util=b,r.messages=x,r.types=A,r.traverse=C.default,r.OptionManager=_.default,r.Pipeline=k.default;var F=new k.default,T=(r.analyse=F.analyse.bind(F),r.transform=F.transform.bind(F));r.transformFromAst=F.transformFromAst.bind(F)},{"../../package":66,"../helpers/resolve-plugin":35,"../helpers/resolve-preset":36,"../tools/build-external-helpers":39,"../transformation/file":40,"../transformation/file/options/config":44,"../transformation/file/options/option-manager":46,"../transformation/pipeline":51,"../util":54,"babel-messages":103,"babel-template":132,"babel-traverse":136,"babel-types":169,fs:182}],30:[function(e,t,r){"use strict";function n(e){return["babel-plugin-"+e,e]}r.__esModule=!0,r.default=n,t.exports=r.default},{}],31:[function(e,t,r){"use strict";function n(e){var t=["babel-preset-"+e,e],r=e.match(/^(@[^\/]+)\/(.+)$/);if(r){var n=r[1],i=r[2];t.push(n+"/babel-preset-"+i)}return t}r.__esModule=!0,r.default=n,t.exports=r.default},{}],32:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/core-js/get-iterator"),s=n(i);r.default=function(e,t){if(e&&t)return(0,o.default)(e,t,function(e,t){if(t&&Array.isArray(e)){for(var r=t.slice(0),n=e,i=Array.isArray(n),a=0,n=i?n:(0,s.default)(n);;){var o;if(i){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o;r.indexOf(u)<0&&r.push(u)}return r}})};var a=e("lodash/mergeWith"),o=n(a);t.exports=r.default},{"babel-runtime/core-js/get-iterator":113,"lodash/mergeWith":516}],33:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t,r){if(e){if("Program"===e.type)return i.file(e,t||[],r||[]);if("File"===e.type)return e}throw new Error("Not a valid ast?")};var n=e("babel-types"),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n);t.exports=r.default},{"babel-types":169}],34:[function(e,t,r){"use strict";function n(e,t){return e.reduce(function(e,r){return e||(0,s.default)(r,t)},null)}r.__esModule=!0,r.default=n;var i=e("./resolve"),s=function(e){return e&&e.__esModule?e:{default:e}}(i);t.exports=r.default},{"./resolve":37}],35:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();return(0,o.default)((0,l.default)(e),t)}r.__esModule=!0,r.default=s;var a=e("./resolve-from-possible-names"),o=i(a),u=e("./get-possible-plugin-names"),l=i(u);t.exports=r.default}).call(this,e("_process"))},{"./get-possible-plugin-names":30,"./resolve-from-possible-names":34,_process:539}],36:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();return(0,o.default)((0,l.default)(e),t)}r.__esModule=!0,r.default=s;var a=e("./resolve-from-possible-names"),o=i(a),u=e("./get-possible-preset-names"),l=i(u);t.exports=r.default}).call(this,e("_process"))},{"./get-possible-preset-names":31,"./resolve-from-possible-names":34,_process:539}],37:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=e("babel-runtime/helpers/typeof"),a=i(s);r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();if("object"===(void 0===u.default?"undefined":(0,a.default)(u.default)))return null;var r=p[t];if(!r){r=new u.default;var i=c.default.join(t,".babelrc");r.id=i,r.filename=i,r.paths=u.default._nodeModulePaths(t),p[t]=r}try{return u.default._resolveFilename(e,r)}catch(e){return null}};var o=e("module"),u=i(o),l=e("path"),c=i(l),p={};t.exports=r.default}).call(this,e("_process"))},{_process:539,"babel-runtime/helpers/typeof":131,module:182,path:535}],38:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/core-js/map"),s=n(i),a=e("babel-runtime/helpers/classCallCheck"),o=n(a),u=e("babel-runtime/helpers/possibleConstructorReturn"),l=n(u),c=e("babel-runtime/helpers/inherits"),p=n(c),h=function(e){function t(){(0,o.default)(this,t);var r=(0,l.default)(this,e.call(this));return r.dynamicData={},r}return(0,p.default)(t,e),t.prototype.setDynamic=function(e,t){this.dynamicData[e]=t},t.prototype.get=function(t){if(this.has(t))return e.prototype.get.call(this,t);if(Object.prototype.hasOwnProperty.call(this.dynamicData,t)){var r=this.dynamicData[t]();return this.set(t,r),r}},t}(s.default);r.default=h,t.exports=r.default},{"babel-runtime/core-js/map":115,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/inherits":128,"babel-runtime/helpers/possibleConstructorReturn":130}],39:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e,t){var r=[],n=b.functionExpression(null,[b.identifier("global")],b.blockStatement(r)),i=b.program([b.expressionStatement(b.callExpression(n,[c.get("selfGlobal")]))]);return r.push(b.variableDeclaration("var",[b.variableDeclarator(e,b.assignmentExpression("=",b.memberExpression(b.identifier("global"),e),b.objectExpression([])))])),t(r),i}function a(e,t){var r=[];return r.push(b.variableDeclaration("var",[b.variableDeclarator(e,b.identifier("global"))])),t(r),b.program([v({FACTORY_PARAMETERS:b.identifier("global"),BROWSER_ARGUMENTS:b.assignmentExpression("=",b.memberExpression(b.identifier("root"),e),b.objectExpression([])),COMMON_ARGUMENTS:b.identifier("exports"),AMD_ARGUMENTS:b.arrayExpression([b.stringLiteral("exports")]),FACTORY_BODY:r,UMD_ROOT:b.identifier("this")})])}function o(e,t){var r=[];return r.push(b.variableDeclaration("var",[b.variableDeclarator(e,b.objectExpression([]))])),t(r),r.push(b.expressionStatement(e)),b.program(r)}function u(e,t,r){c.list.forEach(function(n){if(!(r&&r.indexOf(n)<0)){var i=b.identifier(n);e.push(b.expressionStatement(b.assignmentExpression("=",b.memberExpression(t,i),c.get(n))))}})}r.__esModule=!0,r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global",r=b.identifier("babelHelpers"),n=function(t){return u(t,r,e)},i=void 0,l={global:s,umd:a,var:o}[t];if(!l)throw new Error(d.get("unsupportedOutputType",t));return i=l(r,n),(0,h.default)(i).code};var l=e("babel-helpers"),c=i(l),p=e("babel-generator"),h=n(p),f=e("babel-messages"),d=i(f),m=e("babel-template"),y=n(m),g=e("babel-types"),b=i(g),v=(0,y.default)('\n (function (root, factory) {\n if (typeof define === "function" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === "object") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n');t.exports=r.default},{"babel-generator":78,"babel-helpers":102,"babel-messages":103,"babel-template":132,"babel-types":169}],40:[function(e,t,r){(function(t){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0,r.File=void 0;var s=e("babel-runtime/core-js/get-iterator"),a=i(s),o=e("babel-runtime/core-js/object/create"),u=i(o),l=e("babel-runtime/core-js/object/assign"),c=i(l),p=e("babel-runtime/helpers/classCallCheck"),h=i(p),f=e("babel-runtime/helpers/possibleConstructorReturn"),d=i(f),m=e("babel-runtime/helpers/inherits"),y=i(m),g=e("babel-helpers"),b=i(g),v=e("./metadata"),x=n(v),E=e("convert-source-map"),A=i(E),D=e("./options/option-manager"),C=i(D),S=e("../plugin-pass"),_=i(S),w=e("babel-traverse"),k=i(w),F=e("source-map"),T=i(F),P=e("babel-generator"),B=i(P),O=e("babel-code-frame"),j=i(O),N=e("lodash/defaults"),I=i(N),L=e("./logger"),M=i(L),R=e("../../store"),U=i(R),V=e("babylon"),q=e("../../util"),G=n(q),X=e("path"),J=i(X),W=e("babel-types"),K=n(W),z=e("../../helpers/resolve"),Y=i(z),H=e("../internal-plugins/block-hoist"),$=i(H),Q=e("../internal-plugins/shadow-functions"),Z=i(Q),ee=/^#!.*/,te=[[$.default],[Z.default]],re={enter:function(e,t){var r=e.node.loc;r&&(t.loc=r,e.stop())}},ne=function(r){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];(0,h.default)(this,n);var i=(0,d.default)(this,r.call(this));return i.pipeline=t,i.log=new M.default(i,e.filename||"unknown"),i.opts=i.initOptions(e),i.parserOpts={sourceType:i.opts.sourceType,sourceFileName:i.opts.filename,plugins:[]},i.pluginVisitors=[],i.pluginPasses=[],i.buildPluginsForOptions(i.opts),i.opts.passPerPreset&&(i.perPresetOpts=[],i.opts.presets.forEach(function(e){var t=(0,c.default)((0,u.default)(i.opts),e);i.perPresetOpts.push(t),i.buildPluginsForOptions(t)})),i.metadata={usedHelpers:[],marked:[],modules:{imports:[],exports:{exported:[],specifiers:[]}}},i.dynamicImportTypes={},i.dynamicImportIds={},i.dynamicImports=[],i.declarations={},i.usedHelpers={},i.path=null,i.ast={},i.code="",i.shebang="",i.hub=new w.Hub(i),i}return(0,y.default)(n,r),n.prototype.getMetadata=function(){for(var e=!1,t=this.ast.program.body,r=Array.isArray(t),n=0,t=r?t:(0,a.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;if(K.isModuleDeclaration(s)){e=!0;break}}e&&this.path.traverse(x,this)},n.prototype.initOptions=function(e){e=new C.default(this.log,this.pipeline).init(e),e.inputSourceMap&&(e.sourceMaps=!0),e.moduleId&&(e.moduleIds=!0),e.basename=J.default.basename(e.filename,J.default.extname(e.filename)),e.ignore=G.arrayify(e.ignore,G.regexify),e.only&&(e.only=G.arrayify(e.only,G.regexify)),(0,I.default)(e,{moduleRoot:e.sourceRoot}),(0,I.default)(e,{sourceRoot:e.moduleRoot}),(0,I.default)(e,{filenameRelative:e.filename});var t=J.default.basename(e.filenameRelative);return(0,I.default)(e,{sourceFileName:t,sourceMapTarget:t}),e},n.prototype.buildPluginsForOptions=function(e){if(Array.isArray(e.plugins)){for(var t=e.plugins.concat(te),r=[],n=[],i=t,s=Array.isArray(i),o=0,i=s?i:(0,a.default)(i);;){var u;if(s){if(o>=i.length)break;u=i[o++]}else{if(o=i.next(),o.done)break;u=o.value}var l=u,c=l[0],p=l[1];r.push(c.visitor),n.push(new _.default(this,c,p)),c.manipulateOptions&&c.manipulateOptions(e,this.parserOpts,this)}this.pluginVisitors.push(r),this.pluginPasses.push(n)}},n.prototype.getModuleName=function(){var e=this.opts;if(!e.moduleIds)return null;if(null!=e.moduleId&&!e.getModuleId)return e.moduleId;var t=e.filenameRelative,r="";if(null!=e.moduleRoot&&(r=e.moduleRoot+"/"),!e.filenameRelative)return r+e.filename.replace(/^\//,"");if(null!=e.sourceRoot){var n=new RegExp("^"+e.sourceRoot+"/?");t=t.replace(n,"")}return t=t.replace(/\.(\w*?)$/,""),r+=t,r=r.replace(/\\/g,"/"),e.getModuleId?e.getModuleId(r)||r:r},n.prototype.resolveModuleSource=function(e){var t=this.opts.resolveModuleSource;return t&&(e=t(e,this.opts.filename)),e},n.prototype.addImport=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,n=e+":"+t,i=this.dynamicImportIds[n];if(!i){e=this.resolveModuleSource(e),i=this.dynamicImportIds[n]=this.scope.generateUidIdentifier(r);var s=[];"*"===t?s.push(K.importNamespaceSpecifier(i)):"default"===t?s.push(K.importDefaultSpecifier(i)):s.push(K.importSpecifier(i,K.identifier(t)));var a=K.importDeclaration(s,K.stringLiteral(e));a._blockHoist=3,this.path.unshiftContainer("body",a)}return i},n.prototype.addHelper=function(e){var t=this.declarations[e];if(t)return t;this.usedHelpers[e]||(this.metadata.usedHelpers.push(e),this.usedHelpers[e]=!0);var r=this.get("helperGenerator"),n=this.get("helpersNamespace");if(r){var i=r(e);if(i)return i}else if(n)return K.memberExpression(n,K.identifier(e));var s=(0,b.default)(e),a=this.declarations[e]=this.scope.generateUidIdentifier(e);return K.isFunctionExpression(s)&&!s.id?(s.body._compact=!0,s._generated=!0,s.id=a,s.type="FunctionDeclaration",this.path.unshiftContainer("body",s)):(s._compact=!0,this.scope.push({id:a,init:s,unique:!0})),a},n.prototype.addTemplateObject=function(e,t,r){var n=r.elements.map(function(e){return e.value}),i=e+"_"+r.elements.length+"_"+n.join(","),s=this.declarations[i];if(s)return s;var a=this.declarations[i]=this.scope.generateUidIdentifier("templateObject"),o=this.addHelper(e),u=K.callExpression(o,[t,r]);return u._compact=!0,this.scope.push({id:a,init:u,_blockHoist:1.9}),a},n.prototype.buildCodeFrameError=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:SyntaxError,n=e&&(e.loc||e._loc),i=new r(t);return n?i.loc=n.start:((0,k.default)(e,re,this.scope,i),i.message+=" (This is an error on an internal node. Probably an internal error",i.loc&&(i.message+=". Location has been estimated."),i.message+=")"),i},n.prototype.mergeSourceMap=function(e){var t=this.opts.inputSourceMap;if(t){var r=new T.default.SourceMapConsumer(t),n=new T.default.SourceMapConsumer(e),i=new T.default.SourceMapGenerator({file:r.file,sourceRoot:r.sourceRoot}),s=n.sources[0];r.eachMapping(function(e){var t=n.generatedPositionFor({line:e.generatedLine,column:e.generatedColumn,source:s});null!=t.column&&i.addMapping({source:e.source,original:null==e.source?null:{line:e.originalLine,column:e.originalColumn},generated:t})});var a=i.toJSON();return t.mappings=a.mappings,t}return e},n.prototype.parse=function(r){var n=V.parse,i=this.opts.parserOpts;if(i&&(i=(0,c.default)({},this.parserOpts,i),i.parser)){if("string"==typeof i.parser){var s=J.default.dirname(this.opts.filename)||t.cwd(),a=(0,Y.default)(i.parser,s);if(!a)throw new Error("Couldn't find parser "+i.parser+' with "parse" method relative to directory '+s);n=e(a).parse}else n=i.parser;i.parser={parse:function(e){return(0,V.parse)(e,i)}}}this.log.debug("Parse start");var o=n(r,i||this.parserOpts);return this.log.debug("Parse stop"),o},n.prototype._addAst=function(e){this.path=w.NodePath.get({hub:this.hub,parentPath:null,parent:e,container:e,key:"program"}).setContext(),this.scope=this.path.scope,this.ast=e,this.getMetadata()},n.prototype.addAst=function(e){this.log.debug("Start set AST"),this._addAst(e),this.log.debug("End set AST")},n.prototype.transform=function(){for(var e=0;e<this.pluginPasses.length;e++){var t=this.pluginPasses[e];this.call("pre",t),this.log.debug("Start transform traverse");var r=k.default.visitors.merge(this.pluginVisitors[e],t,this.opts.wrapPluginVisitorMethod);(0,k.default)(this.ast,r,this.scope),this.log.debug("End transform traverse"),this.call("post",t)}return this.generate()},n.prototype.wrap=function(e,r){e+="";try{return this.shouldIgnore()?this.makeResult({code:e,ignored:!0}):r()}catch(r){if(r._babel)throw r;r._babel=!0;var n=r.message=this.opts.filename+": "+r.message,i=r.loc;if(i&&(r.codeFrame=(0,j.default)(e,i.line,i.column+1,this.opts),n+="\n"+r.codeFrame),t.browser&&(r.message=n),r.stack){var s=r.stack.replace(r.message,n);r.stack=s}throw r}},n.prototype.addCode=function(e){e=(e||"")+"",e=this.parseInputSourceMap(e),this.code=e},n.prototype.parseCode=function(){this.parseShebang();var e=this.parse(this.code);this.addAst(e)},n.prototype.shouldIgnore=function(){var e=this.opts;return G.shouldIgnore(e.filename,e.ignore,e.only)},n.prototype.call=function(e,t){for(var r=t,n=Array.isArray(r),i=0,r=n?r:(0,a.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var o=s,u=o.plugin,l=u[e];l&&l.call(o,this)}},n.prototype.parseInputSourceMap=function(e){var t=this.opts;if(!1!==t.inputSourceMap){var r=A.default.fromSource(e);r&&(t.inputSourceMap=r.toObject(),e=A.default.removeComments(e))}return e},n.prototype.parseShebang=function(){var e=ee.exec(this.code);e&&(this.shebang=e[0],this.code=this.code.replace(ee,""))},n.prototype.makeResult=function(e){var t=e.code,r=e.map,n=e.ast,i=e.ignored,s={metadata:null,options:this.opts,ignored:!!i,code:null,ast:null,map:r||null};return this.opts.code&&(s.code=t),this.opts.ast&&(s.ast=n),this.opts.metadata&&(s.metadata=this.metadata),s},n.prototype.generate=function(){var r=this.opts,n=this.ast,i={ast:n};if(!r.code)return this.makeResult(i);var s=B.default;if(r.generatorOpts.generator&&"string"==typeof(s=r.generatorOpts.generator)){var a=J.default.dirname(this.opts.filename)||t.cwd(),o=(0,Y.default)(s,a);if(!o)throw new Error("Couldn't find generator "+s+' with "print" method relative to directory '+a);s=e(o).print}this.log.debug("Generation start");var u=s(n,r.generatorOpts?(0,c.default)(r,r.generatorOpts):r,this.code);return i.code=u.code,i.map=u.map,this.log.debug("Generation end"),this.shebang&&(i.code=this.shebang+"\n"+i.code),i.map&&(i.map=this.mergeSourceMap(i.map)),"inline"!==r.sourceMaps&&"both"!==r.sourceMaps||(i.code+="\n"+A.default.fromObject(i.map).toComment()),"inline"===r.sourceMaps&&(i.map=null),this.makeResult(i)},n}(U.default);r.default=ne,r.File=ne}).call(this,e("_process"))},{"../../helpers/resolve":37,"../../store":38,"../../util":54,"../internal-plugins/block-hoist":49,"../internal-plugins/shadow-functions":50,"../plugin-pass":52,"./logger":41,"./metadata":42,"./options/option-manager":46,_process:539,"babel-code-frame":23,"babel-generator":78,"babel-helpers":102,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/object/assign":117,"babel-runtime/core-js/object/create":118,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/inherits":128,"babel-runtime/helpers/possibleConstructorReturn":130,"babel-traverse":136,"babel-types":169,babylon:177,"convert-source-map":187,"lodash/defaults":484,path:535,"source-map":65}],41:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/helpers/classCallCheck"),s=n(i),a=e("debug/node"),o=n(a),u=(0,o.default)("babel:verbose"),l=(0,o.default)("babel"),c=[],p=function(){function e(t,r){(0,s.default)(this,e),this.filename=r,this.file=t}return e.prototype._buildMessage=function(e){var t="[BABEL] "+this.filename;return e&&(t+=": "+e),t},e.prototype.warn=function(e){console.warn(this._buildMessage(e))},e.prototype.error=function(e){throw new(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Error)(this._buildMessage(e))},e.prototype.deprecate=function(e){this.file.opts&&this.file.opts.suppressDeprecationMessages||(e=this._buildMessage(e),c.indexOf(e)>=0||(c.push(e),console.error(e)))},e.prototype.verbose=function(e){u.enabled&&u(this._buildMessage(e))},e.prototype.debug=function(e){l.enabled&&l(this._buildMessage(e))},e.prototype.deopt=function(e,t){this.debug(t)},e}();r.default=p,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":127,"debug/node":295}],42:[function(e,t,r){"use strict";function n(e,t){var r=e.node,n=r.source?r.source.value:null,i=t.metadata.modules.exports,s=e.get("declaration");if(s.isStatement()){var o=s.getBindingIdentifiers();for(var l in o)i.exported.push(l),i.specifiers.push({kind:"local",local:l,exported:e.isExportDefaultDeclaration()?"default":l})}if(e.isExportNamedDeclaration()&&r.specifiers)for(var c=r.specifiers,p=Array.isArray(c),h=0,c=p?c:(0,a.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if(h=c.next(),h.done)break;f=h.value}var d=f,m=d.exported.name;i.exported.push(m),u.isExportDefaultSpecifier(d)&&i.specifiers.push({kind:"external",local:m,exported:m,source:n}),u.isExportNamespaceSpecifier(d)&&i.specifiers.push({kind:"external-namespace",exported:m,source:n});var y=d.local;y&&(n&&i.specifiers.push({kind:"external",local:y.name,exported:m,source:n}),n||i.specifiers.push({kind:"local",local:y.name,exported:m}))}e.isExportAllDeclaration()&&i.specifiers.push({kind:"external-all",source:n})}function i(e){e.skip()}r.__esModule=!0,r.ImportDeclaration=r.ModuleDeclaration=void 0;var s=e("babel-runtime/core-js/get-iterator"),a=function(e){return e&&e.__esModule?e:{default:e}}(s);r.ExportDeclaration=n,r.Scope=i;var o=e("babel-types"),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(o);r.ModuleDeclaration={enter:function(e,t){var r=e.node;r.source&&(r.source.value=t.resolveModuleSource(r.source.value))}},r.ImportDeclaration={exit:function(e,t){var r=e.node,n=[],i=[];t.metadata.modules.imports.push({source:r.source.value,imported:i,specifiers:n});for(var s=e.get("specifiers"),o=Array.isArray(s),u=0,s=o?s:(0,a.default)(s);;){var l;if(o){if(u>=s.length)break;l=s[u++]}else{if(u=s.next(),u.done)break;l=u.value}var c=l,p=c.node.local.name;if(c.isImportDefaultSpecifier()&&(i.push("default"),n.push({kind:"named",imported:"default",local:p})),c.isImportSpecifier()){var h=c.node.imported.name;i.push(h),n.push({kind:"named",imported:h,local:p})}c.isImportNamespaceSpecifier()&&(i.push("*"),n.push({kind:"namespace",local:p}))}}}},{"babel-runtime/core-js/get-iterator":113,"babel-types":169}],43:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=E[e];return null==t?E[e]=x.default.existsSync(e):t}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],r=e.filename,n=new D(t);return!1!==e.babelrc&&n.findConfigs(r),n.mergeConfig({options:e,alias:"base",dirname:r&&b.default.dirname(r)}),n.configs}r.__esModule=!0;var o=e("babel-runtime/core-js/object/assign"),u=i(o),l=e("babel-runtime/helpers/classCallCheck"),c=i(l);r.default=a;var p=e("../../../helpers/resolve"),h=i(p),f=e("json5"),d=i(f),m=e("path-is-absolute"),y=i(m),g=e("path"),b=i(g),v=e("fs"),x=i(v),E={},A={},D=function(){function e(t){(0,c.default)(this,e),this.resolvedConfigs=[],this.configs=[],this.log=t}return e.prototype.findConfigs=function(e){if(e){(0,y.default)(e)||(e=b.default.join(n.cwd(),e));for(var t=!1,r=!1;e!==(e=b.default.dirname(e));){if(!t){var i=b.default.join(e,".babelrc");s(i)&&(this.addConfig(i),t=!0);var a=b.default.join(e,"package.json");!t&&s(a)&&(t=this.addConfig(a,"babel",JSON))}if(!r){var o=b.default.join(e,".babelignore");s(o)&&(this.addIgnoreConfig(o),r=!0)}if(r&&t)return}}},e.prototype.addIgnoreConfig=function(e){var t=x.default.readFileSync(e,"utf8"),r=t.split("\n");r=r.map(function(e){return e.replace(/#(.*?)$/,"").trim()}).filter(function(e){return!!e}),r.length&&this.mergeConfig({options:{ignore:r},alias:e,dirname:b.default.dirname(e)})},e.prototype.addConfig=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d.default;if(this.resolvedConfigs.indexOf(e)>=0)return!1;this.resolvedConfigs.push(e);var n=x.default.readFileSync(e,"utf8"),i=void 0;try{i=A[n]=A[n]||r.parse(n),t&&(i=i[t])}catch(t){throw t.message=e+": Error while parsing JSON - "+t.message,t}return this.mergeConfig({options:i,alias:e,dirname:b.default.dirname(e)}),!!i},e.prototype.mergeConfig=function(e){var t=e.options,r=e.alias,i=e.loc,s=e.dirname;if(!t)return!1;if(t=(0,u.default)({},t),s=s||n.cwd(),i=i||r,t.extends){var a=(0,h.default)(t.extends,s);a?this.addConfig(a):this.log&&this.log.error("Couldn't resolve extends clause of "+t.extends+" in "+r),delete t.extends}this.configs.push({options:t,alias:r,loc:i,dirname:s});var o=void 0,l=n.env.BABEL_ENV||n.env.NODE_ENV||"development";t.env&&(o=t.env[l],delete t.env),this.mergeConfig({options:o,alias:r+".env."+l,dirname:s})},e}();t.exports=r.default}).call(this,e("_process"))},{"../../../helpers/resolve":37,_process:539,"babel-runtime/core-js/object/assign":117,"babel-runtime/helpers/classCallCheck":127,fs:182,json5:313,path:535,"path-is-absolute":536}],44:[function(e,t,r){"use strict";t.exports={filename:{type:"filename",description:"filename to use when reading from stdin - this will be used in source-maps, errors etc",default:"unknown",shorthand:"f"},filenameRelative:{hidden:!0,type:"string"},inputSourceMap:{hidden:!0},env:{hidden:!0,default:{}},mode:{description:"",hidden:!0},retainLines:{type:"boolean",default:!1,description:"retain line numbers - will result in really ugly code"},highlightCode:{description:"enable/disable ANSI syntax highlighting of code frames (on by default)",type:"boolean",default:!0},suppressDeprecationMessages:{type:"boolean",default:!1,hidden:!0},presets:{type:"list",description:"",default:[]},plugins:{type:"list",default:[],description:""},ignore:{type:"list",description:"list of glob paths to **not** compile",default:[]},only:{type:"list",description:"list of glob paths to **only** compile"},code:{hidden:!0,default:!0,type:"boolean"},metadata:{hidden:!0,default:!0,type:"boolean"},ast:{hidden:!0,default:!0,type:"boolean"},extends:{type:"string",hidden:!0},comments:{type:"boolean",default:!0,description:"write comments to generated output (true by default)"},shouldPrintComment:{hidden:!0,description:"optional callback to control whether a comment should be inserted, when this is used the comments option is ignored"},wrapPluginVisitorMethod:{hidden:!0,description:"optional callback to wrap all visitor methods"},compact:{type:"booleanString",default:"auto",description:"do not include superfluous whitespace characters and line terminators [true|false|auto]"},minified:{type:"boolean",default:!1,description:"save as much bytes when printing [true|false]"},sourceMap:{alias:"sourceMaps",hidden:!0},sourceMaps:{type:"booleanString",description:"[true|false|inline]",default:!1,shorthand:"s"},sourceMapTarget:{type:"string",description:"set `file` on returned source map"},sourceFileName:{type:"string",description:"set `sources[0]` on returned source map"},sourceRoot:{type:"filename",description:"the root from which all sources are relative"},babelrc:{description:"Whether or not to look up .babelrc and .babelignore files",type:"boolean",default:!0},sourceType:{description:"",default:"module"},auxiliaryCommentBefore:{type:"string",description:"print a comment before any injected non-user code"},auxiliaryCommentAfter:{type:"string",description:"print a comment after any injected non-user code"},resolveModuleSource:{hidden:!0},getModuleId:{hidden:!0},moduleRoot:{type:"filename",description:"optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"},moduleIds:{type:"boolean",default:!1,shorthand:"M",description:"insert an explicit id for modules"},moduleId:{description:"specify a custom name for module ids",type:"string"},passPerPreset:{description:"Whether to spawn a traversal pass per a preset. By default all presets are merged.",type:"boolean",default:!1,hidden:!0},parserOpts:{description:"Options to pass into the parser, or to change parsers (parserOpts.parser)",default:!1},generatorOpts:{description:"Options to pass into the generator, or to change generators (generatorOpts.generator)",default:!1}}},{}],45:[function(e,t,r){"use strict";function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e){var r=e[t];if(null!=r){var n=o.default[t];if(n&&n.alias&&(n=o.default[n.alias]),n){var i=s[n.type];i&&(r=i(r)),e[t]=r}}}return e}r.__esModule=!0,r.config=void 0,r.normaliseOptions=n;var i=e("./parsers"),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(i),a=e("./config"),o=function(e){return e&&e.__esModule?e:{default:e}}(a);r.config=o.default},{"./config":44,"./parsers":47}],46:[function(e,t,r){(function(n){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var a=e("babel-runtime/helpers/objectWithoutProperties"),o=s(a),u=e("babel-runtime/core-js/json/stringify"),l=s(u),c=e("babel-runtime/core-js/object/assign"),p=s(c),h=e("babel-runtime/core-js/get-iterator"),f=s(h),d=e("babel-runtime/helpers/typeof"),m=s(d),y=e("babel-runtime/helpers/classCallCheck"),g=s(y),b=e("../../../api/node"),v=i(b),x=e("../../plugin"),E=s(x),A=e("babel-messages"),D=i(A),C=e("./index"),S=e("../../../helpers/resolve-plugin"),_=s(S),w=e("../../../helpers/resolve-preset"),k=s(w),F=e("lodash/cloneDeepWith"),T=s(F),P=e("lodash/clone"),B=s(P),O=e("../../../helpers/merge"),j=s(O),N=e("./config"),I=s(N),L=e("./removed"),M=s(L),R=e("./build-config-chain"),U=s(R),V=e("path"),q=s(V),G=function(){function t(e){(0,g.default)(this,t),this.resolvedConfigs=[],this.options=t.createBareOptions(),this.log=e}return t.memoisePluginContainer=function(e,r,n,i){for(var s=t.memoisedPlugins,a=Array.isArray(s),o=0,s=a?s:(0,f.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u;if(l.container===e)return l.plugin}var c=void 0;if(c="function"==typeof e?e(v):e,"object"===(void 0===c?"undefined":(0,m.default)(c))){var p=new E.default(c,i);return t.memoisedPlugins.push({container:e,plugin:p}),p}throw new TypeError(D.get("pluginNotObject",r,n,void 0===c?"undefined":(0,m.default)(c))+r+n)},t.createBareOptions=function(){var e={};for(var t in I.default){
+var r=I.default[t];e[t]=(0,B.default)(r.default)}return e},t.normalisePlugin=function(e,r,n,i){if(!((e=e.__esModule?e.default:e)instanceof E.default)){if("function"!=typeof e&&"object"!==(void 0===e?"undefined":(0,m.default)(e)))throw new TypeError(D.get("pluginNotFunction",r,n,void 0===e?"undefined":(0,m.default)(e)));e=t.memoisePluginContainer(e,r,n,i)}return e.init(r,n),e},t.normalisePlugins=function(r,n,i){return i.map(function(i,s){var a=void 0,o=void 0;if(!i)throw new TypeError("Falsy value found in plugins");Array.isArray(i)?(a=i[0],o=i[1]):a=i;var u="string"==typeof a?a:r+"$"+s;if("string"==typeof a){var l=(0,_.default)(a,n);if(!l)throw new ReferenceError(D.get("pluginUnknown",a,r,s,n));a=e(l)}return a=t.normalisePlugin(a,r,s,u),[a,o]})},t.prototype.mergeOptions=function(e){var r=this,i=e.options,s=e.extending,a=e.alias,o=e.loc,u=e.dirname;if(a=a||"foreign",i){("object"!==(void 0===i?"undefined":(0,m.default)(i))||Array.isArray(i))&&this.log.error("Invalid options type for "+a,TypeError);var l=(0,T.default)(i,function(e){if(e instanceof E.default)return e});u=u||n.cwd(),o=o||a;for(var c in l){if(!I.default[c]&&this.log)if(M.default[c])this.log.error("Using removed Babel 5 option: "+a+"."+c+" - "+M.default[c].message,ReferenceError);else{var h="Unknown option: "+a+"."+c+". Check out http://babeljs.io/docs/usage/options/ for more information about options.";this.log.error(h+"\n\nA common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:\n\nInvalid:\n `{ presets: [{option: value}] }`\nValid:\n `{ presets: [['presetName', {option: value}]] }`\n\nFor more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets-options.",ReferenceError)}}(0,C.normaliseOptions)(l),l.plugins&&(l.plugins=t.normalisePlugins(o,u,l.plugins)),l.presets&&(l.passPerPreset?l.presets=this.resolvePresets(l.presets,u,function(e,t){r.mergeOptions({options:e,extending:e,alias:t,loc:t,dirname:u})}):(this.mergePresets(l.presets,u),delete l.presets)),i===s?(0,p.default)(s,l):(0,j.default)(s||this.options,l)}},t.prototype.mergePresets=function(e,t){var r=this;this.resolvePresets(e,t,function(e,t){r.mergeOptions({options:e,alias:t,loc:t,dirname:q.default.dirname(t||"")})})},t.prototype.resolvePresets=function(t,r,n){return t.map(function(t){var i=void 0;if(Array.isArray(t)){if(t.length>2)throw new Error("Unexpected extra options "+(0,l.default)(t.slice(2))+" passed to preset.");var s=t;t=s[0],i=s[1]}var a=void 0;try{if("string"==typeof t){if(!(a=(0,k.default)(t,r)))throw new Error("Couldn't find preset "+(0,l.default)(t)+" relative to directory "+(0,l.default)(r));t=e(a)}if("object"===(void 0===t?"undefined":(0,m.default)(t))&&t.__esModule)if(t.default)t=t.default;else{var u=t,c=(u.__esModule,(0,o.default)(u,["__esModule"]));t=c}if("object"===(void 0===t?"undefined":(0,m.default)(t))&&t.buildPreset&&(t=t.buildPreset),"function"!=typeof t&&void 0!==i)throw new Error("Options "+(0,l.default)(i)+" passed to "+(a||"a preset")+" which does not accept options.");if("function"==typeof t&&(t=t(v,i,{dirname:r})),"object"!==(void 0===t?"undefined":(0,m.default)(t)))throw new Error("Unsupported preset format: "+t+".");n&&n(t,a)}catch(e){throw a&&(e.message+=" (While processing preset: "+(0,l.default)(a)+")"),e}return t})},t.prototype.normaliseOptions=function(){var e=this.options;for(var t in I.default){var r=I.default[t],n=e[t];!n&&r.optional||(r.alias?e[r.alias]=e[r.alias]||n:e[t]=n)}},t.prototype.init=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,U.default)(e,this.log),r=Array.isArray(t),n=0,t=r?t:(0,f.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;this.mergeOptions(s)}return this.normaliseOptions(e),this.options},t}();r.default=G,G.memoisedPlugins=[],t.exports=r.default}).call(this,e("_process"))},{"../../../api/node":29,"../../../helpers/merge":32,"../../../helpers/resolve-plugin":35,"../../../helpers/resolve-preset":36,"../../plugin":53,"./build-config-chain":43,"./config":44,"./index":45,"./removed":48,_process:539,"babel-messages":103,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/json/stringify":114,"babel-runtime/core-js/object/assign":117,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/objectWithoutProperties":129,"babel-runtime/helpers/typeof":131,"lodash/clone":480,"lodash/cloneDeepWith":482,path:535}],47:[function(e,t,r){"use strict";function n(e){return!!e}function i(e){return l.booleanify(e)}function s(e){return l.list(e)}r.__esModule=!0,r.filename=void 0,r.boolean=n,r.booleanString=i,r.list=s;var a=e("slash"),o=function(e){return e&&e.__esModule?e:{default:e}}(a),u=e("../../../util"),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(u);r.filename=o.default},{"../../../util":54,slash:589}],48:[function(e,t,r){"use strict";t.exports={auxiliaryComment:{message:"Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"},blacklist:{message:"Put the specific transforms you want in the `plugins` option"},breakConfig:{message:"This is not a necessary option in Babel 6"},experimental:{message:"Put the specific transforms you want in the `plugins` option"},externalHelpers:{message:"Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/"},extra:{message:""},jsxPragma:{message:"use the `pragma` option in the `react-jsx` plugin . Check out http://babeljs.io/docs/plugins/transform-react-jsx/"},loose:{message:"Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option."},metadataUsedHelpers:{message:"Not required anymore as this is enabled by default"},modules:{message:"Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules"},nonStandard:{message:"Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. Also check out the react preset http://babeljs.io/docs/plugins/preset-react/"},optional:{message:"Put the specific transforms you want in the `plugins` option"},sourceMapName:{message:"Use the `sourceMapTarget` option"},stage:{message:"Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"},whitelist:{message:"Put the specific transforms you want in the `plugins` option"}}},{}],49:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("../plugin"),s=n(i),a=e("lodash/sortBy"),o=n(a);r.default=new s.default({name:"internal.blockHoist",visitor:{Block:{exit:function(e){for(var t=e.node,r=!1,n=0;n<t.body.length;n++){var i=t.body[n];if(i&&null!=i._blockHoist){r=!0;break}}r&&(t.body=(0,o.default)(t.body,function(e){var t=e&&e._blockHoist;return null==t&&(t=1),!0===t&&(t=2),-1*t}))}}}}),t.exports=r.default},{"../plugin":53,"lodash/sortBy":520}],50:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return!!e.is("_forceShadow")||t}function s(e,t){var r=e.inShadow(t);if(i(e,r)){var n=e.node._shadowedFunctionLiteral,s=void 0,a=!1,o=e.find(function(t){if(t.parentPath&&t.parentPath.isClassProperty()&&"value"===t.key)return!0;if(e===t)return!1;if((t.isProgram()||t.isFunction())&&(s=s||t),t.isProgram())return a=!0,!0;if(t.isFunction()&&!t.isArrowFunctionExpression()){if(n){if(t===n||t.node===n.node)return!0}else if(!t.is("shadow"))return!0;return a=!0,!1}return!1});if(n&&o.isProgram()&&!n.isProgram()&&(o=e.findParent(function(e){return e.isProgram()||e.isFunction()})),o!==s&&a){var u=o.getData(t);if(u)return e.replaceWith(u);var l=e.scope.generateUidIdentifier(t);o.setData(t,l);var c=o.findParent(function(e){return e.isClass()}),h=!!(c&&c.node&&c.node.superClass);if("this"===t&&o.isMethod({kind:"constructor"})&&h)o.scope.push({id:l}),o.traverse(f,{id:l});else{var d="this"===t?p.thisExpression():p.identifier(t);n&&(d._shadowedFunctionLiteral=n),o.scope.push({id:l,init:d})}return e.replaceWith(l)}}}r.__esModule=!0;var a=e("babel-runtime/core-js/symbol"),o=n(a),u=e("../plugin"),l=n(u),c=e("babel-types"),p=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(c),h=(0,o.default)("super this bound"),f={CallExpression:function(e){if(e.get("callee").isSuper()){var t=e.node;t[h]||(t[h]=!0,e.replaceWith(p.assignmentExpression("=",this.id,t)))}}};r.default=new l.default({name:"internal.shadowFunctions",visitor:{ThisExpression:function(e){s(e,"this")},ReferencedIdentifier:function(e){"arguments"===e.node.name&&s(e,"arguments")}}}),t.exports=r.default},{"../plugin":53,"babel-runtime/core-js/symbol":122,"babel-types":169}],51:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/helpers/classCallCheck"),s=n(i),a=e("../helpers/normalize-ast"),o=n(a),u=e("./plugin"),l=n(u),c=e("./file"),p=n(c),h=function(){function e(){(0,s.default)(this,e)}return e.prototype.lint=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.code=!1,t.mode="lint",this.transform(e,t)},e.prototype.pretransform=function(e,t){var r=new p.default(t,this);return r.wrap(e,function(){return r.addCode(e),r.parseCode(e),r})},e.prototype.transform=function(e,t){var r=new p.default(t,this);return r.wrap(e,function(){return r.addCode(e),r.parseCode(e),r.transform()})},e.prototype.analyse=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments[2];return t.code=!1,r&&(t.plugins=t.plugins||[],t.plugins.push(new l.default({visitor:r}))),this.transform(e,t).metadata},e.prototype.transformFromAst=function(e,t,r){e=(0,o.default)(e);var n=new p.default(r,this);return n.wrap(t,function(){return n.addCode(t),n.addAst(e),n.transform()})},e}();r.default=h,t.exports=r.default},{"../helpers/normalize-ast":33,"./file":40,"./plugin":53,"babel-runtime/helpers/classCallCheck":127}],52:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/helpers/classCallCheck"),s=n(i),a=e("babel-runtime/helpers/possibleConstructorReturn"),o=n(a),u=e("babel-runtime/helpers/inherits"),l=n(u),c=e("../store"),p=n(c),h=e("./file"),f=(n(h),function(e){function t(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,s.default)(this,t);var a=(0,o.default)(this,e.call(this));return a.plugin=n,a.key=n.key,a.file=r,a.opts=i,a}return(0,l.default)(t,e),t.prototype.addHelper=function(){var e;return(e=this.file).addHelper.apply(e,arguments)},t.prototype.addImport=function(){var e;return(e=this.file).addImport.apply(e,arguments)},t.prototype.getModuleName=function(){var e;return(e=this.file).getModuleName.apply(e,arguments)},t.prototype.buildCodeFrameError=function(){var e;return(e=this.file).buildCodeFrameError.apply(e,arguments)},t}(p.default));r.default=f,t.exports=r.default},{"../store":38,"./file":40,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/inherits":128,"babel-runtime/helpers/possibleConstructorReturn":130}],53:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/core-js/get-iterator"),s=n(i),a=e("babel-runtime/helpers/classCallCheck"),o=n(a),u=e("babel-runtime/helpers/possibleConstructorReturn"),l=n(u),c=e("babel-runtime/helpers/inherits"),p=n(c),h=e("./file/options/option-manager"),f=n(h),d=e("babel-messages"),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(d),y=e("../store"),g=n(y),b=e("babel-traverse"),v=n(b),x=e("lodash/assign"),E=n(x),A=e("lodash/clone"),D=n(A),C=["enter","exit"],S=function(e){function t(r,n){(0,o.default)(this,t);var i=(0,l.default)(this,e.call(this));return i.initialized=!1,i.raw=(0,E.default)({},r),i.key=i.take("name")||n,i.manipulateOptions=i.take("manipulateOptions"),i.post=i.take("post"),i.pre=i.take("pre"),i.visitor=i.normaliseVisitor((0,D.default)(i.take("visitor"))||{}),i}return(0,p.default)(t,e),t.prototype.take=function(e){var t=this.raw[e];return delete this.raw[e],t},t.prototype.chain=function(e,t){if(!e[t])return this[t];if(!this[t])return e[t];var r=[e[t],this[t]];return function(){for(var e=void 0,t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];for(var a=r,o=Array.isArray(a),u=0,a=o?a:(0,s.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;if(c){var p=c.apply(this,n);null!=p&&(e=p)}}return e}},t.prototype.maybeInherit=function(e){var t=this.take("inherits");t&&(t=f.default.normalisePlugin(t,e,"inherits"),this.manipulateOptions=this.chain(t,"manipulateOptions"),this.post=this.chain(t,"post"),this.pre=this.chain(t,"pre"),this.visitor=v.default.visitors.merge([t.visitor,this.visitor]))},t.prototype.init=function(e,t){if(!this.initialized){this.initialized=!0,this.maybeInherit(e);for(var r in this.raw)throw new Error(m.get("pluginInvalidProperty",e,t,r))}},t.prototype.normaliseVisitor=function(e){for(var t=C,r=Array.isArray(t),n=0,t=r?t:(0,s.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}if(e[i])throw new Error("Plugins aren't allowed to specify catch-all enter/exit handlers. Please target individual nodes.")}return v.default.explode(e),e},t}(g.default);r.default=S,t.exports=r.default},{"../store":38,"./file/options/option-manager":46,"babel-messages":103,"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/inherits":128,"babel-runtime/helpers/possibleConstructorReturn":130,"babel-traverse":136,"lodash/assign":477,"lodash/clone":480}],54:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=t||i.EXTENSIONS,n=S.default.extname(e);return(0,E.default)(r,n)}function s(e){return e?Array.isArray(e)?e:"string"==typeof e?e.split(","):[e]:[]}function a(e){if(!e)return new RegExp(/.^/);if(Array.isArray(e)&&(e=new RegExp(e.map(m.default).join("|"),"i")),"string"==typeof e){e=(0,w.default)(e),((0,g.default)(e,"./")||(0,g.default)(e,"*/"))&&(e=e.slice(2)),(0,g.default)(e,"**/")&&(e=e.slice(3));var t=v.default.makeRe(e,{nocase:!0});return new RegExp(t.source.slice(1,-1),"i")}if((0,D.default)(e))return e;throw new TypeError("illegal type for regexify")}function o(e,t){return e?"boolean"==typeof e?o([e],t):"string"==typeof e?o(s(e),t):Array.isArray(e)?(t&&(e=e.map(t)),e):[e]:[]}function u(e){return"true"===e||1==e||!("false"===e||0==e||!e)&&e}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2];if(e=e.replace(/\\/g,"/"),r){for(var n=r,i=Array.isArray(n),s=0,n=i?n:(0,h.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}if(c(a,e))return!1}return!0}if(t.length)for(var o=t,u=Array.isArray(o),l=0,o=u?o:(0,h.default)(o);;){var p;if(u){if(l>=o.length)break;p=o[l++]}else{if(l=o.next(),l.done)break;p=l.value}var f=p;if(c(f,e))return!0}return!1}function c(e,t){return"function"==typeof e?e(t):e.test(t)}r.__esModule=!0,r.inspect=r.inherits=void 0;var p=e("babel-runtime/core-js/get-iterator"),h=n(p),f=e("util");Object.defineProperty(r,"inherits",{enumerable:!0,get:function(){return f.inherits}}),Object.defineProperty(r,"inspect",{enumerable:!0,get:function(){return f.inspect}}),r.canCompile=i,r.list=s,r.regexify=a,r.arrayify=o,r.booleanify=u,r.shouldIgnore=l;var d=e("lodash/escapeRegExp"),m=n(d),y=e("lodash/startsWith"),g=n(y),b=e("minimatch"),v=n(b),x=e("lodash/includes"),E=n(x),A=e("lodash/isRegExp"),D=n(A),C=e("path"),S=n(C),_=e("slash"),w=n(_);i.EXTENSIONS=[".js",".jsx",".es6",".es"]},{"babel-runtime/core-js/get-iterator":113,"lodash/escapeRegExp":486,"lodash/includes":496,"lodash/isRegExp":508,"lodash/startsWith":521,minimatch:531,path:535,slash:589,util:601}],55:[function(e,t,r){function n(){this._array=[],this._set=Object.create(null)}var i=e("./util"),s=Object.prototype.hasOwnProperty;n.fromArray=function(e,t){for(var r=new n,i=0,s=e.length;i<s;i++)r.add(e[i],t);return r},n.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},n.prototype.add=function(e,t){var r=i.toSetString(e),n=s.call(this._set,r),a=this._array.length;n&&!t||this._array.push(e),n||(this._set[r]=a)},n.prototype.has=function(e){var t=i.toSetString(e);return s.call(this._set,t)},n.prototype.indexOf=function(e){var t=i.toSetString(e);if(s.call(this._set,t))return this._set[t];throw new Error('"'+e+'" is not in the set.')},n.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},n.prototype.toArray=function(){return this._array.slice()},r.ArraySet=n},{"./util":64}],56:[function(e,t,r){function n(e){return e<0?1+(-e<<1):0+(e<<1)}function i(e){var t=1==(1&e),r=e>>1;return t?-r:r}var s=e("./base64");r.encode=function(e){var t,r="",i=n(e);do{t=31&i,i>>>=5,i>0&&(t|=32),r+=s.encode(t)}while(i>0);return r},r.decode=function(e,t,r){var n,a,o=e.length,u=0,l=0;do{if(t>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(a=s.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));n=!!(32&a),a&=31,u+=a<<l,l+=5}while(n);r.value=i(u),r.rest=t}},{"./base64":57}],57:[function(e,t,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");r.encode=function(e){if(0<=e&&e<n.length)return n[e];throw new TypeError("Must be between 0 and 63: "+e)},r.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}},{}],58:[function(e,t,r){function n(e,t,i,s,a,o){var u=Math.floor((t-e)/2)+e,l=a(i,s[u],!0);return 0===l?u:l>0?t-u>1?n(u,t,i,s,a,o):o==r.LEAST_UPPER_BOUND?t<s.length?t:-1:u:u-e>1?n(e,u,i,s,a,o):o==r.LEAST_UPPER_BOUND?u:e<0?-1:e}r.GREATEST_LOWER_BOUND=1,r.LEAST_UPPER_BOUND=2,r.search=function(e,t,i,s){if(0===t.length)return-1;var a=n(-1,t.length,e,t,i,s||r.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===i(t[a],t[a-1],!0);)--a;return a}},{}],59:[function(e,t,r){function n(e,t){var r=e.generatedLine,n=t.generatedLine,i=e.generatedColumn,a=t.generatedColumn;return n>r||n==r&&a>=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){n(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},r.MappingList=i},{"./util":64}],60:[function(e,t,r){function n(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function i(e,t){return Math.round(e+Math.random()*(t-e))}function s(e,t,r,a){if(r<a){var o=i(r,a),u=r-1;n(e,o,a);for(var l=e[a],c=r;c<a;c++)t(e[c],l)<=0&&(u+=1,n(e,u,c));n(e,u+1,c);var p=u+1;s(e,t,r,p-1),s(e,t,p+1,a)}}r.quickSort=function(e,t){s(e,t,0,e.length-1)}},{}],61:[function(e,t,r){function n(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new a(t):new i(t)}function i(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=o.getArg(t,"version"),n=o.getArg(t,"sources"),i=o.getArg(t,"names",[]),s=o.getArg(t,"sourceRoot",null),a=o.getArg(t,"sourcesContent",null),u=o.getArg(t,"mappings"),c=o.getArg(t,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);n=n.map(String).map(o.normalize).map(function(e){return s&&o.isAbsolute(s)&&o.isAbsolute(e)?o.relative(s,e):e}),this._names=l.fromArray(i.map(String),!0),this._sources=l.fromArray(n,!0),this.sourceRoot=s,this.sourcesContent=a,this._mappings=u,this.file=c}function s(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function a(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=o.getArg(t,"version"),i=o.getArg(t,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new l,this._names=new l;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=o.getArg(e,"offset"),r=o.getArg(t,"line"),i=o.getArg(t,"column");if(r<s.line||r===s.line&&i<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=t,{generatedOffset:{generatedLine:r+1,generatedColumn:i+1},consumer:new n(o.getArg(e,"map"))}})}var o=e("./util"),u=e("./binary-search"),l=e("./array-set").ArraySet,c=e("./base64-vlq"),p=e("./quick-sort").quickSort;n.fromSourceMap=function(e){return i.fromSourceMap(e)},n.prototype._version=3,n.prototype.__generatedMappings=null,Object.defineProperty(n.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),n.prototype.__originalMappings=null,Object.defineProperty(n.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),n.prototype._charIsMappingSeparator=function(e,t){var r=e.charAt(t);return";"===r||","===r},n.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},n.GENERATED_ORDER=1,n.ORIGINAL_ORDER=2,n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.prototype.eachMapping=function(e,t,r){var i,s=t||null,a=r||n.GENERATED_ORDER;switch(a){case n.GENERATED_ORDER:i=this._generatedMappings;break;case n.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=o.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)},n.prototype.allGeneratedPositionsFor=function(e){var t=o.getArg(e,"line"),r={source:o.getArg(e,"source"),originalLine:t,originalColumn:o.getArg(e,"column",0)};if(null!=this.sourceRoot&&(r.source=o.relative(this.sourceRoot,r.source)),!this._sources.has(r.source))return[];r.source=this._sources.indexOf(r.source);var n=[],i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,u.LEAST_UPPER_BOUND);if(i>=0){var s=this._originalMappings[i];if(void 0===e.column)for(var a=s.originalLine;s&&s.originalLine===a;)n.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var l=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==l;)n.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return n},r.SourceMapConsumer=n,i.prototype=Object.create(n.prototype),i.prototype.consumer=n,i.fromSourceMap=function(e){var t=Object.create(i.prototype),r=t._names=l.fromArray(e._names.toArray(),!0),n=t._sources=l.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var a=e._mappings.toArray().slice(),u=t.__generatedMappings=[],c=t.__originalMappings=[],h=0,f=a.length;h<f;h++){var d=a[h],m=new s;m.generatedLine=d.generatedLine,m.generatedColumn=d.generatedColumn,d.source&&(m.source=n.indexOf(d.source),m.originalLine=d.originalLine,m.originalColumn=d.originalColumn,d.name&&(m.name=r.indexOf(d.name)),c.push(m)),u.push(m)}return p(t.__originalMappings,o.compareByOriginalPositions),t},i.prototype._version=3,Object.defineProperty(i.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return null!=this.sourceRoot?o.join(this.sourceRoot,e):e},this)}}),i.prototype._parseMappings=function(e,t){for(var r,n,i,a,u,l=1,h=0,f=0,d=0,m=0,y=0,g=e.length,b=0,v={},x={},E=[],A=[];b<g;)if(";"===e.charAt(b))l++,b++,h=0;else if(","===e.charAt(b))b++;else{for(r=new s,r.generatedLine=l,a=b;a<g&&!this._charIsMappingSeparator(e,a);a++);if(n=e.slice(b,a),i=v[n])b+=n.length;else{for(i=[];b<a;)c.decode(e,b,x),u=x.value,b=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");v[n]=i}r.generatedColumn=h+i[0],h=r.generatedColumn,i.length>1&&(r.source=m+i[1],m+=i[1],r.originalLine=f+i[2],f=r.originalLine,r.originalLine+=1,r.originalColumn=d+i[3],d=r.originalColumn,i.length>4&&(r.name=y+i[4],y+=i[4])),A.push(r),"number"==typeof r.originalLine&&E.push(r)}p(A,o.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,p(E,o.compareByOriginalPositions),this.__originalMappings=E},i.prototype._findMapping=function(e,t,r,n,i,s){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);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 r=this._generatedMappings[e+1];if(t.generatedLine===r.generatedLine){t.lastGeneratedColumn=r.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},i.prototype.originalPositionFor=function(e){var t={generatedLine:o.getArg(e,"line"),generatedColumn:o.getArg(e,"column")},r=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",o.compareByGeneratedPositionsDeflated,o.getArg(e,"bias",n.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===t.generatedLine){var s=o.getArg(i,"source",null);null!==s&&(s=this._sources.at(s),null!=this.sourceRoot&&(s=o.join(this.sourceRoot,s)));var a=o.getArg(i,"name",null);return null!==a&&(a=this._names.at(a)),{source:s,line:o.getArg(i,"originalLine",null),column:o.getArg(i,"originalColumn",null),name:a}}}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=o.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=o.urlParse(this.sourceRoot))){var n=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(n))return this.sourcesContent[this._sources.indexOf(n)];if((!r.path||"/"==r.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=o.getArg(e,"source");if(null!=this.sourceRoot&&(t=o.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};t=this._sources.indexOf(t);var r={source:t,originalLine:o.getArg(e,"line"),originalColumn:o.getArg(e,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,o.getArg(e,"bias",n.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===r.source)return{line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},r.BasicSourceMapConsumer=i,a.prototype=Object.create(n.prototype),a.prototype.constructor=n,a.prototype._version=3,Object.defineProperty(a.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}}),a.prototype.originalPositionFor=function(e){var t={generatedLine:o.getArg(e,"line"),generatedColumn:o.getArg(e,"column")},r=u.search(t,this._sections,function(e,t){var r=e.generatedLine-t.generatedOffset.generatedLine;return r||e.generatedColumn-t.generatedOffset.generatedColumn}),n=this._sections[r];return n?n.consumer.originalPositionFor({line:t.generatedLine-(n.generatedOffset.generatedLine-1),column:t.generatedColumn-(n.generatedOffset.generatedLine===t.generatedLine?n.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},a.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},a.prototype.sourceContentFor=function(e,t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r],i=n.consumer.sourceContentFor(e,!0);if(i)return i}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},a.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var r=this._sections[t];if(-1!==r.consumer.sources.indexOf(o.getArg(e,"source"))){var n=r.consumer.generatedPositionFor(e);if(n){return{line:n.line+(r.generatedOffset.generatedLine-1),column:n.column+(r.generatedOffset.generatedLine===n.line?r.generatedOffset.generatedColumn-1:0)}}}}return{line:null,column:null}},a.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var n=this._sections[r],i=n.consumer._generatedMappings,s=0;s<i.length;s++){var a=i[s],u=n.consumer._sources.at(a.source);null!==n.consumer.sourceRoot&&(u=o.join(n.consumer.sourceRoot,u)),this._sources.add(u),u=this._sources.indexOf(u);var l=n.consumer._names.at(a.name);this._names.add(l),l=this._names.indexOf(l);var c={source:u,generatedLine:a.generatedLine+(n.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(n.generatedOffset.generatedLine===a.generatedLine?n.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:l};this.__generatedMappings.push(c),"number"==typeof c.originalLine&&this.__originalMappings.push(c)}p(this.__generatedMappings,o.compareByGeneratedPositionsDeflated),p(this.__originalMappings,o.compareByOriginalPositions)},r.IndexedSourceMapConsumer=a},{"./array-set":55,"./base64-vlq":56,"./binary-search":58,"./quick-sort":60,"./util":64}],62:[function(e,t,r){function n(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 a,this._names=new a,this._mappings=new o,this._sourcesContents=null}var i=e("./base64-vlq"),s=e("./util"),a=e("./array-set").ArraySet,o=e("./mapping-list").MappingList;n.prototype._version=3,n.fromSourceMap=function(e){var t=e.sourceRoot,r=new n({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var n={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(n.source=e.source,null!=t&&(n.source=s.relative(t,n.source)),n.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(n.name=e.name)),r.addMapping(n)}),e.sources.forEach(function(t){var n=e.sourceContentFor(t);null!=n&&r.setSourceContent(t,n)}),r},n.prototype.addMapping=function(e){var t=s.getArg(e,"generated"),r=s.getArg(e,"original",null),n=s.getArg(e,"source",null),i=s.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,n,i),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:n,name:i
+})},n.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=s.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[s.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[s.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},n.prototype.applySourceMap=function(e,t,r){var n=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.');n=e.file}var i=this._sourceRoot;null!=i&&(n=s.relative(i,n));var o=new a,u=new a;this._mappings.unsortedForEach(function(t){if(t.source===n&&null!=t.originalLine){var a=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=a.source&&(t.source=a.source,null!=r&&(t.source=s.join(r,t.source)),null!=i&&(t.source=s.relative(i,t.source)),t.originalLine=a.line,t.originalColumn=a.column,null!=a.name&&(t.name=a.name))}var l=t.source;null==l||o.has(l)||o.add(l);var c=t.name;null==c||u.has(c)||u.add(c)},this),this._sources=o,this._names=u,e.sources.forEach(function(t){var n=e.sourceContentFor(t);null!=n&&(null!=r&&(t=s.join(r,t)),null!=i&&(t=s.relative(i,t)),this.setSourceContent(t,n))},this)},n.prototype._validateMapping=function(e,t,r,n){if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||r||n)&&!(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&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))},n.prototype._serializeMappings=function(){for(var e,t,r,n,a=0,o=1,u=0,l=0,c=0,p=0,h="",f=this._mappings.toArray(),d=0,m=f.length;d<m;d++){if(t=f[d],e="",t.generatedLine!==o)for(a=0;t.generatedLine!==o;)e+=";",o++;else if(d>0){if(!s.compareByGeneratedPositionsInflated(t,f[d-1]))continue;e+=","}e+=i.encode(t.generatedColumn-a),a=t.generatedColumn,null!=t.source&&(n=this._sources.indexOf(t.source),e+=i.encode(n-p),p=n,e+=i.encode(t.originalLine-1-l),l=t.originalLine-1,e+=i.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),e+=i.encode(r-c),c=r)),h+=e}return h},n.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=s.relative(t,e));var r=s.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},n.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},n.prototype.toString=function(){return JSON.stringify(this.toJSON())},r.SourceMapGenerator=n},{"./array-set":55,"./base64-vlq":56,"./mapping-list":59,"./util":64}],63:[function(e,t,r){function n(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==r?null:r,this.name=null==i?null:i,this[a]=!0,null!=n&&this.add(n)}var i=e("./source-map-generator").SourceMapGenerator,s=e("./util"),a="$$$isSourceNode$$$";n.fromStringWithSourceMap=function(e,t,r){function i(e,t){if(null===e||void 0===e.source)a.add(t);else{var i=r?s.join(r,e.source):e.source;a.add(new n(e.originalLine,e.originalColumn,i,t,e.name))}}var a=new n,o=e.split(/(\r?\n)/),u=function(){return o.shift()+(o.shift()||"")},l=1,c=0,p=null;return t.eachMapping(function(e){if(null!==p){if(!(l<e.generatedLine)){var t=o[0],r=t.substr(0,e.generatedColumn-c);return o[0]=t.substr(e.generatedColumn-c),c=e.generatedColumn,i(p,r),void(p=e)}i(p,u()),l++,c=0}for(;l<e.generatedLine;)a.add(u()),l++;if(c<e.generatedColumn){var t=o[0];a.add(t.substr(0,e.generatedColumn)),o[0]=t.substr(e.generatedColumn),c=e.generatedColumn}p=e},this),o.length>0&&(p&&i(p,u()),a.add(o.join(""))),t.sources.forEach(function(e){var n=t.sourceContentFor(e);null!=n&&(null!=r&&(e=s.join(r,e)),a.setSourceContent(e,n))}),a},n.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[a]&&"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},n.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[a]&&"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},n.prototype.walk=function(e){for(var t,r=0,n=this.children.length;r<n;r++)t=this.children[r],t[a]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},n.prototype.join=function(e){var t,r,n=this.children.length;if(n>0){for(t=[],r=0;r<n-1;r++)t.push(this.children[r]),t.push(e);t.push(this.children[r]),this.children=t}return this},n.prototype.replaceRight=function(e,t){var r=this.children[this.children.length-1];return r[a]?r.replaceRight(e,t):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,t):this.children.push("".replace(e,t)),this},n.prototype.setSourceContent=function(e,t){this.sourceContents[s.toSetString(e)]=t},n.prototype.walkSourceContents=function(e){for(var t=0,r=this.children.length;t<r;t++)this.children[t][a]&&this.children[t].walkSourceContents(e);for(var n=Object.keys(this.sourceContents),t=0,r=n.length;t<r;t++)e(s.fromSetString(n[t]),this.sourceContents[n[t]])},n.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e},n.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},r=new i(e),n=!1,s=null,a=null,o=null,u=null;return this.walk(function(e,i){t.code+=e,null!==i.source&&null!==i.line&&null!==i.column?(s===i.source&&a===i.line&&o===i.column&&u===i.name||r.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:t.line,column:t.column},name:i.name}),s=i.source,a=i.line,o=i.column,u=i.name,n=!0):n&&(r.addMapping({generated:{line:t.line,column:t.column}}),s=null,n=!1);for(var l=0,c=e.length;l<c;l++)10===e.charCodeAt(l)?(t.line++,t.column=0,l+1===c?(s=null,n=!1):n&&r.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){r.setSourceContent(e,t)}),{code:t.code,map:r}},r.SourceNode=n},{"./source-map-generator":62,"./util":64}],64:[function(e,t,r){function n(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;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 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 a(e){var t=e,n=i(e);if(n){if(!n.path)return e;t=n.path}for(var a,o=r.isAbsolute(t),u=t.split(/\/+/),l=0,c=u.length-1;c>=0;c--)a=u[c],"."===a?u.splice(c,1):".."===a?l++:l>0&&(""===a?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return t=u.join("/"),""===t&&(t=o?"/":"."),n?(n.path=t,s(n)):t}function o(e,t){""===e&&(e="."),""===t&&(t=".");var r=i(t),n=i(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),s(r);if(r||t.match(b))return t;if(n&&!n.host&&!n.path)return n.host=t,s(n);var o="/"===t.charAt(0)?t:a(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=o,s(n)):o}function u(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}function l(e){return e}function c(e){return h(e)?"$"+e:e}function p(e){return h(e)?e.slice(1):e}function h(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 r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function f(e,t,r){var n=e.source-t.source;return 0!==n?n:0!==(n=e.originalLine-t.originalLine)?n:0!==(n=e.originalColumn-t.originalColumn)||r?n:0!==(n=e.generatedColumn-t.generatedColumn)?n:(n=e.generatedLine-t.generatedLine,0!==n?n:e.name-t.name)}function d(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!==(n=e.generatedColumn-t.generatedColumn)||r?n:0!==(n=e.source-t.source)?n:0!==(n=e.originalLine-t.originalLine)?n:(n=e.originalColumn-t.originalColumn,0!==n?n:e.name-t.name)}function m(e,t){return e===t?0:e>t?1:-1}function y(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!==(r=e.generatedColumn-t.generatedColumn)?r:0!==(r=m(e.source,t.source))?r:0!==(r=e.originalLine-t.originalLine)?r:(r=e.originalColumn-t.originalColumn,0!==r?r:m(e.name,t.name))}r.getArg=n;var g=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,b=/^data:.+\,.+$/;r.urlParse=i,r.urlGenerate=s,r.normalize=a,r.join=o,r.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(g)},r.relative=u;var v=function(){return!("__proto__"in Object.create(null))}();r.toSetString=v?l:c,r.fromSetString=v?l:p,r.compareByOriginalPositions=f,r.compareByGeneratedPositionsDeflated=d,r.compareByGeneratedPositionsInflated=y},{}],65:[function(e,t,r){r.SourceMapGenerator=e("./lib/source-map-generator").SourceMapGenerator,r.SourceMapConsumer=e("./lib/source-map-consumer").SourceMapConsumer,r.SourceNode=e("./lib/source-node").SourceNode},{"./lib/source-map-consumer":61,"./lib/source-map-generator":62,"./lib/source-node":63}],66:[function(e,t,r){t.exports={_args:[[{raw:"babel-core@^6.18.2",scope:null,escapedName:"babel-core",name:"babel-core",rawSpec:"^6.18.2",spec:">=6.18.2 <7.0.0",type:"range"},"/Users/evgenypoberezkin/JSON/ajv-v4/node_modules/regenerator"]],_from:"babel-core@>=6.18.2 <7.0.0",_id:"babel-core@6.24.0",_inCache:!0,_location:"/babel-core",_nodeVersion:"6.9.0",_npmOperationalInternal:{host:"packages-18-east.internal.npmjs.com",tmp:"tmp/babel-core-6.24.0.tgz_1489371490272_0.8722315817140043"},_npmUser:{name:"hzoo",email:"hi@henryzoo.com"},_npmVersion:"3.10.10",_phantomChildren:{},_requested:{raw:"babel-core@^6.18.2",scope:null,escapedName:"babel-core",name:"babel-core",rawSpec:"^6.18.2",spec:">=6.18.2 <7.0.0",type:"range"},_requiredBy:["/babel-register","/regenerator"],_resolved:"https://registry.npmjs.org/babel-core/-/babel-core-6.24.0.tgz",_shasum:"8f36a0a77f5c155aed6f920b844d23ba56742a02",_shrinkwrap:null,_spec:"babel-core@^6.18.2",_where:"/Users/evgenypoberezkin/JSON/ajv-v4/node_modules/regenerator",author:{name:"Sebastian McKenzie",email:"sebmck@gmail.com"},dependencies:{"babel-code-frame":"^6.22.0","babel-generator":"^6.24.0","babel-helpers":"^6.23.0","babel-messages":"^6.23.0","babel-register":"^6.24.0","babel-runtime":"^6.22.0","babel-template":"^6.23.0","babel-traverse":"^6.23.1","babel-types":"^6.23.0",babylon:"^6.11.0","convert-source-map":"^1.1.0",debug:"^2.1.1",json5:"^0.5.0",lodash:"^4.2.0",minimatch:"^3.0.2","path-is-absolute":"^1.0.0",private:"^0.1.6",slash:"^1.0.0","source-map":"^0.5.0"},description:"Babel compiler core.",devDependencies:{"babel-helper-fixtures":"^6.22.0","babel-helper-transform-fixture-test-runner":"^6.24.0","babel-polyfill":"^6.23.0"},directories:{},dist:{shasum:"8f36a0a77f5c155aed6f920b844d23ba56742a02",tarball:"https://registry.npmjs.org/babel-core/-/babel-core-6.24.0.tgz"},homepage:"https://babeljs.io/",keywords:["6to5","babel","classes","const","es6","harmony","let","modules","transpile","transpiler","var","babel-core","compiler"],license:"MIT",maintainers:[{name:"amasad",email:"amjad.masad@gmail.com"},{name:"hzoo",email:"hi@henryzoo.com"},{name:"jmm",email:"npm-public@jessemccarthy.net"},{name:"loganfsmyth",email:"loganfsmyth@gmail.com"},{name:"sebmck",email:"sebmck@gmail.com"},{name:"thejameskyle",email:"me@thejameskyle.com"}],name:"babel-core",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"https://github.com/babel/babel/tree/master/packages/babel-core"},scripts:{bench:"make bench",test:"make test"},version:"6.24.0"}},{}],67:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/helpers/classCallCheck"),s=n(i),a=e("trim-right"),o=n(a),u=/^[ \t]+$/,l=function(){function e(t){(0,s.default)(this,e),this._map=null,this._buf=[],this._last="",this._queue=[],this._position={line:1,column:0},this._sourcePosition={identifierName:null,line:null,column:null,filename:null},this._map=t}return e.prototype.get=function(){this._flush();var e=this._map,t={code:(0,o.default)(this._buf.join("")),map:null,rawMappings:e&&e.getRawMappings()};return e&&Object.defineProperty(t,"map",{configurable:!0,enumerable:!0,get:function(){return this.map=e.get()},set:function(e){Object.defineProperty(this,"map",{value:e,writable:!0})}}),t},e.prototype.append=function(e){this._flush();var t=this._sourcePosition,r=t.line,n=t.column,i=t.filename,s=t.identifierName;this._append(e,r,n,s,i)},e.prototype.queue=function(e){if("\n"===e)for(;this._queue.length>0&&u.test(this._queue[0][0]);)this._queue.shift();var t=this._sourcePosition,r=t.line,n=t.column,i=t.filename,s=t.identifierName;this._queue.unshift([e,r,n,s,i])},e.prototype._flush=function(){for(var e=void 0;e=this._queue.pop();)this._append.apply(this,e)},e.prototype._append=function(e,t,r,n,i){this._map&&"\n"!==e[0]&&this._map.mark(this._position.line,this._position.column,t,r,n,i),this._buf.push(e),this._last=e[e.length-1];for(var s=0;s<e.length;s++)"\n"===e[s]?(this._position.line++,this._position.column=0):this._position.column++},e.prototype.removeTrailingNewline=function(){this._queue.length>0&&"\n"===this._queue[0][0]&&this._queue.shift()},e.prototype.removeLastSemicolon=function(){this._queue.length>0&&";"===this._queue[0][0]&&this._queue.shift()},e.prototype.endsWith=function(e){if(1===e.length){var t=void 0;if(this._queue.length>0){var r=this._queue[0][0];t=r[r.length-1]}else t=this._last;return t===e}var n=this._last+this._queue.reduce(function(e,t){return t[0]+e},"");return e.length<=n.length&&n.slice(-e.length)===e},e.prototype.hasContent=function(){return this._queue.length>0||!!this._last},e.prototype.source=function(e,t){if(!e||t){var r=t?t[e]:null;this._sourcePosition.identifierName=t&&t.identifierName||null,this._sourcePosition.line=r?r.line:null,this._sourcePosition.column=r?r.column:null,this._sourcePosition.filename=t&&t.filename||null}},e.prototype.withSource=function(e,t,r){if(!this._map)return r();var n=this._sourcePosition.line,i=this._sourcePosition.column,s=this._sourcePosition.filename,a=this._sourcePosition.identifierName;this.source(e,t),r(),this._sourcePosition.line=n,this._sourcePosition.column=i,this._sourcePosition.filename=s,this._sourcePosition.identifierName=a},e.prototype.getCurrentColumn=function(){var e=this._queue.reduce(function(e,t){return t[0]+e},""),t=e.lastIndexOf("\n");return-1===t?this._position.column+e.length:e.length-1-t},e.prototype.getCurrentLine=function(){for(var e=this._queue.reduce(function(e,t){return t[0]+e},""),t=0,r=0;r<e.length;r++)"\n"===e[r]&&t++;return this._position.line+t},e}();r.default=l,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":127,"trim-right":596}],68:[function(e,t,r){"use strict";function n(e){this.print(e.program,e)}function i(e){this.printInnerComments(e,!1),this.printSequence(e.directives,e),e.directives&&e.directives.length&&this.newline(),this.printSequence(e.body,e)}function s(e){this.token("{"),this.printInnerComments(e);var t=e.directives&&e.directives.length;e.body.length||t?(this.newline(),this.printSequence(e.directives,e,{indent:!0}),t&&this.newline(),this.printSequence(e.body,e,{indent:!0}),this.removeTrailingNewline(),this.source("end",e.loc),this.endsWith("\n")||this.newline(),this.rightBrace()):(this.source("end",e.loc),this.token("}"))}function a(){}function o(e){this.print(e.value,e),this.semicolon()}r.__esModule=!0,r.File=n,r.Program=i,r.BlockStatement=s,r.Noop=a,r.Directive=o;var u=e("./types");Object.defineProperty(r,"DirectiveLiteral",{enumerable:!0,get:function(){return u.StringLiteral}})},{"./types":77}],69:[function(e,t,r){"use strict";function n(e){this.printJoin(e.decorators,e),this.word("class"),e.id&&(this.space(),this.print(e.id,e)),this.print(e.typeParameters,e),e.superClass&&(this.space(),this.word("extends"),this.space(),this.print(e.superClass,e),this.print(e.superTypeParameters,e)),e.implements&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements,e)),this.space(),this.print(e.body,e)}function i(e){this.token("{"),this.printInnerComments(e),0===e.body.length?this.token("}"):(this.newline(),this.indent(),this.printSequence(e.body,e),this.dedent(),this.endsWith("\n")||this.newline(),this.rightBrace())}function s(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space()),e.computed?(this.token("["),this.print(e.key,e),this.token("]")):(this._variance(e),this.print(e.key,e)),this.print(e.typeAnnotation,e),e.value&&(this.space(),this.token("="),this.space(),this.print(e.value,e)),this.semicolon()}function a(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space()),"constructorCall"===e.kind&&(this.word("call"),this.space()),this._method(e)}r.__esModule=!0,r.ClassDeclaration=n,r.ClassBody=i,r.ClassProperty=s,r.ClassMethod=a,r.ClassExpression=n},{}],70:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){"void"===e.operator||"delete"===e.operator||"typeof"===e.operator?(this.word(e.operator),this.space()):this.token(e.operator),this.print(e.argument,e)}function s(e){this.word("do"),this.space(),this.print(e.body,e)}function a(e){this.token("("),this.print(e.expression,e),this.token(")")}function o(e){e.prefix?(this.token(e.operator),this.print(e.argument,e)):(this.print(e.argument,e),this.token(e.operator))}function u(e){this.print(e.test,e),this.space(),this.token("?"),this.space(),this.print(e.consequent,e),this.space(),this.token(":"),this.space(),this.print(e.alternate,e)}function l(e,t){this.word("new"),this.space(),this.print(e.callee,e),(0!==e.arguments.length||!this.format.minified||_.isCallExpression(t,{callee:e})||_.isMemberExpression(t)||_.isNewExpression(t))&&(this.token("("),this.printList(e.arguments,e),this.token(")"))}function c(e){this.printList(e.expressions,e)}function p(){this.word("this")}function h(){this.word("super")}function f(e){this.token("@"),this.print(e.expression,e),this.newline()}function d(){this.token(","),this.newline(),this.endsWith("\n")||this.space()}function m(e){this.print(e.callee,e),this.token("(");var t=e._prettyCall,r=void 0;t&&(r=d,this.newline(),this.indent()),this.printList(e.arguments,e,{separator:r}),t&&(this.newline(),this.dedent()),this.token(")")}function y(){this.word("import")}function g(e){return function(t){if(this.word(e),t.delegate&&this.token("*"),t.argument){this.space();var r=this.startTerminatorless();this.print(t.argument,t),this.endTerminatorless(r)}}}function b(){this.semicolon(!0)}function v(e){this.print(e.expression,e),this.semicolon()}function x(e){this.print(e.left,e),e.left.optional&&this.token("?"),this.print(e.left.typeAnnotation,e),this.space(),this.token("="),this.space(),this.print(e.right,e)}function E(e,t){var r=this.inForStatementInitCounter&&"in"===e.operator&&!k.needsParens(e,t);r&&this.token("("),this.print(e.left,e),this.space(),"in"===e.operator||"instanceof"===e.operator?this.word(e.operator):this.token(e.operator),this.space(),this.print(e.right,e),r&&this.token(")")}function A(e){this.print(e.object,e),this.token("::"),this.print(e.callee,e)}function D(e){if(this.print(e.object,e),!e.computed&&_.isMemberExpression(e.property))throw new TypeError("Got a MemberExpression for MemberExpression property");var t=e.computed;_.isLiteral(e.property)&&"number"==typeof e.property.value&&(t=!0),t?(this.token("["),this.print(e.property,e),this.token("]")):(this.token("."),this.print(e.property,e))}function C(e){this.print(e.meta,e),this.token("."),this.print(e.property,e)}r.__esModule=!0,r.LogicalExpression=r.BinaryExpression=r.AwaitExpression=r.YieldExpression=void 0,r.UnaryExpression=i,r.DoExpression=s,r.ParenthesizedExpression=a,r.UpdateExpression=o,r.ConditionalExpression=u,r.NewExpression=l,r.SequenceExpression=c,r.ThisExpression=p,r.Super=h,r.Decorator=f,r.CallExpression=m,r.Import=y,r.EmptyStatement=b,r.ExpressionStatement=v,r.AssignmentPattern=x,r.AssignmentExpression=E,r.BindExpression=A,r.MemberExpression=D,r.MetaProperty=C;var S=e("babel-types"),_=n(S),w=e("../node"),k=n(w);r.YieldExpression=g("yield"),r.AwaitExpression=g("await");r.BinaryExpression=E,r.LogicalExpression=E},{"../node":79,"babel-types":169}],71:[function(e,t,r){"use strict";function n(){this.word("any")}function i(e){this.print(e.elementType,e),this.token("["),this.token("]")}function s(){this.word("boolean")}function a(e){this.word(e.value?"true":"false")}function o(){this.word("null")}function u(e){this.word("declare"),this.space(),this.word("class"),this.space(),this._interfaceish(e)}function l(e){this.word("declare"),this.space(),this.word("function"),this.space(),this.print(e.id,e),this.print(e.id.typeAnnotation.typeAnnotation,e),this.semicolon()}function c(e){this.word("declare"),this.space(),this.InterfaceDeclaration(e)}function p(e){this.word("declare"),this.space(),this.word("module"),this.space(),this.print(e.id,e),this.space(),this.print(e.body,e)}function h(e){this.word("declare"),this.space(),this.word("module"),this.token("."),this.word("exports"),this.print(e.typeAnnotation,e)}function f(e){this.word("declare"),this.space(),this.TypeAlias(e)}function d(e){this.word("declare"),this.space(),this.word("var"),this.space(),this.print(e.id,e),this.print(e.id.typeAnnotation,e),this.semicolon()}function m(){this.token("*")}function y(e,t){this.print(e.typeParameters,e),this.token("("),this.printList(e.params,e),e.rest&&(e.params.length&&(this.token(","),this.space()),this.token("..."),this.print(e.rest,e)),this.token(")"),"ObjectTypeCallProperty"===t.type||"DeclareFunction"===t.type?this.token(":"):(this.space(),this.token("=>")),this.space(),this.print(e.returnType,e)}function g(e){this.print(e.name,e),e.optional&&this.token("?"),this.token(":"),this.space(),this.print(e.typeAnnotation,e)}function b(e){this.print(e.id,e),this.print(e.typeParameters,e)}function v(e){this.print(e.id,e),this.print(e.typeParameters,e),e.extends.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends,e)),e.mixins&&e.mixins.length&&(this.space(),this.word("mixins"),this.space(),this.printList(e.mixins,e)),this.space(),this.print(e.body,e)}function x(e){"plus"===e.variance?this.token("+"):"minus"===e.variance&&this.token("-")}function E(e){this.word("interface"),this.space(),this._interfaceish(e)}function A(){this.space(),this.token("&"),this.space()}function D(e){this.printJoin(e.types,e,{separator:A})}function C(){this.word("mixed")}function S(){this.word("empty")}function _(e){this.token("?"),this.print(e.typeAnnotation,e)}function w(){this.word("number")}function k(){this.word("string")}function F(){this.word("this")}function T(e){this.token("["),this.printList(e.types,e),this.token("]")}function P(e){this.word("typeof"),this.space(),this.print(e.argument,e)}function B(e){this.word("type"),this.space(),this.print(e.id,e),this.print(e.typeParameters,e),this.space(),this.token("="),this.space(),this.print(e.right,e),this.semicolon()}function O(e){this.token(":"),this.space(),e.optional&&this.token("?"),this.print(e.typeAnnotation,e)}function j(e){this._variance(e),this.word(e.name),e.bound&&this.print(e.bound,e),e.default&&(this.space(),this.token("="),this.space(),this.print(e.default,e))}function N(e){this.token("<"),this.printList(e.params,e,{}),this.token(">")}function I(e){var t=this;e.exact?this.token("{|"):this.token("{");var r=e.properties.concat(e.callProperties,e.indexers);r.length&&(this.space(),this.printJoin(r,e,{addNewlines:function(e){if(e&&!r[0])return 1},indent:!0,statement:!0,iterator:function(){1!==r.length&&(t.format.flowCommaSeparator?t.token(","):t.semicolon(),t.space())}}),this.space()),e.exact?this.token("|}"):this.token("}")}function L(e){e.static&&(this.word("static"),this.space()),this.print(e.value,e)}function M(e){e.static&&(this.word("static"),this.space()),this._variance(e),this.token("["),this.print(e.id,e),this.token(":"),this.space(),this.print(e.key,e),this.token("]"),this.token(":"),this.space(),this.print(e.value,e)}function R(e){e.static&&(this.word("static"),this.space()),this._variance(e),this.print(e.key,e),e.optional&&this.token("?"),this.token(":"),this.space(),this.print(e.value,e)}function U(e){this.print(e.qualification,e),this.token("."),this.print(e.id,e)}function V(){this.space(),this.token("|"),this.space()}function q(e){this.printJoin(e.types,e,{separator:V})}function G(e){this.token("("),this.print(e.expression,e),this.print(e.typeAnnotation,e),this.token(")")}function X(){this.word("void")}r.__esModule=!0,r.AnyTypeAnnotation=n,r.ArrayTypeAnnotation=i,r.BooleanTypeAnnotation=s,r.BooleanLiteralTypeAnnotation=a,r.NullLiteralTypeAnnotation=o,r.DeclareClass=u,r.DeclareFunction=l,r.DeclareInterface=c,r.DeclareModule=p,r.DeclareModuleExports=h,r.DeclareTypeAlias=f,r.DeclareVariable=d,r.ExistentialTypeParam=m,r.FunctionTypeAnnotation=y,r.FunctionTypeParam=g,r.InterfaceExtends=b,r._interfaceish=v,r._variance=x,r.InterfaceDeclaration=E,r.IntersectionTypeAnnotation=D,r.MixedTypeAnnotation=C,r.EmptyTypeAnnotation=S,r.NullableTypeAnnotation=_;var J=e("./types");Object.defineProperty(r,"NumericLiteralTypeAnnotation",{enumerable:!0,get:function(){return J.NumericLiteral}}),Object.defineProperty(r,"StringLiteralTypeAnnotation",{enumerable:!0,get:function(){return J.StringLiteral}}),r.NumberTypeAnnotation=w,r.StringTypeAnnotation=k,r.ThisTypeAnnotation=F,r.TupleTypeAnnotation=T,r.TypeofTypeAnnotation=P,r.TypeAlias=B,r.TypeAnnotation=O,r.TypeParameter=j,r.TypeParameterInstantiation=N,r.ObjectTypeAnnotation=I,r.ObjectTypeCallProperty=L,r.ObjectTypeIndexer=M,r.ObjectTypeProperty=R,r.QualifiedTypeIdentifier=U,r.UnionTypeAnnotation=q,r.TypeCastExpression=G,r.VoidTypeAnnotation=X,r.ClassImplements=b,r.GenericTypeAnnotation=b,r.TypeParameterDeclaration=N},{"./types":77}],72:[function(e,t,r){"use strict";function n(e){this.print(e.name,e),e.value&&(this.token("="),this.print(e.value,e))}function i(e){this.word(e.name)}function s(e){this.print(e.namespace,e),this.token(":"),this.print(e.name,e)}function a(e){this.print(e.object,e),this.token("."),this.print(e.property,e)}function o(e){this.token("{"),this.token("..."),this.print(e.argument,e),this.token("}")}function u(e){this.token("{"),this.print(e.expression,e),this.token("}")}function l(e){this.token("{"),this.token("..."),this.print(e.expression,e),this.token("}")}function c(e){this.token(e.value)}function p(e){var t=e.openingElement;if(this.print(t,e),!t.selfClosing){this.indent();for(var r=e.children,n=Array.isArray(r),i=0,r=n?r:(0,g.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;this.print(a,e)}this.dedent(),this.print(e.closingElement,e)}}function h(){this.space()}function f(e){this.token("<"),this.print(e.name,e),e.attributes.length>0&&(this.space(),this.printJoin(e.attributes,e,{separator:h})),e.selfClosing?(this.space(),this.token("/>")):this.token(">")}function d(e){this.token("</"),this.print(e.name,e),this.token(">")}function m(){}r.__esModule=!0;var y=e("babel-runtime/core-js/get-iterator"),g=function(e){return e&&e.__esModule?e:{default:e}}(y);r.JSXAttribute=n,r.JSXIdentifier=i,r.JSXNamespacedName=s,r.JSXMemberExpression=a,r.JSXSpreadAttribute=o,r.JSXExpressionContainer=u,r.JSXSpreadChild=l,r.JSXText=c,r.JSXElement=p,r.JSXOpeningElement=f,r.JSXClosingElement=d,r.JSXEmptyExpression=m},{"babel-runtime/core-js/get-iterator":113}],73:[function(e,t,r){"use strict";function n(e){var t=this;this.print(e.typeParameters,e),this.token("("),this.printList(e.params,e,{iterator:function(e){e.optional&&t.token("?"),t.print(e.typeAnnotation,e)}}),this.token(")"),e.returnType&&this.print(e.returnType,e)}function i(e){var t=e.kind,r=e.key;"method"!==t&&"init"!==t||e.generator&&this.token("*"),"get"!==t&&"set"!==t||(this.word(t),this.space()),e.async&&(this.word("async"),this.space()),e.computed?(this.token("["),this.print(r,e),this.token("]")):this.print(r,e),this._params(e),this.space(),this.print(e.body,e)}function s(e){e.async&&(this.word("async"),this.space()),this.word("function"),e.generator&&this.token("*"),e.id?(this.space(),this.print(e.id,e)):this.space(),this._params(e),this.space(),this.print(e.body,e)}function a(e){e.async&&(this.word("async"),this.space());var t=e.params[0];1===e.params.length&&l.isIdentifier(t)&&!o(e,t)?this.print(t,e):this._params(e),this.space(),this.token("=>"),this.space(),this.print(e.body,e)}function o(e,t){return e.typeParameters||e.returnType||t.typeAnnotation||t.optional||t.trailingComments}r.__esModule=!0,r.FunctionDeclaration=void 0,r._params=n,r._method=i,r.FunctionExpression=s,r.ArrowFunctionExpression=a;var u=e("babel-types"),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(u);r.FunctionDeclaration=s},{"babel-types":169}],74:[function(e,t,r){"use strict";function n(e){"type"!==e.importKind&&"typeof"!==e.importKind||(this.word(e.importKind),this.space()),this.print(e.imported,e),e.local&&e.local.name!==e.imported.name&&(this.space(),this.word("as"),this.space(),this.print(e.local,e))}function i(e){this.print(e.local,e)}function s(e){this.print(e.exported,e)}function a(e){this.print(e.local,e),e.exported&&e.local.name!==e.exported.name&&(this.space(),this.word("as"),this.space(),this.print(e.exported,e))}function o(e){this.token("*"),this.space(),this.word("as"),this.space(),this.print(e.exported,e)}function u(e){this.word("export"),this.space(),this.token("*"),this.space(),this.word("from"),this.space(),this.print(e.source,e),this.semicolon()}function l(){this.word("export"),this.space(),p.apply(this,arguments)}function c(){this.word("export"),this.space(),this.word("default"),this.space(),p.apply(this,arguments)}function p(e){if(e.declaration){var t=e.declaration;this.print(t,e),m.isStatement(t)||this.semicolon()}else{"type"===e.exportKind&&(this.word("type"),this.space());for(var r=e.specifiers.slice(0),n=!1;;){var i=r[0];if(!m.isExportDefaultSpecifier(i)&&!m.isExportNamespaceSpecifier(i))break;n=!0,this.print(r.shift(),e),r.length&&(this.token(","),this.space())}(r.length||!r.length&&!n)&&(this.token("{"),r.length&&(this.space(),this.printList(r,e),this.space()),this.token("}")),e.source&&(this.space(),this.word("from"),this.space(),this.print(e.source,e)),this.semicolon()}}function h(e){this.word("import"),this.space(),"type"!==e.importKind&&"typeof"!==e.importKind||(this.word(e.importKind),this.space());var t=e.specifiers.slice(0);if(t&&t.length){for(;;){var r=t[0];if(!m.isImportDefaultSpecifier(r)&&!m.isImportNamespaceSpecifier(r))break;this.print(t.shift(),e),t.length&&(this.token(","),this.space())}t.length&&(this.token("{"),this.space(),this.printList(t,e),this.space(),this.token("}")),this.space(),this.word("from"),this.space()}this.print(e.source,e),this.semicolon()}function f(e){this.token("*"),this.space(),this.word("as"),this.space(),this.print(e.local,e)}r.__esModule=!0,r.ImportSpecifier=n,r.ImportDefaultSpecifier=i,r.ExportDefaultSpecifier=s,r.ExportSpecifier=a,
+r.ExportNamespaceSpecifier=o,r.ExportAllDeclaration=u,r.ExportNamedDeclaration=l,r.ExportDefaultDeclaration=c,r.ImportDeclaration=h,r.ImportNamespaceSpecifier=f;var d=e("babel-types"),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(d)},{"babel-types":169}],75:[function(e,t,r){"use strict";function n(e){this.word("with"),this.space(),this.token("("),this.print(e.object,e),this.token(")"),this.printBlock(e)}function i(e){this.word("if"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.space();var t=e.alternate&&D.isIfStatement(s(e.consequent));t&&(this.token("{"),this.newline(),this.indent()),this.printAndIndentOnComments(e.consequent,e),t&&(this.dedent(),this.newline(),this.token("}")),e.alternate&&(this.endsWith("}")&&this.space(),this.word("else"),this.space(),this.printAndIndentOnComments(e.alternate,e))}function s(e){return D.isStatement(e.body)?s(e.body):e}function a(e){this.word("for"),this.space(),this.token("("),this.inForStatementInitCounter++,this.print(e.init,e),this.inForStatementInitCounter--,this.token(";"),e.test&&(this.space(),this.print(e.test,e)),this.token(";"),e.update&&(this.space(),this.print(e.update,e)),this.token(")"),this.printBlock(e)}function o(e){this.word("while"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.printBlock(e)}function u(e){this.word("do"),this.space(),this.print(e.body,e),this.space(),this.word("while"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.semicolon()}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"label";return function(r){this.word(e);var n=r[t];if(n){this.space();var i=this.startTerminatorless();this.print(n,r),this.endTerminatorless(i)}this.semicolon()}}function c(e){this.print(e.label,e),this.token(":"),this.space(),this.print(e.body,e)}function p(e){this.word("try"),this.space(),this.print(e.block,e),this.space(),e.handlers?this.print(e.handlers[0],e):this.print(e.handler,e),e.finalizer&&(this.space(),this.word("finally"),this.space(),this.print(e.finalizer,e))}function h(e){this.word("catch"),this.space(),this.token("("),this.print(e.param,e),this.token(")"),this.space(),this.print(e.body,e)}function f(e){this.word("switch"),this.space(),this.token("("),this.print(e.discriminant,e),this.token(")"),this.space(),this.token("{"),this.printSequence(e.cases,e,{indent:!0,addNewlines:function(t,r){if(!t&&e.cases[e.cases.length-1]===r)return-1}}),this.token("}")}function d(e){e.test?(this.word("case"),this.space(),this.print(e.test,e),this.token(":")):(this.word("default"),this.token(":")),e.consequent.length&&(this.newline(),this.printSequence(e.consequent,e,{indent:!0}))}function m(){this.word("debugger"),this.semicolon()}function y(){if(this.token(","),this.newline(),this.endsWith("\n"))for(var e=0;e<4;e++)this.space(!0)}function g(){if(this.token(","),this.newline(),this.endsWith("\n"))for(var e=0;e<6;e++)this.space(!0)}function b(e,t){this.word(e.kind),this.space();var r=!1;if(!D.isFor(t))for(var n=e.declarations,i=Array.isArray(n),s=0,n=i?n:(0,E.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;o.init&&(r=!0)}var u=void 0;r&&(u="const"===e.kind?g:y),this.printList(e.declarations,e,{separator:u}),(!D.isFor(t)||t.left!==e&&t.init!==e)&&this.semicolon()}function v(e){this.print(e.id,e),this.print(e.id.typeAnnotation,e),e.init&&(this.space(),this.token("="),this.space(),this.print(e.init,e))}r.__esModule=!0,r.ThrowStatement=r.BreakStatement=r.ReturnStatement=r.ContinueStatement=r.ForAwaitStatement=r.ForOfStatement=r.ForInStatement=void 0;var x=e("babel-runtime/core-js/get-iterator"),E=function(e){return e&&e.__esModule?e:{default:e}}(x);r.WithStatement=n,r.IfStatement=i,r.ForStatement=a,r.WhileStatement=o,r.DoWhileStatement=u,r.LabeledStatement=c,r.TryStatement=p,r.CatchClause=h,r.SwitchStatement=f,r.SwitchCase=d,r.DebuggerStatement=m,r.VariableDeclaration=b,r.VariableDeclarator=v;var A=e("babel-types"),D=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(A),C=function(e){return function(t){this.word("for"),this.space(),"await"===e&&(this.word("await"),this.space()),this.token("("),this.print(t.left,t),this.space(),this.word("await"===e?"of":e),this.space(),this.print(t.right,t),this.token(")"),this.printBlock(t)}};r.ForInStatement=C("in"),r.ForOfStatement=C("of"),r.ForAwaitStatement=C("await"),r.ContinueStatement=l("continue"),r.ReturnStatement=l("return","argument"),r.BreakStatement=l("break"),r.ThrowStatement=l("throw","argument")},{"babel-runtime/core-js/get-iterator":113,"babel-types":169}],76:[function(e,t,r){"use strict";function n(e){this.print(e.tag,e),this.print(e.quasi,e)}function i(e,t){var r=t.quasis[0]===e,n=t.quasis[t.quasis.length-1]===e,i=(r?"`":"}")+e.value.raw+(n?"`":"${");this.token(i)}function s(e){for(var t=e.quasis,r=0;r<t.length;r++)this.print(t[r],e),r+1<t.length&&this.print(e.expressions[r],e)}r.__esModule=!0,r.TaggedTemplateExpression=n,r.TemplateElement=i,r.TemplateLiteral=s},{}],77:[function(e,t,r){"use strict";function n(e){e.variance&&("plus"===e.variance?this.token("+"):"minus"===e.variance&&this.token("-")),this.word(e.name)}function i(e){this.token("..."),this.print(e.argument,e)}function s(e){var t=e.properties;this.token("{"),this.printInnerComments(e),t.length&&(this.space(),this.printList(t,e,{indent:!0,statement:!0}),this.space()),this.token("}")}function a(e){this.printJoin(e.decorators,e),this._method(e)}function o(e){if(this.printJoin(e.decorators,e),e.computed)this.token("["),this.print(e.key,e),this.token("]");else{if(m.isAssignmentPattern(e.value)&&m.isIdentifier(e.key)&&e.key.name===e.value.left.name)return void this.print(e.value,e);if(this.print(e.key,e),e.shorthand&&m.isIdentifier(e.key)&&m.isIdentifier(e.value)&&e.key.name===e.value.name)return}this.token(":"),this.space(),this.print(e.value,e)}function u(e){var t=e.elements,r=t.length;this.token("["),this.printInnerComments(e);for(var n=0;n<t.length;n++){var i=t[n];i?(n>0&&this.space(),this.print(i,e),n<r-1&&this.token(",")):this.token(",")}this.token("]")}function l(e){this.word("/"+e.pattern+"/"+e.flags)}function c(e){this.word(e.value?"true":"false")}function p(){this.word("null")}function h(e){var t=this.getPossibleRaw(e),r=e.value+"";null==t?this.number(r):this.format.minified?this.number(t.length<r.length?t:r):this.number(t)}function f(e,t){var r=this.getPossibleRaw(e);if(!this.format.minified&&null!=r)return void this.token(r);var n={quotes:m.isJSX(t)?"double":this.format.quotes,wrap:!0};this.format.jsonCompatibleStrings&&(n.json=!0);var i=(0,g.default)(e.value,n);return this.token(i)}r.__esModule=!0,r.ArrayPattern=r.ObjectPattern=r.RestProperty=r.SpreadProperty=r.SpreadElement=void 0,r.Identifier=n,r.RestElement=i,r.ObjectExpression=s,r.ObjectMethod=a,r.ObjectProperty=o,r.ArrayExpression=u,r.RegExpLiteral=l,r.BooleanLiteral=c,r.NullLiteral=p,r.NumericLiteral=h,r.StringLiteral=f;var d=e("babel-types"),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(d),y=e("jsesc"),g=function(e){return e&&e.__esModule?e:{default:e}}(y);r.SpreadElement=i,r.SpreadProperty=i,r.RestProperty=i,r.ObjectPattern=s,r.ArrayPattern=u},{"babel-types":169,jsesc:312}],78:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t,r){var n=" ";if(e&&"string"==typeof e){var i=(0,f.default)(e).indent;i&&" "!==i&&(n=i)}var a={auxiliaryCommentBefore:t.auxiliaryCommentBefore,auxiliaryCommentAfter:t.auxiliaryCommentAfter,shouldPrintComment:t.shouldPrintComment,retainLines:t.retainLines,retainFunctionParens:t.retainFunctionParens,comments:null==t.comments||t.comments,compact:t.compact,minified:t.minified,concise:t.concise,quotes:t.quotes||s(e,r),jsonCompatibleStrings:t.jsonCompatibleStrings,indent:{adjustMultilineComment:!0,style:n,base:0},flowCommaSeparator:t.flowCommaSeparator};return a.minified?(a.compact=!0,a.shouldPrintComment=a.shouldPrintComment||function(){return a.comments}):a.shouldPrintComment=a.shouldPrintComment||function(e){return a.comments||e.indexOf("@license")>=0||e.indexOf("@preserve")>=0},"auto"===a.compact&&(a.compact=e.length>5e5,a.compact&&console.error("[BABEL] "+g.get("codeGeneratorDeopt",t.filename,"500KB"))),a.compact&&(a.indent.adjustMultilineComment=!1),a}function s(e,t){if(!e)return"double";for(var r={single:0,double:0},n=0,i=0;i<t.length;i++){var s=t[i];if("string"===s.type.label){if("'"===e.slice(s.start,s.end)[0]?r.single++:r.double++,++n>=3)break}}return r.single>r.double?"single":"double"}r.__esModule=!0,r.CodeGenerator=void 0;var a=e("babel-runtime/helpers/classCallCheck"),o=n(a),u=e("babel-runtime/helpers/possibleConstructorReturn"),l=n(u),c=e("babel-runtime/helpers/inherits"),p=n(c);r.default=function(e,t,r){return new x(e,t,r).generate()};var h=e("detect-indent"),f=n(h),d=e("./source-map"),m=n(d),y=e("babel-messages"),g=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(y),b=e("./printer"),v=n(b),x=function(e){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments[2];(0,o.default)(this,t);var a=r.tokens||[],u=i(s,n,a),c=n.sourceMaps?new m.default(n,s):null,p=(0,l.default)(this,e.call(this,u,c,a));return p.ast=r,p}return(0,p.default)(t,e),t.prototype.generate=function(){return e.prototype.generate.call(this,this.ast)},t}(v.default);r.CodeGenerator=function(){function e(t,r,n){(0,o.default)(this,e),this._generator=new x(t,r,n)}return e.prototype.generate=function(){return this._generator.generate()},e}()},{"./printer":82,"./source-map":83,"babel-messages":103,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/inherits":128,"babel-runtime/helpers/possibleConstructorReturn":130,"detect-indent":299}],79:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){function t(e,t){var n=r[e];r[e]=n?function(e,r,i){var s=n(e,r,i);return null==s?t(e,r,i):s}:t}for(var r={},n=(0,m.default)(e),i=Array.isArray(n),s=0,n=i?n:(0,f.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a,u=E.FLIPPED_ALIAS_KEYS[o];if(u)for(var l=u,c=Array.isArray(l),p=0,l=c?l:(0,f.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if(p=l.next(),p.done)break;h=p.value}var d=h;t(d,e[o])}else t(o,e[o])}return r}function a(e,t,r,n){var i=e[t.type];return i?i(t,r,n):null}function o(e){return!!E.isCallExpression(e)||!!E.isMemberExpression(e)&&(o(e.object)||!e.computed&&o(e.property))}function u(e,t,r){if(!e)return 0;E.isExpressionStatement(e)&&(e=e.expression);var n=a(D,e,t);if(!n){var i=a(C,e,t);if(i)for(var s=0;s<i.length&&!(n=u(i[s],e,r));s++);}return n&&n[r]||0}function l(e,t){return u(e,t,"before")}function c(e,t){return u(e,t,"after")}function p(e,t,r){return!!t&&(!(!E.isNewExpression(t)||t.callee!==e||!o(e))||a(A,e,t,r))}r.__esModule=!0;var h=e("babel-runtime/core-js/get-iterator"),f=i(h),d=e("babel-runtime/core-js/object/keys"),m=i(d);r.needsWhitespace=u,r.needsWhitespaceBefore=l,r.needsWhitespaceAfter=c,r.needsParens=p;var y=e("./whitespace"),g=i(y),b=e("./parentheses"),v=n(b),x=e("babel-types"),E=n(x),A=s(v),D=s(g.default.nodes),C=s(g.default.list)},{"./parentheses":80,"./whitespace":81,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/object/keys":120,"babel-types":169}],80:[function(e,t,r){"use strict";function n(e,t){return v.isArrayTypeAnnotation(t)}function i(e,t){return v.isMemberExpression(t)&&t.object===e}function s(e,t,r){return g(r,{considerArrow:!0})}function a(e,t,r){return g(r)}function o(e,t){if((v.isCallExpression(t)||v.isNewExpression(t))&&t.callee===e||v.isUnaryLike(t)||v.isMemberExpression(t)&&t.object===e||v.isAwaitExpression(t))return!0;if(v.isBinary(t)){var r=t.operator,n=x[r],i=e.operator,s=x[i];if(n===s&&t.right===e&&!v.isLogicalExpression(t)||n>s)return!0}return!1}function u(e,t){return"in"===e.operator&&(v.isVariableDeclarator(t)||v.isFor(t))}function l(e,t){return!(v.isForStatement(t)||v.isThrowStatement(t)||v.isReturnStatement(t)||v.isIfStatement(t)&&t.test===e||v.isWhileStatement(t)&&t.test===e||v.isForInStatement(t)&&t.right===e||v.isSwitchStatement(t)&&t.discriminant===e||v.isExpressionStatement(t)&&t.expression===e)}function c(e,t){return v.isBinary(t)||v.isUnaryLike(t)||v.isCallExpression(t)||v.isMemberExpression(t)||v.isNewExpression(t)||v.isConditionalExpression(t)&&e===t.test}function p(e,t,r){return g(r,{considerDefaultExports:!0})}function h(e,t){return v.isMemberExpression(t,{object:e})||v.isCallExpression(t,{callee:e})||v.isNewExpression(t,{callee:e})}function f(e,t,r){return g(r,{considerDefaultExports:!0})}function d(e,t){return!!(v.isExportDeclaration(t)||v.isBinaryExpression(t)||v.isLogicalExpression(t)||v.isUnaryExpression(t)||v.isTaggedTemplateExpression(t))||h(e,t)}function m(e,t){return!!(v.isUnaryLike(t)||v.isBinary(t)||v.isConditionalExpression(t,{test:e})||v.isAwaitExpression(t))||h(e,t)}function y(e){return!!v.isObjectPattern(e.left)||m.apply(void 0,arguments)}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.considerArrow,n=void 0!==r&&r,i=t.considerDefaultExports,s=void 0!==i&&i,a=e.length-1,o=e[a];a--;for(var u=e[a];a>0;){if(v.isExpressionStatement(u,{expression:o})||v.isTaggedTemplateExpression(u)||s&&v.isExportDefaultDeclaration(u,{declaration:o})||n&&v.isArrowFunctionExpression(u,{body:o}))return!0;if(!(v.isCallExpression(u,{callee:o})||v.isSequenceExpression(u)&&u.expressions[0]===o||v.isMemberExpression(u,{object:o})||v.isConditional(u,{test:o})||v.isBinary(u,{left:o})||v.isAssignmentExpression(u,{left:o})))return!1;o=u,a--,u=e[a]}return!1}r.__esModule=!0,r.AwaitExpression=r.FunctionTypeAnnotation=void 0,r.NullableTypeAnnotation=n,r.UpdateExpression=i,r.ObjectExpression=s,r.DoExpression=a,r.Binary=o,r.BinaryExpression=u,r.SequenceExpression=l,r.YieldExpression=c,r.ClassExpression=p,r.UnaryLike=h,r.FunctionExpression=f,r.ArrowFunctionExpression=d,r.ConditionalExpression=m,r.AssignmentExpression=y;var b=e("babel-types"),v=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(b),x={"||":0,"&&":1,"|":2,"^":3,"&":4,"==":5,"===":5,"!=":5,"!==":5,"<":6,">":6,"<=":6,">=":6,in:6,instanceof:6,">>":7,"<<":7,">>>":7,"+":8,"-":8,"*":9,"/":9,"%":9,"**":10};r.FunctionTypeAnnotation=n,r.AwaitExpression=c},{"babel-types":169}],81:[function(e,t,r){"use strict";function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l.isMemberExpression(e)?(n(e.object,t),e.computed&&n(e.property,t)):l.isBinary(e)||l.isAssignmentExpression(e)?(n(e.left,t),n(e.right,t)):l.isCallExpression(e)?(t.hasCall=!0,n(e.callee,t)):l.isFunction(e)?t.hasFunction=!0:l.isIdentifier(e)&&(t.hasHelper=t.hasHelper||i(e.callee)),t}function i(e){return l.isMemberExpression(e)?i(e.object)||i(e.property):l.isIdentifier(e)?"require"===e.name||"_"===e.name[0]:l.isCallExpression(e)?i(e.callee):!(!l.isBinary(e)&&!l.isAssignmentExpression(e))&&(l.isIdentifier(e.left)&&i(e.left)||i(e.right))}function s(e){return l.isLiteral(e)||l.isObjectExpression(e)||l.isArrayExpression(e)||l.isIdentifier(e)||l.isMemberExpression(e)}var a=e("lodash/map"),o=function(e){return e&&e.__esModule?e:{default:e}}(a),u=e("babel-types"),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(u);r.nodes={AssignmentExpression:function(e){var t=n(e.right);if(t.hasCall&&t.hasHelper||t.hasFunction)return{before:t.hasFunction,after:!0}},SwitchCase:function(e,t){return{before:e.consequent.length||t.cases[0]===e}},LogicalExpression:function(e){if(l.isFunction(e.left)||l.isFunction(e.right))return{after:!0}},Literal:function(e){if("use strict"===e.value)return{after:!0}},CallExpression:function(e){if(l.isFunction(e.callee)||i(e))return{before:!0,after:!0}},VariableDeclaration:function(e){for(var t=0;t<e.declarations.length;t++){var r=e.declarations[t],a=i(r.id)&&!s(r.init);if(!a){var o=n(r.init);a=i(r.init)&&o.hasCall||o.hasFunction}if(a)return{before:!0,after:!0}}},IfStatement:function(e){if(l.isBlockStatement(e.consequent))return{before:!0,after:!0}}},r.nodes.ObjectProperty=r.nodes.ObjectTypeProperty=r.nodes.ObjectMethod=r.nodes.SpreadProperty=function(e,t){if(t.properties[0]===e)return{before:!0}},r.list={VariableDeclaration:function(e){return(0,o.default)(e.declarations,"init")},ArrayExpression:function(e){return e.elements},ObjectExpression:function(e){return e.properties}},[["Function",!0],["Class",!0],["Loop",!0],["LabeledStatement",!0],["SwitchStatement",!0],["TryStatement",!0]].forEach(function(e){var t=e[0],n=e[1];"boolean"==typeof n&&(n={after:n,before:n}),[t].concat(l.FLIPPED_ALIAS_KEYS[t]||[]).forEach(function(e){r.nodes[e]=function(){return n}})})},{"babel-types":169,"lodash/map":514}],82:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(){this.token(","),this.space()}r.__esModule=!0;var a=e("babel-runtime/core-js/object/assign"),o=i(a),u=e("babel-runtime/core-js/get-iterator"),l=i(u),c=e("babel-runtime/core-js/json/stringify"),p=i(c),h=e("babel-runtime/core-js/weak-set"),f=i(h),d=e("babel-runtime/helpers/classCallCheck"),m=i(d),y=e("lodash/find"),g=i(y),b=e("lodash/findLast"),v=i(b),x=e("lodash/isInteger"),E=i(x),A=e("lodash/repeat"),D=i(A),C=e("./buffer"),S=i(C),_=e("./node"),w=n(_),k=e("./whitespace"),F=i(k),T=e("babel-types"),P=n(T),B=/e/i,O=/\.0+$/,j=/^0[box]/,N=function(){function e(t,r,n){(0,m.default)(this,e),this.inForStatementInitCounter=0,this._printStack=[],this._indent=0,this._insideAux=!1,this._printedCommentStarts={},this._parenPushNewlineState=null,this._printAuxAfterOnNextUserNode=!1,this._printedComments=new f.default,this._endsWithInteger=!1,this._endsWithWord=!1,this.format=t||{},this._buf=new S.default(r),this._whitespace=n.length>0?new F.default(n):null}return e.prototype.generate=function(e){return this.print(e),this._maybeAddAuxComment(),this._buf.get()},e.prototype.indent=function(){this.format.compact||this.format.concise||this._indent++},e.prototype.dedent=function(){this.format.compact||this.format.concise||this._indent--},e.prototype.semicolon=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._maybeAddAuxComment(),this._append(";",!e)},e.prototype.rightBrace=function(){this.format.minified&&this._buf.removeLastSemicolon(),this.token("}")},e.prototype.space=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.format.compact||(this._buf.hasContent()&&!this.endsWith(" ")&&!this.endsWith("\n")||e)&&this._space()},e.prototype.word=function(e){this._endsWithWord&&this._space(),this._maybeAddAuxComment(),this._append(e),this._endsWithWord=!0},e.prototype.number=function(e){this.word(e),this._endsWithInteger=(0,E.default)(+e)&&!j.test(e)&&!B.test(e)&&!O.test(e)&&"."!==e[e.length-1]},e.prototype.token=function(e){("--"===e&&this.endsWith("!")||"+"===e[0]&&this.endsWith("+")||"-"===e[0]&&this.endsWith("-")||"."===e[0]&&this._endsWithInteger)&&this._space(),this._maybeAddAuxComment(),this._append(e)},e.prototype.newline=function(e){if(!this.format.retainLines&&!this.format.compact){if(this.format.concise)return void this.space();if(!(this.endsWith("\n\n")||("number"!=typeof e&&(e=1),e=Math.min(2,e),(this.endsWith("{\n")||this.endsWith(":\n"))&&e--,e<=0)))for(var t=0;t<e;t++)this._newline()}},e.prototype.endsWith=function(e){return this._buf.endsWith(e)},e.prototype.removeTrailingNewline=function(){this._buf.removeTrailingNewline()},e.prototype.source=function(e,t){this._catchUp(e,t),this._buf.source(e,t)},e.prototype.withSource=function(e,t,r){this._catchUp(e,t),this._buf.withSource(e,t,r)},e.prototype._space=function(){this._append(" ",!0)},e.prototype._newline=function(){this._append("\n",!0)},e.prototype._append=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._maybeAddParen(e),this._maybeIndent(e),t?this._buf.queue(e):this._buf.append(e),this._endsWithWord=!1,this._endsWithInteger=!1},e.prototype._maybeIndent=function(e){this._indent&&this.endsWith("\n")&&"\n"!==e[0]&&this._buf.queue(this._getIndent())},e.prototype._maybeAddParen=function(e){var t=this._parenPushNewlineState;if(t){this._parenPushNewlineState=null;var r=void 0;for(r=0;r<e.length&&" "===e[r];r++);if(r!==e.length){var n=e[r];"\n"!==n&&"/"!==n||(this.token("("),this.indent(),t.printed=!0)}}},e.prototype._catchUp=function(e,t){if(this.format.retainLines){var r=t?t[e]:null;if(r&&null!==r.line)for(var n=r.line-this._buf.getCurrentLine(),i=0;i<n;i++)this._newline()}},e.prototype._getIndent=function(){return(0,D.default)(this.format.indent.style,this._indent)},e.prototype.startTerminatorless=function(){return this._parenPushNewlineState={printed:!1}},e.prototype.endTerminatorless=function(e){e.printed&&(this.dedent(),this.newline(),this.token(")"))},e.prototype.print=function(e,t){var r=this;if(e){var n=this.format.concise;e._compact&&(this.format.concise=!0);if(!this[e.type])throw new ReferenceError("unknown node of type "+(0,p.default)(e.type)+" with constructor "+(0,p.default)(e&&e.constructor.name));this._printStack.push(e);var i=this._insideAux;this._insideAux=!e.loc,this._maybeAddAuxComment(this._insideAux&&!i);var s=w.needsParens(e,t,this._printStack);this.format.retainFunctionParens&&"FunctionExpression"===e.type&&e.extra&&e.extra.parenthesized&&(s=!0),s&&this.token("("),this._printLeadingComments(e,t);var a=P.isProgram(e)||P.isFile(e)?null:e.loc;this.withSource("start",a,function(){r[e.type](e,t)}),this._printTrailingComments(e,t),s&&this.token(")"),this._printStack.pop(),this.format.concise=n,this._insideAux=i}},e.prototype._maybeAddAuxComment=function(e){e&&this._printAuxBeforeComment(),this._insideAux||this._printAuxAfterComment()},e.prototype._printAuxBeforeComment=function(){if(!this._printAuxAfterOnNextUserNode){this._printAuxAfterOnNextUserNode=!0;var e=this.format.auxiliaryCommentBefore;e&&this._printComment({type:"CommentBlock",value:e})}},e.prototype._printAuxAfterComment=function(){if(this._printAuxAfterOnNextUserNode){this._printAuxAfterOnNextUserNode=!1;var e=this.format.auxiliaryCommentAfter;e&&this._printComment({type:"CommentBlock",value:e})}},e.prototype.getPossibleRaw=function(e){var t=e.extra;if(t&&null!=t.raw&&null!=t.rawValue&&e.value===t.rawValue)return t.raw},e.prototype.printJoin=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e&&e.length){r.indent&&this.indent();for(var n={addNewlines:r.addNewlines},i=0;i<e.length;i++){var s=e[i];s&&(r.statement&&this._printNewline(!0,s,t,n),this.print(s,t),r.iterator&&r.iterator(s,i),r.separator&&i<e.length-1&&r.separator.call(this),r.statement&&this._printNewline(!1,s,t,n))}r.indent&&this.dedent()}},e.prototype.printAndIndentOnComments=function(e,t){var r=!!e.leadingComments;r&&this.indent(),this.print(e,t),r&&this.dedent()},e.prototype.printBlock=function(e){var t=e.body;P.isEmptyStatement(t)||this.space(),this.print(t,e)},e.prototype._printTrailingComments=function(e,t){this._printComments(this._getComments(!1,e,t))},e.prototype._printLeadingComments=function(e,t){this._printComments(this._getComments(!0,e,t))},e.prototype.printInnerComments=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.innerComments&&(t&&this.indent(),this._printComments(e.innerComments),t&&this.dedent())},e.prototype.printSequence=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.statement=!0,this.printJoin(e,t,r)},e.prototype.printList=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return null==r.separator&&(r.separator=s),this.printJoin(e,t,r)},e.prototype._printNewline=function(e,t,r,n){var i=this;if(!this.format.retainLines&&!this.format.compact){if(this.format.concise)return void this.space();var s=0;if(null!=t.start&&!t._ignoreUserWhitespace&&this._whitespace)if(e){var a=t.leadingComments,o=a&&(0,g.default)(a,function(e){return!!e.loc&&i.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesBefore(o||t)}else{var u=t.trailingComments,l=u&&(0,v.default)(u,function(e){return!!e.loc&&i.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesAfter(l||t)}else{e||s++,n.addNewlines&&(s+=n.addNewlines(e,t)||0);var c=w.needsWhitespaceAfter;e&&(c=w.needsWhitespaceBefore),c(t,r)&&s++,this._buf.hasContent()||(s=0)}this.newline(s)}},e.prototype._getComments=function(e,t){return t&&(e?t.leadingComments:t.trailingComments)||[]},e.prototype._printComment=function(e){var t=this;if(this.format.shouldPrintComment(e.value)&&!e.ignore&&!this._printedComments.has(e)){if(this._printedComments.add(e),null!=e.start){if(this._printedCommentStarts[e.start])return;this._printedCommentStarts[e.start]=!0}this.newline(this._whitespace?this._whitespace.getNewlinesBefore(e):0),this.endsWith("[")||this.endsWith("{")||this.space();var r="CommentLine"===e.type?"//"+e.value+"\n":"/*"+e.value+"*/";if("CommentBlock"===e.type&&this.format.indent.adjustMultilineComment){var n=e.loc&&e.loc.start.column;if(n){var i=new RegExp("\\n\\s{1,"+n+"}","g");r=r.replace(i,"\n")}var s=Math.max(this._getIndent().length,this._buf.getCurrentColumn());r=r.replace(/\n(?!$)/g,"\n"+(0,D.default)(" ",s))}this.withSource("start",e.loc,function(){t._append(r)}),this.newline((this._whitespace?this._whitespace.getNewlinesAfter(e):0)+("CommentLine"===e.type?-1:0))}},e.prototype._printComments=function(e){if(e&&e.length)for(var t=e,r=Array.isArray(t),n=0,t=r?t:(0,l.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;this._printComment(s)}},e}();r.default=N;for(var I=[e("./generators/template-literals"),e("./generators/expressions"),e("./generators/statements"),e("./generators/classes"),e("./generators/methods"),e("./generators/modules"),e("./generators/types"),e("./generators/flow"),e("./generators/base"),e("./generators/jsx")],L=0;L<I.length;L++){var M=I[L];(0,o.default)(N.prototype,M)}t.exports=r.default},{"./buffer":67,"./generators/base":68,"./generators/classes":69,"./generators/expressions":70,"./generators/flow":71,"./generators/jsx":72,"./generators/methods":73,"./generators/modules":74,"./generators/statements":75,"./generators/template-literals":76,"./generators/types":77,"./node":79,"./whitespace":84,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/json/stringify":114,"babel-runtime/core-js/object/assign":117,"babel-runtime/core-js/weak-set":126,"babel-runtime/helpers/classCallCheck":127,"babel-types":169,"lodash/find":488,"lodash/findLast":490,"lodash/isInteger":503,"lodash/repeat":519}],83:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/core-js/object/keys"),s=n(i),a=e("babel-runtime/helpers/typeof"),o=n(a),u=e("babel-runtime/helpers/classCallCheck"),l=n(u),c=e("source-map"),p=n(c),h=function(){function e(t,r){(0,l.default)(this,e),this._cachedMap=null,this._code=r,this._opts=t,this._rawMappings=[]}return e.prototype.get=function(){if(!this._cachedMap){var e=this._cachedMap=new p.default.SourceMapGenerator({file:this._opts.sourceMapTarget,sourceRoot:this._opts.sourceRoot}),t=this._code;"string"==typeof t?e.setSourceContent(this._opts.sourceFileName,t):"object"===(void 0===t?"undefined":(0,o.default)(t))&&(0,s.default)(t).forEach(function(r){e.setSourceContent(r,t[r])}),this._rawMappings.forEach(e.addMapping,e)}return this._cachedMap.toJSON()},e.prototype.getRawMappings=function(){return this._rawMappings.slice()},e.prototype.mark=function(e,t,r,n,i,s){this._lastGenLine!==e&&null===r||this._lastGenLine===e&&this._lastSourceLine===r&&this._lastSourceColumn===n||(this._cachedMap=null,this._lastGenLine=e,this._lastSourceLine=r,this._lastSourceColumn=n,this._rawMappings.push({name:i||void 0,generated:{line:e,column:t},source:null==r?void 0:s||this._opts.sourceFileName,original:null==r?void 0:{line:r,column:n}}))},e}();r.default=h,t.exports=r.default},{"babel-runtime/core-js/object/keys":120,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/typeof":131,"source-map":95}],84:[function(e,t,r){"use strict";r.__esModule=!0;var n=e("babel-runtime/helpers/classCallCheck"),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s=function(){function e(t){(0,i.default)(this,e),this.tokens=t,this.used={}}return e.prototype.getNewlinesBefore=function(e){var t=void 0,r=void 0,n=this.tokens,i=this._findToken(function(t){return t.start-e.start},0,n.length);if(i>=0){for(;i&&e.start===n[i-1].start;)--i;t=n[i-1],r=n[i]}return this._getNewlinesBetween(t,r)},e.prototype.getNewlinesAfter=function(e){var t=void 0,r=void 0,n=this.tokens,i=this._findToken(function(t){return t.end-e.end},0,n.length);if(i>=0){for(;i&&e.end===n[i-1].end;)--i;t=n[i],r=n[i+1],","===r.type.label&&(r=n[i+2])}return r&&"eof"===r.type.label?1:this._getNewlinesBetween(t,r)},e.prototype._getNewlinesBetween=function(e,t){if(!t||!t.loc)return 0;for(var r=e?e.loc.end.line:1,n=t.loc.start.line,i=0,s=r;s<n;s++)void 0===this.used[s]&&(this.used[s]=!0,i++);return i},e.prototype._findToken=function(e,t,r){if(t>=r)return-1;var n=t+r>>>1,i=e(this.tokens[n]);return i<0?this._findToken(e,n+1,r):i>0?this._findToken(e,t,n):0===i?n:-1},e}();r.default=s,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":127}],85:[function(e,t,r){arguments[4][55][0].apply(r,arguments)},{"./util":94,dup:55}],86:[function(e,t,r){arguments[4][56][0].apply(r,arguments)},{"./base64":87,dup:56}],87:[function(e,t,r){arguments[4][57][0].apply(r,arguments)},{dup:57}],88:[function(e,t,r){arguments[4][58][0].apply(r,arguments)},{dup:58}],89:[function(e,t,r){arguments[4][59][0].apply(r,arguments)},{"./util":94,dup:59}],90:[function(e,t,r){arguments[4][60][0].apply(r,arguments)},{dup:60}],91:[function(e,t,r){arguments[4][61][0].apply(r,arguments)},{"./array-set":85,"./base64-vlq":86,"./binary-search":88,"./quick-sort":90,"./util":94,dup:61}],92:[function(e,t,r){arguments[4][62][0].apply(r,arguments)},{"./array-set":85,"./base64-vlq":86,"./mapping-list":89,"./util":94,dup:62}],93:[function(e,t,r){arguments[4][63][0].apply(r,arguments)},{"./source-map-generator":92,"./util":94,dup:63}],94:[function(e,t,r){arguments[4][64][0].apply(r,arguments)},{dup:64}],95:[function(e,t,r){arguments[4][65][0].apply(r,arguments)},{"./lib/source-map-consumer":91,"./lib/source-map-generator":92,"./lib/source-node":93,dup:65}],96:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return!g.isClassMethod(e)&&!g.isObjectMethod(e)||"get"!==e.kind&&"set"!==e.kind?"value":e.kind}function s(e,t,r,n,s){var a=g.toKeyAlias(t),o={};if((0,m.default)(e,a)&&(o=e[a]),e[a]=o,o._inherits=o._inherits||[],o._inherits.push(t),o._key=t.key,t.computed&&(o._computed=!0),t.decorators){var u=o.decorators=o.decorators||g.arrayExpression([]);u.elements=u.elements.concat(t.decorators.map(function(e){return e.expression}).reverse())}if(o.value||o.initializer)throw n.buildCodeFrameError(t,"Key conflict with sibling node");var l=void 0,c=void 0;(g.isObjectProperty(t)||g.isObjectMethod(t)||g.isClassMethod(t))&&(l=g.toComputedKey(t,t.key)),
+g.isObjectProperty(t)||g.isClassProperty(t)?c=t.value:(g.isObjectMethod(t)||g.isClassMethod(t))&&(c=g.functionExpression(null,t.params,t.body,t.generator,t.async),c.returnType=t.returnType);var p=i(t);return r&&"value"===p||(r=p),s&&g.isStringLiteral(l)&&("value"===r||"initializer"===r)&&g.isFunctionExpression(c)&&(c=(0,f.default)({id:l,node:c,scope:s})),c&&(g.inheritsComments(c,t),o[r]=c),o}function a(e){for(var t in e)if(e[t]._computed)return!0;return!1}function o(e){for(var t=g.arrayExpression([]),r=0;r<e.properties.length;r++){var n=e.properties[r],i=n.value;i.properties.unshift(g.objectProperty(g.identifier("key"),g.toComputedKey(n))),t.elements.push(i)}return t}function u(e){var t=g.objectExpression([]);return(0,p.default)(e).forEach(function(r){var n=e[r],i=g.objectExpression([]),s=g.objectProperty(n._key,i,n._computed);(0,p.default)(n).forEach(function(e){var t=n[e];if("_"!==e[0]){var r=t;(g.isClassMethod(t)||g.isClassProperty(t))&&(t=t.value);var s=g.objectProperty(g.identifier(e),t);g.inheritsComments(s,r),g.removeComments(r),i.properties.push(s)}}),t.properties.push(s)}),t}function l(e){return(0,p.default)(e).forEach(function(t){var r=e[t];r.value&&(r.writable=g.booleanLiteral(!0)),r.configurable=g.booleanLiteral(!0),r.enumerable=g.booleanLiteral(!0)}),u(e)}r.__esModule=!0;var c=e("babel-runtime/core-js/object/keys"),p=n(c);r.push=s,r.hasComputed=a,r.toComputedObjectFromClass=o,r.toClassObject=u,r.toDefineObject=l;var h=e("babel-helper-function-name"),f=n(h),d=e("lodash/has"),m=n(d),y=e("babel-types"),g=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(y)},{"babel-helper-function-name":97,"babel-runtime/core-js/object/keys":120,"babel-types":169,"lodash/has":493}],97:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t,r,n){if(e.selfReference){if(!n.hasBinding(r.name)||n.hasGlobal(r.name)){if(!p.isFunction(t))return;var i=h;t.generator&&(i=f);var s=i({FUNCTION:t,FUNCTION_ID:r,FUNCTION_KEY:n.generateUidIdentifier(r.name)}).expression;s.callee._skipModulesRemap=!0;for(var a=s.callee.body.body[0].params,u=0,l=(0,o.default)(t);u<l;u++)a.push(n.generateUidIdentifier("x"));return s}n.rename(r.name)}t.id=r,n.getProgramParent().references[r.name]=!0}function s(e,t,r){var n={selfAssignment:!1,selfReference:!1,outerDeclar:r.getBindingIdentifier(t),references:[],name:t},i=r.getOwnBinding(t);return i?"param"===i.kind&&(n.selfReference=!0):(n.outerDeclar||r.hasGlobal(t))&&r.traverse(e,d,n),n}r.__esModule=!0,r.default=function(e){var t=e.node,r=e.parent,n=e.scope,a=e.id;if(!t.id){if(!p.isObjectProperty(r)&&!p.isObjectMethod(r,{kind:"method"})||r.computed&&!p.isLiteral(r.key)){if(p.isVariableDeclarator(r)){if(a=r.id,p.isIdentifier(a)){var o=n.parent.getBinding(a.name);if(o&&o.constant&&n.getBinding(a.name)===o)return t.id=a,void(t.id[p.NOT_LOCAL_BINDING]=!0)}}else if(p.isAssignmentExpression(r))a=r.left;else if(!a)return}else a=r.key;var u=void 0;if(a&&p.isLiteral(a))u=a.value;else{if(!a||!p.isIdentifier(a))return;u=a.name}u=p.toBindingIdentifierName(u),a=p.identifier(u),a[p.NOT_LOCAL_BINDING]=!0;return i(s(t,u,n),t,a,n)||t}};var a=e("babel-helper-get-function-arity"),o=n(a),u=e("babel-template"),l=n(u),c=e("babel-types"),p=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(c),h=(0,l.default)("\n (function (FUNCTION_KEY) {\n function FUNCTION_ID() {\n return FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n }\n\n return FUNCTION_ID;\n })(FUNCTION)\n"),f=(0,l.default)("\n (function (FUNCTION_KEY) {\n function* FUNCTION_ID() {\n return yield* FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n };\n\n return FUNCTION_ID;\n })(FUNCTION)\n"),d={"ReferencedIdentifier|BindingIdentifier":function(e,t){if(e.node.name===t.name){e.scope.getBindingIdentifier(t.name)===t.outerDeclar&&(t.selfReference=!0,e.stop())}}};t.exports=r.default},{"babel-helper-get-function-arity":98,"babel-template":132,"babel-types":169}],98:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){for(var t=e.params,r=0;r<t.length;r++){var n=t[r];if(i.isAssignmentPattern(n)||i.isRestElement(n))return r}return t.length};var n=e("babel-types"),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n);t.exports=r.default},{"babel-types":169}],99:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t,r){return 1===r.length&&i.isSpreadElement(r[0])&&i.isIdentifier(r[0].argument,{name:"arguments"})?i.callExpression(i.memberExpression(e,i.identifier("apply")),[t,r[0].argument]):i.callExpression(i.memberExpression(e,i.identifier("call")),[t].concat(r))};var n=e("babel-types"),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n);t.exports=r.default},{"babel-types":169}],100:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return!!g.isSuper(e)&&(!g.isMemberExpression(t,{computed:!1})&&!g.isCallExpression(t,{callee:e}))}function a(e){return g.isMemberExpression(e)&&g.isSuper(e.object)}function o(e,t){var r=t?e:g.memberExpression(e,g.identifier("prototype"));return g.logicalExpression("||",g.memberExpression(r,g.identifier("__proto__")),g.callExpression(g.memberExpression(g.identifier("Object"),g.identifier("getPrototypeOf")),[r]))}r.__esModule=!0;var u=e("babel-runtime/helpers/classCallCheck"),l=i(u),c=e("babel-runtime/core-js/symbol"),p=i(c),h=e("babel-helper-optimise-call-expression"),f=i(h),d=e("babel-messages"),m=n(d),y=e("babel-types"),g=n(y),b=(0,p.default)(),v={Function:function(e){e.inShadow("this")||e.skip()},ReturnStatement:function(e,t){e.inShadow("this")||t.returns.push(e)},ThisExpression:function(e,t){e.node[b]||t.thises.push(e)},enter:function(e,t){var r=t.specHandle;t.isLoose&&(r=t.looseHandle);var n=e.isCallExpression()&&e.get("callee").isSuper(),i=r.call(t,e);i&&(t.hasSuper=!0),n&&t.bareSupers.push(e),!0===i&&e.requeue(),!0!==i&&i&&(Array.isArray(i)?e.replaceWithMultiple(i):e.replaceWith(i))}},x=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,l.default)(this,e),this.forceSuperMemoisation=t.forceSuperMemoisation,this.methodPath=t.methodPath,this.methodNode=t.methodNode,this.superRef=t.superRef,this.isStatic=t.isStatic,this.hasSuper=!1,this.inClass=r,this.isLoose=t.isLoose,this.scope=this.methodPath.scope,this.file=t.file,this.opts=t,this.bareSupers=[],this.returns=[],this.thises=[]}return e.prototype.getObjectRef=function(){return this.opts.objectRef||this.opts.getObjectRef()},e.prototype.setSuperProperty=function(e,t,r){return g.callExpression(this.file.addHelper("set"),[o(this.getObjectRef(),this.isStatic),r?e:g.stringLiteral(e.name),t,g.thisExpression()])},e.prototype.getSuperProperty=function(e,t){return g.callExpression(this.file.addHelper("get"),[o(this.getObjectRef(),this.isStatic),t?e:g.stringLiteral(e.name),g.thisExpression()])},e.prototype.replace=function(){this.methodPath.traverse(v,this)},e.prototype.getLooseSuperProperty=function(e,t){var r=this.methodNode,n=this.superRef||g.identifier("Function");return t.property===e?void 0:g.isCallExpression(t,{callee:e})?void 0:g.isMemberExpression(t)&&!r.static?g.memberExpression(n,g.identifier("prototype")):n},e.prototype.looseHandle=function(e){var t=e.node;if(e.isSuper())return this.getLooseSuperProperty(t,e.parent);if(e.isCallExpression()){var r=t.callee;if(!g.isMemberExpression(r))return;if(!g.isSuper(r.object))return;return g.appendToMemberExpression(r,g.identifier("call")),t.arguments.unshift(g.thisExpression()),!0}},e.prototype.specHandleAssignmentExpression=function(e,t,r){return"="===r.operator?this.setSuperProperty(r.left.property,r.right,r.left.computed):(e=e||t.scope.generateUidIdentifier("ref"),[g.variableDeclaration("var",[g.variableDeclarator(e,r.left)]),g.expressionStatement(g.assignmentExpression("=",r.left,g.binaryExpression(r.operator[0],e,r.right)))])},e.prototype.specHandle=function(e){var t=void 0,r=void 0,n=void 0,i=e.parent,o=e.node;if(s(o,i))throw e.buildCodeFrameError(m.get("classesIllegalBareSuper"));if(g.isCallExpression(o)){var u=o.callee;if(g.isSuper(u))return;a(u)&&(t=u.property,r=u.computed,n=o.arguments)}else if(g.isMemberExpression(o)&&g.isSuper(o.object))t=o.property,r=o.computed;else{if(g.isUpdateExpression(o)&&a(o.argument)){var l=g.binaryExpression(o.operator[0],o.argument,g.numericLiteral(1));if(o.prefix)return this.specHandleAssignmentExpression(null,e,l);var c=e.scope.generateUidIdentifier("ref");return this.specHandleAssignmentExpression(c,e,l).concat(g.expressionStatement(c))}if(g.isAssignmentExpression(o)&&a(o.left))return this.specHandleAssignmentExpression(null,e,o)}if(t){var p=this.getSuperProperty(t,r);return n?this.optimiseCall(p,n):p}},e.prototype.optimiseCall=function(e,t){var r=g.thisExpression();return r[b]=!0,(0,f.default)(e,r,t)},e}();r.default=x,t.exports=r.default},{"babel-helper-optimise-call-expression":99,"babel-messages":103,"babel-runtime/core-js/symbol":122,"babel-runtime/helpers/classCallCheck":127,"babel-types":169}],101:[function(e,t,r){"use strict";r.__esModule=!0;var n=e("babel-template"),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s={};r.default=s,s.typeof=(0,i.default)('\n (typeof Symbol === "function" && typeof Symbol.iterator === "symbol")\n ? function (obj) { return typeof obj; }\n : function (obj) {\n return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype\n ? "symbol"\n : typeof obj;\n };\n'),s.jsx=(0,i.default)('\n (function () {\n var REACT_ELEMENT_TYPE = (typeof Symbol === "function" && Symbol.for && Symbol.for("react.element")) || 0xeac7;\n\n return function createRawReactElement (type, props, key, children) {\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n // If we\'re going to assign props.children, we create a new object now\n // to avoid mutating defaultProps.\n props = {};\n }\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : \'\' + key,\n ref: null,\n props: props,\n _owner: null,\n };\n };\n\n })()\n'),s.asyncIterator=(0,i.default)('\n (function (iterable) {\n if (typeof Symbol === "function") {\n if (Symbol.asyncIterator) {\n var method = iterable[Symbol.asyncIterator];\n if (method != null) return method.call(iterable);\n }\n if (Symbol.iterator) {\n return iterable[Symbol.iterator]();\n }\n }\n throw new TypeError("Object is not async iterable");\n })\n'),s.asyncGenerator=(0,i.default)('\n (function () {\n function AwaitValue(value) {\n this.value = value;\n }\n\n function AsyncGenerator(gen) {\n var front, back;\n\n function send(key, arg) {\n return new Promise(function (resolve, reject) {\n var request = {\n key: key,\n arg: arg,\n resolve: resolve,\n reject: reject,\n next: null\n };\n\n if (back) {\n back = back.next = request;\n } else {\n front = back = request;\n resume(key, arg);\n }\n });\n }\n\n function resume(key, arg) {\n try {\n var result = gen[key](arg)\n var value = result.value;\n if (value instanceof AwaitValue) {\n Promise.resolve(value.value).then(\n function (arg) { resume("next", arg); },\n function (arg) { resume("throw", arg); });\n } else {\n settle(result.done ? "return" : "normal", result.value);\n }\n } catch (err) {\n settle("throw", err);\n }\n }\n\n function settle(type, value) {\n switch (type) {\n case "return":\n front.resolve({ value: value, done: true });\n break;\n case "throw":\n front.reject(value);\n break;\n default:\n front.resolve({ value: value, done: false });\n break;\n }\n\n front = front.next;\n if (front) {\n resume(front.key, front.arg);\n } else {\n back = null;\n }\n }\n\n this._invoke = send;\n\n // Hide "return" method if generator return is not supported\n if (typeof gen.return !== "function") {\n this.return = undefined;\n }\n }\n\n if (typeof Symbol === "function" && Symbol.asyncIterator) {\n AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; };\n }\n\n AsyncGenerator.prototype.next = function (arg) { return this._invoke("next", arg); };\n AsyncGenerator.prototype.throw = function (arg) { return this._invoke("throw", arg); };\n AsyncGenerator.prototype.return = function (arg) { return this._invoke("return", arg); };\n\n return {\n wrap: function (fn) {\n return function () {\n return new AsyncGenerator(fn.apply(this, arguments));\n };\n },\n await: function (value) {\n return new AwaitValue(value);\n }\n };\n\n })()\n'),s.asyncGeneratorDelegate=(0,i.default)('\n (function (inner, awaitWrap) {\n var iter = {}, waiting = false;\n\n function pump(key, value) {\n waiting = true;\n value = new Promise(function (resolve) { resolve(inner[key](value)); });\n return { done: false, value: awaitWrap(value) };\n };\n\n if (typeof Symbol === "function" && Symbol.iterator) {\n iter[Symbol.iterator] = function () { return this; };\n }\n\n iter.next = function (value) {\n if (waiting) {\n waiting = false;\n return value;\n }\n return pump("next", value);\n };\n\n if (typeof inner.throw === "function") {\n iter.throw = function (value) {\n if (waiting) {\n waiting = false;\n throw value;\n }\n return pump("throw", value);\n };\n }\n\n if (typeof inner.return === "function") {\n iter.return = function (value) {\n return pump("return", value);\n };\n }\n\n return iter;\n })\n'),s.asyncToGenerator=(0,i.default)('\n (function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new Promise(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return Promise.resolve(value).then(function (value) {\n step("next", value);\n }, function (err) {\n step("throw", err);\n });\n }\n }\n\n return step("next");\n });\n };\n })\n'),s.classCallCheck=(0,i.default)('\n (function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError("Cannot call a class as a function");\n }\n });\n'),s.createClass=(0,i.default)('\n (function() {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i ++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ("value" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n })()\n'),s.defineEnumerableProperties=(0,i.default)('\n (function (obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if ("value" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n return obj;\n })\n'),s.defaults=(0,i.default)("\n (function (obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n return obj;\n })\n"),s.defineProperty=(0,i.default)("\n (function (obj, key, value) {\n // Shortcircuit the slow defineProperty path when possible.\n // We are trying to avoid issues where setters defined on the\n // prototype cause side effects under the fast path of simple\n // assignment. By checking for existence of the property with\n // the in operator, we can optimize most of this overhead away.\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n });\n"),s.extends=(0,i.default)("\n Object.assign || (function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n })\n"),s.get=(0,i.default)('\n (function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if ("value" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n });\n'),s.inherits=(0,i.default)('\n (function (subClass, superClass) {\n if (typeof superClass !== "function" && superClass !== null) {\n throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n })\n'),s.instanceof=(0,i.default)('\n (function (left, right) {\n if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n });\n'),s.interopRequireDefault=(0,i.default)("\n (function (obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n })\n"),s.interopRequireWildcard=(0,i.default)("\n (function (obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n newObj.default = obj;\n return newObj;\n }\n })\n"),s.newArrowCheck=(0,i.default)('\n (function (innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError("Cannot instantiate an arrow function");\n }\n });\n'),s.objectDestructuringEmpty=(0,i.default)('\n (function (obj) {\n if (obj == null) throw new TypeError("Cannot destructure undefined");\n });\n'),s.objectWithoutProperties=(0,i.default)("\n (function (obj, keys) {\n var target = {};\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n return target;\n })\n"),s.possibleConstructorReturn=(0,i.default)('\n (function (self, call) {\n if (!self) {\n throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n }\n return call && (typeof call === "object" || typeof call === "function") ? call : self;\n });\n'),s.selfGlobal=(0,i.default)('\n typeof global === "undefined" ? self : global\n'),s.set=(0,i.default)('\n (function set(object, property, value, receiver) {\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent !== null) {\n set(parent, property, value, receiver);\n }\n } else if ("value" in desc && desc.writable) {\n desc.value = value;\n } else {\n var setter = desc.set;\n\n if (setter !== undefined) {\n setter.call(receiver, value);\n }\n }\n\n return value;\n });\n'),s.slicedToArray=(0,i.default)('\n (function () {\n // Broken out into a separate function to avoid deoptimizations due to the try/catch for the\n // array iterator case.\n function sliceIterator(arr, i) {\n // this is an expanded form of `for...of` that properly supports abrupt completions of\n // iterators etc. variable names have been minimised to reduce the size of this massive\n // helper. sometimes spec compliancy is annoying :(\n //\n // _n = _iteratorNormalCompletion\n // _d = _didIteratorError\n // _e = _iteratorError\n // _i = _iterator\n // _s = _step\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i["return"]) _i["return"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n };\n })();\n'),s.slicedToArrayLoose=(0,i.default)('\n (function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n var _arr = [];\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n if (i && _arr.length === i) break;\n }\n return _arr;\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n });\n'),s.taggedTemplateLiteral=(0,i.default)("\n (function (strings, raw) {\n return Object.freeze(Object.defineProperties(strings, {\n raw: { value: Object.freeze(raw) }\n }));\n });\n"),s.taggedTemplateLiteralLoose=(0,i.default)("\n (function (strings, raw) {\n strings.raw = raw;\n return strings;\n });\n"),s.temporalRef=(0,i.default)('\n (function (val, name, undef) {\n if (val === undef) {\n throw new ReferenceError(name + " is not defined - temporal dead zone");\n } else {\n return val;\n }\n })\n'),s.temporalUndefined=(0,i.default)("\n ({})\n"),s.toArray=(0,i.default)("\n (function (arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n });\n"),s.toConsumableArray=(0,i.default)("\n (function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n return arr2;\n } else {\n return Array.from(arr);\n }\n });\n"),t.exports=r.default},{"babel-template":132}],102:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=u.default[e];if(!t)throw new ReferenceError("Unknown helper "+e);return t().expression}r.__esModule=!0,r.list=void 0;var s=e("babel-runtime/core-js/object/keys"),a=n(s);r.get=i;var o=e("./helpers"),u=n(o);r.list=(0,a.default)(u.default).map(function(e){return e.replace(/^_/,"")}).filter(function(e){return"__esModule"!==e});r.default=i},{"./helpers":101,"babel-runtime/core-js/object/keys":120}],103:[function(e,t,r){"use strict";function n(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var s=l[e];if(!s)throw new ReferenceError("Unknown message "+(0,a.default)(e));return r=i(r),s.replace(/\$(\d+)/g,function(e,t){return r[t-1]})}function i(e){return e.map(function(e){if(null!=e&&e.inspect)return e.inspect();try{return(0,a.default)(e)||e+""}catch(t){return u.inspect(e)}})}r.__esModule=!0,r.MESSAGES=void 0;var s=e("babel-runtime/core-js/json/stringify"),a=function(e){return e&&e.__esModule?e:{default:e}}(s);r.get=n,r.parseArgs=i;var o=e("util"),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(o),l=r.MESSAGES={tailCallReassignmentDeopt:"Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence",classesIllegalBareSuper:"Illegal use of bare super",classesIllegalSuperCall:"Direct super call is illegal in non-constructor, use super.$1() instead",scopeDuplicateDeclaration:"Duplicate declaration $1",settersNoRest:"Setters aren't allowed to have a rest",noAssignmentsInForHead:"No assignments allowed in for-in/of head",expectedMemberExpressionOrIdentifier:"Expected type MemberExpression or Identifier",invalidParentForThisNode:"We don't know how to handle this node within the current parent - please open an issue",readOnly:"$1 is read-only",unknownForHead:"Unknown node type $1 in ForStatement",didYouMean:"Did you mean $1?",codeGeneratorDeopt:"Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.",missingTemplatesDirectory:"no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues",unsupportedOutputType:"Unsupported output type $1",illegalMethodName:"Illegal method name $1",lostTrackNodePath:"We lost track of this node's position, likely because the AST was directly manipulated",modulesIllegalExportName:"Illegal export $1",modulesDuplicateDeclarations:"Duplicate module declarations with the same source but in different scopes",undeclaredVariable:"Reference to undeclared variable $1",undeclaredVariableType:"Referencing a type alias outside of a type annotation",undeclaredVariableSuggestion:"Reference to undeclared variable $1 - did you mean $2?",traverseNeedsParent:"You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a $1 node without passing scope and parentPath.",traverseVerifyRootFunction:"You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?",traverseVerifyVisitorProperty:"You passed `traverse()` a visitor object with the property $1 that has the invalid property $2",traverseVerifyNodeType:"You gave us a visitor for the node type $1 but it's not a valid type",pluginNotObject:"Plugin $2 specified in $1 was expected to return an object when invoked but returned $3",pluginNotFunction:"Plugin $2 specified in $1 was expected to return a function but returned $3",pluginUnknown:"Unknown plugin $1 specified in $2 at $3, attempted to resolve relative to $4",pluginInvalidProperty:"Plugin $2 specified in $1 provided an invalid property of $3"}},{"babel-runtime/core-js/json/stringify":114,util:601}],104:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("asyncFunctions")}}},t.exports=r.default},{}],105:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("asyncGenerators")}}},t.exports=r.default},{}],106:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){var t=e.types;return{visitor:{ArrowFunctionExpression:function(e,r){if(r.opts.spec){var n=e.node;if(n.shadow)return;n.shadow={this:!1},n.type="FunctionExpression";var i=t.thisExpression();i._forceShadow=e,e.ensureBlock(),e.get("body").unshiftContainer("body",t.expressionStatement(t.callExpression(r.addHelper("newArrowCheck"),[t.thisExpression(),i]))),e.replaceWith(t.callExpression(t.memberExpression(n,t.identifier("bind")),[t.thisExpression()]))}else e.arrowFunctionToShadowed()}}}},t.exports=r.default},{}],107:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return v.isLoop(e.parent)||v.isCatchClause(e.parent)}function s(e){return!!v.isVariableDeclaration(e)&&(!!e[v.BLOCK_SCOPED_SYMBOL]||("let"===e.kind||"const"===e.kind))}function a(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(t||(t=e.node),!v.isFor(r))for(var s=0;s<t.declarations.length;s++){var a=t.declarations[s];a.init=a.init||n.buildUndefinedNode()}if(t[v.BLOCK_SCOPED_SYMBOL]=!0,t.kind="var",i){var o=n.getFunctionParent(),u=e.getBindingIdentifiers();for(var l in u){var c=n.getOwnBinding(l);c&&(c.kind="var"),n.moveBindingTo(l,o)}}}function o(e){return v.isVariableDeclaration(e,{kind:"var"})&&!s(e)}function u(e){return v.isBreakStatement(e)?"break":v.isContinueStatement(e)?"continue":void 0}r.__esModule=!0;var l=e("babel-runtime/core-js/symbol"),c=n(l),p=e("babel-runtime/core-js/object/create"),h=n(p),f=e("babel-runtime/helpers/classCallCheck"),d=n(f);r.default=function(){return{visitor:{VariableDeclaration:function(e,t){var r=e.node,n=e.parent,i=e.scope;if(s(r)&&(a(e,null,n,i,!0),r._tdzThis)){for(var o=[r],u=0;u<r.declarations.length;u++){var l=r.declarations[u];if(l.init){var c=v.assignmentExpression("=",l.id,l.init);c._ignoreBlockScopingTDZ=!0,o.push(v.expressionStatement(c))}l.init=t.addHelper("temporalUndefined")}r._blockHoist=2,e.isCompletionRecord()&&o.push(v.expressionStatement(i.buildUndefinedNode())),e.replaceWithMultiple(o)}},Loop:function(e,t){var r=e.node,n=e.parent,i=e.scope;v.ensureBlock(r);var s=new O(e,e.get("body"),n,i,t),a=s.run();a&&e.replaceWith(a)},CatchClause:function(e,t){var r=e.parent,n=e.scope;new O(null,e.get("body"),r,n,t).run()},
+"BlockStatement|SwitchStatement|Program":function(e,t){if(!i(e)){new O(null,e,e.parent,e.scope,t).run()}}}}};var m=e("babel-traverse"),y=n(m),g=e("./tdz"),b=e("babel-types"),v=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(b),x=e("lodash/values"),E=n(x),A=e("lodash/extend"),D=n(A),C=e("babel-template"),S=n(C),_=(0,S.default)('\n if (typeof RETURN === "object") return RETURN.v;\n'),w=y.default.visitors.merge([{Loop:{enter:function(e,t){t.loopDepth++},exit:function(e,t){t.loopDepth--}},Function:function(e,t){return t.loopDepth>0&&e.traverse(k,t),e.skip()}},g.visitor]),k=y.default.visitors.merge([{ReferencedIdentifier:function(e,t){var r=t.letReferences[e.node.name];if(r){var n=e.scope.getBindingIdentifier(e.node.name);n&&n!==r||(t.closurify=!0)}}},g.visitor]),F={enter:function(e,t){var r=e.node;e.parent;if(e.isForStatement()){if(o(r.init)){var n=t.pushDeclar(r.init);1===n.length?r.init=n[0]:r.init=v.sequenceExpression(n)}}else if(e.isFor())o(r.left)&&(t.pushDeclar(r.left),r.left=r.left.declarations[0].id);else if(o(r))e.replaceWithMultiple(t.pushDeclar(r).map(function(e){return v.expressionStatement(e)}));else if(e.isFunction())return e.skip()}},T={LabeledStatement:function(e,t){var r=e.node;t.innerLabels.push(r.label.name)}},P={enter:function(e,t){if(e.isAssignmentExpression()||e.isUpdateExpression()){var r=e.getBindingIdentifiers();for(var n in r)t.outsideReferences[n]===e.scope.getBindingIdentifier(n)&&(t.reassignments[n]=!0)}}},B={Loop:function(e,t){var r=t.ignoreLabeless;t.ignoreLabeless=!0,e.traverse(B,t),t.ignoreLabeless=r,e.skip()},Function:function(e){e.skip()},SwitchCase:function(e,t){var r=t.inSwitchCase;t.inSwitchCase=!0,e.traverse(B,t),t.inSwitchCase=r,e.skip()},"BreakStatement|ContinueStatement|ReturnStatement":function(e,t){var r=e.node,n=e.parent,i=e.scope;if(!r[this.LOOP_IGNORE]){var s=void 0,a=u(r);if(a){if(r.label){if(t.innerLabels.indexOf(r.label.name)>=0)return;a=a+"|"+r.label.name}else{if(t.ignoreLabeless)return;if(t.inSwitchCase)return;if(v.isBreakStatement(r)&&v.isSwitchCase(n))return}t.hasBreakContinue=!0,t.map[a]=r,s=v.stringLiteral(a)}e.isReturnStatement()&&(t.hasReturn=!0,s=v.objectExpression([v.objectProperty(v.identifier("v"),r.argument||i.buildUndefinedNode())])),s&&(s=v.returnStatement(s),s[this.LOOP_IGNORE]=!0,e.skip(),e.replaceWith(v.inherits(s,r)))}}},O=function(){function e(t,r,n,i,s){(0,d.default)(this,e),this.parent=n,this.scope=i,this.file=s,this.blockPath=r,this.block=r.node,this.outsideLetReferences=(0,h.default)(null),this.hasLetReferences=!1,this.letReferences=(0,h.default)(null),this.body=[],t&&(this.loopParent=t.parent,this.loopLabel=v.isLabeledStatement(this.loopParent)&&this.loopParent.label,this.loopPath=t,this.loop=t.node)}return e.prototype.run=function(){var e=this.block;if(!e._letDone){e._letDone=!0;var t=this.getLetReferences();if(v.isFunction(this.parent)||v.isProgram(this.block))return void this.updateScopeInfo();if(this.hasLetReferences)return t?this.wrapClosure():this.remap(),this.updateScopeInfo(t),this.loopLabel&&!v.isLabeledStatement(this.loopParent)?v.labeledStatement(this.loopLabel,this.loop):void 0}},e.prototype.updateScopeInfo=function(e){var t=this.scope,r=t.getFunctionParent(),n=this.letReferences;for(var i in n){var s=n[i],a=t.getBinding(s.name);a&&("let"!==a.kind&&"const"!==a.kind||(a.kind="var",e?t.removeBinding(s.name):t.moveBindingTo(s.name,r)))}},e.prototype.remap=function(){var e=this.letReferences,t=this.scope;for(var r in e){var n=e[r];(t.parentHasBinding(r)||t.hasGlobal(r))&&(t.hasOwnBinding(r)&&t.rename(n.name),this.blockPath.scope.hasOwnBinding(r)&&this.blockPath.scope.rename(n.name))}},e.prototype.wrapClosure=function(){if(this.file.opts.throwIfClosureRequired)throw this.blockPath.buildCodeFrameError("Compiling let/const in this block would add a closure (throwIfClosureRequired).");var e=this.block,t=this.outsideLetReferences;if(this.loop)for(var r in t){var n=t[r];(this.scope.hasGlobal(n.name)||this.scope.parentHasBinding(n.name))&&(delete t[n.name],delete this.letReferences[n.name],this.scope.rename(n.name),this.letReferences[n.name]=n,t[n.name]=n)}this.has=this.checkLoop(),this.hoistVarDeclarations();var i=(0,E.default)(t),s=(0,E.default)(t),a=this.blockPath.isSwitchStatement(),o=v.functionExpression(null,i,v.blockStatement(a?[e]:e.body));o.shadow=!0,this.addContinuations(o);var u=o;this.loop&&(u=this.scope.generateUidIdentifier("loop"),this.loopPath.insertBefore(v.variableDeclaration("var",[v.variableDeclarator(u,o)])));var l=v.callExpression(u,s),c=this.scope.generateUidIdentifier("ret");y.default.hasType(o.body,this.scope,"YieldExpression",v.FUNCTION_TYPES)&&(o.generator=!0,l=v.yieldExpression(l,!0)),y.default.hasType(o.body,this.scope,"AwaitExpression",v.FUNCTION_TYPES)&&(o.async=!0,l=v.awaitExpression(l)),this.buildClosure(c,l),a?this.blockPath.replaceWithMultiple(this.body):e.body=this.body},e.prototype.buildClosure=function(e,t){var r=this.has;r.hasReturn||r.hasBreakContinue?this.buildHas(e,t):this.body.push(v.expressionStatement(t))},e.prototype.addContinuations=function(e){var t={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(e,P,t);for(var r=0;r<e.params.length;r++){var n=e.params[r];if(t.reassignments[n.name]){var i=this.scope.generateUidIdentifier(n.name);e.params[r]=i,this.scope.rename(n.name,i.name,e),e.body.body.push(v.expressionStatement(v.assignmentExpression("=",n,i)))}}},e.prototype.getLetReferences=function(){var e=this,t=this.block,r=[];if(this.loop){var n=this.loop.left||this.loop.init;s(n)&&(r.push(n),(0,D.default)(this.outsideLetReferences,v.getBindingIdentifiers(n)))}var i=function n(i,o){o=o||i.node,(v.isClassDeclaration(o)||v.isFunctionDeclaration(o)||s(o))&&(s(o)&&a(i,o,t,e.scope),r=r.concat(o.declarations||o)),v.isLabeledStatement(o)&&n(i.get("body"),o.body)};if(t.body)for(var o=0;o<t.body.length;o++){var u=this.blockPath.get("body")[o];i(u)}if(t.cases)for(var l=0;l<t.cases.length;l++)for(var c=t.cases[l].consequent,p=0;p<c.length;p++){var h=this.blockPath.get("cases")[l],f=c[p];i(h,f)}for(var d=0;d<r.length;d++){var m=r[d],y=v.getBindingIdentifiers(m,!1,!0);(0,D.default)(this.letReferences,y),this.hasLetReferences=!0}if(this.hasLetReferences){var g={letReferences:this.letReferences,closurify:!1,file:this.file,loopDepth:0},b=this.blockPath.find(function(e){return e.isLoop()||e.isFunction()});return b&&b.isLoop()&&g.loopDepth++,this.blockPath.traverse(w,g),g.closurify}},e.prototype.checkLoop=function(){var e={hasBreakContinue:!1,ignoreLabeless:!1,inSwitchCase:!1,innerLabels:[],hasReturn:!1,isLoop:!!this.loop,map:{},LOOP_IGNORE:(0,c.default)()};return this.blockPath.traverse(T,e),this.blockPath.traverse(B,e),e},e.prototype.hoistVarDeclarations=function(){this.blockPath.traverse(F,this)},e.prototype.pushDeclar=function(e){var t=[],r=v.getBindingIdentifiers(e);for(var n in r)t.push(v.variableDeclarator(r[n]));this.body.push(v.variableDeclaration(e.kind,t));for(var i=[],s=0;s<e.declarations.length;s++){var a=e.declarations[s];if(a.init){var o=v.assignmentExpression("=",a.id,a.init);i.push(v.inherits(o,a))}}return i},e.prototype.buildHas=function(e,t){var r=this.body;r.push(v.variableDeclaration("var",[v.variableDeclarator(e,t)]));var n=void 0,i=this.has,s=[];if(i.hasReturn&&(n=_({RETURN:e})),i.hasBreakContinue){for(var a in i.map)s.push(v.switchCase(v.stringLiteral(a),[i.map[a]]));if(i.hasReturn&&s.push(v.switchCase(null,[n])),1===s.length){var o=s[0];r.push(v.ifStatement(v.binaryExpression("===",e,o.test),o.consequent[0]))}else{if(this.loop)for(var u=0;u<s.length;u++){var l=s[u].consequent[0];v.isBreakStatement(l)&&!l.label&&(l.label=this.loopLabel=this.loopLabel||this.scope.generateUidIdentifier("loop"))}r.push(v.switchStatement(e,s))}}else i.hasReturn&&r.push(n)},e}();t.exports=r.default},{"./tdz":108,"babel-runtime/core-js/object/create":118,"babel-runtime/core-js/symbol":122,"babel-runtime/helpers/classCallCheck":127,"babel-template":132,"babel-traverse":136,"babel-types":169,"lodash/extend":487,"lodash/values":530}],108:[function(e,t,r){"use strict";function n(e,t){var r=t._guessExecutionStatusRelativeTo(e);return"before"===r?"inside":"after"===r?"outside":"maybe"}function i(e,t){return o.callExpression(t.addHelper("temporalRef"),[e,o.stringLiteral(e.name),t.addHelper("temporalUndefined")])}function s(e,t,r){var n=r.letReferences[e.name];return!!n&&t.getBindingIdentifier(e.name)===n}r.__esModule=!0,r.visitor=void 0;var a=e("babel-types"),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(a);r.visitor={ReferencedIdentifier:function(e,t){if(this.file.opts.tdz){var r=e.node,a=e.parent,u=e.scope;if(!e.parentPath.isFor({left:r})&&s(r,u,t)){var l=u.getBinding(r.name).path,c=n(e,l);if("inside"!==c)if("maybe"===c){var p=i(r,t.file);if(l.parent._tdzThis=!0,e.skip(),e.parentPath.isUpdateExpression()){if(a._ignoreBlockScopingTDZ)return;e.parentPath.replaceWith(o.sequenceExpression([p,a]))}else e.replaceWith(p)}else"outside"===c&&e.replaceWith(o.throwStatement(o.inherits(o.newExpression(o.identifier("ReferenceError"),[o.stringLiteral(r.name+" is not defined - temporal dead zone")]),r)))}}},AssignmentExpression:{exit:function(e,t){if(this.file.opts.tdz){var r=e.node;if(!r._ignoreBlockScopingTDZ){var n=[],a=e.getBindingIdentifiers();for(var u in a){var l=a[u];s(l,e.scope,t)&&n.push(i(l,t.file))}n.length&&(r._ignoreBlockScopingTDZ=!0,n.push(r),e.replaceWithMultiple(n.map(o.expressionStatement)))}}}}}},{"babel-types":169}],109:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/core-js/symbol"),s=n(i);r.default=function(e){var t=e.types,r=(0,s.default)();return{visitor:{ExportDefaultDeclaration:function(e){if(e.get("declaration").isClassDeclaration()){var r=e.node,n=r.declaration.id||e.scope.generateUidIdentifier("class");r.declaration.id=n,e.replaceWith(r.declaration),e.insertAfter(t.exportDefaultDeclaration(n))}},ClassDeclaration:function(e){var r=e.node,n=r.id||e.scope.generateUidIdentifier("class");e.replaceWith(t.variableDeclaration("let",[t.variableDeclarator(n,t.toExpression(r))]))},ClassExpression:function(e,t){var n=e.node;if(!n[r]){var i=(0,p.default)(e);if(i&&i!==n)return e.replaceWith(i);n[r]=!0;var s=l.default;t.opts.loose&&(s=o.default),e.replaceWith(new s(e,t.file).run())}}}}};var a=e("./loose"),o=n(a),u=e("./vanilla"),l=n(u),c=e("babel-helper-function-name"),p=n(c);t.exports=r.default},{"./loose":110,"./vanilla":111,"babel-helper-function-name":97,"babel-runtime/core-js/symbol":122}],110:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/helpers/classCallCheck"),s=n(i),a=e("babel-runtime/helpers/possibleConstructorReturn"),o=n(a),u=e("babel-runtime/helpers/inherits"),l=n(u),c=e("babel-helper-function-name"),p=n(c),h=e("./vanilla"),f=n(h),d=e("babel-types"),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(d),y=function(e){function t(){(0,s.default)(this,t);var r=(0,o.default)(this,e.apply(this,arguments));return r.isLoose=!0,r}return(0,l.default)(t,e),t.prototype._processMethod=function(e,t){if(!e.decorators){var r=this.classRef;e.static||(r=m.memberExpression(r,m.identifier("prototype")));var n=m.memberExpression(r,e.key,e.computed||m.isLiteral(e.key)),i=m.functionExpression(null,e.params,e.body,e.generator,e.async);i.returnType=e.returnType;var s=m.toComputedKey(e,e.key);m.isStringLiteral(s)&&(i=(0,p.default)({node:i,id:s,scope:t}));var a=m.expressionStatement(m.assignmentExpression("=",n,i));return m.inheritsComments(a,e),this.body.push(a),!0}},t}(f.default);r.default=y,t.exports=r.default},{"./vanilla":111,"babel-helper-function-name":97,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/inherits":128,"babel-runtime/helpers/possibleConstructorReturn":130,"babel-types":169}],111:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=e("babel-runtime/core-js/get-iterator"),a=i(s),o=e("babel-runtime/helpers/classCallCheck"),u=i(o),l=e("babel-traverse"),c=e("babel-helper-replace-supers"),p=i(c),h=e("babel-helper-optimise-call-expression"),f=i(h),d=e("babel-helper-define-map"),m=n(d),y=e("babel-template"),g=i(y),b=e("babel-types"),v=n(b),x=(0,g.default)("\n (function () {\n super(...arguments);\n })\n"),E={"FunctionExpression|FunctionDeclaration":function(e){e.is("shadow")||e.skip()},Method:function(e){e.skip()}},A=l.visitors.merge([E,{Super:function(e){if(this.isDerived&&!this.hasBareSuper&&!e.parentPath.isCallExpression({callee:e.node}))throw e.buildCodeFrameError("'super.*' is not allowed before super()")},CallExpression:{exit:function(e){if(e.get("callee").isSuper()&&(this.hasBareSuper=!0,!this.isDerived))throw e.buildCodeFrameError("super() is only allowed in a derived constructor")}},ThisExpression:function(e){if(this.isDerived&&!this.hasBareSuper&&!e.inShadow("this"))throw e.buildCodeFrameError("'this' is not allowed before super()")}}]),D=l.visitors.merge([E,{ThisExpression:function(e){this.superThises.push(e)}}]),C=function(){function e(t,r){(0,u.default)(this,e),this.parent=t.parent,this.scope=t.scope,this.node=t.node,this.path=t,this.file=r,this.clearDescriptors(),this.instancePropBody=[],this.instancePropRefs={},this.staticPropBody=[],this.body=[],this.bareSuperAfter=[],this.bareSupers=[],this.pushedConstructor=!1,this.pushedInherits=!1,this.isLoose=!1,this.superThises=[],this.classId=this.node.id,this.classRef=this.node.id?v.identifier(this.node.id.name):this.scope.generateUidIdentifier("class"),this.superName=this.node.superClass||v.identifier("Function"),this.isDerived=!!this.node.superClass}return e.prototype.run=function(){var e=this,t=this.superName,r=this.file,n=this.body,i=this.constructorBody=v.blockStatement([]);this.constructor=this.buildConstructor();var s=[],a=[];if(this.isDerived&&(a.push(t),t=this.scope.generateUidIdentifierBasedOnNode(t),s.push(t),this.superName=t),this.buildBody(),i.body.unshift(v.expressionStatement(v.callExpression(r.addHelper("classCallCheck"),[v.thisExpression(),this.classRef]))),n=n.concat(this.staticPropBody.map(function(t){return t(e.classRef)})),this.classId&&1===n.length)return v.toExpression(n[0]);n.push(v.returnStatement(this.classRef));var o=v.functionExpression(null,s,v.blockStatement(n));return o.shadow=!0,v.callExpression(o,a)},e.prototype.buildConstructor=function(){var e=v.functionDeclaration(this.classRef,[],this.constructorBody);return v.inherits(e,this.node),e},e.prototype.pushToMap=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"value",n=arguments[3],i=void 0;e.static?(this.hasStaticDescriptors=!0,i=this.staticMutatorMap):(this.hasInstanceDescriptors=!0,i=this.instanceMutatorMap);var s=m.push(i,e,r,this.file,n);return t&&(s.enumerable=v.booleanLiteral(!0)),s},e.prototype.constructorMeMaybe=function(){for(var e=!1,t=this.path.get("body.body"),r=t,n=Array.isArray(r),i=0,r=n?r:(0,a.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}if(e=s.equals("kind","constructor"))break}if(!e){var o=void 0,u=void 0;if(this.isDerived){var l=x().expression;o=l.params,u=l.body}else o=[],u=v.blockStatement([]);this.path.get("body").unshiftContainer("body",v.classMethod("constructor",v.identifier("constructor"),o,u))}},e.prototype.buildBody=function(){if(this.constructorMeMaybe(),this.pushBody(),this.verifyConstructor(),this.userConstructor){var e=this.constructorBody;e.body=e.body.concat(this.userConstructor.body.body),v.inherits(this.constructor,this.userConstructor),v.inherits(e,this.userConstructor.body)}this.pushDescriptors()},e.prototype.pushBody=function(){for(var e=this.path.get("body.body"),t=e,r=Array.isArray(t),n=0,t=r?t:(0,a.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i,o=s.node;if(s.isClassProperty())throw s.buildCodeFrameError("Missing class properties transform.");if(o.decorators)throw s.buildCodeFrameError("Method has decorators, put the decorator plugin before the classes one.");if(v.isClassMethod(o)){var u="constructor"===o.kind;if(u&&(s.traverse(A,this),!this.hasBareSuper&&this.isDerived))throw s.buildCodeFrameError("missing super() call in constructor");var l=new p.default({forceSuperMemoisation:u,methodPath:s,methodNode:o,objectRef:this.classRef,superRef:this.superName,isStatic:o.static,isLoose:this.isLoose,scope:this.scope,file:this.file},!0);l.replace(),u?this.pushConstructor(l,o,s):this.pushMethod(o,s)}}},e.prototype.clearDescriptors=function(){this.hasInstanceDescriptors=!1,this.hasStaticDescriptors=!1,this.instanceMutatorMap={},this.staticMutatorMap={}},e.prototype.pushDescriptors=function(){this.pushInherits();var e=this.body,t=void 0,r=void 0;if(this.hasInstanceDescriptors&&(t=m.toClassObject(this.instanceMutatorMap)),this.hasStaticDescriptors&&(r=m.toClassObject(this.staticMutatorMap)),t||r){t&&(t=m.toComputedObjectFromClass(t)),r&&(r=m.toComputedObjectFromClass(r));var n=v.nullLiteral(),i=[this.classRef,n,n,n,n];t&&(i[1]=t),r&&(i[2]=r),this.instanceInitializersId&&(i[3]=this.instanceInitializersId,e.unshift(this.buildObjectAssignment(this.instanceInitializersId))),this.staticInitializersId&&(i[4]=this.staticInitializersId,e.unshift(this.buildObjectAssignment(this.staticInitializersId)));for(var s=0,a=0;a<i.length;a++)i[a]!==n&&(s=a);i=i.slice(0,s+1),e.push(v.expressionStatement(v.callExpression(this.file.addHelper("createClass"),i)))}this.clearDescriptors()},e.prototype.buildObjectAssignment=function(e){return v.variableDeclaration("var",[v.variableDeclarator(e,v.objectExpression([]))])},e.prototype.wrapSuperCall=function(e,t,r,n){var i=e.node;this.isLoose?(i.arguments.unshift(v.thisExpression()),2===i.arguments.length&&v.isSpreadElement(i.arguments[1])&&v.isIdentifier(i.arguments[1].argument,{name:"arguments"})?(i.arguments[1]=i.arguments[1].argument,i.callee=v.memberExpression(t,v.identifier("apply"))):i.callee=v.memberExpression(t,v.identifier("call"))):i=(0,f.default)(v.logicalExpression("||",v.memberExpression(this.classRef,v.identifier("__proto__")),v.callExpression(v.memberExpression(v.identifier("Object"),v.identifier("getPrototypeOf")),[this.classRef])),v.thisExpression(),i.arguments);var s=v.callExpression(this.file.addHelper("possibleConstructorReturn"),[v.thisExpression(),i]),a=this.bareSuperAfter.map(function(e){return e(r)});e.parentPath.isExpressionStatement()&&e.parentPath.container===n.node.body&&n.node.body.length-1===e.parentPath.key?((this.superThises.length||a.length)&&(e.scope.push({id:r}),s=v.assignmentExpression("=",r,s)),a.length&&(s=v.toSequenceExpression([s].concat(a,[r]))),e.parentPath.replaceWith(v.returnStatement(s))):e.replaceWithMultiple([v.variableDeclaration("var",[v.variableDeclarator(r,s)])].concat(a,[v.expressionStatement(r)]))},e.prototype.verifyConstructor=function(){var e=this;if(this.isDerived){var t=this.userConstructorPath,r=t.get("body");t.traverse(D,this);for(var n=!!this.bareSupers.length,i=this.superName||v.identifier("Function"),s=t.scope.generateUidIdentifier("this"),o=this.bareSupers,u=Array.isArray(o),l=0,o=u?o:(0,a.default)(o);;){var c;if(u){if(l>=o.length)break;c=o[l++]}else{if(l=o.next(),l.done)break;c=l.value}var p=c;this.wrapSuperCall(p,i,s,r),n&&p.find(function(e){return e===t||(e.isLoop()||e.isConditional()?(n=!1,!0):void 0)})}for(var h=this.superThises,f=Array.isArray(h),d=0,h=f?h:(0,a.default)(h);;){var m;if(f){if(d>=h.length)break;m=h[d++]}else{if(d=h.next(),d.done)break;m=d.value}m.replaceWith(s)}var y=function(t){return v.callExpression(e.file.addHelper("possibleConstructorReturn"),[s].concat(t||[]))},g=r.get("body");g.length&&!g.pop().isReturnStatement()&&r.pushContainer("body",v.returnStatement(n?s:y()));for(var b=this.superReturns,x=Array.isArray(b),E=0,b=x?b:(0,a.default)(b);;){var A;if(x){if(E>=b.length)break;A=b[E++]}else{if(E=b.next(),E.done)break;A=E.value}var C=A;if(C.node.argument){var S=C.scope.generateDeclaredUidIdentifier("ret");C.get("argument").replaceWithMultiple([v.assignmentExpression("=",S,C.node.argument),y(S)])}else C.get("argument").replaceWith(y())}}},e.prototype.pushMethod=function(e,t){var r=t?t.scope:this.scope;"method"===e.kind&&this._processMethod(e,r)||this.pushToMap(e,!1,null,r)},e.prototype._processMethod=function(){return!1},e.prototype.pushConstructor=function(e,t,r){this.bareSupers=e.bareSupers,this.superReturns=e.returns,r.scope.hasOwnBinding(this.classRef.name)&&r.scope.rename(this.classRef.name);var n=this.constructor;this.userConstructorPath=r,this.userConstructor=t,this.hasConstructor=!0,v.inheritsComments(n,t),n._ignoreUserWhitespace=!0,n.params=t.params,v.inherits(n.body,t.body),n.body.directives=t.body.directives,this._pushConstructor()},e.prototype._pushConstructor=function(){this.pushedConstructor||(this.pushedConstructor=!0,(this.hasInstanceDescriptors||this.hasStaticDescriptors)&&this.pushDescriptors(),this.body.push(this.constructor),this.pushInherits())},e.prototype.pushInherits=function(){this.isDerived&&!this.pushedInherits&&(this.pushedInherits=!0,this.body.unshift(v.expressionStatement(v.callExpression(this.file.addHelper("inherits"),[this.classRef,this.superName]))))},e}();r.default=C,t.exports=r.default},{"babel-helper-define-map":96,"babel-helper-optimise-call-expression":99,"babel-helper-replace-supers":100,"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/classCallCheck":127,"babel-template":132,"babel-traverse":136,"babel-types":169}],112:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){function t(e){var t=e.node,r=e.scope,n=[],i=t.right;if(!a.isIdentifier(i)||!r.hasBinding(i.name)){var s=r.generateUidIdentifier("arr");n.push(a.variableDeclaration("var",[a.variableDeclarator(s,i)])),i=s}var u=r.generateUidIdentifier("i"),l=o({BODY:t.body,KEY:u,ARR:i});a.inherits(l,t),a.ensureBlock(l);var c=a.memberExpression(i,u,!0),p=t.left;return a.isVariableDeclaration(p)?(p.declarations[0].init=c,l.body.body.unshift(p)):l.body.body.unshift(a.expressionStatement(a.assignmentExpression("=",p,c))),e.parentPath.isLabeledStatement()&&(l=a.labeledStatement(e.parentPath.node.label,l)),n.push(l),n}function r(e,t){var r=e.node,n=e.scope,s=e.parent,o=r.left,l=void 0,c=void 0;if(a.isIdentifier(o)||a.isPattern(o)||a.isMemberExpression(o))c=o;else{if(!a.isVariableDeclaration(o))throw t.buildCodeFrameError(o,i.get("unknownForHead",o.type));c=n.generateUidIdentifier("ref"),l=a.variableDeclaration(o.kind,[a.variableDeclarator(o.declarations[0].id,c)])}var p=n.generateUidIdentifier("iterator"),h=n.generateUidIdentifier("isArray"),f=u({LOOP_OBJECT:p,IS_ARRAY:h,OBJECT:r.right,INDEX:n.generateUidIdentifier("i"),ID:c});l||f.body.body.shift();var d=a.isLabeledStatement(s),m=void 0;return d&&(m=a.labeledStatement(s.label,f)),{replaceParent:d,declar:l,node:m||f,loop:f}}function n(e,t){var r=e.node,n=e.scope,s=e.parent,o=r.left,u=void 0,c=n.generateUidIdentifier("step"),p=a.memberExpression(c,a.identifier("value"));if(a.isIdentifier(o)||a.isPattern(o)||a.isMemberExpression(o))u=a.expressionStatement(a.assignmentExpression("=",o,p));else{if(!a.isVariableDeclaration(o))throw t.buildCodeFrameError(o,i.get("unknownForHead",o.type));u=a.variableDeclaration(o.kind,[a.variableDeclarator(o.declarations[0].id,p)])}var h=n.generateUidIdentifier("iterator"),f=l({ITERATOR_HAD_ERROR_KEY:n.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:n.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:n.generateUidIdentifier("iteratorError"),ITERATOR_KEY:h,STEP_KEY:c,OBJECT:r.right,BODY:null}),d=a.isLabeledStatement(s),m=f[3].block.body,y=m[0];return d&&(m[0]=a.labeledStatement(s.label,y)),{replaceParent:d,declar:u,loop:y,node:f}}var i=e.messages,s=e.template,a=e.types,o=s("\n for (var KEY = 0; KEY < ARR.length; KEY++) BODY;\n "),u=s("\n for (var LOOP_OBJECT = OBJECT,\n IS_ARRAY = Array.isArray(LOOP_OBJECT),\n INDEX = 0,\n LOOP_OBJECT = IS_ARRAY ? LOOP_OBJECT : LOOP_OBJECT[Symbol.iterator]();;) {\n var ID;\n if (IS_ARRAY) {\n if (INDEX >= LOOP_OBJECT.length) break;\n ID = LOOP_OBJECT[INDEX++];\n } else {\n INDEX = LOOP_OBJECT.next();\n if (INDEX.done) break;\n ID = INDEX.value;\n }\n }\n "),l=s("\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (var ITERATOR_KEY = OBJECT[Symbol.iterator](), STEP_KEY; !(ITERATOR_COMPLETION = (STEP_KEY = ITERATOR_KEY.next()).done); ITERATOR_COMPLETION = true) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return) {\n ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n ");return{visitor:{ForOfStatement:function(e,i){if(e.get("right").isArrayExpression())return e.parentPath.isLabeledStatement()?e.parentPath.replaceWithMultiple(t(e)):e.replaceWithMultiple(t(e));var s=n;i.opts.loose&&(s=r);var o=e.node,u=s(e,i),l=u.declar,c=u.loop,p=c.body;e.ensureBlock(),l&&p.body.push(l),p.body=p.body.concat(o.body.body),a.inherits(c,o),a.inherits(c.body,o.body),u.replaceParent?(e.parentPath.replaceWithMultiple(u.node),e.remove()):e.replaceWithMultiple(u.node)}}}},t.exports=r.default},{}],113:[function(e,t,r){t.exports={default:e("core-js/library/fn/get-iterator"),__esModule:!0}},{"core-js/library/fn/get-iterator":188}],114:[function(e,t,r){t.exports={default:e("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":189}],115:[function(e,t,r){t.exports={default:e("core-js/library/fn/map"),__esModule:!0}},{"core-js/library/fn/map":190}],116:[function(e,t,r){t.exports={default:e("core-js/library/fn/number/max-safe-integer"),__esModule:!0}},{"core-js/library/fn/number/max-safe-integer":191}],117:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":192}],118:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":193}],119:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/get-own-property-symbols"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-symbols":194}],120:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":195}],121:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/set-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/set-prototype-of":196}],122:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":198}],123:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol/for"),__esModule:!0}},{"core-js/library/fn/symbol/for":197}],124:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":199}],125:[function(e,t,r){t.exports={default:e("core-js/library/fn/weak-map"),__esModule:!0}},{"core-js/library/fn/weak-map":200}],126:[function(e,t,r){t.exports={default:e("core-js/library/fn/weak-set"),__esModule:!0}},{"core-js/library/fn/weak-set":201}],127:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},{}],128:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("../core-js/object/set-prototype-of"),s=n(i),a=e("../core-js/object/create"),o=n(a),u=e("../helpers/typeof"),l=n(u);r.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,l.default)(t)));e.prototype=(0,o.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(s.default?(0,s.default)(e,t):e.__proto__=t)}},{"../core-js/object/create":118,"../core-js/object/set-prototype-of":121,"../helpers/typeof":131}],129:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}},{}],130:[function(e,t,r){"use strict";r.__esModule=!0;var n=e("../helpers/typeof"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);r.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,i.default)(t))&&"function"!=typeof t?e:t}},{"../helpers/typeof":131}],131:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("../core-js/symbol/iterator"),s=n(i),a=e("../core-js/symbol"),o=n(a),u="function"==typeof o.default&&"symbol"==typeof s.default?function(e){return typeof e}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":typeof e};r.default="function"==typeof o.default&&"symbol"===u(s.default)?function(e){return void 0===e?"undefined":u(e)}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":void 0===e?"undefined":u(e)}},{"../core-js/symbol":122,"../core-js/symbol/iterator":124}],132:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){e=(0,l.default)(e);var r=e,n=r.program;return t.length&&(0,m.default)(e,A,null,t),n.body.length>1?n.body:n.body[0]}r.__esModule=!0;var a=e("babel-runtime/core-js/symbol"),o=i(a);r.default=function(e,t){var r=void 0;try{throw new Error}catch(e){e.stack&&(r=e.stack.split("\n").slice(1).join("\n"))}t=(0,p.default)({allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,preserveComments:!1},t);var n=function(){var i=void 0;try{i=g.parse(e,t),i=m.default.removeProperties(i,{preserveComments:t.preserveComments}),m.default.cheap(i,function(e){e[x]=!0})}catch(e){throw e.stack=e.stack+"from\n"+r,e}return n=function(){return i},i};return function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return s(n(),t)}};var u=e("lodash/cloneDeep"),l=i(u),c=e("lodash/assign"),p=i(c),h=e("lodash/has"),f=i(h),d=e("babel-traverse"),m=i(d),y=e("babylon"),g=n(y),b=e("babel-types"),v=n(b),x="_fromTemplate",E=(0,o.default)(),A={noScope:!0,enter:function(e,t){var r=e.node;if(r[E])return e.skip();v.isExpressionStatement(r)&&(r=r.expression);var n=void 0;if(v.isIdentifier(r)&&r[x])if((0,f.default)(t[0],r.name))n=t[0][r.name];else if("$"===r.name[0]){var i=+r.name.slice(1);t[i]&&(n=t[i])}null===n&&e.remove(),n&&(n[E]=!0,e.replaceInline(n))},exit:function(e){var t=e.node;t.loc||m.default.clearNode(t)}};t.exports=r.default},{"babel-runtime/core-js/symbol":122,"babel-traverse":136,"babel-types":169,babylon:177,"lodash/assign":477,"lodash/cloneDeep":481,"lodash/has":493}],133:[function(e,t,r){"use strict";function n(){i(),s()}function i(){r.path=u=new o.default}function s(){r.scope=l=new o.default}r.__esModule=!0,r.scope=r.path=void 0;var a=e("babel-runtime/core-js/weak-map"),o=function(e){return e&&e.__esModule?e:{default:e}}(a);r.clear=n,r.clearPath=i,r.clearScope=s;var u=r.path=new o.default,l=r.scope=new o.default},{"babel-runtime/core-js/weak-map":125}],
+134:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=e("babel-runtime/core-js/get-iterator"),a=i(s),o=e("babel-runtime/helpers/classCallCheck"),u=i(o),l=e("./path"),c=i(l),p=e("babel-types"),h=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(p),f="test"===n.env.NODE_ENV,d=function(){function e(t,r,n,i){(0,u.default)(this,e),this.queue=null,this.parentPath=i,this.scope=t,this.state=n,this.opts=r}return e.prototype.shouldVisit=function(e){var t=this.opts;if(t.enter||t.exit)return!0;if(t[e.type])return!0;var r=h.VISITOR_KEYS[e.type];if(!r||!r.length)return!1;for(var n=r,i=Array.isArray(n),s=0,n=i?n:(0,a.default)(n);;){var o;if(i){if(s>=n.length)break;o=n[s++]}else{if(s=n.next(),s.done)break;o=s.value}if(e[o])return!0}return!1},e.prototype.create=function(e,t,r,n){return c.default.get({parentPath:this.parentPath,parent:e,container:t,key:r,listKey:n})},e.prototype.maybeQueue=function(e,t){if(this.trap)throw new Error("Infinite cycle detected");this.queue&&(t?this.queue.push(e):this.priorityQueue.push(e))},e.prototype.visitMultiple=function(e,t,r){if(0===e.length)return!1;for(var n=[],i=0;i<e.length;i++){var s=e[i];s&&this.shouldVisit(s)&&n.push(this.create(t,e,i,r))}return this.visitQueue(n)},e.prototype.visitSingle=function(e,t){return!!this.shouldVisit(e[t])&&this.visitQueue([this.create(e,e,t)])},e.prototype.visitQueue=function(e){this.queue=e,this.priorityQueue=[];for(var t=[],r=!1,n=e,i=Array.isArray(n),s=0,n=i?n:(0,a.default)(n);;){var o;if(i){if(s>=n.length)break;o=n[s++]}else{if(s=n.next(),s.done)break;o=s.value}var u=o;if(u.resync(),0!==u.contexts.length&&u.contexts[u.contexts.length-1]===this||u.pushContext(this),null!==u.key&&(f&&e.length>=1e4&&(this.trap=!0),!(t.indexOf(u.node)>=0))){if(t.push(u.node),u.visit()){r=!0;break}if(this.priorityQueue.length&&(r=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=e,r))break}}for(var l=e,c=Array.isArray(l),p=0,l=c?l:(0,a.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if(p=l.next(),p.done)break;h=p.value}h.popContext()}return this.queue=null,r},e.prototype.visit=function(e,t){var r=e[t];return!!r&&(Array.isArray(r)?this.visitMultiple(r,e,t):this.visitSingle(e,t))},e}();r.default=d,t.exports=r.default}).call(this,e("_process"))},{"./path":143,_process:539,"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/classCallCheck":127,"babel-types":169}],135:[function(e,t,r){"use strict";r.__esModule=!0;var n=e("babel-runtime/helpers/classCallCheck"),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s=function e(t,r){(0,i.default)(this,e),this.file=t,this.options=r};r.default=s,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":127}],136:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r,n,i){if(e){if(t||(t={}),!t.noScope&&!r&&"Program"!==e.type&&"File"!==e.type)throw new Error(g.get("traverseNeedsParent",e.type));m.explode(t),s.node(e,t,r,n,i)}}function a(e,t){e.node.type===t.type&&(t.has=!0,e.stop())}r.__esModule=!0,r.visitors=r.Hub=r.Scope=r.NodePath=void 0;var o=e("babel-runtime/core-js/get-iterator"),u=i(o),l=e("./path");Object.defineProperty(r,"NodePath",{enumerable:!0,get:function(){return i(l).default}});var c=e("./scope");Object.defineProperty(r,"Scope",{enumerable:!0,get:function(){return i(c).default}});var p=e("./hub");Object.defineProperty(r,"Hub",{enumerable:!0,get:function(){return i(p).default}}),r.default=s;var h=e("./context"),f=i(h),d=e("./visitors"),m=n(d),y=e("babel-messages"),g=n(y),b=e("lodash/includes"),v=i(b),x=e("babel-types"),E=n(x),A=e("./cache"),D=n(A);r.visitors=m,s.visitors=m,s.verify=m.verify,s.explode=m.explode,s.NodePath=e("./path"),s.Scope=e("./scope"),s.Hub=e("./hub"),s.cheap=function(e,t){return E.traverseFast(e,t)},s.node=function(e,t,r,n,i,s){var a=E.VISITOR_KEYS[e.type];if(a)for(var o=new f.default(r,t,n,i),l=a,c=Array.isArray(l),p=0,l=c?l:(0,u.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if(p=l.next(),p.done)break;h=p.value}var d=h;if((!s||!s[d])&&o.visit(e,d))return}},s.clearNode=function(e,t){E.removeProperties(e,t),D.path.delete(e)},s.removeProperties=function(e,t){return E.traverseFast(e,s.clearNode,t),e},s.hasType=function(e,t,r,n){if((0,v.default)(n,e.type))return!1;if(e.type===r)return!0;var i={has:!1,type:r};return s(e,{blacklist:n,enter:a},t,i),i.has},s.clearCache=function(){D.clear()},s.clearCache.clearPath=D.clearPath,s.clearCache.clearScope=D.clearScope,s.copyCache=function(e,t){D.path.has(e)&&D.path.set(t,D.path.get(e))}},{"./cache":133,"./context":134,"./hub":135,"./path":143,"./scope":155,"./visitors":157,"babel-messages":103,"babel-runtime/core-js/get-iterator":113,"babel-types":169,"lodash/includes":496}],137:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){for(var t=this;t=t.parentPath;)if(e(t))return t;return null}function s(e){var t=this;do{if(e(t))return t}while(t=t.parentPath);return null}function a(){return this.findParent(function(e){return e.isFunction()||e.isProgram()})}function o(){var e=this;do{if(Array.isArray(e.container))return e}while(e=e.parentPath)}function u(e){return this.getDeepestCommonAncestorFrom(e,function(e,t,r){for(var n=void 0,i=b.VISITOR_KEYS[e.type],s=r,a=Array.isArray(s),o=0,s=a?s:(0,y.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u,c=l[t+1];if(n)if(c.listKey&&n.listKey===c.listKey&&c.key<n.key)n=c;else{var p=i.indexOf(n.parentKey),h=i.indexOf(c.parentKey);p>h&&(n=c)}else n=c}return n})}function l(e,t){var r=this;if(!e.length)return this;if(1===e.length)return e[0];var n=1/0,i=void 0,s=void 0,a=e.map(function(e){var t=[];do{t.unshift(e)}while((e=e.parentPath)&&e!==r);return t.length<n&&(n=t.length),t}),o=a[0];e:for(var u=0;u<n;u++){for(var l=o[u],c=a,p=Array.isArray(c),h=0,c=p?c:(0,y.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if(h=c.next(),h.done)break;f=h.value}var d=f;if(d[u]!==l)break e}i=u,s=l}if(s)return t?t(s,i,a):s;throw new Error("Couldn't find intersection")}function c(){var e=this,t=[];do{t.push(e)}while(e=e.parentPath);return t}function p(e){return e.isDescendant(this)}function h(e){return!!this.findParent(function(t){return t===e})}function f(){for(var e=this;e;){for(var t=arguments,r=Array.isArray(t),n=0,t=r?t:(0,y.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;if(e.node.type===s)return!0}e=e.parentPath}return!1}function d(e){var t=this.isFunction()?this:this.findParent(function(e){return e.isFunction()});if(t){if(t.isFunctionExpression()||t.isFunctionDeclaration()){var r=t.node.shadow;if(r&&(!e||!1!==r[e]))return t}else if(t.isArrowFunctionExpression())return t;return null}}r.__esModule=!0;var m=e("babel-runtime/core-js/get-iterator"),y=n(m);r.findParent=i,r.find=s,r.getFunctionParent=a,r.getStatementParent=o,r.getEarliestCommonAncestorFrom=u,r.getDeepestCommonAncestorFrom=l,r.getAncestry=c,r.isAncestor=p,r.isDescendant=h,r.inType=f,r.inShadow=d;var g=e("babel-types"),b=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(g),v=e("./index");n(v)},{"./index":143,"babel-runtime/core-js/get-iterator":113,"babel-types":169}],138:[function(e,t,r){"use strict";function n(){if("string"!=typeof this.key){var e=this.node;if(e){var t=e.trailingComments,r=e.leadingComments;if(t||r){var n=this.getSibling(this.key-1),i=this.getSibling(this.key+1);n.node||(n=i),i.node||(i=n),n.addComments("trailing",r),i.addComments("leading",t)}}}}function i(e,t,r){this.addComments(e,[{type:r?"CommentLine":"CommentBlock",value:t}])}function s(e,t){if(t){var r=this.node;if(r){var n=e+"Comments";r[n]?r[n]=r[n].concat(t):r[n]=t}}}r.__esModule=!0,r.shareCommentsWithSiblings=n,r.addComment=i,r.addComments=s},{}],139:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=this.opts;return this.debug(function(){return e}),!(!this.node||!this._call(t[e]))||!!this.node&&this._call(t[this.node.type]&&t[this.node.type][e])}function s(e){if(!e)return!1;for(var t=e,r=Array.isArray(t),n=0,t=r?t:(0,S.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;if(s){var a=this.node;if(!a)return!0;if(s.call(this.state,this,this.state))throw new Error("Unexpected return value from visitor method "+s);if(this.node!==a)return!0;if(this.shouldStop||this.shouldSkip||this.removed)return!0}}return!1}function a(){var e=this.opts.blacklist;return e&&e.indexOf(this.node.type)>-1}function o(){return!!this.node&&(!this.isBlacklisted()&&((!this.opts.shouldSkip||!this.opts.shouldSkip(this))&&(this.call("enter")||this.shouldSkip?(this.debug(function(){return"Skip..."}),this.shouldStop):(this.debug(function(){return"Recursing into..."}),w.default.node(this.node,this.opts,this.scope,this.state,this,this.skipKeys),this.call("exit"),this.shouldStop))))}function u(){this.shouldSkip=!0}function l(e){this.skipKeys[e]=!0}function c(){this.shouldStop=!0,this.shouldSkip=!0}function p(){if(!this.opts||!this.opts.noScope){var e=this.context&&this.context.scope;if(!e)for(var t=this.parentPath;t&&!e;){if(t.opts&&t.opts.noScope)return;e=t.scope,t=t.parentPath}this.scope=this.getScope(e),this.scope&&this.scope.init()}}function h(e){return this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.skipKeys={},e&&(this.context=e,this.state=e.state,this.opts=e.opts),this.setScope(),this}function f(){this.removed||(this._resyncParent(),this._resyncList(),this._resyncKey())}function d(){this.parentPath&&(this.parent=this.parentPath.node)}function m(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(var e=0;e<this.container.length;e++)if(this.container[e]===this.node)return this.setKey(e)}else for(var t in this.container)if(this.container[t]===this.node)return this.setKey(t);this.key=null}}function y(){if(this.parent&&this.inList){var e=this.parent[this.listKey];this.container!==e&&(this.container=e||null)}}function g(){null!=this.key&&this.container&&this.container[this.key]===this.node||this._markRemoved()}function b(){this.contexts.pop(),this.setContext(this.contexts[this.contexts.length-1])}function v(e){this.contexts.push(e),this.setContext(e)}function x(e,t,r,n){this.inList=!!r,this.listKey=r,this.parentKey=r||n,this.container=t,this.parentPath=e||this.parentPath,this.setKey(n)}function E(e){this.key=e,this.node=this.container[this.key],this.type=this.node&&this.node.type}function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this;if(!e.removed)for(var t=this.contexts,r=t,n=Array.isArray(r),i=0,r=n?r:(0,S.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;a.maybeQueue(e)}}function D(){for(var e=this,t=this.contexts;!t.length;)e=e.parentPath,t=e.contexts;return t}r.__esModule=!0;var C=e("babel-runtime/core-js/get-iterator"),S=n(C);r.call=i,r._call=s,r.isBlacklisted=a,r.visit=o,r.skip=u,r.skipKey=l,r.stop=c,r.setScope=p,r.setContext=h,r.resync=f,r._resyncParent=d,r._resyncKey=m,r._resyncList=y,r._resyncRemoved=g,r.popContext=b,r.pushContext=v,r.setup=x,r.setKey=E,r.requeue=A,r._getQueueContexts=D;var _=e("../index"),w=n(_)},{"../index":136,"babel-runtime/core-js/get-iterator":113}],140:[function(e,t,r){"use strict";function n(){var e=this.node,t=void 0;if(this.isMemberExpression())t=e.property;else{if(!this.isProperty()&&!this.isMethod())throw new ReferenceError("todo");t=e.key}return e.computed||o.isIdentifier(t)&&(t=o.stringLiteral(t.name)),t}function i(){return o.ensureBlock(this.node)}function s(){if(this.isArrowFunctionExpression()){this.ensureBlock();var e=this.node;e.expression=!1,e.type="FunctionExpression",e.shadow=e.shadow||!0}}r.__esModule=!0,r.toComputedKey=n,r.ensureBlock=i,r.arrowFunctionToShadowed=s;var a=e("babel-types"),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(a)},{"babel-types":169}],141:[function(e,t,r){(function(t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){var e=this.evaluate();if(e.confident)return!!e.value}function s(){function e(e){i&&(s=e,i=!1)}function r(t){var r=t.node;if(a.has(r)){var s=a.get(r);return s.resolved?s.value:void e(t)}var o={resolved:!1};a.set(r,o);var u=n(t);return i&&(o.resolved=!0,o.value=u),u}function n(n){if(i){var s=n.node;if(n.isSequenceExpression()){var a=n.get("expressions");return r(a[a.length-1])}if(n.isStringLiteral()||n.isNumericLiteral()||n.isBooleanLiteral())return s.value;if(n.isNullLiteral())return null;if(n.isTemplateLiteral()){for(var u="",c=0,p=n.get("expressions"),d=s.quasis,m=Array.isArray(d),y=0,d=m?d:(0,l.default)(d);;){var g;if(m){if(y>=d.length)break;g=d[y++]}else{if(y=d.next(),y.done)break;g=y.value}var b=g;if(!i)break;u+=b.value.cooked;var v=p[c++];v&&(u+=String(r(v)))}if(!i)return;return u}if(n.isConditionalExpression()){var x=r(n.get("test"));if(!i)return;return r(x?n.get("consequent"):n.get("alternate"))}if(n.isExpressionWrapper())return r(n.get("expression"));if(n.isMemberExpression()&&!n.parentPath.isCallExpression({callee:s})){var E=n.get("property"),A=n.get("object");if(A.isLiteral()&&E.isIdentifier()){var D=A.node.value,C=void 0===D?"undefined":(0,o.default)(D);if("number"===C||"string"===C)return D[E.node.name]}}if(n.isReferencedIdentifier()){var S=n.scope.getBinding(s.name);if(S&&S.constantViolations.length>0)return e(S.path);if(S&&n.node.start<S.path.node.end)return e(S.path);if(S&&S.hasValue)return S.value;if("undefined"===s.name)return S?e(S.path):void 0;if("Infinity"===s.name)return S?e(S.path):1/0;if("NaN"===s.name)return S?e(S.path):NaN;var _=n.resolve();return _===n?e(n):r(_)}if(n.isUnaryExpression({prefix:!0})){if("void"===s.operator)return;var w=n.get("argument");if("typeof"===s.operator&&(w.isFunction()||w.isClass()))return"function";var k=r(w);if(!i)return;switch(s.operator){case"!":return!k;case"+":return+k;case"-":return-k;case"~":return~k;case"typeof":return void 0===k?"undefined":(0,o.default)(k)}}if(n.isArrayExpression()){for(var F=[],T=n.get("elements"),P=T,B=Array.isArray(P),O=0,P=B?P:(0,l.default)(P);;){var j;if(B){if(O>=P.length)break;j=P[O++]}else{if(O=P.next(),O.done)break;j=O.value}var N=j;if(N=N.evaluate(),!N.confident)return e(N);F.push(N.value)}return F}if(n.isObjectExpression()){for(var I={},L=n.get("properties"),M=L,R=Array.isArray(M),U=0,M=R?M:(0,l.default)(M);;){var V;if(R){if(U>=M.length)break;V=M[U++]}else{if(U=M.next(),U.done)break;V=U.value}var q=V;if(q.isObjectMethod()||q.isSpreadProperty())return e(q);var G=q.get("key"),X=G;if(q.node.computed){if(X=X.evaluate(),!X.confident)return e(G);X=X.value}else X=X.isIdentifier()?X.node.name:X.node.value;var J=q.get("value"),W=J.evaluate();if(!W.confident)return e(J);W=W.value,I[X]=W}return I}if(n.isLogicalExpression()){var K=i,z=r(n.get("left")),Y=i;i=K;var H=r(n.get("right")),$=i;switch(i=Y&&$,s.operator){case"||":if(z&&Y)return i=!0,z;if(!i)return;return z||H;case"&&":if((!z&&Y||!H&&$)&&(i=!0),!i)return;return z&&H}}if(n.isBinaryExpression()){var Q=r(n.get("left"));if(!i)return;var Z=r(n.get("right"));if(!i)return;switch(s.operator){case"-":return Q-Z;case"+":return Q+Z;case"/":return Q/Z;case"*":return Q*Z;case"%":return Q%Z;case"**":return Math.pow(Q,Z);case"<":return Q<Z;case">":return Q>Z;case"<=":return Q<=Z;case">=":return Q>=Z;case"==":return Q==Z;case"!=":return Q!=Z;case"===":return Q===Z;case"!==":return Q!==Z;case"|":return Q|Z;case"&":return Q&Z;case"^":return Q^Z;case"<<":return Q<<Z;case">>":return Q>>Z;case">>>":return Q>>>Z}}if(n.isCallExpression()){var ee=n.get("callee"),te=void 0,re=void 0;if(ee.isIdentifier()&&!n.scope.getBinding(ee.node.name,!0)&&h.indexOf(ee.node.name)>=0&&(re=t[s.callee.name]),ee.isMemberExpression()){var ne=ee.get("object"),ie=ee.get("property");if(ne.isIdentifier()&&ie.isIdentifier()&&h.indexOf(ne.node.name)>=0&&f.indexOf(ie.node.name)<0&&(te=t[ne.node.name],re=te[ie.node.name]),ne.isLiteral()&&ie.isIdentifier()){var se=(0,o.default)(ne.node.value);"string"!==se&&"number"!==se||(te=ne.node.value,re=te[ie.node.name])}}if(re){var ae=n.get("arguments").map(r);if(!i)return;return re.apply(te,ae)}}e(n)}}var i=!0,s=void 0,a=new p.default,u=r(this);return i||(u=void 0),{confident:i,deopt:s,value:u}}r.__esModule=!0;var a=e("babel-runtime/helpers/typeof"),o=n(a),u=e("babel-runtime/core-js/get-iterator"),l=n(u),c=e("babel-runtime/core-js/map"),p=n(c);r.evaluateTruthy=i,r.evaluate=s;var h=["String","Number","Math"],f=["random"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/map":115,"babel-runtime/helpers/typeof":131}],142:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){var e=this;do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())break;e=e.parentPath}while(e);if(e&&(e.isProgram()||e.isFile()))throw new Error("File/Program node, we can't possibly find a statement parent to this");return e}function s(){return"left"===this.key?this.getSibling("right"):"right"===this.key?this.getSibling("left"):void 0}function a(){var e=[],t=function(t){t&&(e=e.concat(t.getCompletionRecords()))};if(this.isIfStatement())t(this.get("consequent")),t(this.get("alternate"));else if(this.isDoExpression()||this.isFor()||this.isWhile())t(this.get("body"));else if(this.isProgram()||this.isBlockStatement())t(this.get("body").pop());else{if(this.isFunction())return this.get("body").getCompletionRecords();this.isTryStatement()?(t(this.get("block")),t(this.get("handler")),t(this.get("finalizer"))):e.push(this)}return e}function o(e){return C.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e})}function u(){return this.getSibling(this.key-1)}function l(){return this.getSibling(this.key+1)}function c(){for(var e=this.key,t=this.getSibling(++e),r=[];t.node;)r.push(t),t=this.getSibling(++e);return r}function p(){for(var e=this.key,t=this.getSibling(--e),r=[];t.node;)r.push(t),t=this.getSibling(--e);return r}function h(e,t){!0===t&&(t=this.context);var r=e.split(".");return 1===r.length?this._getKey(e,t):this._getPattern(r,t)}function f(e,t){var r=this,n=this.node,i=n[e];return Array.isArray(i)?i.map(function(s,a){return C.default.get({listKey:e,parentPath:r,parent:n,container:i,key:a}).setContext(t)}):C.default.get({parentPath:this,parent:n,container:n,key:e}).setContext(t)}function d(e,t){for(var r=this,n=e,i=Array.isArray(n),s=0,n=i?n:(0,A.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;r="."===o?r.parentPath:Array.isArray(r)?r[o]:r.get(o,t)}return r}function m(e){return _.getBindingIdentifiers(this.node,e)}function y(e){return _.getOuterBindingIdentifiers(this.node,e)}function g(){for(var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this,n=[].concat(r),i=(0,x.default)(null);n.length;){var s=n.shift();if(s&&s.node){var a=_.getBindingIdentifiers.keys[s.node.type];if(s.isIdentifier())if(e){var o=i[s.node.name]=i[s.node.name]||[];o.push(s)}else i[s.node.name]=s;else if(s.isExportDeclaration()){var u=s.get("declaration");u.isDeclaration()&&n.push(u)}else{if(t){if(s.isFunctionDeclaration()){n.push(s.get("id"));continue}if(s.isFunctionExpression())continue}if(a)for(var l=0;l<a.length;l++){var c=a[l],p=s.get(c);(Array.isArray(p)||p.node)&&(n=n.concat(p))}}}}return i}function b(e){return this.getBindingIdentifierPaths(e,!0)}r.__esModule=!0;var v=e("babel-runtime/core-js/object/create"),x=n(v),E=e("babel-runtime/core-js/get-iterator"),A=n(E);r.getStatementParent=i,r.getOpposite=s,r.getCompletionRecords=a,r.getSibling=o,r.getPrevSibling=u,r.getNextSibling=l,r.getAllNextSiblings=c,r.getAllPrevSiblings=p,r.get=h,r._getKey=f,r._getPattern=d,r.getBindingIdentifiers=m,r.getOuterBindingIdentifiers=y,r.getBindingIdentifierPaths=g,r.getOuterBindingIdentifierPaths=b;var D=e("./index"),C=n(D),S=e("babel-types"),_=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(S)},{"./index":143,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/object/create":118,"babel-types":169}],143:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=e("babel-runtime/core-js/get-iterator"),a=i(s),o=e("babel-runtime/helpers/classCallCheck"),u=i(o),l=e("./lib/virtual-types"),c=n(l),p=e("debug"),h=i(p),f=e("invariant"),d=i(f),m=e("../index"),y=i(m),g=e("lodash/assign"),b=i(g),v=e("../scope"),x=i(v),E=e("babel-types"),A=n(E),D=e("../cache"),C=(0,h.default)("babel"),S=function(){function e(t,r){(0,u.default)(this,e),this.parent=r,this.hub=t,this.contexts=[],this.data={},this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.state=null,this.opts=null,this.skipKeys=null,this.parentPath=null,this.context=null,this.container=null,this.listKey=null,this.inList=!1,this.parentKey=null,this.key=null,this.node=null,this.scope=null,this.type=null,this.typeAnnotation=null}return e.get=function(t){var r=t.hub,n=t.parentPath,i=t.parent,s=t.container,a=t.listKey,o=t.key;!r&&n&&(r=n.hub),(0,d.default)(i,"To get a node path the parent needs to exist");var u=s[o],l=D.path.get(i)||[];D.path.has(i)||D.path.set(i,l);for(var c=void 0,p=0;p<l.length;p++){var h=l[p];if(h.node===u){c=h;break}}return c||(c=new e(r,i),l.push(c)),c.setup(n,s,a,o),c},e.prototype.getScope=function(e){var t=e;return this.isScope()&&(t=new x.default(this,e)),t},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e,t){var r=this.data[e];return!r&&t&&(r=this.data[e]=t),r},e.prototype.buildCodeFrameError=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:SyntaxError;return this.hub.file.buildCodeFrameError(this.node,e,t)},e.prototype.traverse=function(e,t){(0,y.default)(this.node,e,this.scope,t,this)},e.prototype.mark=function(e,t){this.hub.file.metadata.marked.push({type:e,message:t,loc:this.node.loc})},e.prototype.set=function(e,t){A.validate(this.node,e,t),this.node[e]=t},e.prototype.getPathLocation=function(){var e=[],t=this;do{var r=t.key;t.inList&&(r=t.listKey+"["+r+"]"),e.unshift(r)}while(t=t.parentPath);return e.join(".")},e.prototype.debug=function(e){C.enabled&&C(this.getPathLocation()+" "+this.type+": "+e())},e}();r.default=S,(0,b.default)(S.prototype,e("./ancestry")),(0,b.default)(S.prototype,e("./inference")),(0,b.default)(S.prototype,e("./replacement")),(0,b.default)(S.prototype,e("./evaluation")),(0,b.default)(S.prototype,e("./conversion")),(0,b.default)(S.prototype,e("./introspection")),(0,b.default)(S.prototype,e("./context")),(0,b.default)(S.prototype,e("./removal")),(0,b.default)(S.prototype,e("./modification")),(0,b.default)(S.prototype,e("./family")),(0,b.default)(S.prototype,e("./comments"));for(var _=A.TYPES,w=Array.isArray(_),k=0,_=w?_:(0,a.default)(_);;){var F;if("break"===function(){if(w){if(k>=_.length)return"break";F=_[k++]}else{if(k=_.next(),k.done)return"break";F=k.value}var e=F,t="is"+e;S.prototype[t]=function(e){return A[t](this.node,e)},S.prototype["assert"+e]=function(r){if(!this[t](r))throw new TypeError("Expected node path of type "+e)}}())break}for(var T in c){(function(e){if("_"===e[0])return"continue";A.TYPES.indexOf(e)<0&&A.TYPES.push(e);var t=c[e];S.prototype["is"+e]=function(e){return t.checkPath(this,e)}})(T)}t.exports=r.default},{"../cache":133,"../index":136,"../scope":155,"./ancestry":137,"./comments":138,"./context":139,"./conversion":140,"./evaluation":141,"./family":142,"./inference":144,"./introspection":147,"./lib/virtual-types":150,"./modification":151,"./removal":152,"./replacement":153,"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/classCallCheck":127,"babel-types":169,debug:296,invariant:307,"lodash/assign":477}],144:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(){if(this.typeAnnotation)return this.typeAnnotation;var e=this._getTypeAnnotation()||y.anyTypeAnnotation();return y.isTypeAnnotation(e)&&(e=e.typeAnnotation),this.typeAnnotation=e}function s(){var e=this.node;{if(e){if(e.typeAnnotation)return e.typeAnnotation;var t=d[e.type];return t?t.call(this,e):(t=d[this.parentPath.type],t&&t.validParent?this.parentPath.getTypeAnnotation():void 0)}if("init"===this.key&&this.parentPath.isVariableDeclarator()){var r=this.parentPath.parentPath,n=r.parentPath;return"left"===r.key&&n.isForInStatement()?y.stringTypeAnnotation():"left"===r.key&&n.isForOfStatement()?y.anyTypeAnnotation():y.voidTypeAnnotation()}}}function a(e,t){return o(e,this.getTypeAnnotation(),t)}function o(e,t,r){if("string"===e)return y.isStringTypeAnnotation(t);if("number"===e)return y.isNumberTypeAnnotation(t);if("boolean"===e)return y.isBooleanTypeAnnotation(t);if("any"===e)return y.isAnyTypeAnnotation(t);if("mixed"===e)return y.isMixedTypeAnnotation(t);if("empty"===e)return y.isEmptyTypeAnnotation(t);if("void"===e)return y.isVoidTypeAnnotation(t);if(r)return!1;throw new Error("Unknown base type "+e)}function u(e){var t=this.getTypeAnnotation();if(y.isAnyTypeAnnotation(t))return!0;if(y.isUnionTypeAnnotation(t)){for(var r=t.types,n=Array.isArray(r),i=0,r=n?r:(0,h.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;if(y.isAnyTypeAnnotation(a)||o(e,a,!0))return!0}return!1}return o(e,t,!0)}function l(e){var t=this.getTypeAnnotation();if(e=e.getTypeAnnotation(),!y.isAnyTypeAnnotation(t)&&y.isFlowBaseAnnotation(t))return e.type===t.type}function c(e){var t=this.getTypeAnnotation();return y.isGenericTypeAnnotation(t)&&y.isIdentifier(t.id,{name:e})}r.__esModule=!0;var p=e("babel-runtime/core-js/get-iterator"),h=function(e){return e&&e.__esModule?e:{default:e}}(p);r.getTypeAnnotation=i,r._getTypeAnnotation=s,r.isBaseType=a,r.couldBeBaseType=u,r.baseTypeStrictlyMatches=l,r.isGenericType=c;var f=e("./inferers"),d=n(f),m=e("babel-types"),y=n(m)},{"./inferers":146,"babel-runtime/core-js/get-iterator":113,"babel-types":169}],145:[function(e,t,r){"use strict";function n(e,t){var r=e.scope.getBinding(t),n=[];e.typeAnnotation=p.unionTypeAnnotation(n);var s=[],a=i(r,e,s),u=o(e,t);if(u&&function(){var e=i(r,u.ifStatement);a=a.filter(function(t){return e.indexOf(t)<0}),n.push(u.typeAnnotation)}(),a.length){a=a.concat(s);for(var c=a,h=Array.isArray(c),f=0,c=h?c:(0,l.default)(c);;){var d;if(h){if(f>=c.length)break;d=c[f++]}else{if(f=c.next(),f.done)break;d=f.value}var m=d;n.push(m.getTypeAnnotation())}}if(n.length)return p.createUnionTypeAnnotation(n)}function i(e,t,r){var n=e.constantViolations.slice();return n.unshift(e.path),n.filter(function(e){e=e.resolve();var n=e._guessExecutionStatusRelativeTo(t);return r&&"function"===n&&r.push(e),"before"===n})}function s(e,t){var r=t.node.operator,n=t.get("right").resolve(),i=t.get("left").resolve(),s=void 0;if(i.isIdentifier({name:e})?s=n:n.isIdentifier({name:e})&&(s=i),s)return"==="===r?s.getTypeAnnotation():p.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(r)>=0?p.numberTypeAnnotation():void 0;if("==="===r){var a=void 0,o=void 0;if(i.isUnaryExpression({operator:"typeof"})?(a=i,o=n):n.isUnaryExpression({operator:"typeof"})&&(a=n,o=i),(o||a)&&(o=o.resolve(),o.isLiteral())){if("string"==typeof o.node.value&&a.get("argument").isIdentifier({name:e}))return p.createTypeAnnotationBasedOnTypeof(o.node.value)}}}function a(e){for(var t=void 0;t=e.parentPath;){if(t.isIfStatement()||t.isConditionalExpression())return"test"===e.key?void 0:t;e=t}}function o(e,t){var r=a(e);if(r){var n=r.get("test"),i=[n],u=[];do{var l=i.shift().resolve();if(l.isLogicalExpression()&&(i.push(l.get("left")),i.push(l.get("right"))),l.isBinaryExpression()){var c=s(t,l);c&&u.push(c)}}while(i.length);return u.length?{typeAnnotation:p.createUnionTypeAnnotation(u),ifStatement:r}:o(r,t)}}r.__esModule=!0;var u=e("babel-runtime/core-js/get-iterator"),l=function(e){return e&&e.__esModule?e:{default:e}}(u);r.default=function(e){if(this.isReferenced()){var t=this.scope.getBinding(e.name);return t?t.identifier.typeAnnotation?t.identifier.typeAnnotation:n(this,e.name):"undefined"===e.name?p.voidTypeAnnotation():"NaN"===e.name||"Infinity"===e.name?p.numberTypeAnnotation():void e.name}};var c=e("babel-types"),p=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(c);t.exports=r.default},{"babel-runtime/core-js/get-iterator":113,"babel-types":169}],146:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){return this.get("id").isIdentifier()?this.get("init").getTypeAnnotation():void 0}function s(e){return e.typeAnnotation}function a(e){if(this.get("callee").isIdentifier())return F.genericTypeAnnotation(e.callee)}function o(){return F.stringTypeAnnotation()}function u(e){var t=e.operator;return"void"===t?F.voidTypeAnnotation():F.NUMBER_UNARY_OPERATORS.indexOf(t)>=0?F.numberTypeAnnotation():F.STRING_UNARY_OPERATORS.indexOf(t)>=0?F.stringTypeAnnotation():F.BOOLEAN_UNARY_OPERATORS.indexOf(t)>=0?F.booleanTypeAnnotation():void 0}function l(e){var t=e.operator;if(F.NUMBER_BINARY_OPERATORS.indexOf(t)>=0)return F.numberTypeAnnotation();if(F.BOOLEAN_BINARY_OPERATORS.indexOf(t)>=0)return F.booleanTypeAnnotation();if("+"===t){var r=this.get("right"),n=this.get("left");return n.isBaseType("number")&&r.isBaseType("number")?F.numberTypeAnnotation():n.isBaseType("string")||r.isBaseType("string")?F.stringTypeAnnotation():F.unionTypeAnnotation([F.stringTypeAnnotation(),F.numberTypeAnnotation()])}}function c(){return F.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])}function p(){return F.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])}function h(){return this.get("expressions").pop().getTypeAnnotation()}function f(){return this.get("right").getTypeAnnotation()}function d(e){var t=e.operator;if("++"===t||"--"===t)return F.numberTypeAnnotation()}function m(){return F.stringTypeAnnotation()}function y(){return F.numberTypeAnnotation()}function g(){return F.booleanTypeAnnotation()}function b(){return F.nullLiteralTypeAnnotation()}function v(){return F.genericTypeAnnotation(F.identifier("RegExp"))}function x(){return F.genericTypeAnnotation(F.identifier("Object"))}function E(){return F.genericTypeAnnotation(F.identifier("Array"))}function A(){return E()}function D(){return F.genericTypeAnnotation(F.identifier("Function"))}function C(){return _(this.get("callee"))}function S(){return _(this.get("tag"))}function _(e){if(e=e.resolve(),e.isFunction()){if(e.is("async"))return e.is("generator")?F.genericTypeAnnotation(F.identifier("AsyncIterator")):F.genericTypeAnnotation(F.identifier("Promise"));if(e.node.returnType)return e.node.returnType}}r.__esModule=!0,r.ClassDeclaration=r.ClassExpression=r.FunctionDeclaration=r.ArrowFunctionExpression=r.FunctionExpression=r.Identifier=void 0;var w=e("./inferer-reference");Object.defineProperty(r,"Identifier",{enumerable:!0,get:function(){return n(w).default}}),r.VariableDeclarator=i,
+r.TypeCastExpression=s,r.NewExpression=a,r.TemplateLiteral=o,r.UnaryExpression=u,r.BinaryExpression=l,r.LogicalExpression=c,r.ConditionalExpression=p,r.SequenceExpression=h,r.AssignmentExpression=f,r.UpdateExpression=d,r.StringLiteral=m,r.NumericLiteral=y,r.BooleanLiteral=g,r.NullLiteral=b,r.RegExpLiteral=v,r.ObjectExpression=x,r.ArrayExpression=E,r.RestElement=A,r.CallExpression=C,r.TaggedTemplateExpression=S;var k=e("babel-types"),F=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(k);s.validParent=!0,A.validParent=!0,r.FunctionExpression=D,r.ArrowFunctionExpression=D,r.FunctionDeclaration=D,r.ClassExpression=D,r.ClassDeclaration=D},{"./inferer-reference":145,"babel-types":169}],147:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){function r(e){var t=n[s];return"*"===t||e===t}if(!this.isMemberExpression())return!1;for(var n=e.split("."),i=[this.node],s=0;i.length;){var a=i.shift();if(t&&s===n.length)return!0;if(k.isIdentifier(a)){if(!r(a.name))return!1}else if(k.isLiteral(a)){if(!r(a.value))return!1}else{if(k.isMemberExpression(a)){if(a.computed&&!k.isLiteral(a.property))return!1;i.unshift(a.property),i.unshift(a.object);continue}if(!k.isThisExpression(a))return!1;if(!r("this"))return!1}if(++s>n.length)return!1}return s===n.length}function s(e){var t=this.node&&this.node[e];return t&&Array.isArray(t)?!!t.length:!!t}function a(){return this.scope.isStatic(this.node)}function o(e){return!this.has(e)}function u(e,t){return this.node[e]===t}function l(e){return k.isType(this.type,e)}function c(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()}function p(e){return!("body"!==this.key||!this.parentPath.isArrowFunctionExpression())&&(this.isExpression()?k.isBlockStatement(e):!!this.isBlockStatement()&&k.isExpression(e))}function h(e){var t=this,r=!0;do{var n=t.container;if(t.isFunction()&&!r)return!!e;if(r=!1,Array.isArray(n)&&t.key!==n.length-1)return!1}while((t=t.parentPath)&&!t.isProgram());return!0}function f(){return!this.parentPath.isLabeledStatement()&&!k.isBlockStatement(this.container)&&(0,_.default)(k.STATEMENT_OR_BLOCK_KEYS,this.key)}function d(e,t){if(!this.isReferencedIdentifier())return!1;var r=this.scope.getBinding(this.node.name);if(!r||"module"!==r.kind)return!1;var n=r.path,i=n.parentPath;return!!i.isImportDeclaration()&&(i.node.source.value===e&&(!t||(!(!n.isImportDefaultSpecifier()||"default"!==t)||(!(!n.isImportNamespaceSpecifier()||"*"!==t)||!(!n.isImportSpecifier()||n.node.imported.name!==t)))))}function m(){var e=this.node;return e.end?this.hub.file.code.slice(e.start,e.end):""}function y(e){return"after"!==this._guessExecutionStatusRelativeTo(e)}function g(e){var t=e.scope.getFunctionParent(),r=this.scope.getFunctionParent();if(t.node!==r.node){var n=this._guessExecutionStatusRelativeToDifferentFunctions(t);if(n)return n;e=t.path}var i=e.getAncestry();if(i.indexOf(this)>=0)return"after";var s=this.getAncestry(),a=void 0,o=void 0,u=void 0;for(u=0;u<s.length;u++){var l=s[u];if((o=i.indexOf(l))>=0){a=l;break}}if(!a)return"before";var c=i[o-1],p=s[u-1];return c&&p?c.listKey&&c.container===p.container?c.key>p.key?"before":"after":k.VISITOR_KEYS[c.type].indexOf(c.key)>k.VISITOR_KEYS[p.type].indexOf(p.key)?"before":"after":"before"}function b(e){var t=e.path;if(t.isFunctionDeclaration()){var r=t.scope.getBinding(t.node.id.name);if(!r.references)return"before";for(var n=r.referencePaths,i=n,s=Array.isArray(i),a=0,i=s?i:(0,C.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o;if("callee"!==u.key||!u.parentPath.isCallExpression())return}for(var l=void 0,c=n,p=Array.isArray(c),h=0,c=p?c:(0,C.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if(h=c.next(),h.done)break;f=h.value}var d=f;if(!!!d.find(function(e){return e.node===t.node})){var m=this._guessExecutionStatusRelativeTo(d);if(l){if(l!==m)return}else l=m}}return l}}function v(e,t){return this._resolve(e,t)||this}function x(e,t){var r=this;if(!(t&&t.indexOf(this)>=0))if(t=t||[],t.push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(e,t)}else if(this.isReferencedIdentifier()){var n=this.scope.getBinding(this.node.name);if(!n)return;if(!n.constant)return;if("module"===n.kind)return;if(n.path!==this){var i=function(){var i=n.path.resolve(e,t);return r.find(function(e){return e.node===i.node})?{v:void 0}:{v:i}}();if("object"===(void 0===i?"undefined":(0,A.default)(i)))return i.v}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(e,t);if(e&&this.isMemberExpression()){var s=this.toComputedKey();if(!k.isLiteral(s))return;var a=s.value,o=this.get("object").resolve(e,t);if(o.isObjectExpression())for(var u=o.get("properties"),l=u,c=Array.isArray(l),p=0,l=c?l:(0,C.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if(p=l.next(),p.done)break;h=p.value}var f=h;if(f.isProperty()){var d=f.get("key"),m=f.isnt("computed")&&d.isIdentifier({name:a});if(m=m||d.isLiteral({value:a}))return f.get("value").resolve(e,t)}}else if(o.isArrayExpression()&&!isNaN(+a)){var y=o.get("elements"),g=y[a];if(g)return g.resolve(e,t)}}}}r.__esModule=!0,r.is=void 0;var E=e("babel-runtime/helpers/typeof"),A=n(E),D=e("babel-runtime/core-js/get-iterator"),C=n(D);r.matchesPattern=i,r.has=s,r.isStatic=a,r.isnt=o,r.equals=u,r.isNodeType=l,r.canHaveVariableDeclarationOrExpression=c,r.canSwapBetweenExpressionAndStatement=p,r.isCompletionRecord=h,r.isStatementOrBlock=f,r.referencesImport=d,r.getSource=m,r.willIMaybeExecuteBefore=y,r._guessExecutionStatusRelativeTo=g,r._guessExecutionStatusRelativeToDifferentFunctions=b,r.resolve=v,r._resolve=x;var S=e("lodash/includes"),_=n(S),w=e("babel-types"),k=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(w);r.is=s},{"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/typeof":131,"babel-types":169,"lodash/includes":496}],148:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/core-js/get-iterator"),s=n(i),a=e("babel-runtime/helpers/classCallCheck"),o=n(a),u=e("babel-types"),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(u),c={ReferencedIdentifier:function(e,t){if(!e.isJSXIdentifier()||!u.react.isCompatTag(e.node.name)||e.parentPath.isJSXMemberExpression()){if("this"===e.node.name){var r=e.scope;do{if(r.path.isFunction()&&!r.path.isArrowFunctionExpression())break}while(r=r.parent);r&&t.breakOnScopePaths.push(r.path)}var n=e.scope.getBinding(e.node.name);n&&n===t.scope.getBinding(e.node.name)&&(t.bindings[e.node.name]=n)}}},p=function(){function e(t,r){(0,o.default)(this,e),this.breakOnScopePaths=[],this.bindings={},this.scopes=[],this.scope=r,this.path=t,this.attachAfter=!1}return e.prototype.isCompatibleScope=function(e){for(var t in this.bindings){var r=this.bindings[t];if(!e.bindingIdentifierEquals(t,r.identifier))return!1}return!0},e.prototype.getCompatibleScopes=function(){var e=this.path.scope;do{if(!this.isCompatibleScope(e))break;if(this.scopes.push(e),this.breakOnScopePaths.indexOf(e.path)>=0)break}while(e=e.parent)},e.prototype.getAttachmentPath=function(){var e=this._getAttachmentPath();if(e){var t=e.scope;if(t.path===e&&(t=e.scope.parent),t.path.isProgram()||t.path.isFunction())for(var r in this.bindings)if(t.hasOwnBinding(r)){var n=this.bindings[r];if("param"!==n.kind&&this.getAttachmentParentForPath(n.path).key>e.key){this.attachAfter=!0,e=n.path;for(var i=n.constantViolations,a=Array.isArray(i),o=0,i=a?i:(0,s.default)(i);;){var u;if(a){if(o>=i.length)break;u=i[o++]}else{if(o=i.next(),o.done)break;u=o.value}var l=u;this.getAttachmentParentForPath(l).key>e.key&&(e=l)}}}return e}},e.prototype._getAttachmentPath=function(){var e=this.scopes,t=e.pop();if(t){if(t.path.isFunction()){if(this.hasOwnParamBindings(t)){if(this.scope===t)return;return t.path.get("body").get("body")[0]}return this.getNextScopeAttachmentParent()}return t.path.isProgram()?this.getNextScopeAttachmentParent():void 0}},e.prototype.getNextScopeAttachmentParent=function(){var e=this.scopes.pop();if(e)return this.getAttachmentParentForPath(e.path)},e.prototype.getAttachmentParentForPath=function(e){do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement()||e.isVariableDeclarator()&&null!==e.parentPath.node&&e.parentPath.node.declarations.length>1)return e}while(e=e.parentPath)},e.prototype.hasOwnParamBindings=function(e){for(var t in this.bindings)if(e.hasOwnBinding(t)){var r=this.bindings[t];if("param"===r.kind&&r.constant)return!0}return!1},e.prototype.run=function(){var e=this.path.node;if(!e._hoisted){e._hoisted=!0,this.path.traverse(c,this),this.getCompatibleScopes();var t=this.getAttachmentPath();if(t&&t.getFunctionParent()!==this.path.getFunctionParent()){var r=t.scope.generateUidIdentifier("ref"),n=l.variableDeclarator(r,this.path.node);t[this.attachAfter?"insertAfter":"insertBefore"]([t.isVariableDeclarator()?n:l.variableDeclaration("var",[n])]);var i=this.path.parentPath;i.isJSXElement()&&this.path.container===i.node.children&&(r=l.JSXExpressionContainer(r)),this.path.replaceWith(r)}}},e}();r.default=p,t.exports=r.default},{"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/classCallCheck":127,"babel-types":169}],149:[function(e,t,r){"use strict";r.__esModule=!0;r.hooks=[function(e,t){if("test"===e.key&&(t.isWhile()||t.isSwitchCase())||"declaration"===e.key&&t.isExportDeclaration()||"body"===e.key&&t.isLabeledStatement()||"declarations"===e.listKey&&t.isVariableDeclaration()&&1===t.node.declarations.length||"expression"===e.key&&t.isExpressionStatement())return t.remove(),!0},function(e,t){if(t.isSequenceExpression()&&1===t.node.expressions.length)return t.replaceWith(t.node.expressions[0]),!0},function(e,t){if(t.isBinary())return"left"===e.key?t.replaceWith(t.node.right):t.replaceWith(t.node.left),!0},function(e,t){if(t.isIfStatement()&&("consequent"===e.key||"alternate"===e.key)||"body"===e.key&&(t.isLoop()||t.isArrowFunctionExpression()))return e.replaceWith({type:"BlockStatement",body:[]}),!0}]},{}],150:[function(e,t,r){"use strict";r.__esModule=!0,r.Flow=r.Pure=r.Generated=r.User=r.Var=r.BlockScoped=r.Referenced=r.Scope=r.Expression=r.Statement=r.BindingIdentifier=r.ReferencedMemberExpression=r.ReferencedIdentifier=void 0;var n=e("babel-types"),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n);r.ReferencedIdentifier={types:["Identifier","JSXIdentifier"],checkPath:function(e,t){var r=e.node,s=e.parent;if(!i.isIdentifier(r,t)&&!i.isJSXMemberExpression(s,t)){if(!i.isJSXIdentifier(r,t))return!1;if(n.react.isCompatTag(r.name))return!1}return i.isReferenced(r,s)}},r.ReferencedMemberExpression={types:["MemberExpression"],checkPath:function(e){var t=e.node,r=e.parent;return i.isMemberExpression(t)&&i.isReferenced(t,r)}},r.BindingIdentifier={types:["Identifier"],checkPath:function(e){var t=e.node,r=e.parent;return i.isIdentifier(t)&&i.isBinding(t,r)}},r.Statement={types:["Statement"],checkPath:function(e){var t=e.node,r=e.parent;if(i.isStatement(t)){if(i.isVariableDeclaration(t)){if(i.isForXStatement(r,{left:t}))return!1;if(i.isForStatement(r,{init:t}))return!1}return!0}return!1}},r.Expression={types:["Expression"],checkPath:function(e){return e.isIdentifier()?e.isReferencedIdentifier():i.isExpression(e.node)}},r.Scope={types:["Scopable"],checkPath:function(e){return i.isScope(e.node,e.parent)}},r.Referenced={checkPath:function(e){return i.isReferenced(e.node,e.parent)}},r.BlockScoped={checkPath:function(e){return i.isBlockScoped(e.node)}},r.Var={types:["VariableDeclaration"],checkPath:function(e){return i.isVar(e.node)}},r.User={checkPath:function(e){return e.node&&!!e.node.loc}},r.Generated={checkPath:function(e){return!e.isUser()}},r.Pure={checkPath:function(e,t){return e.scope.isPure(e.node,t)}},r.Flow={types:["Flow","ImportDeclaration","ExportDeclaration","ImportSpecifier"],checkPath:function(e){var t=e.node;return!!i.isFlow(t)||(i.isImportDeclaration(t)?"type"===t.importKind||"typeof"===t.importKind:i.isExportDeclaration(t)?"type"===t.exportKind:!!i.isImportSpecifier(t)&&("type"===t.importKind||"typeof"===t.importKind))}}},{"babel-types":169}],151:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){if(this._assertUnremoved(),e=this._verifyNodeList(e),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertBefore(e);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key)this.node&&e.push(this.node),this.replaceExpressionWithStatements(e);else{if(this._maybePopFromStatements(e),Array.isArray(this.container))return this._containerInsertBefore(e);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&e.push(this.node),this._replaceWith(S.blockStatement(e))}return[this]}function s(e,t){this.updateSiblingKeys(e,t.length);for(var r=[],n=0;n<t.length;n++){var i=e+n,s=t[n];if(this.container.splice(i,0,s),this.context){var a=this.context.create(this.parent,this.container,i,this.listKey);this.context.queue&&a.pushContext(this.context),r.push(a)}else r.push(D.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:i}))}for(var o=this._getQueueContexts(),u=r,l=Array.isArray(u),c=0,u=l?u:(0,b.default)(u);;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if(c=u.next(),c.done)break;p=c.value}var h=p;h.setScope(),h.debug(function(){return"Inserted."});for(var f=o,d=Array.isArray(f),m=0,f=d?f:(0,b.default)(f);;){var y;if(d){if(m>=f.length)break;y=f[m++]}else{if(m=f.next(),m.done)break;y=m.value}y.maybeQueue(h,!0)}}return r}function a(e){return this._containerInsert(this.key,e)}function o(e){return this._containerInsert(this.key+1,e)}function u(e){var t=e[e.length-1];(S.isIdentifier(t)||S.isExpressionStatement(t)&&S.isIdentifier(t.expression))&&!this.isCompletionRecord()&&e.pop()}function l(e){if(this._assertUnremoved(),e=this._verifyNodeList(e),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertAfter(e);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key){if(this.node){var t=this.scope.generateDeclaredUidIdentifier();e.unshift(S.expressionStatement(S.assignmentExpression("=",t,this.node))),e.push(S.expressionStatement(t))}this.replaceExpressionWithStatements(e)}else{if(this._maybePopFromStatements(e),Array.isArray(this.container))return this._containerInsertAfter(e);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&e.unshift(this.node),this._replaceWith(S.blockStatement(e))}return[this]}function c(e,t){if(this.parent)for(var r=v.path.get(this.parent),n=0;n<r.length;n++){var i=r[n];i.key>=e&&(i.key+=t)}}function p(e){if(!e)return[];e.constructor!==Array&&(e=[e]);for(var t=0;t<e.length;t++){var r=e[t],n=void 0;if(r?"object"!==(void 0===r?"undefined":(0,y.default)(r))?n="contains a non-object node":r.type?r instanceof D.default&&(n="has a NodePath when it expected a raw object"):n="without a type":n="has falsy node",n){var i=Array.isArray(r)?"array":void 0===r?"undefined":(0,y.default)(r);throw new Error("Node list "+n+" with the index of "+t+" and type of "+i)}}return e}function h(e,t){return this._assertUnremoved(),t=this._verifyNodeList(t),D.default.get({parentPath:this,parent:this.node,container:this.node[e],listKey:e,key:0}).insertBefore(t)}function f(e,t){this._assertUnremoved(),t=this._verifyNodeList(t);var r=this.node[e];return D.default.get({parentPath:this,parent:this.node,container:r,listKey:e,key:r.length}).replaceWithMultiple(t)}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.scope;return new E.default(this,e).run()}r.__esModule=!0;var m=e("babel-runtime/helpers/typeof"),y=n(m),g=e("babel-runtime/core-js/get-iterator"),b=n(g);r.insertBefore=i,r._containerInsert=s,r._containerInsertBefore=a,r._containerInsertAfter=o,r._maybePopFromStatements=u,r.insertAfter=l,r.updateSiblingKeys=c,r._verifyNodeList=p,r.unshiftContainer=h,r.pushContainer=f,r.hoist=d;var v=e("../cache"),x=e("./lib/hoister"),E=n(x),A=e("./index"),D=n(A),C=e("babel-types"),S=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(C)},{"../cache":133,"./index":143,"./lib/hoister":148,"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/typeof":131,"babel-types":169}],152:[function(e,t,r){"use strict";function n(){if(this._assertUnremoved(),this.resync(),this._callRemovalHooks())return void this._markRemoved();this.shareCommentsWithSiblings(),this._remove(),this._markRemoved()}function i(){for(var e=c.hooks,t=Array.isArray(e),r=0,e=t?e:(0,l.default)(e);;){var n;if(t){if(r>=e.length)break;n=e[r++]}else{if(r=e.next(),r.done)break;n=r.value}if(n(this,this.parentPath))return!0}}function s(){Array.isArray(this.container)?(this.container.splice(this.key,1),this.updateSiblingKeys(this.key,-1)):this._replaceWith(null)}function a(){this.shouldSkip=!0,this.removed=!0,this.node=null}function o(){if(this.removed)throw this.buildCodeFrameError("NodePath has been removed so is read-only.")}r.__esModule=!0;var u=e("babel-runtime/core-js/get-iterator"),l=function(e){return e&&e.__esModule?e:{default:e}}(u);r.remove=n,r._callRemovalHooks=i,r._remove=s,r._markRemoved=a,r._assertUnremoved=o;var c=e("./lib/removal-hooks")},{"./lib/removal-hooks":149,"babel-runtime/core-js/get-iterator":113}],153:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){this.resync(),e=this._verifyNodeList(e),x.inheritLeadingComments(e[0],this.node),x.inheritTrailingComments(e[e.length-1],this.node),this.node=this.container[this.key]=null,this.insertAfter(e),this.node?this.requeue():this.remove()}function s(e){this.resync();try{e="("+e+")",e=(0,b.parse)(e)}catch(r){var t=r.loc;throw t&&(r.message+=" - make sure this is an expression.",r.message+="\n"+(0,f.default)(e,t.line,t.column+1)),r}return e=e.program.body[0].expression,m.default.removeProperties(e),this.replaceWith(e)}function a(e){if(this.resync(),this.removed)throw new Error("You can't replace this node, we've already removed it");if(e instanceof g.default&&(e=e.node),!e)throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");if(this.node!==e){if(this.isProgram()&&!x.isProgram(e))throw new Error("You can only replace a Program root node with another Program node");if(Array.isArray(e))throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");if("string"==typeof e)throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");if(this.isNodeType("Statement")&&x.isExpression(e)&&(this.canHaveVariableDeclarationOrExpression()||this.canSwapBetweenExpressionAndStatement(e)||(e=x.expressionStatement(e))),this.isNodeType("Expression")&&x.isStatement(e)&&!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(e))return this.replaceExpressionWithStatements([e]);var t=this.node;t&&(x.inheritsComments(e,t),x.removeComments(t)),this._replaceWith(e),this.type=e.type,this.setScope(),this.requeue()}}function o(e){if(!this.container)throw new ReferenceError("Container is falsy");this.inList?x.validate(this.parent,this.key,[e]):x.validate(this.parent,this.key,e),this.debug(function(){return"Replace with "+(e&&e.type)}),this.node=this.container[this.key]=e}function u(e){this.resync();var t=x.toSequenceExpression(e,this.scope);if(x.isSequenceExpression(t)){var r=t.expressions;r.length>=2&&this.parentPath.isExpressionStatement()&&this._maybePopFromStatements(r),1===r.length?this.replaceWith(r[0]):this.replaceWith(t)}else{if(!t){var n=x.functionExpression(null,[],x.blockStatement(e));n.shadow=!0,this.replaceWith(x.callExpression(n,[])),this.traverse(E);for(var i=this.get("callee").getCompletionRecords(),s=i,a=Array.isArray(s),o=0,s=a?s:(0,p.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u;if(l.isExpressionStatement()){var c=l.findParent(function(e){return e.isLoop()});if(c){var h=c.getData("expressionReplacementReturnUid");if(h)h=x.identifier(h.name);else{var f=this.get("callee");h=f.scope.generateDeclaredUidIdentifier("ret"),f.get("body").pushContainer("body",x.returnStatement(h)),c.setData("expressionReplacementReturnUid",h)}l.get("expression").replaceWith(x.assignmentExpression("=",h,l.node.expression))}else l.replaceWith(x.returnStatement(l.node.expression))}}return this.node}this.replaceWith(t)}}function l(e){return this.resync(),Array.isArray(e)?Array.isArray(this.container)?(e=this._verifyNodeList(e),this._containerInsertAfter(e),this.remove()):this.replaceWithMultiple(e):this.replaceWith(e)}r.__esModule=!0;var c=e("babel-runtime/core-js/get-iterator"),p=n(c);r.replaceWithMultiple=i,r.replaceWithSourceString=s,r.replaceWith=a,r._replaceWith=o,r.replaceExpressionWithStatements=u,r.replaceInline=l;var h=e("babel-code-frame"),f=n(h),d=e("../index"),m=n(d),y=e("./index"),g=n(y),b=e("babylon"),v=e("babel-types"),x=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(v),E={Function:function(e){e.skip()},VariableDeclaration:function(e){if("var"===e.node.kind){var t=e.getBindingIdentifiers();for(var r in t)e.scope.push({id:t[r]});for(var n=[],i=e.node.declarations,s=Array.isArray(i),a=0,i=s?i:(0,p.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o;u.init&&n.push(x.expressionStatement(x.assignmentExpression("=",u.id,u.init)))}e.replaceWithMultiple(n)}}}},{"../index":136,"./index":143,"babel-code-frame":23,"babel-runtime/core-js/get-iterator":113,"babel-types":169,babylon:177}],154:[function(e,t,r){"use strict";r.__esModule=!0;var n=e("babel-runtime/helpers/classCallCheck"),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s=function(){function e(t){var r=t.existing,n=t.identifier,s=t.scope,a=t.path,o=t.kind;(0,i.default)(this,e),this.identifier=n,this.scope=s,this.path=a,this.kind=o,this.constantViolations=[],this.constant=!0,this.referencePaths=[],this.referenced=!1,this.references=0,this.clearValue(),r&&(this.constantViolations=[].concat(r.path,r.constantViolations,this.constantViolations))}return e.prototype.deoptValue=function(){this.clearValue(),this.hasDeoptedValue=!0},e.prototype.setValue=function(e){this.hasDeoptedValue||(this.hasValue=!0,this.value=e)},e.prototype.clearValue=function(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null},e.prototype.reassign=function(e){this.constant=!1,-1===this.constantViolations.indexOf(e)&&this.constantViolations.push(e)},e.prototype.reference=function(e){-1===this.referencePaths.indexOf(e)&&(this.referenced=!0,this.references++,this.referencePaths.push(e))},e.prototype.dereference=function(){this.references--,this.referenced=!!this.references},e}();r.default=s,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":127}],155:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r){for(var n=N.scope.get(e.node)||[],i=n,s=Array.isArray(i),a=0,i=s?i:(0,y.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o;if(u.parent===t&&u.path===e)return u}n.push(r),N.scope.has(e.node)||N.scope.set(e.node,n)}function a(e,t){if(j.isModuleDeclaration(e))if(e.source)a(e.source,t);else if(e.specifiers&&e.specifiers.length)for(var r=e.specifiers,n=Array.isArray(r),i=0,r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var o=s;a(o,t)}else e.declaration&&a(e.declaration,t);else if(j.isModuleSpecifier(e))a(e.local,t);else if(j.isMemberExpression(e))a(e.object,t),a(e.property,t);else if(j.isIdentifier(e))t.push(e.name);else if(j.isLiteral(e))t.push(e.value);else if(j.isCallExpression(e))a(e.callee,t);else if(j.isObjectExpression(e)||j.isObjectPattern(e))for(var u=e.properties,l=Array.isArray(u),c=0,u=l?u:(0,y.default)(u);;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if(c=u.next(),c.done)break;p=c.value}var h=p;a(h.key||h.argument,t)}}r.__esModule=!0;var o=e("babel-runtime/core-js/object/keys"),u=i(o),l=e("babel-runtime/core-js/object/create"),c=i(l),p=e("babel-runtime/core-js/map"),h=i(p),f=e("babel-runtime/helpers/classCallCheck"),d=i(f),m=e("babel-runtime/core-js/get-iterator"),y=i(m),g=e("lodash/includes"),b=i(g),v=e("lodash/repeat"),x=i(v),E=e("./lib/renamer"),A=i(E),D=e("../index"),C=i(D),S=e("lodash/defaults"),_=i(S),w=e("babel-messages"),k=n(w),F=e("./binding"),T=i(F),P=e("globals"),B=i(P),O=e("babel-types"),j=n(O),N=e("../cache"),I=0,L={For:function(e){for(var t=j.FOR_INIT_KEYS,r=Array.isArray(t),n=0,t=r?t:(0,y.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i,a=e.get(s);a.isVar()&&e.scope.getFunctionParent().registerBinding("var",a)}},Declaration:function(e){e.isBlockScoped()||e.isExportDeclaration()&&e.get("declaration").isDeclaration()||e.scope.getFunctionParent().registerDeclaration(e)},ReferencedIdentifier:function(e,t){t.references.push(e)},ForXStatement:function(e,t){var r=e.get("left");(r.isPattern()||r.isIdentifier())&&t.constantViolations.push(r)},ExportDeclaration:{exit:function(e){var t=e.node,r=e.scope,n=t.declaration;if(j.isClassDeclaration(n)||j.isFunctionDeclaration(n)){var i=n.id;if(!i)return;var s=r.getBinding(i.name);s&&s.reference(e)}else if(j.isVariableDeclaration(n))for(var a=n.declarations,o=Array.isArray(a),u=0,a=o?a:(0,y.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l,p=j.getBindingIdentifiers(c);for(var h in p){var f=r.getBinding(h);f&&f.reference(e)}}}},LabeledStatement:function(e){e.scope.getProgramParent().addGlobal(e.node),e.scope.getBlockParent().registerDeclaration(e)},AssignmentExpression:function(e,t){t.assignments.push(e)},UpdateExpression:function(e,t){t.constantViolations.push(e.get("argument"))},UnaryExpression:function(e,t){"delete"===e.node.operator&&t.constantViolations.push(e.get("argument"))},BlockScoped:function(e){var t=e.scope;t.path===e&&(t=t.parent),t.getBlockParent().registerDeclaration(e)},ClassDeclaration:function(e){var t=e.node.id;if(t){var r=t.name;e.scope.bindings[r]=e.scope.getBinding(r)}},Block:function(e){for(var t=e.get("body"),r=t,n=Array.isArray(r),i=0,r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;a.isFunctionDeclaration()&&e.scope.getBlockParent().registerDeclaration(a)}}},M=0,R=function(){function e(t,r){if((0,d.default)(this,e),r&&r.block===t.node)return r;var n=s(t,r,this);if(n)return n;this.uid=M++,this.parent=r,this.hub=t.hub,this.parentBlock=t.parent,this.block=t.node,this.path=t,this.labels=new h.default}return e.prototype.traverse=function(e,t,r){(0,C.default)(e,t,this,r,this.path)},e.prototype.generateDeclaredUidIdentifier=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp",t=this.generateUidIdentifier(e);return this.push({id:t}),t},e.prototype.generateUidIdentifier=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp";return j.identifier(this.generateUid(e))},e.prototype.generateUid=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp";e=j.toIdentifier(e).replace(/^_+/,"").replace(/[0-9]+$/g,"");var t=void 0,r=0;do{t=this._generateUid(e,r),r++}while(this.hasLabel(t)||this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));var n=this.getProgramParent();return n.references[t]=!0,n.uids[t]=!0,t},e.prototype._generateUid=function(e,t){var r=e;return t>1&&(r+=t),"_"+r},e.prototype.generateUidIdentifierBasedOnNode=function(e,t){var r=e;j.isAssignmentExpression(e)?r=e.left:j.isVariableDeclarator(e)?r=e.id:(j.isObjectProperty(r)||j.isObjectMethod(r))&&(r=r.key);var n=[];a(r,n);var i=n.join("$");return i=i.replace(/^_/,"")||t||"ref",this.generateUidIdentifier(i.slice(0,20))},e.prototype.isStatic=function(e){if(j.isThisExpression(e)||j.isSuper(e))return!0;if(j.isIdentifier(e)){var t=this.getBinding(e.name);return t?t.constant:this.hasBinding(e.name)}return!1},e.prototype.maybeGenerateMemoised=function(e,t){if(this.isStatic(e))return null;var r=this.generateUidIdentifierBasedOnNode(e);return t||this.push({id:r}),r},e.prototype.checkBlockScopedCollisions=function(e,t,r,n){if("param"!==t&&("hoisted"!==t||"let"!==e.kind)){if("let"===t||"let"===e.kind||"const"===e.kind||"module"===e.kind||"param"===e.kind&&("let"===t||"const"===t))throw this.hub.file.buildCodeFrameError(n,k.get("scopeDuplicateDeclaration",r),TypeError)}},e.prototype.rename=function(e,t,r){var n=this.getBinding(e);if(n)return t=t||this.generateUidIdentifier(e).name,new A.default(n,e,t).rename(r)},e.prototype._renameFromMap=function(e,t,r,n){e[t]&&(e[r]=n,e[t]=null)},e.prototype.dump=function(){var e=(0,x.default)("-",60);console.log(e);var t=this;do{console.log("#",t.block.type);for(var r in t.bindings){var n=t.bindings[r];console.log(" -",r,{constant:n.constant,references:n.references,violations:n.constantViolations.length,kind:n.kind})}}while(t=t.parent);console.log(e)},e.prototype.toArray=function(e,t){var r=this.hub.file;if(j.isIdentifier(e)){var n=this.getBinding(e.name);if(n&&n.constant&&n.path.isGenericType("Array"))return e}if(j.isArrayExpression(e))return e;if(j.isIdentifier(e,{name:"arguments"}))return j.callExpression(j.memberExpression(j.memberExpression(j.memberExpression(j.identifier("Array"),j.identifier("prototype")),j.identifier("slice")),j.identifier("call")),[e]);var i="toArray",s=[e];return!0===t?i="toConsumableArray":t&&(s.push(j.numericLiteral(t)),i="slicedToArray"),j.callExpression(r.addHelper(i),s)},e.prototype.hasLabel=function(e){return!!this.getLabel(e)},e.prototype.getLabel=function(e){return this.labels.get(e)},e.prototype.registerLabel=function(e){this.labels.set(e.node.label.name,e)},e.prototype.registerDeclaration=function(e){if(e.isLabeledStatement())this.registerLabel(e);else if(e.isFunctionDeclaration())this.registerBinding("hoisted",e.get("id"),e);else if(e.isVariableDeclaration())for(var t=e.get("declarations"),r=t,n=Array.isArray(r),i=0,r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;this.registerBinding(e.node.kind,a)}else if(e.isClassDeclaration())this.registerBinding("let",e);else if(e.isImportDeclaration())for(var o=e.get("specifiers"),u=o,l=Array.isArray(u),c=0,u=l?u:(0,y.default)(u);;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if(c=u.next(),c.done)break;p=c.value}var h=p;this.registerBinding("module",h)}else if(e.isExportDeclaration()){var f=e.get("declaration");(f.isClassDeclaration()||f.isFunctionDeclaration()||f.isVariableDeclaration())&&this.registerDeclaration(f)}else this.registerBinding("unknown",e)},e.prototype.buildUndefinedNode=function(){return this.hasBinding("undefined")?j.unaryExpression("void",j.numericLiteral(0),!0):j.identifier("undefined")},e.prototype.registerConstantViolation=function(e){var t=e.getBindingIdentifiers();for(var r in t){var n=this.getBinding(r)
+;n&&n.reassign(e)}},e.prototype.registerBinding=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;if(!e)throw new ReferenceError("no `kind`");if(t.isVariableDeclaration())for(var n=t.get("declarations"),i=n,s=Array.isArray(i),a=0,i=s?i:(0,y.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o;this.registerBinding(e,u)}else{var l=this.getProgramParent(),c=t.getBindingIdentifiers(!0);for(var p in c)for(var h=c[p],f=Array.isArray(h),d=0,h=f?h:(0,y.default)(h);;){var m;if(f){if(d>=h.length)break;m=h[d++]}else{if(d=h.next(),d.done)break;m=d.value}var g=m,b=this.getOwnBinding(p);if(b){if(b.identifier===g)continue;this.checkBlockScopedCollisions(b,e,p,g)}b&&b.path.isFlow()&&(b=null),l.references[p]=!0,this.bindings[p]=new T.default({identifier:g,existing:b,scope:this,path:r,kind:e})}}},e.prototype.addGlobal=function(e){this.globals[e.name]=e},e.prototype.hasUid=function(e){var t=this;do{if(t.uids[e])return!0}while(t=t.parent);return!1},e.prototype.hasGlobal=function(e){var t=this;do{if(t.globals[e])return!0}while(t=t.parent);return!1},e.prototype.hasReference=function(e){var t=this;do{if(t.references[e])return!0}while(t=t.parent);return!1},e.prototype.isPure=function(e,t){if(j.isIdentifier(e)){var r=this.getBinding(e.name);return!!r&&(!t||r.constant)}if(j.isClass(e))return!(e.superClass&&!this.isPure(e.superClass,t))&&this.isPure(e.body,t);if(j.isClassBody(e)){for(var n=e.body,i=Array.isArray(n),s=0,n=i?n:(0,y.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;if(!this.isPure(o,t))return!1}return!0}if(j.isBinary(e))return this.isPure(e.left,t)&&this.isPure(e.right,t);if(j.isArrayExpression(e)){for(var u=e.elements,l=Array.isArray(u),c=0,u=l?u:(0,y.default)(u);;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if(c=u.next(),c.done)break;p=c.value}var h=p;if(!this.isPure(h,t))return!1}return!0}if(j.isObjectExpression(e)){for(var f=e.properties,d=Array.isArray(f),m=0,f=d?f:(0,y.default)(f);;){var g;if(d){if(m>=f.length)break;g=f[m++]}else{if(m=f.next(),m.done)break;g=m.value}var b=g;if(!this.isPure(b,t))return!1}return!0}return j.isClassMethod(e)?!(e.computed&&!this.isPure(e.key,t))&&("get"!==e.kind&&"set"!==e.kind):j.isClassProperty(e)||j.isObjectProperty(e)?!(e.computed&&!this.isPure(e.key,t))&&this.isPure(e.value,t):j.isUnaryExpression(e)?this.isPure(e.argument,t):j.isPureish(e)},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e){var t=this;do{var r=t.data[e];if(null!=r)return r}while(t=t.parent)},e.prototype.removeData=function(e){var t=this;do{null!=t.data[e]&&(t.data[e]=null)}while(t=t.parent)},e.prototype.init=function(){this.references||this.crawl()},e.prototype.crawl=function(){I++,this._crawl(),I--},e.prototype._crawl=function(){var e=this.path;if(this.references=(0,c.default)(null),this.bindings=(0,c.default)(null),this.globals=(0,c.default)(null),this.uids=(0,c.default)(null),this.data=(0,c.default)(null),e.isLoop())for(var t=j.FOR_INIT_KEYS,r=Array.isArray(t),n=0,t=r?t:(0,y.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i,a=e.get(s);a.isBlockScoped()&&this.registerBinding(a.node.kind,a)}if(e.isFunctionExpression()&&e.has("id")&&(e.get("id").node[j.NOT_LOCAL_BINDING]||this.registerBinding("local",e.get("id"),e)),e.isClassExpression()&&e.has("id")&&(e.get("id").node[j.NOT_LOCAL_BINDING]||this.registerBinding("local",e)),e.isFunction())for(var o=e.get("params"),u=o,l=Array.isArray(u),p=0,u=l?u:(0,y.default)(u);;){var h;if(l){if(p>=u.length)break;h=u[p++]}else{if(p=u.next(),p.done)break;h=p.value}var f=h;this.registerBinding("param",f)}if(e.isCatchClause()&&this.registerBinding("let",e),!this.getProgramParent().crawling){var d={references:[],constantViolations:[],assignments:[]};this.crawling=!0,e.traverse(L,d),this.crawling=!1;for(var m=d.assignments,g=Array.isArray(m),b=0,m=g?m:(0,y.default)(m);;){var v;if(g){if(b>=m.length)break;v=m[b++]}else{if(b=m.next(),b.done)break;v=b.value}var x=v,E=x.getBindingIdentifiers(),A=void 0;for(var D in E)x.scope.getBinding(D)||(A=A||x.scope.getProgramParent(),A.addGlobal(E[D]));x.scope.registerConstantViolation(x)}for(var C=d.references,S=Array.isArray(C),_=0,C=S?C:(0,y.default)(C);;){var w;if(S){if(_>=C.length)break;w=C[_++]}else{if(_=C.next(),_.done)break;w=_.value}var k=w,F=k.scope.getBinding(k.node.name);F?F.reference(k):k.scope.getProgramParent().addGlobal(k.node)}for(var T=d.constantViolations,P=Array.isArray(T),B=0,T=P?T:(0,y.default)(T);;){var O;if(P){if(B>=T.length)break;O=T[B++]}else{if(B=T.next(),B.done)break;O=B.value}var N=O;N.scope.registerConstantViolation(N)}}},e.prototype.push=function(e){var t=this.path;t.isBlockStatement()||t.isProgram()||(t=this.getBlockParent().path),t.isSwitchStatement()&&(t=this.getFunctionParent().path),(t.isLoop()||t.isCatchClause()||t.isFunction())&&(j.ensureBlock(t.node),t=t.get("body"));var r=e.unique,n=e.kind||"var",i=null==e._blockHoist?2:e._blockHoist,s="declaration:"+n+":"+i,a=!r&&t.getData(s);if(!a){var o=j.variableDeclaration(n,[]);o._generated=!0,o._blockHoist=i;a=t.unshiftContainer("body",[o])[0],r||t.setData(s,a)}var u=j.variableDeclarator(e.id,e.init);a.node.declarations.push(u),this.registerBinding(n,a.get("declarations").pop())},e.prototype.getProgramParent=function(){var e=this;do{if(e.path.isProgram())return e}while(e=e.parent);throw new Error("We couldn't find a Function or Program...")},e.prototype.getFunctionParent=function(){var e=this;do{if(e.path.isFunctionParent())return e}while(e=e.parent);throw new Error("We couldn't find a Function or Program...")},e.prototype.getBlockParent=function(){var e=this;do{if(e.path.isBlockParent())return e}while(e=e.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")},e.prototype.getAllBindings=function(){var e=(0,c.default)(null),t=this;do{(0,_.default)(e,t.bindings),t=t.parent}while(t);return e},e.prototype.getAllBindingsOfKind=function(){for(var e=(0,c.default)(null),t=arguments,r=Array.isArray(t),n=0,t=r?t:(0,y.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i,a=this;do{for(var o in a.bindings){var u=a.bindings[o];u.kind===s&&(e[o]=u)}a=a.parent}while(a)}return e},e.prototype.bindingIdentifierEquals=function(e,t){return this.getBindingIdentifier(e)===t},e.prototype.warnOnFlowBinding=function(e){return 0===I&&e&&e.path.isFlow()&&console.warn("\n You or one of the Babel plugins you are using are using Flow declarations as bindings.\n Support for this will be removed in version 6.8. To find out the caller, grep for this\n message and change it to a `console.trace()`.\n "),e},e.prototype.getBinding=function(e){var t=this;do{var r=t.getOwnBinding(e);if(r)return this.warnOnFlowBinding(r)}while(t=t.parent)},e.prototype.getOwnBinding=function(e){return this.warnOnFlowBinding(this.bindings[e])},e.prototype.getBindingIdentifier=function(e){var t=this.getBinding(e);return t&&t.identifier},e.prototype.getOwnBindingIdentifier=function(e){var t=this.bindings[e];return t&&t.identifier},e.prototype.hasOwnBinding=function(e){return!!this.getOwnBinding(e)},e.prototype.hasBinding=function(t,r){return!!t&&(!!this.hasOwnBinding(t)||(!!this.parentHasBinding(t,r)||(!!this.hasUid(t)||(!(r||!(0,b.default)(e.globals,t))||!(r||!(0,b.default)(e.contextVariables,t))))))},e.prototype.parentHasBinding=function(e,t){return this.parent&&this.parent.hasBinding(e,t)},e.prototype.moveBindingTo=function(e,t){var r=this.getBinding(e);r&&(r.scope.removeOwnBinding(e),r.scope=t,t.bindings[e]=r)},e.prototype.removeOwnBinding=function(e){delete this.bindings[e]},e.prototype.removeBinding=function(e){var t=this.getBinding(e);t&&t.scope.removeOwnBinding(e);var r=this;do{r.uids[e]&&(r.uids[e]=!1)}while(r=r.parent)},e}();R.globals=(0,u.default)(B.default.builtin),R.contextVariables=["arguments","undefined","Infinity","NaN"],r.default=R,t.exports=r.default},{"../cache":133,"../index":136,"./binding":154,"./lib/renamer":156,"babel-messages":103,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/map":115,"babel-runtime/core-js/object/create":118,"babel-runtime/core-js/object/keys":120,"babel-runtime/helpers/classCallCheck":127,"babel-types":169,globals:303,"lodash/defaults":484,"lodash/includes":496,"lodash/repeat":519}],156:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/helpers/classCallCheck"),s=n(i),a=e("../binding"),o=(n(a),e("babel-types")),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(o),l={ReferencedIdentifier:function(e,t){var r=e.node;r.name===t.oldName&&(r.name=t.newName)},Scope:function(e,t){e.scope.bindingIdentifierEquals(t.oldName,t.binding.identifier)||e.skip()},"AssignmentExpression|Declaration":function(e,t){var r=e.getOuterBindingIdentifiers();for(var n in r)n===t.oldName&&(r[n].name=t.newName)}},c=function(){function e(t,r,n){(0,s.default)(this,e),this.newName=n,this.oldName=r,this.binding=t}return e.prototype.maybeConvertFromExportDeclaration=function(e){var t=e.parentPath.isExportDeclaration()&&e.parentPath;if(t){var r=t.isExportDefaultDeclaration();r&&(e.isFunctionDeclaration()||e.isClassDeclaration())&&!e.node.id&&(e.node.id=e.scope.generateUidIdentifier("default"));var n=e.getOuterBindingIdentifiers(),i=[];for(var s in n){var a=s===this.oldName?this.newName:s,o=r?"default":s;i.push(u.exportSpecifier(u.identifier(a),u.identifier(o)))}if(i.length){var l=u.exportNamedDeclaration(null,i);e.isFunctionDeclaration()&&(l._blockHoist=3),t.insertAfter(l),t.replaceWith(e.node)}}},e.prototype.maybeConvertFromClassFunctionDeclaration=function(e){},e.prototype.maybeConvertFromClassFunctionExpression=function(e){},e.prototype.rename=function(e){var t=this.binding,r=this.oldName,n=this.newName,i=t.scope,s=t.path,a=s.find(function(e){return e.isDeclaration()||e.isFunctionExpression()});a&&this.maybeConvertFromExportDeclaration(a),i.traverse(e||i.block,l,this),e||(i.removeOwnBinding(r),i.bindings[n]=t,this.binding.identifier.name=n),t.type,a&&(this.maybeConvertFromClassFunctionDeclaration(a),this.maybeConvertFromClassFunctionExpression(a))},e}();r.default=c,t.exports=r.default},{"../binding":154,"babel-runtime/helpers/classCallCheck":127,"babel-types":169}],157:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){if(e._exploded)return e;e._exploded=!0;for(var t in e)if(!f(t)){var r=t.split("|");if(1!==r.length){var n=e[t];delete e[t];for(var i=r,s=Array.isArray(i),o=0,i=s?i:(0,x.default)(i);;){var u;if(s){if(o>=i.length)break;u=i[o++]}else{if(o=i.next(),o.done)break;u=o.value}var l=u;e[l]=n}}}a(e),delete e.__esModule,c(e),p(e);for(var m=(0,b.default)(e),y=Array.isArray(m),g=0,m=y?m:(0,x.default)(m);;){var v;if(y){if(g>=m.length)break;v=m[g++]}else{if(g=m.next(),g.done)break;v=g.value}var E=v;if(!f(E)){var D=A[E];if(D){var C=e[E];for(var S in C)C[S]=h(D,C[S]);if(delete e[E],D.types)for(var w=D.types,F=Array.isArray(w),T=0,w=F?w:(0,x.default)(w);;){var P;if(F){if(T>=w.length)break;P=w[T++]}else{if(T=w.next(),T.done)break;P=T.value}var B=P;e[B]?d(e[B],C):e[B]=C}else d(e,C)}}}for(var O in e)if(!f(O)){var j=e[O],N=_.FLIPPED_ALIAS_KEYS[O],I=_.DEPRECATED_KEYS[O];if(I&&(console.trace("Visitor defined for "+O+" but it has been renamed to "+I),N=[I]),N){delete e[O];for(var L=N,M=Array.isArray(L),R=0,L=M?L:(0,x.default)(L);;){var U;if(M){if(R>=L.length)break;U=L[R++]}else{if(R=L.next(),R.done)break;U=R.value}var V=U,q=e[V];q?d(q,j):e[V]=(0,k.default)(j)}}}for(var G in e)f(G)||p(e[G]);return e}function a(e){if(!e._verified){if("function"==typeof e)throw new Error(C.get("traverseVerifyRootFunction"));for(var t in e)if("enter"!==t&&"exit"!==t||o(t,e[t]),!f(t)){if(_.TYPES.indexOf(t)<0)throw new Error(C.get("traverseVerifyNodeType",t));var r=e[t];if("object"===(void 0===r?"undefined":(0,y.default)(r)))for(var n in r){if("enter"!==n&&"exit"!==n)throw new Error(C.get("traverseVerifyVisitorProperty",t,n));o(t+"."+n,r[n])}}e._verified=!0}}function o(e,t){for(var r=[].concat(t),n=r,i=Array.isArray(n),s=0,n=i?n:(0,x.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;if("function"!=typeof o)throw new TypeError("Non-function found defined in "+e+" with type "+(void 0===o?"undefined":(0,y.default)(o)))}}function u(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2],n={},i=0;i<e.length;i++){var a=e[i],o=t[i];s(a);for(var u in a){var c=a[u];(o||r)&&(c=l(c,o,r));d(n[u]=n[u]||{},c)}}return n}function l(e,t,r){var n={};for(var i in e){(function(i){var s=e[i];if(!Array.isArray(s))return"continue";s=s.map(function(e){var n=e;return t&&(n=function(r){return e.call(t,r,t)}),r&&(n=r(t.key,i,n)),n}),n[i]=s})(i)}return n}function c(e){for(var t in e)if(!f(t)){var r=e[t];"function"==typeof r&&(e[t]={enter:r})}}function p(e){e.enter&&!Array.isArray(e.enter)&&(e.enter=[e.enter]),e.exit&&!Array.isArray(e.exit)&&(e.exit=[e.exit])}function h(e,t){var r=function(r){if(e.checkPath(r))return t.apply(this,arguments)};return r.toString=function(){return t.toString()},r}function f(e){return"_"===e[0]||("enter"===e||"exit"===e||"shouldSkip"===e||("blacklist"===e||"noScope"===e||"skipKeys"===e))}function d(e,t){for(var r in t)e[r]=[].concat(e[r]||[],t[r])}r.__esModule=!0;var m=e("babel-runtime/helpers/typeof"),y=i(m),g=e("babel-runtime/core-js/object/keys"),b=i(g),v=e("babel-runtime/core-js/get-iterator"),x=i(v);r.explode=s,r.verify=a,r.merge=u;var E=e("./path/lib/virtual-types"),A=n(E),D=e("babel-messages"),C=n(D),S=e("babel-types"),_=n(S),w=e("lodash/clone"),k=i(w)},{"./path/lib/virtual-types":150,"babel-messages":103,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/object/keys":120,"babel-runtime/helpers/typeof":131,"babel-types":169,"lodash/clone":480}],158:[function(e,t,r){"use strict";r.__esModule=!0,r.NOT_LOCAL_BINDING=r.BLOCK_SCOPED_SYMBOL=r.INHERIT_KEYS=r.UNARY_OPERATORS=r.STRING_UNARY_OPERATORS=r.NUMBER_UNARY_OPERATORS=r.BOOLEAN_UNARY_OPERATORS=r.BINARY_OPERATORS=r.NUMBER_BINARY_OPERATORS=r.BOOLEAN_BINARY_OPERATORS=r.COMPARISON_BINARY_OPERATORS=r.EQUALITY_BINARY_OPERATORS=r.BOOLEAN_NUMBER_BINARY_OPERATORS=r.UPDATE_OPERATORS=r.LOGICAL_OPERATORS=r.COMMENT_KEYS=r.FOR_INIT_KEYS=r.FLATTENABLE_KEYS=r.STATEMENT_OR_BLOCK_KEYS=void 0;var n=e("babel-runtime/core-js/symbol/for"),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s=(r.STATEMENT_OR_BLOCK_KEYS=["consequent","body","alternate"],r.FLATTENABLE_KEYS=["body","expressions"],r.FOR_INIT_KEYS=["left","init"],r.COMMENT_KEYS=["leadingComments","trailingComments","innerComments"],r.LOGICAL_OPERATORS=["||","&&"],r.UPDATE_OPERATORS=["++","--"],r.BOOLEAN_NUMBER_BINARY_OPERATORS=[">","<",">=","<="]),a=r.EQUALITY_BINARY_OPERATORS=["==","===","!=","!=="],o=r.COMPARISON_BINARY_OPERATORS=[].concat(a,["in","instanceof"]),u=r.BOOLEAN_BINARY_OPERATORS=[].concat(o,s),l=r.NUMBER_BINARY_OPERATORS=["-","/","%","*","**","&","|",">>",">>>","<<","^"],c=(r.BINARY_OPERATORS=["+"].concat(l,u),r.BOOLEAN_UNARY_OPERATORS=["delete","!"]),p=r.NUMBER_UNARY_OPERATORS=["+","-","++","--","~"],h=r.STRING_UNARY_OPERATORS=["typeof"];r.UNARY_OPERATORS=["void"].concat(c,p,h),r.INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]},r.BLOCK_SCOPED_SYMBOL=(0,i.default)("var used to be block scoped"),r.NOT_LOCAL_BINDING=(0,i.default)("should not be considered a local binding")},{"babel-runtime/core-js/symbol/for":123}],159:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.key||e.property;return e.computed||C.isIdentifier(t)&&(t=C.stringLiteral(t.name)),t}function s(e,t){function r(e){for(var s=!1,a=[],o=e,u=Array.isArray(o),l=0,o=u?o:(0,b.default)(o);;){var c;if(u){if(l>=o.length)break;c=o[l++]}else{if(l=o.next(),l.done)break;c=l.value}var p=c;if(C.isExpression(p))a.push(p);else if(C.isExpressionStatement(p))a.push(p.expression);else{if(C.isVariableDeclaration(p)){if("var"!==p.kind)return i=!0;for(var h=p.declarations,f=Array.isArray(h),d=0,h=f?h:(0,b.default)(h);;){var m;if(f){if(d>=h.length)break;m=h[d++]}else{if(d=h.next(),d.done)break;m=d.value}var y=m,g=C.getBindingIdentifiers(y);for(var v in g)n.push({kind:p.kind,id:g[v]});y.init&&a.push(C.assignmentExpression("=",y.id,y.init))}s=!0;continue}if(C.isIfStatement(p)){var x=p.consequent?r([p.consequent]):t.buildUndefinedNode(),E=p.alternate?r([p.alternate]):t.buildUndefinedNode();if(!x||!E)return i=!0;a.push(C.conditionalExpression(p.test,x,E))}else{if(!C.isBlockStatement(p)){if(C.isEmptyStatement(p)){s=!0;continue}return i=!0}a.push(r(p.body))}}s=!1}return(s||0===a.length)&&a.push(t.buildUndefinedNode()),1===a.length?a[0]:C.sequenceExpression(a)}if(e&&e.length){var n=[],i=!1,s=r(e);if(!i){for(var a=0;a<n.length;a++)t.push(n[a]);return s}}}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.key,r=void 0;return"method"===e.kind?a.increment()+"":(r=C.isIdentifier(t)?t.name:C.isStringLiteral(t)?(0,y.default)(t.value):(0,y.default)(C.removePropertiesDeep(C.cloneDeep(t))),e.computed&&(r="["+r+"]"),e.static&&(r="static:"+r),r)}function o(e){return e+="",e=e.replace(/[^a-zA-Z0-9$_]/g,"-"),e=e.replace(/^[-0-9]+/,""),e=e.replace(/[-\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""}),C.isValidIdentifier(e)||(e="_"+e),e||"_"}function u(e){return e=o(e),"eval"!==e&&"arguments"!==e||(e="_"+e),e}function l(e,t){if(C.isStatement(e))return e;var r=!1,n=void 0;if(C.isClass(e))r=!0,n="ClassDeclaration";else if(C.isFunction(e))r=!0,n="FunctionDeclaration";else if(C.isAssignmentExpression(e))return C.expressionStatement(e);if(r&&!e.id&&(n=!1),!n){if(t)return!1;throw new Error("cannot turn "+e.type+" to a statement")}return e.type=n,e}function c(e){if(C.isExpressionStatement(e)&&(e=e.expression),C.isExpression(e))return e;if(C.isClass(e)?e.type="ClassExpression":C.isFunction(e)&&(e.type="FunctionExpression"),!C.isExpression(e))throw new Error("cannot turn "+e.type+" to an expression");return e}function p(e,t){return C.isBlockStatement(e)?e:(C.isEmptyStatement(e)&&(e=[]),Array.isArray(e)||(C.isStatement(e)||(e=C.isFunction(t)?C.returnStatement(e):C.expressionStatement(e)),e=[e]),C.blockStatement(e))}function h(e){if(void 0===e)return C.identifier("undefined");if(!0===e||!1===e)return C.booleanLiteral(e);if(null===e)return C.nullLiteral();if("string"==typeof e)return C.stringLiteral(e);if("number"==typeof e)return C.numericLiteral(e);if((0,A.default)(e)){var t=e.source,r=e.toString().match(/\/([a-z]+|)$/)[1];return C.regExpLiteral(t,r)}if(Array.isArray(e))return C.arrayExpression(e.map(C.valueToNode));if((0,x.default)(e)){var n=[];for(var i in e){var s=void 0;s=C.isValidIdentifier(i)?C.identifier(i):C.stringLiteral(i),n.push(C.objectProperty(s,C.valueToNode(e[i])))}return C.objectExpression(n)}throw new Error("don't know how to turn this value into a node")}r.__esModule=!0;var f=e("babel-runtime/core-js/number/max-safe-integer"),d=n(f),m=e("babel-runtime/core-js/json/stringify"),y=n(m),g=e("babel-runtime/core-js/get-iterator"),b=n(g);r.toComputedKey=i,r.toSequenceExpression=s,r.toKeyAlias=a,r.toIdentifier=o,r.toBindingIdentifierName=u,r.toStatement=l,r.toExpression=c,r.toBlock=p,r.valueToNode=h;var v=e("lodash/isPlainObject"),x=n(v),E=e("lodash/isRegExp"),A=n(E),D=e("./index"),C=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(D);a.uid=0,a.increment=function(){return a.uid>=d.default?a.uid=0:a.uid++}},{"./index":169,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/json/stringify":114,"babel-runtime/core-js/number/max-safe-integer":116,"lodash/isPlainObject":507,"lodash/isRegExp":508}],160:[function(e,t,r){"use strict";var n=e("../index"),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n),s=e("../constants"),a=e("./index"),o=function(e){return e&&e.__esModule?e:{default:e}}(a);(0,o.default)("ArrayExpression",{fields:{elements:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeOrValueType)("null","Expression","SpreadElement"))),default:[]}},visitor:["elements"],aliases:["Expression"]}),(0,o.default)("AssignmentExpression",{fields:{operator:{validate:(0,a.assertValueType)("string")},left:{validate:(0,a.assertNodeType)("LVal")},right:{validate:(0,a.assertNodeType)("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]}),(0,o.default)("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:a.assertOneOf.apply(void 0,s.BINARY_OPERATORS)},left:{validate:(0,a.assertNodeType)("Expression")},right:{validate:(0,a.assertNodeType)("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]}),(0,o.default)("Directive",{visitor:["value"],fields:{value:{validate:(0,a.assertNodeType)("DirectiveLiteral")}}}),(0,o.default)("DirectiveLiteral",{builder:["value"],fields:{value:{validate:(0,a.assertValueType)("string")}}}),(0,o.default)("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Directive"))),default:[]},body:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","Statement"]}),(0,o.default)("BreakStatement",{visitor:["label"],fields:{label:{validate:(0,a.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),(0,o.default)("CallExpression",{visitor:["callee","arguments"],fields:{callee:{validate:(0,a.assertNodeType)("Expression")},arguments:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Expression","SpreadElement")))}},aliases:["Expression"]}),(0,o.default)("CatchClause",{visitor:["param","body"],fields:{param:{validate:(0,a.assertNodeType)("Identifier")},body:{validate:(0,a.assertNodeType)("BlockStatement")}},aliases:["Scopable"]}),(0,o.default)("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:(0,a.assertNodeType)("Expression")},consequent:{validate:(0,a.assertNodeType)("Expression")},alternate:{validate:(0,a.assertNodeType)("Expression")}},aliases:["Expression","Conditional"]}),(0,o.default)("ContinueStatement",{visitor:["label"],fields:{label:{validate:(0,a.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),(0,o.default)("DebuggerStatement",{aliases:["Statement"]}),(0,o.default)("DoWhileStatement",{visitor:["test","body"],fields:{test:{validate:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]}),(0,o.default)("EmptyStatement",{aliases:["Statement"]}),(0,o.default)("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:(0,a.assertNodeType)("Expression")}},aliases:["Statement","ExpressionWrapper"]}),(0,o.default)("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:(0,a.assertNodeType)("Program")}}}),(0,o.default)("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,a.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("Statement")}}}),(0,o.default)("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:(0,a.assertNodeType)("VariableDeclaration","Expression"),optional:!0},test:{validate:(0,a.assertNodeType)("Expression"),optional:!0},update:{validate:(0,a.assertNodeType)("Expression"),optional:!0},body:{validate:(0,a.assertNodeType)("Statement")}}}),(0,o.default)("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","params","body","returnType","typeParameters"],fields:{id:{validate:(0,a.assertNodeType)("Identifier")},params:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("LVal")))},body:{validate:(0,a.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,a.assertValueType)("boolean")},async:{default:!1,validate:(0,a.assertValueType)("boolean")}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"]}),(0,o.default)("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{id:{validate:(0,a.assertNodeType)("Identifier"),optional:!0},params:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("LVal")))},body:{validate:(0,a.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,a.assertValueType)("boolean")},async:{default:!1,validate:(0,a.assertValueType)("boolean")}}}),(0,o.default)("Identifier",{builder:["name"],visitor:["typeAnnotation"],aliases:["Expression","LVal"],fields:{name:{validate:function(e,t,r){i.isValidIdentifier(r)}},decorators:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Decorator")))}}}),(0,o.default)("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,a.assertNodeType)("Expression")},consequent:{validate:(0,a.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,a.assertNodeType)("Statement")}}}),(0,o.default)("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,a.assertNodeType)("Identifier")},body:{validate:(0,a.assertNodeType)("Statement")}}}),(0,o.default)("StringLiteral",{builder:["value"],fields:{value:{validate:(0,a.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,o.default)("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,a.assertValueType)("number")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,o.default)("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),(0,o.default)("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,a.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,o.default)("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Literal"],fields:{pattern:{validate:(0,a.assertValueType)("string")},flags:{validate:(0,a.assertValueType)("string"),default:""}}}),(0,o.default)("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:a.assertOneOf.apply(void 0,s.LOGICAL_OPERATORS)},left:{validate:(0,a.assertNodeType)("Expression")},right:{validate:(0,a.assertNodeType)("Expression")}}}),(0,o.default)("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal"],fields:{object:{validate:(0,a.assertNodeType)("Expression")},property:{validate:function(e,t,r){var n=e.computed?"Expression":"Identifier";(0,a.assertNodeType)(n)(e,t,r)}},computed:{default:!1}}}),(0,o.default)("NewExpression",{visitor:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:(0,a.assertNodeType)("Expression")},arguments:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Expression","SpreadElement")))}}}),(0,o.default)("Program",{visitor:["directives","body"],builder:["body","directives"],fields:{directives:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Directive"))),default:[]},body:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","FunctionParent"]}),(0,o.default)("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("ObjectMethod","ObjectProperty","SpreadProperty")))}}}),(0,o.default)("ObjectMethod",{builder:["kind","key","params","body","computed"],fields:{kind:{validate:(0,a.chain)((0,a.assertValueType)("string"),(0,a.assertOneOf)("method","get","set")),default:"method"},computed:{validate:(0,a.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var n=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];a.assertNodeType.apply(void 0,n)(e,t,r)}},decorators:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Decorator")))},body:{validate:(0,a.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,a.assertValueType)("boolean")},async:{default:!1,validate:(0,a.assertValueType)("boolean")}},visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]}),(0,o.default)("ObjectProperty",{builder:["key","value","computed","shorthand","decorators"],fields:{computed:{validate:(0,a.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var n=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];a.assertNodeType.apply(void 0,n)(e,t,r)}},value:{validate:(0,a.assertNodeType)("Expression")},shorthand:{validate:(0,a.assertValueType)("boolean"),default:!1},decorators:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Decorator"))),optional:!0}},visitor:["key","value","decorators"],aliases:["UserWhitespacable","Property","ObjectMember"]}),(0,o.default)("RestElement",{visitor:["argument","typeAnnotation"],aliases:["LVal"],fields:{argument:{validate:(0,a.assertNodeType)("LVal")},decorators:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Decorator")))}}}),(0,o.default)("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,a.assertNodeType)("Expression"),optional:!0}}}),(0,o.default)("SequenceExpression",{visitor:["expressions"],fields:{expressions:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Expression")))}},aliases:["Expression"]}),(0,o.default)("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:(0,a.assertNodeType)("Expression"),optional:!0},consequent:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Statement")))}}}),(0,o.default)("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:(0,a.assertNodeType)("Expression")},cases:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("SwitchCase")))}}}),(0,o.default)("ThisExpression",{aliases:["Expression"]}),(0,o.default)("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,a.assertNodeType)("Expression")}}}),(0,o.default)("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{body:{validate:(0,a.assertNodeType)("BlockStatement")},handler:{optional:!0,
+handler:(0,a.assertNodeType)("BlockStatement")},finalizer:{optional:!0,validate:(0,a.assertNodeType)("BlockStatement")}}}),(0,o.default)("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:(0,a.assertNodeType)("Expression")},operator:{validate:a.assertOneOf.apply(void 0,s.UNARY_OPERATORS)}},visitor:["argument"],aliases:["UnaryLike","Expression"]}),(0,o.default)("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:(0,a.assertNodeType)("Expression")},operator:{validate:a.assertOneOf.apply(void 0,s.UPDATE_OPERATORS)}},visitor:["argument"],aliases:["Expression"]}),(0,o.default)("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{kind:{validate:(0,a.chain)((0,a.assertValueType)("string"),(0,a.assertOneOf)("var","let","const"))},declarations:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("VariableDeclarator")))}}}),(0,o.default)("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:(0,a.assertNodeType)("LVal")},init:{optional:!0,validate:(0,a.assertNodeType)("Expression")}}}),(0,o.default)("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("BlockStatement","Statement")}}}),(0,o.default)("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{object:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("BlockStatement","Statement")}}})},{"../constants":158,"../index":169,"./index":164}],161:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AssignmentPattern",{visitor:["left","right"],aliases:["Pattern","LVal"],fields:{left:{validate:(0,n.assertNodeType)("Identifier")},right:{validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ArrayPattern",{visitor:["elements","typeAnnotation"],aliases:["Pattern","LVal"],fields:{elements:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Expression")))},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["params","body","returnType","typeParameters"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{params:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("LVal")))},body:{validate:(0,n.assertNodeType)("BlockStatement","Expression")},async:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("ClassBody",{visitor:["body"],fields:{body:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ClassMethod","ClassProperty")))}}}),(0,i.default)("ClassDeclaration",{builder:["id","superClass","body","decorators"],visitor:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],aliases:["Scopable","Class","Statement","Declaration","Pureish"],fields:{id:{validate:(0,n.assertNodeType)("Identifier")},body:{validate:(0,n.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ClassExpression",{inherits:"ClassDeclaration",aliases:["Scopable","Class","Expression","Pureish"],fields:{id:{optional:!0,validate:(0,n.assertNodeType)("Identifier")},body:{validate:(0,n.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ExportAllDeclaration",{visitor:["source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{source:{validate:(0,n.assertNodeType)("StringLiteral")}}}),(0,i.default)("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,n.assertNodeType)("FunctionDeclaration","ClassDeclaration","Expression")}}}),(0,i.default)("ExportNamedDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,n.assertNodeType)("Declaration"),optional:!0},specifiers:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ExportSpecifier")))},source:{validate:(0,n.assertNodeType)("StringLiteral"),optional:!0}}}),(0,i.default)("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")},exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ForOfStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,n.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,n.assertNodeType)("Expression")},body:{validate:(0,n.assertNodeType)("Statement")}}}),(0,i.default)("ImportDeclaration",{visitor:["specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration"],fields:{specifiers:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier")))},source:{validate:(0,n.assertNodeType)("StringLiteral")}}}),(0,i.default)("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ImportSpecifier",{visitor:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")},imported:{validate:(0,n.assertNodeType)("Identifier")},importKind:{validate:(0,n.assertOneOf)(null,"type","typeof")}}}),(0,i.default)("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:(0,n.assertValueType)("string")},property:{validate:(0,n.assertValueType)("string")}}}),(0,i.default)("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static"],visitor:["key","params","body","decorators","returnType","typeParameters"],fields:{kind:{validate:(0,n.chain)((0,n.assertValueType)("string"),(0,n.assertOneOf)("get","set","method","constructor")),default:"method"},computed:{default:!1,validate:(0,n.assertValueType)("boolean")},static:{default:!1,validate:(0,n.assertValueType)("boolean")},key:{validate:function(e,t,r){var i=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];n.assertNodeType.apply(void 0,i)(e,t,r)}},params:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("LVal")))},body:{validate:(0,n.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,n.assertValueType)("boolean")},async:{default:!1,validate:(0,n.assertValueType)("boolean")}}}),(0,i.default)("ObjectPattern",{visitor:["properties","typeAnnotation"],aliases:["Pattern","LVal"],fields:{properties:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("RestProperty","Property")))},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("Super",{aliases:["Expression"]}),(0,i.default)("TaggedTemplateExpression",{visitor:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:(0,n.assertNodeType)("Expression")},quasi:{validate:(0,n.assertNodeType)("TemplateLiteral")}}}),(0,i.default)("TemplateElement",{builder:["value","tail"],fields:{value:{},tail:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("TemplateElement")))},expressions:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Expression")))}}}),(0,i.default)("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:(0,n.assertValueType)("boolean"),default:!1},argument:{optional:!0,validate:(0,n.assertNodeType)("Expression")}}})},{"./index":164}],162:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("ForAwaitStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,n.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,n.assertNodeType)("Expression")},body:{validate:(0,n.assertNodeType)("Statement")}}}),(0,i.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:{}}),(0,i.default)("Import",{aliases:["Expression"]}),(0,i.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("DoExpression",{visitor:["body"],aliases:["Expression"],fields:{body:{validate:(0,n.assertNodeType)("BlockStatement")}}}),(0,i.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("RestProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("LVal")}}}),(0,i.default)("SpreadProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}})},{"./index":164}],163:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AnyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["Flow"],fields:{}}),(0,i.default)("BooleanTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("BooleanLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("NullLiteralTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ClassImplements",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed"],aliases:["Property"],fields:{computed:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("DeclareClass",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareFunction",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareInterface",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareModule",{visitor:["id","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareVariable",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("ExistentialTypeParam",{aliases:["Flow"]}),(0,i.default)("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["Flow"],fields:{}}),(0,i.default)("FunctionTypeParam",{visitor:["name","typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("InterfaceExtends",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("InterfaceDeclaration",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("IntersectionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("MixedTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),(0,i.default)("EmptyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),(0,i.default)("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("NumericLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("NumberTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("StringLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("StringTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ThisTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("TupleTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeofTypeAnnotation",{visitor:["argument"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("TypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["Flow","ExpressionWrapper","Expression"],fields:{}}),(0,i.default)("TypeParameter",{visitor:["bound"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeParameterDeclaration",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeParameterInstantiation",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,i.default)("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties"],aliases:["Flow"],fields:{}}),(0,i.default)("ObjectTypeCallProperty",{visitor:["value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("ObjectTypeIndexer",{visitor:["id","key","value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("ObjectTypeProperty",{visitor:["key","value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("QualifiedTypeIdentifier",{visitor:["id","qualification"],aliases:["Flow"],fields:{}}),(0,i.default)("UnionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("VoidTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}})},{"./index":164}],164:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return Array.isArray(e)?"array":null===e?"null":void 0===e?"undefined":void 0===e?"undefined":(0,g.default)(e)}function s(e){function t(t,r,n){if(Array.isArray(n))for(var i=0;i<n.length;i++)e(t,r+"["+i+"]",n[i])}return t.each=e,t}function a(){function e(e,t,n){if(r.indexOf(n)<0)throw new TypeError("Property "+t+" expected value to be one of "+(0,m.default)(r)+" but got "+(0,m.default)(n))}for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.oneOf=r,e}function o(){function e(e,t,n){for(var i=!1,s=r,a=Array.isArray(s),o=0,s=a?s:(0,f.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u;if(v.is(l,n)){i=!0;break}}if(!i)throw new TypeError("Property "+t+" of "+e.type+" expected node to be of a type "+(0,m.default)(r)+" but instead got "+(0,m.default)(n&&n.type))}for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.oneOfNodeTypes=r,e}function u(){function e(e,t,n){for(var s=!1,a=r,o=Array.isArray(a),u=0,a=o?a:(0,f.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;if(i(n)===c||v.is(c,n)){s=!0;break}}if(!s)throw new TypeError("Property "+t+" of "+e.type+" expected node to be of a type "+(0,m.default)(r)+" but instead got "+(0,m.default)(n&&n.type))}for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.oneOfNodeOrValueTypes=r,e}function l(e){function t(t,r,n){if(i(n)!==e)throw new TypeError("Property "+r+" expected type of "+e+" but got "+i(n))}return t.type=e,t}function c(){function e(){for(var e=r,t=Array.isArray(e),n=0,e=t?e:(0,f.default)(e);;){var i;if(t){if(n>=e.length)break;i=e[n++]}else{if(n=e.next(),n.done)break;i=n.value}i.apply(void 0,arguments)}}for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.chainOf=r,e}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.inherits&&S[t.inherits]||{};t.fields=t.fields||r.fields||{},t.visitor=t.visitor||r.visitor||[],t.aliases=t.aliases||r.aliases||[],t.builder=t.builder||r.builder||t.visitor||[],t.deprecatedAlias&&(C[t.deprecatedAlias]=e);for(var n=t.visitor.concat(t.builder),s=Array.isArray(n),a=0,n=s?n:(0,f.default)(n);;){var o;if(s){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o;t.fields[u]=t.fields[u]||{}}for(var c in t.fields){var p=t.fields[c];-1===t.builder.indexOf(c)&&(p.optional=!0),void 0===p.default?p.default=null:p.validate||(p.validate=l(i(p.default)))}x[e]=t.visitor,D[e]=t.builder,A[e]=t.fields,E[e]=t.aliases,S[e]=t}r.__esModule=!0,r.DEPRECATED_KEYS=r.BUILDER_KEYS=r.NODE_FIELDS=r.ALIAS_KEYS=r.VISITOR_KEYS=void 0;var h=e("babel-runtime/core-js/get-iterator"),f=n(h),d=e("babel-runtime/core-js/json/stringify"),m=n(d),y=e("babel-runtime/helpers/typeof"),g=n(y);r.assertEach=s,r.assertOneOf=a,r.assertNodeType=o,r.assertNodeOrValueType=u,r.assertValueType=l,r.chain=c,r.default=p;var b=e("../index"),v=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(b),x=r.VISITOR_KEYS={},E=r.ALIAS_KEYS={},A=r.NODE_FIELDS={},D=r.BUILDER_KEYS={},C=r.DEPRECATED_KEYS={},S={}},{"../index":169,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/json/stringify":114,"babel-runtime/helpers/typeof":131}],165:[function(e,t,r){"use strict";e("./index"),e("./core"),e("./es2015"),e("./flow"),e("./jsx"),e("./misc"),e("./experimental")},{"./core":160,"./es2015":161,"./experimental":162,"./flow":163,"./index":164,"./jsx":166,"./misc":167}],166:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("JSXAttribute",{visitor:["name","value"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:(0,n.assertNodeType)("JSXElement","StringLiteral","JSXExpressionContainer")}}}),(0,i.default)("JSXClosingElement",{visitor:["name"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXMemberExpression")}}}),(0,i.default)("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["JSX","Immutable","Expression"],fields:{openingElement:{validate:(0,n.assertNodeType)("JSXOpeningElement")},closingElement:{optional:!0,validate:(0,n.assertNodeType)("JSXClosingElement")},children:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement")))}}}),(0,i.default)("JSXEmptyExpression",{aliases:["JSX","Expression"]}),(0,i.default)("JSXExpressionContainer",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXSpreadChild",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXIdentifier",{builder:["name"],aliases:["JSX","Expression"],fields:{name:{validate:(0,n.assertValueType)("string")}}}),(0,i.default)("JSXMemberExpression",{visitor:["object","property"],aliases:["JSX","Expression"],fields:{object:{validate:(0,n.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,n.assertNodeType)("JSXIdentifier")}}}),(0,i.default)("JSXNamespacedName",{visitor:["namespace","name"],aliases:["JSX"],fields:{namespace:{validate:(0,n.assertNodeType)("JSXIdentifier")},name:{validate:(0,n.assertNodeType)("JSXIdentifier")}}}),(0,i.default)("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXMemberExpression")},selfClosing:{default:!1,validate:(0,n.assertValueType)("boolean")},attributes:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("JSXAttribute","JSXSpreadAttribute")))}}}),(0,i.default)("JSXSpreadAttribute",{visitor:["argument"],aliases:["JSX"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXText",{aliases:["JSX","Immutable"],builder:["value"],fields:{value:{validate:(0,n.assertValueType)("string")}}})},{"./index":164}],167:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("Noop",{visitor:[]}),(0,i.default)("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}})},{"./index":164}],168:[function(e,t,r){"use strict";function n(e){var t=i(e);return 1===t.length?t[0]:o.unionTypeAnnotation(t)}function i(e){for(var t={},r={},n=[],s=[],a=0;a<e.length;a++){var u=e[a];if(u&&!(s.indexOf(u)>=0)){if(o.isAnyTypeAnnotation(u))return[u];if(o.isFlowBaseAnnotation(u))r[u.type]=u;else if(o.isUnionTypeAnnotation(u))n.indexOf(u.types)<0&&(e=e.concat(u.types),n.push(u.types));else if(o.isGenericTypeAnnotation(u)){var l=u.id.name;if(t[l]){var c=t[l];c.typeParameters?u.typeParameters&&(c.typeParameters.params=i(c.typeParameters.params.concat(u.typeParameters.params))):c=u.typeParameters}else t[l]=u}else s.push(u)}}for(var p in r)s.push(r[p]);for(var h in t)s.push(t[h]);return s}function s(e){if("string"===e)return o.stringTypeAnnotation();if("number"===e)return o.numberTypeAnnotation();if("undefined"===e)return o.voidTypeAnnotation();if("boolean"===e)return o.booleanTypeAnnotation();if("function"===e)return o.genericTypeAnnotation(o.identifier("Function"));if("object"===e)return o.genericTypeAnnotation(o.identifier("Object"));if("symbol"===e)return o.genericTypeAnnotation(o.identifier("Symbol"));throw new Error("Invalid typeof value")}r.__esModule=!0,r.createUnionTypeAnnotation=n,r.removeTypeDuplicates=i,r.createTypeAnnotationBasedOnTypeof=s;var a=e("./index"),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(a)},{"./index":169}],169:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=H["is"+e];t||(t=H["is"+e]=function(t,r){return H.is(e,t,r)}),H["assert"+e]=function(r,n){if(n=n||{},!t(r,n))throw new Error("Expected type "+(0,N.default)(e)+" with option "+(0,N.default)(n))}}function s(e,t,r){return!!t&&(!!a(t.type,e)&&(void 0===r||H.shallowEqual(t,r)))}function a(e,t){if(e===t)return!0;if(H.ALIAS_KEYS[t])return!1;var r=H.FLIPPED_ALIAS_KEYS[t];if(r){if(r[0]===e)return!0;for(var n=r,i=Array.isArray(n),s=0,n=i?n:(0,P.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}if(e===a)return!0}}return!1}function o(e,t,r){if(e){var n=H.NODE_FIELDS[e.type];if(n){var i=n[t];i&&i.validate&&(i.optional&&null==r||i.validate(e,t,r))}}}function u(e,t){for(var r=(0,O.default)(t),n=r,i=Array.isArray(n),s=0,n=i?n:(0,P.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;if(e[o]!==t[o])return!1}return!0}function l(e,t,r){return e.object=H.memberExpression(e.object,e.property,e.computed),e.property=t,e.computed=!!r,e}function c(e,t){return e.object=H.memberExpression(t,e.object),e}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"body";return e[t]=H.toBlock(e[t],e)}function h(e){if(!e)return e;var t={};for(var r in e)"_"!==r[0]&&(t[r]=e[r]);return t}function f(e){var t=h(e);return delete t.loc,t}function d(e){if(!e)return e;var t={};for(var r in e)if("_"!==r[0]){var n=e[r];n&&(n.type?n=H.cloneDeep(n):Array.isArray(n)&&(n=n.map(H.cloneDeep))),t[r]=n}return t}function m(e,t){var r=e.split(".");return function(e){if(!H.isMemberExpression(e))return!1;for(var n=[e],i=0;n.length;){var s=n.shift();if(t&&i===r.length)return!0;if(H.isIdentifier(s)){if(r[i]!==s.name)return!1}else{if(!H.isStringLiteral(s)){if(H.isMemberExpression(s)){if(s.computed&&!H.isStringLiteral(s.property))return!1;n.push(s.object),n.push(s.property);continue}return!1}if(r[i]!==s.value)return!1}if(++i>r.length)return!1}return!0}}function y(e){for(var t=H.COMMENT_KEYS,r=Array.isArray(t),n=0,t=r?t:(0,P.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}delete e[i]}return e}function g(e,t){return b(e,t),v(e,t),x(e,t),e}function b(e,t){E("trailingComments",e,t)}function v(e,t){E("leadingComments",e,t)}function x(e,t){E("innerComments",e,t)}function E(e,t,r){t&&r&&(t[e]=(0,W.default)([].concat(t[e],r[e]).filter(Boolean)))}function A(e,t){if(!e||!t)return e;for(var r=H.INHERIT_KEYS.optional,n=Array.isArray(r),i=0,r=n?r:(0,P.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;null==e[a]&&(e[a]=t[a])}for(var o in t)"_"===o[0]&&(e[o]=t[o]);for(var u=H.INHERIT_KEYS.force,l=Array.isArray(u),c=0,u=l?u:(0,P.default)(u);;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if(c=u.next(),c.done)break;p=c.value}var h=p;e[h]=t[h]}return H.inheritsComments(e,t),e}function D(e){if(!C(e))throw new TypeError("Not a valid node "+(e&&e.type))}function C(e){return!(!e||!K.VISITOR_KEYS[e.type])}function S(e,t,r){if(e){var n=H.VISITOR_KEYS[e.type];if(n){r=r||{},t(e,r);for(var i=n,s=Array.isArray(i),a=0,i=s?i:(0,P.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o,l=e[u];if(Array.isArray(l))for(var c=l,p=Array.isArray(c),h=0,c=p?c:(0,P.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if(h=c.next(),h.done)break;f=h.value}var d=f;S(d,t,r)}else S(l,t,r)}}}}function _(e,t){t=t||{};for(var r=t.preserveComments?Z:ee,n=r,i=Array.isArray(n),s=0,n=i?n:(0,P.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;null!=e[o]&&(e[o]=void 0)}for(var u in e)"_"===u[0]&&null!=e[u]&&(e[u]=void 0);for(var l=(0,F.default)(e),c=l,p=Array.isArray(c),h=0,c=p?c:(0,P.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if(h=c.next(),h.done)break;f=h.value}e[f]=null}}function w(e,t){return S(e,_,t),e}r.__esModule=!0,r.createTypeAnnotationBasedOnTypeof=r.removeTypeDuplicates=r.createUnionTypeAnnotation=r.valueToNode=r.toBlock=r.toExpression=r.toStatement=r.toBindingIdentifierName=r.toIdentifier=r.toKeyAlias=r.toSequenceExpression=r.toComputedKey=r.isNodesEquivalent=r.isImmutable=r.isScope=r.isSpecifierDefault=r.isVar=r.isBlockScoped=r.isLet=r.isValidIdentifier=r.isReferenced=r.isBinding=r.getOuterBindingIdentifiers=r.getBindingIdentifiers=r.TYPES=r.react=r.DEPRECATED_KEYS=r.BUILDER_KEYS=r.NODE_FIELDS=r.ALIAS_KEYS=r.VISITOR_KEYS=r.NOT_LOCAL_BINDING=r.BLOCK_SCOPED_SYMBOL=r.INHERIT_KEYS=r.UNARY_OPERATORS=r.STRING_UNARY_OPERATORS=r.NUMBER_UNARY_OPERATORS=r.BOOLEAN_UNARY_OPERATORS=r.BINARY_OPERATORS=r.NUMBER_BINARY_OPERATORS=r.BOOLEAN_BINARY_OPERATORS=r.COMPARISON_BINARY_OPERATORS=r.EQUALITY_BINARY_OPERATORS=r.BOOLEAN_NUMBER_BINARY_OPERATORS=r.UPDATE_OPERATORS=r.LOGICAL_OPERATORS=r.COMMENT_KEYS=r.FOR_INIT_KEYS=r.FLATTENABLE_KEYS=r.STATEMENT_OR_BLOCK_KEYS=void 0;var k=e("babel-runtime/core-js/object/get-own-property-symbols"),F=n(k),T=e("babel-runtime/core-js/get-iterator"),P=n(T),B=e("babel-runtime/core-js/object/keys"),O=n(B),j=e("babel-runtime/core-js/json/stringify"),N=n(j),I=e("./constants");Object.defineProperty(r,"STATEMENT_OR_BLOCK_KEYS",{enumerable:!0,get:function(){return I.STATEMENT_OR_BLOCK_KEYS}}),Object.defineProperty(r,"FLATTENABLE_KEYS",{enumerable:!0,get:function(){return I.FLATTENABLE_KEYS}}),Object.defineProperty(r,"FOR_INIT_KEYS",{enumerable:!0,get:function(){return I.FOR_INIT_KEYS}}),Object.defineProperty(r,"COMMENT_KEYS",{enumerable:!0,get:function(){return I.COMMENT_KEYS}}),Object.defineProperty(r,"LOGICAL_OPERATORS",{enumerable:!0,get:function(){return I.LOGICAL_OPERATORS}}),Object.defineProperty(r,"UPDATE_OPERATORS",{enumerable:!0,get:function(){return I.UPDATE_OPERATORS}}),Object.defineProperty(r,"BOOLEAN_NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return I.BOOLEAN_NUMBER_BINARY_OPERATORS}}),Object.defineProperty(r,"EQUALITY_BINARY_OPERATORS",{enumerable:!0,get:function(){return I.EQUALITY_BINARY_OPERATORS}}),Object.defineProperty(r,"COMPARISON_BINARY_OPERATORS",{enumerable:!0,get:function(){return I.COMPARISON_BINARY_OPERATORS}}),Object.defineProperty(r,"BOOLEAN_BINARY_OPERATORS",{enumerable:!0,get:function(){return I.BOOLEAN_BINARY_OPERATORS}}),Object.defineProperty(r,"NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return I.NUMBER_BINARY_OPERATORS}}),Object.defineProperty(r,"BINARY_OPERATORS",{enumerable:!0,get:function(){return I.BINARY_OPERATORS}}),Object.defineProperty(r,"BOOLEAN_UNARY_OPERATORS",{enumerable:!0,get:function(){return I.BOOLEAN_UNARY_OPERATORS}}),Object.defineProperty(r,"NUMBER_UNARY_OPERATORS",{enumerable:!0,get:function(){return I.NUMBER_UNARY_OPERATORS}}),Object.defineProperty(r,"STRING_UNARY_OPERATORS",{enumerable:!0,get:function(){return I.STRING_UNARY_OPERATORS}}),Object.defineProperty(r,"UNARY_OPERATORS",{enumerable:!0,get:function(){return I.UNARY_OPERATORS}}),Object.defineProperty(r,"INHERIT_KEYS",{enumerable:!0,get:function(){return I.INHERIT_KEYS}}),Object.defineProperty(r,"BLOCK_SCOPED_SYMBOL",{enumerable:!0,get:function(){return I.BLOCK_SCOPED_SYMBOL}}),Object.defineProperty(r,"NOT_LOCAL_BINDING",{enumerable:!0,get:function(){return I.NOT_LOCAL_BINDING}}),r.is=s,r.isType=a,r.validate=o,r.shallowEqual=u,r.appendToMemberExpression=l,r.prependToMemberExpression=c,r.ensureBlock=p,r.clone=h,r.cloneWithoutLoc=f,r.cloneDeep=d,r.buildMatchMemberExpression=m,r.removeComments=y,r.inheritsComments=g,r.inheritTrailingComments=b,r.inheritLeadingComments=v,r.inheritInnerComments=x,r.inherits=A,r.assertNode=D,r.isNode=C,r.traverseFast=S,r.removeProperties=_,r.removePropertiesDeep=w;var L=e("./retrievers");Object.defineProperty(r,"getBindingIdentifiers",{enumerable:!0,get:function(){return L.getBindingIdentifiers}}),Object.defineProperty(r,"getOuterBindingIdentifiers",{enumerable:!0,get:function(){return L.getOuterBindingIdentifiers}});var M=e("./validators");Object.defineProperty(r,"isBinding",{enumerable:!0,get:function(){return M.isBinding}}),Object.defineProperty(r,"isReferenced",{enumerable:!0,get:function(){return M.isReferenced}}),
+Object.defineProperty(r,"isValidIdentifier",{enumerable:!0,get:function(){return M.isValidIdentifier}}),Object.defineProperty(r,"isLet",{enumerable:!0,get:function(){return M.isLet}}),Object.defineProperty(r,"isBlockScoped",{enumerable:!0,get:function(){return M.isBlockScoped}}),Object.defineProperty(r,"isVar",{enumerable:!0,get:function(){return M.isVar}}),Object.defineProperty(r,"isSpecifierDefault",{enumerable:!0,get:function(){return M.isSpecifierDefault}}),Object.defineProperty(r,"isScope",{enumerable:!0,get:function(){return M.isScope}}),Object.defineProperty(r,"isImmutable",{enumerable:!0,get:function(){return M.isImmutable}}),Object.defineProperty(r,"isNodesEquivalent",{enumerable:!0,get:function(){return M.isNodesEquivalent}});var R=e("./converters");Object.defineProperty(r,"toComputedKey",{enumerable:!0,get:function(){return R.toComputedKey}}),Object.defineProperty(r,"toSequenceExpression",{enumerable:!0,get:function(){return R.toSequenceExpression}}),Object.defineProperty(r,"toKeyAlias",{enumerable:!0,get:function(){return R.toKeyAlias}}),Object.defineProperty(r,"toIdentifier",{enumerable:!0,get:function(){return R.toIdentifier}}),Object.defineProperty(r,"toBindingIdentifierName",{enumerable:!0,get:function(){return R.toBindingIdentifierName}}),Object.defineProperty(r,"toStatement",{enumerable:!0,get:function(){return R.toStatement}}),Object.defineProperty(r,"toExpression",{enumerable:!0,get:function(){return R.toExpression}}),Object.defineProperty(r,"toBlock",{enumerable:!0,get:function(){return R.toBlock}}),Object.defineProperty(r,"valueToNode",{enumerable:!0,get:function(){return R.valueToNode}});var U=e("./flow");Object.defineProperty(r,"createUnionTypeAnnotation",{enumerable:!0,get:function(){return U.createUnionTypeAnnotation}}),Object.defineProperty(r,"removeTypeDuplicates",{enumerable:!0,get:function(){return U.removeTypeDuplicates}}),Object.defineProperty(r,"createTypeAnnotationBasedOnTypeof",{enumerable:!0,get:function(){return U.createTypeAnnotationBasedOnTypeof}});var V=e("to-fast-properties"),q=n(V),G=e("lodash/clone"),X=n(G),J=e("lodash/uniq"),W=n(J);e("./definitions/init");var K=e("./definitions"),z=e("./react"),Y=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(z),H=r;r.VISITOR_KEYS=K.VISITOR_KEYS,r.ALIAS_KEYS=K.ALIAS_KEYS,r.NODE_FIELDS=K.NODE_FIELDS,r.BUILDER_KEYS=K.BUILDER_KEYS,r.DEPRECATED_KEYS=K.DEPRECATED_KEYS,r.react=Y;for(var $ in H.VISITOR_KEYS)i($);H.FLIPPED_ALIAS_KEYS={},(0,O.default)(H.ALIAS_KEYS).forEach(function(e){H.ALIAS_KEYS[e].forEach(function(t){(H.FLIPPED_ALIAS_KEYS[t]=H.FLIPPED_ALIAS_KEYS[t]||[]).push(e)})}),(0,O.default)(H.FLIPPED_ALIAS_KEYS).forEach(function(e){H[e.toUpperCase()+"_TYPES"]=H.FLIPPED_ALIAS_KEYS[e],i(e)});r.TYPES=(0,O.default)(H.VISITOR_KEYS).concat((0,O.default)(H.FLIPPED_ALIAS_KEYS)).concat((0,O.default)(H.DEPRECATED_KEYS));(0,O.default)(H.BUILDER_KEYS).forEach(function(e){function t(){if(arguments.length>r.length)throw new Error("t."+e+": Too many arguments passed. Received "+arguments.length+" but can receive no more than "+r.length);var t={};t.type=e;for(var n=0,i=r,s=Array.isArray(i),a=0,i=s?i:(0,P.default)(i);;){var u;if(s){if(a>=i.length)break;u=i[a++]}else{if(a=i.next(),a.done)break;u=a.value}var l=u,c=H.NODE_FIELDS[e][l],p=arguments[n++];void 0===p&&(p=(0,X.default)(c.default)),t[l]=p}for(var h in t)o(t,h,t[h]);return t}var r=H.BUILDER_KEYS[e];H[e]=t,H[e[0].toLowerCase()+e.slice(1)]=t});for(var Q in H.DEPRECATED_KEYS)!function(e){function t(t){return function(){return console.trace("The node type "+e+" has been renamed to "+r),t.apply(this,arguments)}}var r=H.DEPRECATED_KEYS[e];H[e]=H[e[0].toLowerCase()+e.slice(1)]=t(H[r]),H["is"+e]=t(H["is"+r]),H["assert"+e]=t(H["assert"+r])}(Q);(0,q.default)(H),(0,q.default)(H.VISITOR_KEYS);var Z=["tokens","start","end","loc","raw","rawValue"],ee=H.COMMENT_KEYS.concat(["comments"]).concat(Z)},{"./constants":158,"./converters":159,"./definitions":164,"./definitions/init":165,"./flow":168,"./react":170,"./retrievers":171,"./validators":172,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/json/stringify":114,"babel-runtime/core-js/object/get-own-property-symbols":119,"babel-runtime/core-js/object/keys":120,"lodash/clone":480,"lodash/uniq":529,"to-fast-properties":595}],170:[function(e,t,r){"use strict";function n(e){return!!e&&/^[a-z]|\-/.test(e)}function i(e,t){for(var r=e.value.split(/\r\n|\n|\r/),n=0,i=0;i<r.length;i++)r[i].match(/[^ \t]/)&&(n=i);for(var s="",a=0;a<r.length;a++){var u=r[a],l=0===a,c=a===r.length-1,p=a===n,h=u.replace(/\t/g," ");l||(h=h.replace(/^[ ]+/,"")),c||(h=h.replace(/[ ]+$/,"")),h&&(p||(h+=" "),s+=h)}s&&t.push(o.stringLiteral(s))}function s(e){for(var t=[],r=0;r<e.children.length;r++){var n=e.children[r];o.isJSXText(n)?i(n,t):(o.isJSXExpressionContainer(n)&&(n=n.expression),o.isJSXEmptyExpression(n)||t.push(n))}return t}r.__esModule=!0,r.isReactComponent=void 0,r.isCompatTag=n,r.buildChildren=s;var a=e("./index"),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(a);r.isReactComponent=o.buildMatchMemberExpression("React.Component")},{"./index":169}],171:[function(e,t,r){"use strict";function n(e,t,r){for(var n=[].concat(e),i=(0,a.default)(null);n.length;){var s=n.shift();if(s){var o=u.getBindingIdentifiers.keys[s.type];if(u.isIdentifier(s))if(t){var l=i[s.name]=i[s.name]||[];l.push(s)}else i[s.name]=s;else if(u.isExportDeclaration(s))u.isDeclaration(s.declaration)&&n.push(s.declaration);else{if(r){if(u.isFunctionDeclaration(s)){n.push(s.id);continue}if(u.isFunctionExpression(s))continue}if(o)for(var c=0;c<o.length;c++){var p=o[c];s[p]&&(n=n.concat(s[p]))}}}}return i}function i(e,t){return n(e,t,!0)}r.__esModule=!0;var s=e("babel-runtime/core-js/object/create"),a=function(e){return e&&e.__esModule?e:{default:e}}(s);r.getBindingIdentifiers=n,r.getOuterBindingIdentifiers=i;var o=e("./index"),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(o);n.keys={DeclareClass:["id"],DeclareFunction:["id"],DeclareModule:["id"],DeclareVariable:["id"],InterfaceDeclaration:["id"],TypeAlias:["id"],CatchClause:["param"],LabeledStatement:["label"],UnaryExpression:["argument"],AssignmentExpression:["left"],ImportSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportDefaultSpecifier:["local"],ImportDeclaration:["specifiers"],ExportSpecifier:["exported"],ExportNamespaceSpecifier:["exported"],ExportDefaultSpecifier:["exported"],FunctionDeclaration:["id","params"],FunctionExpression:["id","params"],ClassDeclaration:["id"],ClassExpression:["id"],RestElement:["argument"],UpdateExpression:["argument"],RestProperty:["argument"],ObjectProperty:["value"],AssignmentPattern:["left"],ArrayPattern:["elements"],ObjectPattern:["properties"],VariableDeclaration:["declarations"],VariableDeclarator:["id"]}},{"./index":169,"babel-runtime/core-js/object/create":118}],172:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=x.getBindingIdentifiers.keys[t.type];if(r)for(var n=0;n<r.length;n++){var i=r[n],s=t[i];if(Array.isArray(s)){if(s.indexOf(e)>=0)return!0}else if(s===e)return!0}return!1}function s(e,t){switch(t.type){case"BindExpression":return t.object===e||t.callee===e;case"MemberExpression":case"JSXMemberExpression":return!(t.property!==e||!t.computed)||t.object===e;case"MetaProperty":return!1;case"ObjectProperty":if(t.key===e)return t.computed;case"VariableDeclarator":return t.id!==e;case"ArrowFunctionExpression":case"FunctionDeclaration":case"FunctionExpression":for(var r=t.params,n=Array.isArray(r),i=0,r=n?r:(0,v.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}if(s===e)return!1}return t.id!==e;case"ExportSpecifier":return!t.source&&t.local===e;case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return!1;case"JSXAttribute":return t.name!==e;case"ClassProperty":return t.key===e?t.computed:t.value===e;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return!1;case"ClassDeclaration":case"ClassExpression":return t.id!==e;case"ClassMethod":case"ObjectMethod":return t.key===e&&t.computed;case"LabeledStatement":return!1;case"CatchClause":return t.param!==e;case"RestElement":return!1;case"AssignmentExpression":case"AssignmentPattern":return t.right===e;case"ObjectPattern":case"ArrayPattern":return!1}return!0}function a(e){return"string"==typeof e&&!A.default.keyword.isReservedWordES6(e,!0)&&A.default.keyword.isIdentifierNameES6(e)}function o(e){return C.isVariableDeclaration(e)&&("var"!==e.kind||e[S.BLOCK_SCOPED_SYMBOL])}function u(e){return C.isFunctionDeclaration(e)||C.isClassDeclaration(e)||C.isLet(e)}function l(e){return C.isVariableDeclaration(e,{kind:"var"})&&!e[S.BLOCK_SCOPED_SYMBOL]}function c(e){return C.isImportDefaultSpecifier(e)||C.isIdentifier(e.imported||e.exported,{name:"default"})}function p(e,t){return(!C.isBlockStatement(e)||!C.isFunction(t,{body:e}))&&C.isScopable(e)}function h(e){return!!C.isType(e.type,"Immutable")||!!C.isIdentifier(e)&&"undefined"===e.name}function f(e,t){if("object"!==(void 0===e?"undefined":(0,g.default)(e))||"object"!==(void 0===e?"undefined":(0,g.default)(e))||null==e||null==t)return e===t;if(e.type!==t.type)return!1;for(var r=(0,m.default)(C.NODE_FIELDS[e.type]||e.type),n=r,i=Array.isArray(n),s=0,n=i?n:(0,v.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;if((0,g.default)(e[o])!==(0,g.default)(t[o]))return!1;if(Array.isArray(e[o])){if(!Array.isArray(t[o]))return!1;if(e[o].length!==t[o].length)return!1;for(var u=0;u<e[o].length;u++)if(!f(e[o][u],t[o][u]))return!1}else if(!f(e[o],t[o]))return!1}return!0}r.__esModule=!0;var d=e("babel-runtime/core-js/object/keys"),m=n(d),y=e("babel-runtime/helpers/typeof"),g=n(y),b=e("babel-runtime/core-js/get-iterator"),v=n(b);r.isBinding=i,r.isReferenced=s,r.isValidIdentifier=a,r.isLet=o,r.isBlockScoped=u,r.isVar=l,r.isSpecifierDefault=c,r.isScope=p,r.isImmutable=h,r.isNodesEquivalent=f;var x=e("./retrievers"),E=e("esutils"),A=n(E),D=e("./index"),C=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(D),S=e("./constants")},{"./constants":158,"./index":169,"./retrievers":171,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/object/keys":120,"babel-runtime/helpers/typeof":131,esutils:176}],173:[function(e,t,r){arguments[4][24][0].apply(r,arguments)},{dup:24}],174:[function(e,t,r){arguments[4][25][0].apply(r,arguments)},{dup:25}],175:[function(e,t,r){arguments[4][26][0].apply(r,arguments)},{"./code":174,dup:26}],176:[function(e,t,r){arguments[4][27][0].apply(r,arguments)},{"./ast":173,"./code":174,"./keyword":175,dup:27}],177:[function(e,t,r){"use strict";function n(e){return e=e.split(" "),function(t){return e.indexOf(t)>=0}}function i(e,t){for(var r=65536,n=0;n<t.length;n+=2){if((r+=t[n])>e)return!1;if((r+=t[n+1])>=e)return!0}}function s(e){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&E.test(String.fromCharCode(e)):i(e,D)))}function a(e){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)):i(e,D)||i(e,C))))}function o(e){var t={};for(var r in S)t[r]=e&&r in e?e[r]:S[r];return t}function u(e){return 10===e||13===e||8232===e||8233===e}function l(e,t){for(var r=1,n=0;;){L.lastIndex=n;var i=L.exec(e);if(!(i&&i.index<t))return new V(r,t-n);++r,n=i.index+i[0].length}}function c(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}function p(e,t,r,n){return e.type=t,e.end=r,e.loc.end=n,this.processComment(e),e}function h(e){return e[e.length-1]}function f(e){return e&&"Property"===e.type&&"init"===e.kind&&!1===e.method}function d(e){return"JSXIdentifier"===e.type?e.name:"JSXNamespacedName"===e.type?e.namespace.name+":"+e.name.name:"JSXMemberExpression"===e.type?d(e.object)+"."+d(e.property):void 0}function m(e,t){return new z(t,e).parse()}function y(e,t){var r=new z(t,e);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()}Object.defineProperty(r,"__esModule",{value:!0});var g={6:n("enum await"),strict:n("implements interface let package private protected public static yield"),strictBind:n("eval arguments")},b=n("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super"),v="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",x="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",E=new RegExp("["+v+"]"),A=new RegExp("["+v+x+"]");v=x=null;var D=[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],S={sourceType:"script",sourceFilename:void 0,startLine:1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,plugins:[],strictMode:null},_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},k=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},F=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},T=!0,P=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};w(this,e),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.rightAssociative=!!r.rightAssociative,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null},B=function(e){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return w(this,t),n.keyword=r,F(this,e.call(this,r,n))}return k(t,e),t}(P),O=function(e){function t(r,n){return w(this,t),F(this,e.call(this,r,{beforeExpr:T,binop:n}))}return k(t,e),t}(P),j={num:new P("num",{startsExpr:!0}),regexp:new P("regexp",{startsExpr:!0}),string:new P("string",{startsExpr:!0}),name:new P("name",{startsExpr:!0}),eof:new P("eof"),bracketL:new P("[",{beforeExpr:T,startsExpr:!0}),bracketR:new P("]"),braceL:new P("{",{beforeExpr:T,startsExpr:!0}),braceBarL:new P("{|",{beforeExpr:T,startsExpr:!0}),braceR:new P("}"),braceBarR:new P("|}"),parenL:new P("(",{beforeExpr:T,startsExpr:!0}),parenR:new P(")"),comma:new P(",",{beforeExpr:T}),semi:new P(";",{beforeExpr:T}),colon:new P(":",{beforeExpr:T}),doubleColon:new P("::",{beforeExpr:T}),dot:new P("."),question:new P("?",{beforeExpr:T}),arrow:new P("=>",{beforeExpr:T}),template:new P("template"),ellipsis:new P("...",{beforeExpr:T}),backQuote:new P("`",{startsExpr:!0}),dollarBraceL:new P("${",{beforeExpr:T,startsExpr:!0}),at:new P("@"),eq:new P("=",{beforeExpr:T,isAssign:!0}),assign:new P("_=",{beforeExpr:T,isAssign:!0}),incDec:new P("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new P("prefix",{beforeExpr:T,prefix:!0,startsExpr:!0}),logicalOR:new O("||",1),logicalAND:new O("&&",2),bitwiseOR:new O("|",3),bitwiseXOR:new O("^",4),bitwiseAND:new O("&",5),equality:new O("==/!=",6),relational:new O("</>",7),bitShift:new O("<</>>",8),plusMin:new P("+/-",{beforeExpr:T,binop:9,prefix:!0,startsExpr:!0}),modulo:new O("%",10),star:new O("*",10),slash:new O("/",10),exponent:new P("**",{beforeExpr:T,binop:11,rightAssociative:!0})},N={break:new B("break"),case:new B("case",{beforeExpr:T}),catch:new B("catch"),continue:new B("continue"),debugger:new B("debugger"),default:new B("default",{beforeExpr:T}),do:new B("do",{isLoop:!0,beforeExpr:T}),else:new B("else",{beforeExpr:T}),finally:new B("finally"),for:new B("for",{isLoop:!0}),function:new B("function",{startsExpr:!0}),if:new B("if"),return:new B("return",{beforeExpr:T}),switch:new B("switch"),throw:new B("throw",{beforeExpr:T}),try:new B("try"),var:new B("var"),let:new B("let"),const:new B("const"),while:new B("while",{isLoop:!0}),with:new B("with"),new:new B("new",{beforeExpr:T,startsExpr:!0}),this:new B("this",{startsExpr:!0}),super:new B("super",{startsExpr:!0}),class:new B("class"),extends:new B("extends",{beforeExpr:T}),export:new B("export"),import:new B("import"),yield:new B("yield",{beforeExpr:T,startsExpr:!0}),null:new B("null",{startsExpr:!0}),true:new B("true",{startsExpr:!0}),false:new B("false",{startsExpr:!0}),in:new B("in",{beforeExpr:T,binop:7}),instanceof:new B("instanceof",{beforeExpr:T,binop:7}),typeof:new B("typeof",{beforeExpr:T,prefix:!0,startsExpr:!0}),void:new B("void",{beforeExpr:T,prefix:!0,startsExpr:!0}),delete:new B("delete",{beforeExpr:T,prefix:!0,startsExpr:!0})};Object.keys(N).forEach(function(e){j["_"+e]=N[e]});var I=/\r\n?|\n|\u2028|\u2029/,L=new RegExp(I.source,"g"),M=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,R=function e(t,r,n,i){w(this,e),this.token=t,this.isExpr=!!r,this.preserveSpace=!!n,this.override=i},U={braceStatement:new R("{",!1),braceExpression:new R("{",!0),templateQuasi:new R("${",!0),parenStatement:new R("(",!1),parenExpression:new R("(",!0),template:new R("`",!0,!0,function(e){return e.readTmplToken()}),functionExpression:new R("function",!0)};j.parenR.updateContext=j.braceR.updateContext=function(){if(1===this.state.context.length)return void(this.state.exprAllowed=!0);var e=this.state.context.pop();e===U.braceStatement&&this.curContext()===U.functionExpression?(this.state.context.pop(),this.state.exprAllowed=!1):e===U.templateQuasi?this.state.exprAllowed=!0:this.state.exprAllowed=!e.isExpr},j.name.updateContext=function(e){this.state.exprAllowed=!1,e!==j._let&&e!==j._const&&e!==j._var||I.test(this.input.slice(this.state.end))&&(this.state.exprAllowed=!0)},j.braceL.updateContext=function(e){this.state.context.push(this.braceIsBlock(e)?U.braceStatement:U.braceExpression),this.state.exprAllowed=!0},j.dollarBraceL.updateContext=function(){this.state.context.push(U.templateQuasi),this.state.exprAllowed=!0},j.parenL.updateContext=function(e){var t=e===j._if||e===j._for||e===j._with||e===j._while;this.state.context.push(t?U.parenStatement:U.parenExpression),this.state.exprAllowed=!0},j.incDec.updateContext=function(){},j._function.updateContext=function(){this.curContext()!==U.braceStatement&&this.state.context.push(U.functionExpression),this.state.exprAllowed=!1},j.backQuote.updateContext=function(){this.curContext()===U.template?this.state.context.pop():this.state.context.push(U.template),this.state.exprAllowed=!1};var V=function e(t,r){w(this,e),this.line=t,this.column=r},q=function e(t,r){w(this,e),this.start=t,this.end=r},G=function(){function e(){w(this,e)}return e.prototype.init=function(e,t){return this.strict=!1!==e.strictMode&&"module"===e.sourceType,this.input=t,this.potentialArrowAt=-1,this.inMethod=this.inFunction=this.inGenerator=this.inAsync=this.inPropertyName=this.inType=this.noAnonFunctionType=!1,this.labels=[],this.decorators=[],this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.pos=this.lineStart=0,this.curLine=e.startLine,this.type=j.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=[U.braceStatement],this.exprAllowed=!0,this.containsEsc=this.containsOctal=!1,this.octalPosition=null,this.exportedIdentifiers=[],this},e.prototype.curPosition=function(){return new V(this.curLine,this.pos-this.lineStart)},e.prototype.clone=function(t){var r=new e;for(var n in this){var i=this[n];t&&"context"!==n||!Array.isArray(i)||(i=i.slice()),r[n]=i}return r},e}(),X=function e(t){w(this,e),this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new q(t.startLoc,t.endLoc)},J=function(){function e(t,r){w(this,e),this.state=new G,this.state.init(t,r)}return e.prototype.next=function(){this.isLookahead||this.state.tokens.push(new X(this.state)),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()},e.prototype.eat=function(e){return!!this.match(e)&&(this.next(),!0)},e.prototype.match=function(e){return this.state.type===e},e.prototype.isKeyword=function(e){return b(e)},e.prototype.lookahead=function(){var e=this.state;this.state=e.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;var t=this.state.clone(!0);return this.state=e,t},e.prototype.setStrict=function(e){if(this.state.strict=e,this.match(j.num)||this.match(j.string)){for(this.state.pos=this.state.start;this.state.pos<this.state.lineStart;)this.state.lineStart=this.input.lastIndexOf("\n",this.state.lineStart-2)+1,--this.state.curLine;this.nextToken()}},e.prototype.curContext=function(){return this.state.context[this.state.context.length-1]},e.prototype.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.state.containsOctal=!1,this.state.octalPosition=null,this.state.start=this.state.pos,this.state.startLoc=this.state.curPosition(),this.state.pos>=this.input.length?this.finishToken(j.eof):e.override?e.override(this):this.readToken(this.fullCharCodeAtPos())},e.prototype.readToken=function(e){return s(e)||92===e?this.readWord():this.getTokenFromCode(e)},e.prototype.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.state.pos);return e<=55295||e>=57344?e:(e<<10)+this.input.charCodeAt(this.state.pos+1)-56613888},e.prototype.pushComment=function(e,t,r,n,i,s){var a={type:e?"CommentBlock":"CommentLine",value:t,start:r,end:n,loc:new q(i,s)};this.isLookahead||(this.state.tokens.push(a),this.state.comments.push(a),this.addComment(a))},e.prototype.skipBlockComment=function(){var e=this.state.curPosition(),t=this.state.pos,r=this.input.indexOf("*/",this.state.pos+=2);-1===r&&this.raise(this.state.pos-2,"Unterminated comment"),this.state.pos=r+2,L.lastIndex=t;for(var n=void 0;(n=L.exec(this.input))&&n.index<this.state.pos;)++this.state.curLine,this.state.lineStart=n.index+n[0].length;this.pushComment(!0,this.input.slice(t+2,r),t,this.state.pos,e,this.state.curPosition())},e.prototype.skipLineComment=function(e){for(var t=this.state.pos,r=this.state.curPosition(),n=this.input.charCodeAt(this.state.pos+=e);this.state.pos<this.input.length&&10!==n&&13!==n&&8232!==n&&8233!==n;)++this.state.pos,n=this.input.charCodeAt(this.state.pos);this.pushComment(!1,this.input.slice(t+e,this.state.pos),t,this.state.pos,r,this.state.curPosition())},e.prototype.skipSpace=function(){e:for(;this.state.pos<this.input.length;){var e=this.input.charCodeAt(this.state.pos);switch(e){case 32:case 160:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&M.test(String.fromCharCode(e))))break e;++this.state.pos}}},e.prototype.finishToken=function(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var r=this.state.type;this.state.type=e,this.state.value=t,this.updateContext(r)},e.prototype.readToken_dot=function(){var e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.state.pos+2);return 46===e&&46===t?(this.state.pos+=3,this.finishToken(j.ellipsis)):(++this.state.pos,this.finishToken(j.dot))},e.prototype.readToken_slash=function(){return this.state.exprAllowed?(++this.state.pos,this.readRegexp()):61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(j.assign,2):this.finishOp(j.slash,1)},e.prototype.readToken_mult_modulo=function(e){var t=42===e?j.star:j.modulo,r=1,n=this.input.charCodeAt(this.state.pos+1);return 42===n&&(r++,n=this.input.charCodeAt(this.state.pos+2),t=j.exponent),61===n&&(r++,t=j.assign),this.finishOp(t,r)},e.prototype.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?this.finishOp(124===e?j.logicalOR:j.logicalAND,2):61===t?this.finishOp(j.assign,2):124===e&&125===t&&this.hasPlugin("flow")?this.finishOp(j.braceBarR,2):this.finishOp(124===e?j.bitwiseOR:j.bitwiseAND,1)},e.prototype.readToken_caret=function(){return 61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(j.assign,2):this.finishOp(j.bitwiseXOR,1)},e.prototype.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?45===t&&62===this.input.charCodeAt(this.state.pos+2)&&I.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(j.incDec,2):61===t?this.finishOp(j.assign,2):this.finishOp(j.plusMin,1)},e.prototype.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.state.pos+1),r=1;return t===e?(r=62===e&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+r)?this.finishOp(j.assign,r+1):this.finishOp(j.bitShift,r)):33===t&&60===e&&45===this.input.charCodeAt(this.state.pos+2)&&45===this.input.charCodeAt(this.state.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(r=2),this.finishOp(j.relational,r))},e.prototype.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.state.pos+1);return 61===t?this.finishOp(j.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2):61===e&&62===t?(this.state.pos+=2,this.finishToken(j.arrow)):this.finishOp(61===e?j.eq:j.prefix,1)},e.prototype.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.state.pos,this.finishToken(j.parenL);case 41:return++this.state.pos,this.finishToken(j.parenR);case 59:return++this.state.pos,this.finishToken(j.semi);case 44:return++this.state.pos,this.finishToken(j.comma);case 91:return++this.state.pos,this.finishToken(j.bracketL);case 93:return++this.state.pos,this.finishToken(j.bracketR);case 123:return this.hasPlugin("flow")&&124===this.input.charCodeAt(this.state.pos+1)?this.finishOp(j.braceBarL,2):(++this.state.pos,this.finishToken(j.braceL));case 125:return++this.state.pos,this.finishToken(j.braceR);case 58:return this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(j.doubleColon,2):(++this.state.pos,this.finishToken(j.colon));case 63:return++this.state.pos,this.finishToken(j.question);case 64:return++this.state.pos,this.finishToken(j.at);case 96:return++this.state.pos,this.finishToken(j.backQuote);case 48:var t=this.input.charCodeAt(this.state.pos+1);if(120===t||88===t)return this.readRadixNumber(16);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(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(j.prefix,1)}this.raise(this.state.pos,"Unexpected character '"+c(e)+"'")},e.prototype.finishOp=function(e,t){var r=this.input.slice(this.state.pos,this.state.pos+t);return this.state.pos+=t,this.finishToken(e,r)},e.prototype.readRegexp=function(){for(var e=this.state.pos,t=void 0,r=void 0;;){this.state.pos>=this.input.length&&this.raise(e,"Unterminated regular expression");var n=this.input.charAt(this.state.pos);if(I.test(n)&&this.raise(e,"Unterminated regular expression"),t)t=!1;else{if("["===n)r=!0;else if("]"===n&&r)r=!1;else if("/"===n&&!r)break;t="\\"===n}++this.state.pos}var i=this.input.slice(e,this.state.pos);++this.state.pos;var s=this.readWord1();if(s){/^[gmsiyu]*$/.test(s)||this.raise(e,"Invalid regular expression flag")}return this.finishToken(j.regexp,{pattern:i,flags:s})},e.prototype.readInt=function(e,t){for(var r=this.state.pos,n=0,i=0,s=null==t?1/0:t;i<s;++i){var a=this.input.charCodeAt(this.state.pos),o=void 0;if((o=a>=97?a-97+10:a>=65?a-65+10:a>=48&&a<=57?a-48:1/0)>=e)break;++this.state.pos,n=n*e+o}return this.state.pos===r||null!=t&&this.state.pos-r!==t?null:n},e.prototype.readRadixNumber=function(e){this.state.pos+=2;var t=this.readInt(e)
+;return null==t&&this.raise(this.state.start+2,"Expected number in radix "+e),s(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number"),this.finishToken(j.num,t)},e.prototype.readNumber=function(e){var t=this.state.pos,r=48===this.input.charCodeAt(this.state.pos),n=!1;e||null!==this.readInt(10)||this.raise(t,"Invalid number");var i=this.input.charCodeAt(this.state.pos);46===i&&(++this.state.pos,this.readInt(10),n=!0,i=this.input.charCodeAt(this.state.pos)),69!==i&&101!==i||(i=this.input.charCodeAt(++this.state.pos),43!==i&&45!==i||++this.state.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),n=!0),s(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number");var a=this.input.slice(t,this.state.pos),o=void 0;return n?o=parseFloat(a):r&&1!==a.length?/[89]/.test(a)||this.state.strict?this.raise(t,"Invalid number"):o=parseInt(a,8):o=parseInt(a,10),this.finishToken(j.num,o)},e.prototype.readCodePoint=function(){var e=this.input.charCodeAt(this.state.pos),t=void 0;if(123===e){var r=++this.state.pos;t=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos),++this.state.pos,t>1114111&&this.raise(r,"Code point out of bounds")}else t=this.readHexChar(4);return t},e.prototype.readString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;92===n?(t+=this.input.slice(r,this.state.pos),t+=this.readEscapedChar(!1),r=this.state.pos):(u(n)&&this.raise(this.state.start,"Unterminated string constant"),++this.state.pos)}return t+=this.input.slice(r,this.state.pos++),this.finishToken(j.string,t)},e.prototype.readTmplToken=function(){for(var e="",t=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated template");var r=this.input.charCodeAt(this.state.pos);if(96===r||36===r&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(j.template)?36===r?(this.state.pos+=2,this.finishToken(j.dollarBraceL)):(++this.state.pos,this.finishToken(j.backQuote)):(e+=this.input.slice(t,this.state.pos),this.finishToken(j.template,e));if(92===r)e+=this.input.slice(t,this.state.pos),e+=this.readEscapedChar(!0),t=this.state.pos;else if(u(r)){switch(e+=this.input.slice(t,this.state.pos),++this.state.pos,r){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(r)}++this.state.curLine,this.state.lineStart=this.state.pos,t=this.state.pos}else++this.state.pos}},e.prototype.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return c(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.state.pos)&&++this.state.pos;case 10:return this.state.lineStart=this.state.pos,++this.state.curLine,"";default:if(t>=48&&t<=55){var r=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],n=parseInt(r,8);return n>255&&(r=r.slice(0,-1),n=parseInt(r,8)),n>0&&(this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=this.state.pos-2),(this.state.strict||e)&&this.raise(this.state.pos-2,"Octal literal in strict mode")),this.state.pos+=r.length-1,String.fromCharCode(n)}return String.fromCharCode(t)}},e.prototype.readHexChar=function(e){var t=this.state.pos,r=this.readInt(16,e);return null===r&&this.raise(t,"Bad character escape sequence"),r},e.prototype.readWord1=function(){this.state.containsEsc=!1;for(var e="",t=!0,r=this.state.pos;this.state.pos<this.input.length;){var n=this.fullCharCodeAtPos();if(a(n))this.state.pos+=n<=65535?1:2;else{if(92!==n)break;this.state.containsEsc=!0,e+=this.input.slice(r,this.state.pos);var i=this.state.pos;117!==this.input.charCodeAt(++this.state.pos)&&this.raise(this.state.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.state.pos;var o=this.readCodePoint();(t?s:a)(o,!0)||this.raise(i,"Invalid Unicode escape"),e+=c(o),r=this.state.pos}t=!1}return e+this.input.slice(r,this.state.pos)},e.prototype.readWord=function(){var e=this.readWord1(),t=j.name;return!this.state.containsEsc&&this.isKeyword(e)&&(t=N[e]),this.finishToken(t,e)},e.prototype.braceIsBlock=function(e){if(e===j.colon){var t=this.curContext();if(t===U.braceStatement||t===U.braceExpression)return!t.isExpr}return e===j._return?I.test(this.input.slice(this.state.lastTokEnd,this.state.start)):e===j._else||e===j.semi||e===j.eof||e===j.parenR||(e===j.braceL?this.curContext()===U.braceStatement:!this.state.exprAllowed)},e.prototype.updateContext=function(e){var t=this.state.type,r=void 0;t.keyword&&e===j.dot?this.state.exprAllowed=!1:(r=t.updateContext)?r.call(this,e):this.state.exprAllowed=t.beforeExpr},e}(),W={},K=["jsx","doExpressions","objectRestSpread","decorators","classProperties","exportExtensions","asyncGenerators","functionBind","functionSent","dynamicImport","flow"],z=function(e){function t(r,n){w(this,t),r=o(r);var i=F(this,e.call(this,r,n));return i.options=r,i.inModule="module"===i.options.sourceType,i.input=n,i.plugins=i.loadPlugins(i.options.plugins),i.filename=r.sourceFilename,0===i.state.pos&&"#"===i.input[0]&&"!"===i.input[1]&&i.skipLineComment(2),i}return k(t,e),t.prototype.isReservedWord=function(e){return"await"===e?this.inModule:g[6](e)},t.prototype.hasPlugin=function(e){return!!(this.plugins["*"]&&K.indexOf(e)>-1)||!!this.plugins[e]},t.prototype.extend=function(e,t){this[e]=t(this[e])},t.prototype.loadAllPlugins=function(){var e=this,t=Object.keys(W).filter(function(e){return"flow"!==e&&"estree"!==e});t.push("flow"),t.forEach(function(t){var r=W[t];r&&r(e)})},t.prototype.loadPlugins=function(e){if(e.indexOf("*")>=0)return this.loadAllPlugins(),{"*":!0};var t={};e.indexOf("flow")>=0&&(e=e.filter(function(e){return"flow"!==e}),e.push("flow")),e.indexOf("estree")>=0&&(e=e.filter(function(e){return"estree"!==e}),e.unshift("estree"));for(var r=e,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;if(!t[a]){t[a]=!0;var o=W[a];o&&o(this)}}return t},t.prototype.parse=function(){var e=this.startNode(),t=this.startNode();return this.nextToken(),this.parseTopLevel(e,t)},t}(J),Y=z.prototype;Y.addExtra=function(e,t,r){if(e){(e.extra=e.extra||{})[t]=r}},Y.isRelational=function(e){return this.match(j.relational)&&this.state.value===e},Y.expectRelational=function(e){this.isRelational(e)?this.next():this.unexpected(null,j.relational)},Y.isContextual=function(e){return this.match(j.name)&&this.state.value===e},Y.eatContextual=function(e){return this.state.value===e&&this.eat(j.name)},Y.expectContextual=function(e,t){this.eatContextual(e)||this.unexpected(null,t)},Y.canInsertSemicolon=function(){return this.match(j.eof)||this.match(j.braceR)||I.test(this.input.slice(this.state.lastTokEnd,this.state.start))},Y.isLineTerminator=function(){return this.eat(j.semi)||this.canInsertSemicolon()},Y.semicolon=function(){this.isLineTerminator()||this.unexpected(null,j.semi)},Y.expect=function(e,t){return this.eat(e)||this.unexpected(t,e)},Y.unexpected=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Unexpected token";t&&"object"===(void 0===t?"undefined":_(t))&&t.label&&(t="Unexpected token, expected "+t.label),this.raise(null!=e?e:this.state.start,t)};var H=z.prototype;H.parseTopLevel=function(e,t){return t.sourceType=this.options.sourceType,this.parseBlockBody(t,!0,!0,j.eof),e.program=this.finishNode(t,"Program"),e.comments=this.state.comments,e.tokens=this.state.tokens,this.finishNode(e,"File")};var $={kind:"loop"},Q={kind:"switch"};H.stmtToDirective=function(e){var t=e.expression,r=this.startNodeAt(t.start,t.loc.start),n=this.startNodeAt(e.start,e.loc.start),i=this.input.slice(t.start,t.end),s=r.value=i.slice(1,-1);return this.addExtra(r,"raw",i),this.addExtra(r,"rawValue",s),n.value=this.finishNodeAt(r,"DirectiveLiteral",t.end,t.loc.end),this.finishNodeAt(n,"Directive",e.end,e.loc.end)},H.parseStatement=function(e,t){this.match(j.at)&&this.parseDecorators(!0);var r=this.state.type,n=this.startNode();switch(r){case j._break:case j._continue:return this.parseBreakContinueStatement(n,r.keyword);case j._debugger:return this.parseDebuggerStatement(n);case j._do:return this.parseDoStatement(n);case j._for:return this.parseForStatement(n);case j._function:return e||this.unexpected(),this.parseFunctionStatement(n);case j._class:return e||this.unexpected(),this.parseClass(n,!0);case j._if:return this.parseIfStatement(n);case j._return:return this.parseReturnStatement(n);case j._switch:return this.parseSwitchStatement(n);case j._throw:return this.parseThrowStatement(n);case j._try:return this.parseTryStatement(n);case j._let:case j._const:e||this.unexpected();case j._var:return this.parseVarStatement(n,r);case j._while:return this.parseWhileStatement(n);case j._with:return this.parseWithStatement(n);case j.braceL:return this.parseBlock();case j.semi:return this.parseEmptyStatement(n);case j._export:case j._import:if(this.hasPlugin("dynamicImport")&&this.lookahead().type===j.parenL)break;return this.options.allowImportExportEverywhere||(t||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===j._import?this.parseImport(n):this.parseExport(n);case j.name:if("async"===this.state.value){var i=this.state.clone();if(this.next(),this.match(j._function)&&!this.canInsertSemicolon())return this.expect(j._function),this.parseFunction(n,!0,!1,!0);this.state=i}}var s=this.state.value,a=this.parseExpression();return r===j.name&&"Identifier"===a.type&&this.eat(j.colon)?this.parseLabeledStatement(n,s,a):this.parseExpressionStatement(n,a)},H.takeDecorators=function(e){this.state.decorators.length&&(e.decorators=this.state.decorators,this.state.decorators=[])},H.parseDecorators=function(e){for(;this.match(j.at);){var t=this.parseDecorator();this.state.decorators.push(t)}e&&this.match(j._export)||this.match(j._class)||this.raise(this.state.start,"Leading decorators must be attached to a class declaration")},H.parseDecorator=function(){this.hasPlugin("decorators")||this.unexpected();var e=this.startNode();return this.next(),e.expression=this.parseMaybeAssign(),this.finishNode(e,"Decorator")},H.parseBreakContinueStatement=function(e,t){var r="break"===t;this.next(),this.isLineTerminator()?e.label=null:this.match(j.name)?(e.label=this.parseIdentifier(),this.semicolon()):this.unexpected();var n=void 0;for(n=0;n<this.state.labels.length;++n){var i=this.state.labels[n];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(r||"loop"===i.kind))break;if(e.label&&r)break}}return n===this.state.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")},H.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},H.parseDoStatement=function(e){return this.next(),this.state.labels.push($),e.body=this.parseStatement(!1),this.state.labels.pop(),this.expect(j._while),e.test=this.parseParenExpression(),this.eat(j.semi),this.finishNode(e,"DoWhileStatement")},H.parseForStatement=function(e){this.next(),this.state.labels.push($);var t=!1;if(this.hasPlugin("asyncGenerators")&&this.state.inAsync&&this.isContextual("await")&&(t=!0,this.next()),this.expect(j.parenL),this.match(j.semi))return t&&this.unexpected(),this.parseFor(e,null);if(this.match(j._var)||this.match(j._let)||this.match(j._const)){var r=this.startNode(),n=this.state.type;return this.next(),(this.parseVar(r,!0,n),this.finishNode(r,"VariableDeclaration"),!this.match(j._in)&&!this.isContextual("of")||1!==r.declarations.length||r.declarations[0].init)?(t&&this.unexpected(),this.parseFor(e,r)):this.parseForIn(e,r,t)}var i={start:0},s=this.parseExpression(!0,i);if(this.match(j._in)||this.isContextual("of")){var a=this.isContextual("of")?"for-of statement":"for-in statement";return this.toAssignable(s,void 0,a),this.checkLVal(s,void 0,void 0,a),this.parseForIn(e,s,t)}return i.start&&this.unexpected(i.start),t&&this.unexpected(),this.parseFor(e,s)},H.parseFunctionStatement=function(e){return this.next(),this.parseFunction(e,!0)},H.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!1),e.alternate=this.eat(j._else)?this.parseStatement(!1):null,this.finishNode(e,"IfStatement")},H.parseReturnStatement=function(e){return this.state.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.state.start,"'return' outside of function"),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},H.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(j.braceL),this.state.labels.push(Q);for(var t,r=void 0;!this.match(j.braceR);)if(this.match(j._case)||this.match(j._default)){var n=this.match(j._case);r&&this.finishNode(r,"SwitchCase"),e.cases.push(r=this.startNode()),r.consequent=[],this.next(),n?r.test=this.parseExpression():(t&&this.raise(this.state.lastTokStart,"Multiple default clauses"),t=!0,r.test=null),this.expect(j.colon)}else r?r.consequent.push(this.parseStatement(!0)):this.unexpected();return r&&this.finishNode(r,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")},H.parseThrowStatement=function(e){return this.next(),I.test(this.input.slice(this.state.lastTokEnd,this.state.start))&&this.raise(this.state.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var Z=[];H.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(j._catch)){var t=this.startNode();this.next(),this.expect(j.parenL),t.param=this.parseBindingAtom(),this.checkLVal(t.param,!0,Object.create(null),"catch clause"),this.expect(j.parenR),t.body=this.parseBlock(),e.handler=this.finishNode(t,"CatchClause")}return e.guardedHandlers=Z,e.finalizer=this.eat(j._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},H.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},H.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.state.labels.push($),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,"WhileStatement")},H.parseWithStatement=function(e){return this.state.strict&&this.raise(this.state.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(!1),this.finishNode(e,"WithStatement")},H.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},H.parseLabeledStatement=function(e,t,r){for(var n=this.state.labels,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}a.name===t&&this.raise(r.start,"Label '"+t+"' is already declared")}for(var o=this.state.type.isLoop?"loop":this.match(j._switch)?"switch":null,u=this.state.labels.length-1;u>=0;u--){var l=this.state.labels[u];if(l.statementStart!==e.start)break;l.statementStart=this.state.start,l.kind=o}return this.state.labels.push({name:t,kind:o,statementStart:this.state.start}),e.body=this.parseStatement(!0),this.state.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")},H.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},H.parseBlock=function(e){var t=this.startNode();return this.expect(j.braceL),this.parseBlockBody(t,e,!1,j.braceR),this.finishNode(t,"BlockStatement")},H.isValidDirective=function(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized},H.parseBlockBody=function(e,t,r,n){e.body=[],e.directives=[];for(var i=!1,s=void 0,a=void 0;!this.eat(n);){i||!this.state.containsOctal||a||(a=this.state.octalPosition);var o=this.parseStatement(!0,r);if(t&&!i&&this.isValidDirective(o)){var u=this.stmtToDirective(o);e.directives.push(u),void 0===s&&"use strict"===u.value.value&&(s=this.state.strict,this.setStrict(!0),a&&this.raise(a,"Octal literal in strict mode"))}else i=!0,e.body.push(o)}!1===s&&this.setStrict(!1)},H.parseFor=function(e,t){return e.init=t,this.expect(j.semi),e.test=this.match(j.semi)?null:this.parseExpression(),this.expect(j.semi),e.update=this.match(j.parenR)?null:this.parseExpression(),this.expect(j.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,"ForStatement")},H.parseForIn=function(e,t,r){var n=void 0;return r?(this.eatContextual("of"),n="ForAwaitStatement"):(n=this.match(j._in)?"ForInStatement":"ForOfStatement",this.next()),e.left=t,e.right=this.parseExpression(),this.expect(j.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,n)},H.parseVar=function(e,t,r){for(e.declarations=[],e.kind=r.keyword;;){var n=this.startNode();if(this.parseVarHead(n),this.eat(j.eq)?n.init=this.parseMaybeAssign(t):r!==j._const||this.match(j._in)||this.isContextual("of")?"Identifier"===n.id.type||t&&(this.match(j._in)||this.isContextual("of"))?n.init=null:this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(j.comma))break}return e},H.parseVarHead=function(e){e.id=this.parseBindingAtom(),this.checkLVal(e.id,!0,void 0,"variable declaration")},H.parseFunction=function(e,t,r,n,i){var s=this.state.inMethod;return this.state.inMethod=!1,this.initFunction(e,n),this.match(j.star)&&(e.async&&!this.hasPlugin("asyncGenerators")?this.unexpected():(e.generator=!0,this.next())),!t||i||this.match(j.name)||this.match(j._yield)||this.unexpected(),(this.match(j.name)||this.match(j._yield))&&(e.id=this.parseBindingIdentifier()),this.parseFunctionParams(e),this.parseFunctionBody(e,r),this.state.inMethod=s,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},H.parseFunctionParams=function(e){this.expect(j.parenL),e.params=this.parseBindingList(j.parenR)},H.parseClass=function(e,t,r){return this.next(),this.takeDecorators(e),this.parseClassId(e,t,r),this.parseClassSuper(e),this.parseClassBody(e),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},H.isClassProperty=function(){return this.match(j.eq)||this.isLineTerminator()},H.isClassMutatorStarter=function(){return!1},H.parseClassBody=function(e){var t=this.state.strict;this.state.strict=!0;var r=!1,n=!1,i=[],s=this.startNode();for(s.body=[],this.expect(j.braceL);!this.eat(j.braceR);)if(this.eat(j.semi))i.length>0&&this.raise(this.state.lastTokEnd,"Decorators must not be followed by a semicolon");else if(this.match(j.at))i.push(this.parseDecorator());else{var a=this.startNode();i.length&&(a.decorators=i,i=[]);var o=!1,u=this.match(j.name)&&"static"===this.state.value,l=this.eat(j.star),c=!1,p=!1;if(this.parsePropertyName(a),a.static=u&&!this.match(j.parenL),a.static&&(l=this.eat(j.star),this.parsePropertyName(a)),!l){if(this.isClassProperty()){s.body.push(this.parseClassProperty(a));continue}"Identifier"===a.key.type&&!a.computed&&this.hasPlugin("classConstructorCall")&&"call"===a.key.name&&this.match(j.name)&&"constructor"===this.state.value&&(o=!0,this.parsePropertyName(a))}var h=!this.match(j.parenL)&&!a.computed&&"Identifier"===a.key.type&&"async"===a.key.name;if(h&&(this.hasPlugin("asyncGenerators")&&this.eat(j.star)&&(l=!0),p=!0,this.parsePropertyName(a)),a.kind="method",!a.computed){var f=a.key;p||l||this.isClassMutatorStarter()||"Identifier"!==f.type||this.match(j.parenL)||"get"!==f.name&&"set"!==f.name||(c=!0,a.kind=f.name,f=this.parsePropertyName(a));var d=!(o||a.static||"constructor"!==f.name&&"constructor"!==f.value);d&&(n&&this.raise(f.start,"Duplicate constructor in the same class"),c&&this.raise(f.start,"Constructor can't have get/set modifier"),l&&this.raise(f.start,"Constructor can't be a generator"),p&&this.raise(f.start,"Constructor can't be an async function"),a.kind="constructor",n=!0);var m=a.static&&("prototype"===f.name||"prototype"===f.value);m&&this.raise(f.start,"Classes may not have static property named prototype")}o&&(r&&this.raise(a.start,"Duplicate constructor call in the same class"),a.kind="constructorCall",r=!0),"constructor"!==a.kind&&"constructorCall"!==a.kind||!a.decorators||this.raise(a.start,"You can't attach decorators to a class constructor"),this.parseClassMethod(s,a,l,p),c&&this.checkGetterSetterParamCount(a)}i.length&&this.raise(this.state.start,"You have trailing decorators with no method"),e.body=this.finishNode(s,"ClassBody"),this.state.strict=t},H.parseClassProperty=function(e){return this.match(j.eq)?(this.hasPlugin("classProperties")||this.unexpected(),this.next(),e.value=this.parseMaybeAssign()):e.value=null,this.semicolon(),this.finishNode(e,"ClassProperty")},H.parseClassMethod=function(e,t,r,n){this.parseMethod(t,r,n),e.body.push(this.finishNode(t,"ClassMethod"))},H.parseClassId=function(e,t,r){this.match(j.name)?e.id=this.parseIdentifier():r||!t?e.id=null:this.unexpected()},H.parseClassSuper=function(e){e.superClass=this.eat(j._extends)?this.parseExprSubscripts():null},H.parseExport=function(e){if(this.next(),this.match(j.star)){var t=this.startNode();if(this.next(),!this.hasPlugin("exportExtensions")||!this.eatContextual("as"))return this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration");t.exported=this.parseIdentifier(),e.specifiers=[this.finishNode(t,"ExportNamespaceSpecifier")],this.parseExportSpecifiersMaybe(e),this.parseExportFrom(e,!0)}else if(this.hasPlugin("exportExtensions")&&this.isExportDefaultSpecifier()){var r=this.startNode();if(r.exported=this.parseIdentifier(!0),e.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],this.match(j.comma)&&this.lookahead().type===j.star){this.expect(j.comma);var n=this.startNode();this.expect(j.star),this.expectContextual("as"),n.exported=this.parseIdentifier(),e.specifiers.push(this.finishNode(n,"ExportNamespaceSpecifier"))}else this.parseExportSpecifiersMaybe(e);this.parseExportFrom(e,!0)}else{if(this.eat(j._default)){var i=this.startNode(),s=!1;return this.eat(j._function)?i=this.parseFunction(i,!0,!1,!1,!0):this.match(j._class)?i=this.parseClass(i,!0,!0):(s=!0,i=this.parseMaybeAssign()),e.declaration=i,s&&this.semicolon(),this.checkExport(e,!0,!0),this.finishNode(e,"ExportDefaultDeclaration")}this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,e.declaration=this.parseExportDeclaration(e)):(e.declaration=null,e.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(e))}return this.checkExport(e,!0),this.finishNode(e,"ExportNamedDeclaration")},H.parseExportDeclaration=function(){return this.parseStatement(!0)},H.isExportDefaultSpecifier=function(){if(this.match(j.name))return"type"!==this.state.value&&"async"!==this.state.value&&"interface"!==this.state.value;if(!this.match(j._default))return!1;var e=this.lookahead();return e.type===j.comma||e.type===j.name&&"from"===e.value},H.parseExportSpecifiersMaybe=function(e){this.eat(j.comma)&&(e.specifiers=e.specifiers.concat(this.parseExportSpecifiers()))},H.parseExportFrom=function(e,t){this.eatContextual("from")?(e.source=this.match(j.string)?this.parseExprAtom():this.unexpected(),this.checkExport(e)):t?this.unexpected():e.source=null,this.semicolon()},H.shouldParseExportDeclaration=function(){return"var"===this.state.type.keyword||"const"===this.state.type.keyword||"let"===this.state.type.keyword||"function"===this.state.type.keyword||"class"===this.state.type.keyword||this.isContextual("async")},H.checkExport=function(e,t,r){if(t)if(r)this.checkDuplicateExports(e,"default");else if(e.specifiers&&e.specifiers.length)for(var n=e.specifiers,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;this.checkDuplicateExports(o,o.exported.name)}else if(e.declaration)if("FunctionDeclaration"===e.declaration.type||"ClassDeclaration"===e.declaration.type)this.checkDuplicateExports(e,e.declaration.id.name);else if("VariableDeclaration"===e.declaration.type)for(var u=e.declaration.declarations,l=Array.isArray(u),c=0,u=l?u:u[Symbol.iterator]();;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if(c=u.next(),c.done)break;p=c.value}var h=p;this.checkDeclaration(h.id)}if(this.state.decorators.length){var f=e.declaration&&("ClassDeclaration"===e.declaration.type||"ClassExpression"===e.declaration.type);e.declaration&&f||this.raise(e.start,"You can only use decorators on an export when exporting a class"),this.takeDecorators(e.declaration)}},H.checkDeclaration=function(e){if("ObjectPattern"===e.type)for(var t=e.properties,r=Array.isArray(t),n=0,t=r?t:t[Symbol.iterator]();;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;this.checkDeclaration(s)}else if("ArrayPattern"===e.type)for(var a=e.elements,o=Array.isArray(a),u=0,a=o?a:a[Symbol.iterator]();;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;c&&this.checkDeclaration(c)}else"ObjectProperty"===e.type?this.checkDeclaration(e.value):"RestElement"===e.type||"RestProperty"===e.type?this.checkDeclaration(e.argument):"Identifier"===e.type&&this.checkDuplicateExports(e,e.name)},H.checkDuplicateExports=function(e,t){this.state.exportedIdentifiers.indexOf(t)>-1&&this.raiseDuplicateExportError(e,t),this.state.exportedIdentifiers.push(t)},H.raiseDuplicateExportError=function(e,t){this.raise(e.start,"default"===t?"Only one default export allowed per module.":"`"+t+"` has already been exported. Exported identifiers must be unique.")},H.parseExportSpecifiers=function(){var e=[],t=!0,r=void 0;for(this.expect(j.braceL);!this.eat(j.braceR);){if(t)t=!1;else if(this.expect(j.comma),this.eat(j.braceR))break;var n=this.match(j._default);n&&!r&&(r=!0);var i=this.startNode();i.local=this.parseIdentifier(n),i.exported=this.eatContextual("as")?this.parseIdentifier(!0):i.local.__clone(),e.push(this.finishNode(i,"ExportSpecifier"))}return r&&!this.isContextual("from")&&this.unexpected(),e},H.parseImport=function(e){return this.eat(j._import),this.match(j.string)?(e.specifiers=[],e.source=this.parseExprAtom()):(e.specifiers=[],this.parseImportSpecifiers(e),this.expectContextual("from"),e.source=this.match(j.string)?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},H.parseImportSpecifiers=function(e){var t=!0;if(this.match(j.name)){var r=this.state.start,n=this.state.startLoc;if(e.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(),r,n)),!this.eat(j.comma))return}if(this.match(j.star)){var i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdentifier(),this.checkLVal(i.local,!0,void 0,"import namespace specifier"),void e.specifiers.push(this.finishNode(i,"ImportNamespaceSpecifier"))}for(this.expect(j.braceL);!this.eat(j.braceR);){if(t)t=!1;else if(this.eat(j.colon)&&this.unexpected(null,"ES2015 named imports do not destructure. Use another statement for destructuring after the import."),this.expect(j.comma),this.eat(j.braceR))break;this.parseImportSpecifier(e)}},H.parseImportSpecifier=function(e){var t=this.startNode();t.imported=this.parseIdentifier(!0),this.eatContextual("as")?t.local=this.parseIdentifier():(this.checkReservedWord(t.imported.name,t.start,!0,!0),t.local=t.imported.__clone()),this.checkLVal(t.local,!0,void 0,"import specifier"),e.specifiers.push(this.finishNode(t,"ImportSpecifier"))},H.parseImportSpecifierDefault=function(e,t,r){var n=this.startNodeAt(t,r);return n.local=e,this.checkLVal(n.local,!0,void 0,"default import specifier"),this.finishNode(n,"ImportDefaultSpecifier")};var ee=z.prototype;ee.toAssignable=function(e,t,r){if(e)switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var n=e.properties,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;"ObjectMethod"===o.type?"get"===o.kind||"set"===o.kind?this.raise(o.key.start,"Object pattern can't contain getter or setter"):this.raise(o.key.start,"Object pattern can't contain methods"):this.toAssignable(o,t,"object destructuring pattern")}break;case"ObjectProperty":this.toAssignable(e.value,t,r);break;case"SpreadProperty":e.type="RestProperty";break;case"ArrayExpression":e.type="ArrayPattern",this.toAssignableList(e.elements,t,r);break;case"AssignmentExpression":"="===e.operator?(e.type="AssignmentPattern",delete e.operator):this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");break;case"MemberExpression":if(!t)break;default:var u="Invalid left-hand side"+(r?" in "+r:"expression");this.raise(e.start,u)}return e},ee.toAssignableList=function(e,t,r){var n=e.length;if(n){var i=e[n-1];if(i&&"RestElement"===i.type)--n;else if(i&&"SpreadElement"===i.type){i.type="RestElement";var s=i.argument;this.toAssignable(s,t,r),"Identifier"!==s.type&&"MemberExpression"!==s.type&&"ArrayPattern"!==s.type&&this.unexpected(s.start),--n}}for(var a=0;a<n;a++){var o=e[a];o&&this.toAssignable(o,t,r)}return e},ee.toReferencedList=function(e){return e},ee.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},ee.parseRest=function(){var e=this.startNode();return this.next(),e.argument=this.parseBindingIdentifier(),this.finishNode(e,"RestElement")},ee.shouldAllowYieldIdentifier=function(){return this.match(j._yield)&&!this.state.strict&&!this.state.inGenerator},ee.parseBindingIdentifier=function(){return this.parseIdentifier(this.shouldAllowYieldIdentifier())},ee.parseBindingAtom=function(){switch(this.state.type){case j._yield:(this.state.strict||this.state.inGenerator)&&this.unexpected();case j.name:return this.parseIdentifier(!0);case j.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(j.bracketR,!0),this.finishNode(e,"ArrayPattern");case j.braceL:return this.parseObj(!0);default:this.unexpected()}},ee.parseBindingList=function(e,t){for(var r=[],n=!0;!this.eat(e);)if(n?n=!1:this.expect(j.comma),t&&this.match(j.comma))r.push(null);else{if(this.eat(e))break;if(this.match(j.ellipsis)){r.push(this.parseAssignableListItemTypes(this.parseRest())),this.expect(e);break}for(var i=[];this.match(j.at);)i.push(this.parseDecorator());var s=this.parseMaybeDefault();i.length&&(s.decorators=i),this.parseAssignableListItemTypes(s),r.push(this.parseMaybeDefault(s.start,s.loc.start,s))}return r},ee.parseAssignableListItemTypes=function(e){return e},ee.parseMaybeDefault=function(e,t,r){if(t=t||this.state.startLoc,e=e||this.state.start,r=r||this.parseBindingAtom(),!this.eat(j.eq))return r;var n=this.startNodeAt(e,t);return n.left=r,n.right=this.parseMaybeAssign(),this.finishNode(n,"AssignmentPattern")},ee.checkLVal=function(e,t,r,n){switch(e.type){case"Identifier":if(this.checkReservedWord(e.name,e.start,!1,!0),r){var i="_"+e.name;r[i]?this.raise(e.start,"Argument name clash in strict mode"):r[i]=!0}break;case"MemberExpression":t&&this.raise(e.start,(t?"Binding":"Assigning to")+" member expression");break;case"ObjectPattern":for(var s=e.properties,a=Array.isArray(s),o=0,s=a?s:s[Symbol.iterator]();;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u
+;"ObjectProperty"===l.type&&(l=l.value),this.checkLVal(l,t,r,"object destructuring pattern")}break;case"ArrayPattern":for(var c=e.elements,p=Array.isArray(c),h=0,c=p?c:c[Symbol.iterator]();;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if(h=c.next(),h.done)break;f=h.value}var d=f;d&&this.checkLVal(d,t,r,"array destructuring pattern")}break;case"AssignmentPattern":this.checkLVal(e.left,t,r,"assignment pattern");break;case"RestProperty":this.checkLVal(e.argument,t,r,"rest property");break;case"RestElement":this.checkLVal(e.argument,t,r,"rest element");break;default:var m=(t?"Binding invalid":"Invalid")+" left-hand side"+(n?" in "+n:"expression");this.raise(e.start,m)}};var te=z.prototype;te.checkPropClash=function(e,t){if(!e.computed&&!e.kind){var r=e.key;"__proto__"===("Identifier"===r.type?r.name:String(r.value))&&(t.proto&&this.raise(r.start,"Redefinition of __proto__ property"),t.proto=!0)}},te.getExpression=function(){this.nextToken();var e=this.parseExpression();return this.match(j.eof)||this.unexpected(),e},te.parseExpression=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.parseMaybeAssign(e,t);if(this.match(j.comma)){var s=this.startNodeAt(r,n);for(s.expressions=[i];this.eat(j.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.toReferencedList(s.expressions),this.finishNode(s,"SequenceExpression")}return i},te.parseMaybeAssign=function(e,t,r,n){var i=this.state.start,s=this.state.startLoc;if(this.match(j._yield)&&this.state.inGenerator){var a=this.parseYield();return r&&(a=r.call(this,a,i,s)),a}var o=void 0;t?o=!1:(t={start:0},o=!0),(this.match(j.parenL)||this.match(j.name))&&(this.state.potentialArrowAt=this.state.start);var u=this.parseMaybeConditional(e,t,n);if(r&&(u=r.call(this,u,i,s)),this.state.type.isAssign){var l=this.startNodeAt(i,s);if(l.operator=this.state.value,l.left=this.match(j.eq)?this.toAssignable(u,void 0,"assignment expression"):u,t.start=0,this.checkLVal(u,void 0,void 0,"assignment expression"),u.extra&&u.extra.parenthesized){var c=void 0;"ObjectPattern"===u.type?c="`({a}) = 0` use `({a} = 0)`":"ArrayPattern"===u.type&&(c="`([a]) = 0` use `([a] = 0)`"),c&&this.raise(u.start,"You're trying to assign to a parenthesized expression, eg. instead of "+c)}return this.next(),l.right=this.parseMaybeAssign(e),this.finishNode(l,"AssignmentExpression")}return o&&t.start&&this.unexpected(t.start),u},te.parseMaybeConditional=function(e,t,r){var n=this.state.start,i=this.state.startLoc,s=this.parseExprOps(e,t);return t&&t.start?s:this.parseConditional(s,e,n,i,r)},te.parseConditional=function(e,t,r,n){if(this.eat(j.question)){var i=this.startNodeAt(r,n);return i.test=e,i.consequent=this.parseMaybeAssign(),this.expect(j.colon),i.alternate=this.parseMaybeAssign(t),this.finishNode(i,"ConditionalExpression")}return e},te.parseExprOps=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.parseMaybeUnary(t);return t&&t.start?i:this.parseExprOp(i,r,n,-1,e)},te.parseExprOp=function(e,t,r,n,i){var s=this.state.type.binop;if(!(null==s||i&&this.match(j._in))&&s>n){var a=this.startNodeAt(t,r);a.left=e,a.operator=this.state.value,"**"!==a.operator||"UnaryExpression"!==e.type||!e.extra||e.extra.parenthesizedArgument||e.extra.parenthesized||this.raise(e.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");var o=this.state.type;this.next();var u=this.state.start,l=this.state.startLoc;return a.right=this.parseExprOp(this.parseMaybeUnary(),u,l,o.rightAssociative?s-1:s,i),this.finishNode(a,o===j.logicalOR||o===j.logicalAND?"LogicalExpression":"BinaryExpression"),this.parseExprOp(a,t,r,n,i)}return e},te.parseMaybeUnary=function(e){if(this.state.type.prefix){var t=this.startNode(),r=this.match(j.incDec);t.operator=this.state.value,t.prefix=!0,this.next();var n=this.state.type;return t.argument=this.parseMaybeUnary(),this.addExtra(t,"parenthesizedArgument",!(n!==j.parenL||t.argument.extra&&t.argument.extra.parenthesized)),e&&e.start&&this.unexpected(e.start),r?this.checkLVal(t.argument,void 0,void 0,"prefix operation"):this.state.strict&&"delete"===t.operator&&"Identifier"===t.argument.type&&this.raise(t.start,"Deleting local variable in strict mode"),this.finishNode(t,r?"UpdateExpression":"UnaryExpression")}var i=this.state.start,s=this.state.startLoc,a=this.parseExprSubscripts(e);if(e&&e.start)return a;for(;this.state.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(i,s);o.operator=this.state.value,o.prefix=!1,o.argument=a,this.checkLVal(a,void 0,void 0,"postfix operation"),this.next(),a=this.finishNode(o,"UpdateExpression")}return a},te.parseExprSubscripts=function(e){var t=this.state.start,r=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseExprAtom(e);return"ArrowFunctionExpression"===i.type&&i.start===n?i:e&&e.start?i:this.parseSubscripts(i,t,r)},te.parseSubscripts=function(e,t,r,n){for(;;){if(!n&&this.eat(j.doubleColon)){var i=this.startNodeAt(t,r);return i.object=e,i.callee=this.parseNoCallExpr(),this.parseSubscripts(this.finishNode(i,"BindExpression"),t,r,n)}if(this.eat(j.dot)){var s=this.startNodeAt(t,r);s.object=e,s.property=this.parseIdentifier(!0),s.computed=!1,e=this.finishNode(s,"MemberExpression")}else if(this.eat(j.bracketL)){var a=this.startNodeAt(t,r);a.object=e,a.property=this.parseExpression(),a.computed=!0,this.expect(j.bracketR),e=this.finishNode(a,"MemberExpression")}else if(!n&&this.match(j.parenL)){var o=this.state.potentialArrowAt===e.start&&"Identifier"===e.type&&"async"===e.name&&!this.canInsertSemicolon();this.next();var u=this.startNodeAt(t,r);if(u.callee=e,u.arguments=this.parseCallExpressionArguments(j.parenR,o),"Import"===u.callee.type&&1!==u.arguments.length&&this.raise(u.start,"import() requires exactly one argument"),e=this.finishNode(u,"CallExpression"),o&&this.shouldParseAsyncArrow())return this.parseAsyncArrowFromCallExpression(this.startNodeAt(t,r),u);this.toReferencedList(u.arguments)}else{if(!this.match(j.backQuote))return e;var l=this.startNodeAt(t,r);l.tag=e,l.quasi=this.parseTemplate(),e=this.finishNode(l,"TaggedTemplateExpression")}}},te.parseCallExpressionArguments=function(e,t){for(var r=[],n=void 0,i=!0;!this.eat(e);){if(i)i=!1;else if(this.expect(j.comma),this.eat(e))break;this.match(j.parenL)&&!n&&(n=this.state.start),r.push(this.parseExprListItem(!1,t?{start:0}:void 0,t?{start:0}:void 0))}return t&&n&&this.shouldParseAsyncArrow()&&this.unexpected(),r},te.shouldParseAsyncArrow=function(){return this.match(j.arrow)},te.parseAsyncArrowFromCallExpression=function(e,t){return this.expect(j.arrow),this.parseArrowExpression(e,t.arguments,!0)},te.parseNoCallExpr=function(){var e=this.state.start,t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,t,!0)},te.parseExprAtom=function(e){var t=this.state.potentialArrowAt===this.state.start,r=void 0;switch(this.state.type){case j._super:return this.state.inMethod||this.options.allowSuperOutsideMethod||this.raise(this.state.start,"'super' outside of function or class"),r=this.startNode(),this.next(),this.match(j.parenL)||this.match(j.bracketL)||this.match(j.dot)||this.unexpected(),this.match(j.parenL)&&"constructor"!==this.state.inMethod&&!this.options.allowSuperOutsideMethod&&this.raise(r.start,"super() outside of class constructor"),this.finishNode(r,"Super");case j._import:return this.hasPlugin("dynamicImport")||this.unexpected(),r=this.startNode(),this.next(),this.match(j.parenL)||this.unexpected(null,j.parenL),this.finishNode(r,"Import");case j._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case j._yield:this.state.inGenerator&&this.unexpected();case j.name:r=this.startNode();var n="await"===this.state.value&&this.state.inAsync,i=this.shouldAllowYieldIdentifier(),s=this.parseIdentifier(n||i);if("await"===s.name){if(this.state.inAsync||this.inModule)return this.parseAwait(r)}else{if("async"===s.name&&this.match(j._function)&&!this.canInsertSemicolon())return this.next(),this.parseFunction(r,!1,!1,!0);if(t&&"async"===s.name&&this.match(j.name)){var a=[this.parseIdentifier()];return this.expect(j.arrow),this.parseArrowExpression(r,a,!0)}}return t&&!this.canInsertSemicolon()&&this.eat(j.arrow)?this.parseArrowExpression(r,[s]):s;case j._do:if(this.hasPlugin("doExpressions")){var o=this.startNode();this.next();var u=this.state.inFunction,l=this.state.labels;return this.state.labels=[],this.state.inFunction=!1,o.body=this.parseBlock(!1,!0),this.state.inFunction=u,this.state.labels=l,this.finishNode(o,"DoExpression")}case j.regexp:var c=this.state.value;return r=this.parseLiteral(c.value,"RegExpLiteral"),r.pattern=c.pattern,r.flags=c.flags,r;case j.num:return this.parseLiteral(this.state.value,"NumericLiteral");case j.string:return this.parseLiteral(this.state.value,"StringLiteral");case j._null:return r=this.startNode(),this.next(),this.finishNode(r,"NullLiteral");case j._true:case j._false:return r=this.startNode(),r.value=this.match(j._true),this.next(),this.finishNode(r,"BooleanLiteral");case j.parenL:return this.parseParenAndDistinguishExpression(null,null,t);case j.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(j.bracketR,!0,e),this.toReferencedList(r.elements),this.finishNode(r,"ArrayExpression");case j.braceL:return this.parseObj(!1,e);case j._function:return this.parseFunctionExpression();case j.at:this.parseDecorators();case j._class:return r=this.startNode(),this.takeDecorators(r),this.parseClass(r,!1);case j._new:return this.parseNew();case j.backQuote:return this.parseTemplate();case j.doubleColon:r=this.startNode(),this.next(),r.object=null;var p=r.callee=this.parseNoCallExpr();if("MemberExpression"===p.type)return this.finishNode(r,"BindExpression");this.raise(p.start,"Binding should be performed on object property.");default:this.unexpected()}},te.parseFunctionExpression=function(){var e=this.startNode(),t=this.parseIdentifier(!0);return this.state.inGenerator&&this.eat(j.dot)&&this.hasPlugin("functionSent")?this.parseMetaProperty(e,t,"sent"):this.parseFunction(e,!1)},te.parseMetaProperty=function(e,t,r){return e.meta=t,e.property=this.parseIdentifier(!0),e.property.name!==r&&this.raise(e.property.start,"The only valid meta property for new is "+t.name+"."+r),this.finishNode(e,"MetaProperty")},te.parseLiteral=function(e,t,r,n){r=r||this.state.start,n=n||this.state.startLoc;var i=this.startNodeAt(r,n);return this.addExtra(i,"rawValue",e),this.addExtra(i,"raw",this.input.slice(r,this.state.end)),i.value=e,this.next(),this.finishNode(i,t)},te.parseParenExpression=function(){this.expect(j.parenL);var e=this.parseExpression();return this.expect(j.parenR),e},te.parseParenAndDistinguishExpression=function(e,t,r){e=e||this.state.start,t=t||this.state.startLoc;var n=void 0;this.expect(j.parenL);for(var i=this.state.start,s=this.state.startLoc,a=[],o={start:0},u={start:0},l=!0,c=void 0,p=void 0;!this.match(j.parenR);){if(l)l=!1;else if(this.expect(j.comma,u.start||null),this.match(j.parenR)){p=this.state.start;break}if(this.match(j.ellipsis)){var h=this.state.start,f=this.state.startLoc;c=this.state.start,a.push(this.parseParenItem(this.parseRest(),f,h));break}a.push(this.parseMaybeAssign(!1,o,this.parseParenItem,u))}var d=this.state.start,m=this.state.startLoc;this.expect(j.parenR);var y=this.startNodeAt(e,t);if(r&&this.shouldParseArrow()&&(y=this.parseArrow(y))){for(var g=a,b=Array.isArray(g),v=0,g=b?g:g[Symbol.iterator]();;){var x;if(b){if(v>=g.length)break;x=g[v++]}else{if(v=g.next(),v.done)break;x=v.value}var E=x;E.extra&&E.extra.parenthesized&&this.unexpected(E.extra.parenStart)}return this.parseArrowExpression(y,a)}return a.length||this.unexpected(this.state.lastTokStart),p&&this.unexpected(p),c&&this.unexpected(c),o.start&&this.unexpected(o.start),u.start&&this.unexpected(u.start),a.length>1?(n=this.startNodeAt(i,s),n.expressions=a,this.toReferencedList(n.expressions),this.finishNodeAt(n,"SequenceExpression",d,m)):n=a[0],this.addExtra(n,"parenthesized",!0),this.addExtra(n,"parenStart",e),n},te.shouldParseArrow=function(){return!this.canInsertSemicolon()},te.parseArrow=function(e){if(this.eat(j.arrow))return e},te.parseParenItem=function(e){return e},te.parseNew=function(){var e=this.startNode(),t=this.parseIdentifier(!0);return this.eat(j.dot)?this.parseMetaProperty(e,t,"target"):(e.callee=this.parseNoCallExpr(),this.eat(j.parenL)?(e.arguments=this.parseExprList(j.parenR),this.toReferencedList(e.arguments)):e.arguments=[],this.finishNode(e,"NewExpression"))},te.parseTemplateElement=function(){var e=this.startNode();return e.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),e.tail=this.match(j.backQuote),this.finishNode(e,"TemplateElement")},te.parseTemplate=function(){var e=this.startNode();this.next(),e.expressions=[];var t=this.parseTemplateElement();for(e.quasis=[t];!t.tail;)this.expect(j.dollarBraceL),e.expressions.push(this.parseExpression()),this.expect(j.braceR),e.quasis.push(t=this.parseTemplateElement());return this.next(),this.finishNode(e,"TemplateLiteral")},te.parseObj=function(e,t){var r=[],n=Object.create(null),i=!0,s=this.startNode();s.properties=[],this.next();for(var a=null;!this.eat(j.braceR);){if(i)i=!1;else if(this.expect(j.comma),this.eat(j.braceR))break;for(;this.match(j.at);)r.push(this.parseDecorator());var o=this.startNode(),u=!1,l=!1,c=void 0,p=void 0;if(r.length&&(o.decorators=r,r=[]),this.hasPlugin("objectRestSpread")&&this.match(j.ellipsis)){if(o=this.parseSpread(e?{start:0}:void 0),o.type=e?"RestProperty":"SpreadProperty",e&&this.toAssignable(o.argument,!0,"object pattern"),s.properties.push(o),!e)continue;var h=this.state.start;if(null===a){if(this.eat(j.braceR))break;if(this.match(j.comma)&&this.lookahead().type===j.braceR)continue;a=h;continue}this.unexpected(a,"Cannot have multiple rest elements when destructuring")}if(o.method=!1,o.shorthand=!1,(e||t)&&(c=this.state.start,p=this.state.startLoc),e||(u=this.eat(j.star)),!e&&this.isContextual("async")){u&&this.unexpected();var f=this.parseIdentifier();this.match(j.colon)||this.match(j.parenL)||this.match(j.braceR)||this.match(j.eq)||this.match(j.comma)?(o.key=f,o.computed=!1):(l=!0,this.hasPlugin("asyncGenerators")&&(u=this.eat(j.star)),this.parsePropertyName(o))}else this.parsePropertyName(o);this.parseObjPropValue(o,c,p,u,l,e,t),this.checkPropClash(o,n),o.shorthand&&this.addExtra(o,"shorthand",!0),s.properties.push(o)}return null!==a&&this.unexpected(a,"The rest element has to be the last element when destructuring"),r.length&&this.raise(this.state.start,"You have trailing decorators with no property"),this.finishNode(s,e?"ObjectPattern":"ObjectExpression")},te.isGetterOrSetterMethod=function(e,t){return!t&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&(this.match(j.string)||this.match(j.num)||this.match(j.bracketL)||this.match(j.name)||this.state.type.keyword)},te.checkGetterSetterParamCount=function(e){var t="get"===e.kind?0:1;if(e.params.length!==t){var r=e.start;"get"===e.kind?this.raise(r,"getter should have no params"):this.raise(r,"setter should have exactly one param")}},te.parseObjectMethod=function(e,t,r,n){return r||t||this.match(j.parenL)?(n&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,r),this.finishNode(e,"ObjectMethod")):this.isGetterOrSetterMethod(e,n)?((t||r)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),this.parseMethod(e),this.checkGetterSetterParamCount(e),this.finishNode(e,"ObjectMethod")):void 0},te.parseObjectProperty=function(e,t,r,n,i){return this.eat(j.colon)?(e.value=n?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(!1,i),this.finishNode(e,"ObjectProperty")):e.computed||"Identifier"!==e.key.type?void 0:(n?(this.checkReservedWord(e.key.name,e.key.start,!0,!0),e.value=this.parseMaybeDefault(t,r,e.key.__clone())):this.match(j.eq)&&i?(i.start||(i.start=this.state.start),e.value=this.parseMaybeDefault(t,r,e.key.__clone())):e.value=e.key.__clone(),e.shorthand=!0,this.finishNode(e,"ObjectProperty"))},te.parseObjPropValue=function(e,t,r,n,i,s,a){var o=this.parseObjectMethod(e,n,i,s)||this.parseObjectProperty(e,t,r,s,a);return o||this.unexpected(),o},te.parsePropertyName=function(e){if(this.eat(j.bracketL))e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(j.bracketR);else{e.computed=!1;var t=this.state.inPropertyName;this.state.inPropertyName=!0,e.key=this.match(j.num)||this.match(j.string)?this.parseExprAtom():this.parseIdentifier(!0),this.state.inPropertyName=t}return e.key},te.initFunction=function(e,t){e.id=null,e.generator=!1,e.expression=!1,e.async=!!t},te.parseMethod=function(e,t,r){var n=this.state.inMethod;return this.state.inMethod=e.kind||!0,this.initFunction(e,r),this.expect(j.parenL),e.params=this.parseBindingList(j.parenR),e.generator=!!t,this.parseFunctionBody(e),this.state.inMethod=n,e},te.parseArrowExpression=function(e,t,r){return this.initFunction(e,r),e.params=this.toAssignableList(t,!0,"arrow function parameters"),this.parseFunctionBody(e,!0),this.finishNode(e,"ArrowFunctionExpression")},te.isStrictBody=function(e,t){if(!t&&e.body.directives.length)for(var r=e.body.directives,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;if("use strict"===a.value.value)return!0}return!1},te.parseFunctionBody=function(e,t){var r=t&&!this.match(j.braceL),n=this.state.inAsync;if(this.state.inAsync=e.async,r)e.body=this.parseMaybeAssign(),e.expression=!0;else{var i=this.state.inFunction,s=this.state.inGenerator,a=this.state.labels;this.state.inFunction=!0,this.state.inGenerator=e.generator,this.state.labels=[],e.body=this.parseBlock(!0),e.expression=!1,this.state.inFunction=i,this.state.inGenerator=s,this.state.labels=a}this.state.inAsync=n;var o=this.isStrictBody(e,r),u=this.state.strict||t||o;if(o&&e.id&&"Identifier"===e.id.type&&"yield"===e.id.name&&this.raise(e.id.start,"Binding yield in strict mode"),u){var l=Object.create(null),c=this.state.strict;o&&(this.state.strict=!0),e.id&&this.checkLVal(e.id,!0,void 0,"function name");for(var p=e.params,h=Array.isArray(p),f=0,p=h?p:p[Symbol.iterator]();;){var d;if(h){if(f>=p.length)break;d=p[f++]}else{if(f=p.next(),f.done)break;d=f.value}var m=d;o&&"Identifier"!==m.type&&this.raise(m.start,"Non-simple parameter in strict mode"),this.checkLVal(m,!0,l,"function parameter list")}this.state.strict=c}},te.parseExprList=function(e,t,r){for(var n=[],i=!0;!this.eat(e);){if(i)i=!1;else if(this.expect(j.comma),this.eat(e))break;n.push(this.parseExprListItem(t,r))}return n},te.parseExprListItem=function(e,t,r){return e&&this.match(j.comma)?null:this.match(j.ellipsis)?this.parseSpread(t):this.parseMaybeAssign(!1,t,this.parseParenItem,r)},te.parseIdentifier=function(e){var t=this.startNode();return e||this.checkReservedWord(this.state.value,this.state.start,!!this.state.type.keyword,!1),this.match(j.name)?t.name=this.state.value:this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),!e&&"await"===t.name&&this.state.inAsync&&this.raise(t.start,"invalid use of await inside of an async function"),t.loc.identifierName=t.name,this.next(),this.finishNode(t,"Identifier")},te.checkReservedWord=function(e,t,r,n){(this.isReservedWord(e)||r&&this.isKeyword(e))&&this.raise(t,e+" is a reserved word"),this.state.strict&&(g.strict(e)||n&&g.strictBind(e))&&this.raise(t,e+" is a reserved word in strict mode")},te.parseAwait=function(e){return this.state.inAsync||this.unexpected(),this.match(j.star)&&this.raise(e.start,"await* has been removed from the async functions proposal. Use Promise.all() instead."),e.argument=this.parseMaybeUnary(),this.finishNode(e,"AwaitExpression")},te.parseYield=function(){var e=this.startNode();return this.next(),this.match(j.semi)||this.canInsertSemicolon()||!this.match(j.star)&&!this.state.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(j.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")};var re=z.prototype,ne=["leadingComments","trailingComments","innerComments"],ie=function(){function e(t,r,n){w(this,e),this.type="",this.start=t,this.end=0,this.loc=new q(r),n&&(this.loc.filename=n)}return e.prototype.__clone=function(){var t=new e;for(var r in this)ne.indexOf(r)<0&&(t[r]=this[r]);return t},e}();re.startNode=function(){return new ie(this.state.start,this.state.startLoc,this.filename)},re.startNodeAt=function(e,t){return new ie(e,t,this.filename)},re.finishNode=function(e,t){return p.call(this,e,t,this.state.lastTokEnd,this.state.lastTokEndLoc)},re.finishNodeAt=function(e,t,r,n){return p.call(this,e,t,r,n)},z.prototype.raise=function(e,t){var r=l(this.input,e);t+=" ("+r.line+":"+r.column+")";var n=new SyntaxError(t);throw n.pos=e,n.loc=r,n};var se=z.prototype;se.addComment=function(e){this.filename&&(e.loc.filename=this.filename),this.state.trailingComments.push(e),this.state.leadingComments.push(e)},se.processComment=function(e){if(!("Program"===e.type&&e.body.length>0)){var t=this.state.commentStack,r=void 0,n=void 0,i=void 0,s=void 0;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=e.end?(n=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else{var a=h(t);t.length>0&&a.trailingComments&&a.trailingComments[0].start>=e.end&&(n=a.trailingComments,a.trailingComments=null)}for(;t.length>0&&h(t).start>=e.start;)r=t.pop();if(r){if(r.leadingComments)if(r!==e&&h(r.leadingComments).end<=e.start)e.leadingComments=r.leadingComments,r.leadingComments=null;else for(i=r.leadingComments.length-2;i>=0;--i)if(r.leadingComments[i].end<=e.start){e.leadingComments=r.leadingComments.splice(0,i+1);break}}else if(this.state.leadingComments.length>0)if(h(this.state.leadingComments).end<=e.start){if(this.state.commentPreviousNode)for(s=0;s<this.state.leadingComments.length;s++)this.state.leadingComments[s].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(s,1),s--);this.state.leadingComments.length>0&&(e.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(i=0;i<this.state.leadingComments.length&&!(this.state.leadingComments[i].end>e.start);i++);e.leadingComments=this.state.leadingComments.slice(0,i),0===e.leadingComments.length&&(e.leadingComments=null),n=this.state.leadingComments.slice(i),0===n.length&&(n=null)}this.state.commentPreviousNode=e,n&&(n.length&&n[0].start>=e.start&&h(n).end<=e.end?e.innerComments=n:e.trailingComments=n),t.push(e)}};var ae=z.prototype;ae.estreeParseRegExpLiteral=function(e){var t=e.pattern,r=e.flags,n=null;try{n=new RegExp(t,r)}catch(e){}var i=this.estreeParseLiteral(n);return i.regex={pattern:t,flags:r},i},ae.estreeParseLiteral=function(e){return this.parseLiteral(e,"Literal")},ae.directiveToStmt=function(e){var t=e.value,r=this.startNodeAt(e.start,e.loc.start),n=this.startNodeAt(t.start,t.loc.start);return n.value=t.value,n.raw=t.extra.raw,r.expression=this.finishNodeAt(n,"Literal",t.end,t.loc.end),r.directive=t.extra.raw.slice(1,-1),this.finishNodeAt(r,"ExpressionStatement",e.end,e.loc.end)};var oe=function(e){e.extend("checkDeclaration",function(e){return function(t){f(t)?this.checkDeclaration(t.value):e.call(this,t)}}),e.extend("checkGetterSetterParamCount",function(){return function(e){var t="get"===e.kind?0:1;if(e.value.params.length!==t){var r=e.start;"get"===e.kind?this.raise(r,"getter should have no params"):this.raise(r,"setter should have exactly one param")}}}),e.extend("checkLVal",function(e){return function(t,r,n){var i=this;switch(t.type){case"ObjectPattern":t.properties.forEach(function(e){i.checkLVal("Property"===e.type?e.value:e,r,n,"object destructuring pattern")});break;default:for(var s=arguments.length,a=Array(s>3?s-3:0),o=3;o<s;o++)a[o-3]=arguments[o];e.call.apply(e,[this,t,r,n].concat(a))}}}),e.extend("checkPropClash",function(){return function(e,t){if(!e.computed&&f(e)){var r=e.key;"__proto__"===("Identifier"===r.type?r.name:String(r.value))&&(t.proto&&this.raise(r.start,"Redefinition of __proto__ property"),t.proto=!0)}}}),e.extend("isStrictBody",function(){return function(e,t){if(!t&&e.body.body.length>0)for(var r=e.body.body,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;if("ExpressionStatement"!==a.type||"Literal"!==a.expression.type)break;if("use strict"===a.expression.value)return!0}return!1}}),e.extend("isValidDirective",function(){return function(e){return!("ExpressionStatement"!==e.type||"Literal"!==e.expression.type||"string"!=typeof e.expression.value||e.expression.extra&&e.expression.extra.parenthesized)}}),e.extend("parseBlockBody",function(e){return function(t){for(var r=this,n=arguments.length,i=Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];e.call.apply(e,[this,t].concat(i)),t.directives.reverse().forEach(function(e){t.body.unshift(r.directiveToStmt(e))}),delete t.directives}}),e.extend("parseClassMethod",function(e){return function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.call.apply(e,[this,t].concat(n));var s=t.body;s[s.length-1].type="MethodDefinition"}}),e.extend("parseExprAtom",function(e){return function(){switch(this.state.type){case j.regexp:return this.estreeParseRegExpLiteral(this.state.value);case j.num:case j.string:return this.estreeParseLiteral(this.state.value);case j._null:return this.estreeParseLiteral(null);case j._true:return this.estreeParseLiteral(!0);case j._false:return this.estreeParseLiteral(!1);default:for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.call.apply(e,[this].concat(r))}}}),e.extend("parseLiteral",function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=e.call.apply(e,[this].concat(r));return i.raw=i.extra.raw,delete i.extra,i}}),e.extend("parseMethod",function(e){return function(t){var r=this.startNode();r.kind=t.kind;for(var n=arguments.length,i=Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];return r=e.call.apply(e,[this,r].concat(i)),delete r.kind,t.value=this.finishNode(r,"FunctionExpression"),t}}),e.extend("parseObjectMethod",function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=e.call.apply(e,[this].concat(r));return i&&("method"===i.kind&&(i.kind="init"),i.type="Property"),i}}),e.extend("parseObjectProperty",function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=e.call.apply(e,[this].concat(r));return i&&(i.kind="init",i.type="Property"),i}}),e.extend("toAssignable",function(e){return function(t,r){for(var n=arguments.length,i=Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];if(f(t))return this.toAssignable.apply(this,[t.value,r].concat(i)),t;if("ObjectExpression"===t.type){t.type="ObjectPattern";for(var a=t.properties,o=Array.isArray(a),u=0,a=o?a:a[Symbol.iterator]();;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;"get"===c.kind||"set"===c.kind?this.raise(c.key.start,"Object pattern can't contain getter or setter"):c.method?this.raise(c.key.start,"Object pattern can't contain methods"):this.toAssignable(c,r,"object destructuring pattern")}return t}return e.call.apply(e,[this,t,r].concat(i))}})},ue=["any","mixed","empty","bool","boolean","number","string","void","null"],le=z.prototype;le.flowParseTypeInitialiser=function(e){var t=this.state.inType;this.state.inType=!0,this.expect(e||j.colon);var r=this.flowParseType();return this.state.inType=t,r},le.flowParsePredicate=function(){var e=this.startNode(),t=this.state.startLoc,r=this.state.start;this.expect(j.modulo);var n=this.state.startLoc;return this.expectContextual("checks"),t.line===n.line&&t.column===n.column-1||this.raise(r,"Spaces between ´%´ and ´checks´ are not allowed here."),this.eat(j.parenL)?(e.expression=this.parseExpression(),this.expect(j.parenR),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")},le.flowParseTypeAndPredicateInitialiser=function(){var e=this.state.inType;this.state.inType=!0,this.expect(j.colon);var t=null,r=null;return this.match(j.modulo)?(this.state.inType=e,r=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(j.modulo)&&(r=this.flowParsePredicate())),[t,r]},le.flowParseDeclareClass=function(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")},le.flowParseDeclareFunction=function(e){this.next();var t=e.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.isRelational("<")?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(j.parenL);var i=this.flowParseFunctionTypeParams();r.params=i.params,r.rest=i.rest,this.expect(j.parenR);var s=null,a=this.flowParseTypeAndPredicateInitialiser();return r.returnType=a[0],s=a[1],n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),n.predicate=s,t.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.finishNode(t,t.type),this.semicolon(),this.finishNode(e,"DeclareFunction")},le.flowParseDeclare=function(e){return this.match(j._class)?this.flowParseDeclareClass(e):this.match(j._function)?this.flowParseDeclareFunction(e):this.match(j._var)?this.flowParseDeclareVariable(e):this.isContextual("module")?this.lookahead().type===j.dot?this.flowParseDeclareModuleExports(e):this.flowParseDeclareModule(e):this.isContextual("type")?this.flowParseDeclareTypeAlias(e):this.isContextual("interface")?this.flowParseDeclareInterface(e):void this.unexpected()},le.flowParseDeclareVariable=function(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(),this.semicolon(),this.finishNode(e,"DeclareVariable")},le.flowParseDeclareModule=function(e){this.next(),this.match(j.string)?e.id=this.parseExprAtom():e.id=this.parseIdentifier();var t=e.body=this.startNode(),r=t.body=[];for(this.expect(j.braceL);!this.match(j.braceR);){var n=this.startNode();if(this.match(j._import)){var i=this.lookahead();"type"!==i.value&&"typeof"!==i.value&&this.unexpected(null,"Imports within a `declare module` body must always be `import type` or `import typeof`"),this.parseImport(n)}else this.expectContextual("declare","Only declares and type imports are allowed inside declare module"),n=this.flowParseDeclare(n,!0);r.push(n)}return this.expect(j.braceR),this.finishNode(t,"BlockStatement"),this.finishNode(e,"DeclareModule")},le.flowParseDeclareModuleExports=function(e){return this.expectContextual("module"),this.expect(j.dot),this.expectContextual("exports"),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")},le.flowParseDeclareTypeAlias=function(e){return this.next(),this.flowParseTypeAlias(e),this.finishNode(e,"DeclareTypeAlias")},le.flowParseDeclareInterface=function(e){return this.next(),this.flowParseInterfaceish(e),this.finishNode(e,"DeclareInterface")},le.flowParseInterfaceish=function(e,t){if(e.id=this.parseIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],e.mixins=[],this.eat(j._extends))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(j.comma));if(this.isContextual("mixins")){this.next();do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(j.comma))}e.body=this.flowParseObjectType(t)},le.flowParseInterfaceExtends=function(){var e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")},le.flowParseInterface=function(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")},le.flowParseRestrictedIdentifier=function(e){
+return ue.indexOf(this.state.value)>-1&&this.raise(this.state.start,"Cannot overwrite primitive type "+this.state.value),this.parseIdentifier(e)},le.flowParseTypeAlias=function(e){return e.id=this.flowParseRestrictedIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(j.eq),this.semicolon(),this.finishNode(e,"TypeAlias")},le.flowParseTypeParameter=function(){var e=this.startNode(),t=this.flowParseVariance(),r=this.flowParseTypeAnnotatableIdentifier();return e.name=r.name,e.variance=t,e.bound=r.typeAnnotation,this.match(j.eq)&&(this.eat(j.eq),e.default=this.flowParseType()),this.finishNode(e,"TypeParameter")},le.flowParseTypeParameterDeclaration=function(){var e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.isRelational("<")||this.match(j.jsxTagStart)?this.next():this.unexpected();do{t.params.push(this.flowParseTypeParameter()),this.isRelational(">")||this.expect(j.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")},le.flowParseTypeParameterInstantiation=function(){var e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flowParseType()),this.isRelational(">")||this.expect(j.comma);return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")},le.flowParseObjectPropertyKey=function(){return this.match(j.num)||this.match(j.string)?this.parseExprAtom():this.parseIdentifier(!0)},le.flowParseObjectTypeIndexer=function(e,t,r){return e.static=t,this.expect(j.bracketL),this.lookahead().type===j.colon?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(j.bracketR),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeIndexer")},le.flowParseObjectTypeMethodish=function(e){for(e.params=[],e.rest=null,e.typeParameters=null,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(j.parenL);this.match(j.name);)e.params.push(this.flowParseFunctionTypeParam()),this.match(j.parenR)||this.expect(j.comma);return this.eat(j.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),this.expect(j.parenR),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")},le.flowParseObjectTypeMethod=function(e,t,r,n){var i=this.startNodeAt(e,t);return i.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e,t)),i.static=r,i.key=n,i.optional=!1,this.flowObjectTypeSemicolon(),this.finishNode(i,"ObjectTypeProperty")},le.flowParseObjectTypeCallProperty=function(e,t){var r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeCallProperty")},le.flowParseObjectType=function(e,t){var r=this.state.inType;this.state.inType=!0;var n=this.startNode(),i=void 0,s=void 0,a=!1;n.callProperties=[],n.properties=[],n.indexers=[];var o=void 0,u=void 0;for(t&&this.match(j.braceBarL)?(this.expect(j.braceBarL),o=j.braceBarR,u=!0):(this.expect(j.braceL),o=j.braceR,u=!1),n.exact=u;!this.match(o);){var l=!1,c=this.state.start,p=this.state.startLoc;i=this.startNode(),e&&this.isContextual("static")&&this.lookahead().type!==j.colon&&(this.next(),a=!0);var h=this.state.start,f=this.flowParseVariance();this.match(j.bracketL)?n.indexers.push(this.flowParseObjectTypeIndexer(i,a,f)):this.match(j.parenL)||this.isRelational("<")?(f&&this.unexpected(h),n.callProperties.push(this.flowParseObjectTypeCallProperty(i,a))):(s=this.flowParseObjectPropertyKey(),this.isRelational("<")||this.match(j.parenL)?(f&&this.unexpected(h),n.properties.push(this.flowParseObjectTypeMethod(c,p,a,s))):(this.eat(j.question)&&(l=!0),i.key=s,i.value=this.flowParseTypeInitialiser(),i.optional=l,i.static=a,i.variance=f,this.flowObjectTypeSemicolon(),n.properties.push(this.finishNode(i,"ObjectTypeProperty")))),a=!1}this.expect(o);var d=this.finishNode(n,"ObjectTypeAnnotation");return this.state.inType=r,d},le.flowObjectTypeSemicolon=function(){this.eat(j.semi)||this.eat(j.comma)||this.match(j.braceR)||this.match(j.braceBarR)||this.unexpected()},le.flowParseQualifiedTypeIdentifier=function(e,t,r){e=e||this.state.start,t=t||this.state.startLoc;for(var n=r||this.parseIdentifier();this.eat(j.dot);){var i=this.startNodeAt(e,t);i.qualification=n,i.id=this.parseIdentifier(),n=this.finishNode(i,"QualifiedTypeIdentifier")}return n},le.flowParseGenericType=function(e,t,r){var n=this.startNodeAt(e,t);return n.typeParameters=null,n.id=this.flowParseQualifiedTypeIdentifier(e,t,r),this.isRelational("<")&&(n.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(n,"GenericTypeAnnotation")},le.flowParseTypeofType=function(){var e=this.startNode();return this.expect(j._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")},le.flowParseTupleType=function(){var e=this.startNode();for(e.types=[],this.expect(j.bracketL);this.state.pos<this.input.length&&!this.match(j.bracketR)&&(e.types.push(this.flowParseType()),!this.match(j.bracketR));)this.expect(j.comma);return this.expect(j.bracketR),this.finishNode(e,"TupleTypeAnnotation")},le.flowParseFunctionTypeParam=function(){var e=null,t=!1,r=null,n=this.startNode(),i=this.lookahead();return i.type===j.colon||i.type===j.question?(e=this.parseIdentifier(),this.eat(j.question)&&(t=!0),r=this.flowParseTypeInitialiser()):r=this.flowParseType(),n.name=e,n.optional=t,n.typeAnnotation=r,this.finishNode(n,"FunctionTypeParam")},le.reinterpretTypeAsFunctionTypeParam=function(e){var t=this.startNodeAt(e.start,e.loc);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,"FunctionTypeParam")},le.flowParseFunctionTypeParams=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={params:e,rest:null};!this.match(j.parenR)&&!this.match(j.ellipsis);)t.params.push(this.flowParseFunctionTypeParam()),this.match(j.parenR)||this.expect(j.comma);return this.eat(j.ellipsis)&&(t.rest=this.flowParseFunctionTypeParam()),t},le.flowIdentToTypeAnnotation=function(e,t,r,n){switch(n.name){case"any":return this.finishNode(r,"AnyTypeAnnotation");case"void":return this.finishNode(r,"VoidTypeAnnotation");case"bool":case"boolean":return this.finishNode(r,"BooleanTypeAnnotation");case"mixed":return this.finishNode(r,"MixedTypeAnnotation");case"empty":return this.finishNode(r,"EmptyTypeAnnotation");case"number":return this.finishNode(r,"NumberTypeAnnotation");case"string":return this.finishNode(r,"StringTypeAnnotation");default:return this.flowParseGenericType(e,t,n)}},le.flowParsePrimaryType=function(){var e=this.state.start,t=this.state.startLoc,r=this.startNode(),n=void 0,i=void 0,s=!1,a=this.state.noAnonFunctionType;switch(this.state.type){case j.name:return this.flowIdentToTypeAnnotation(e,t,r,this.parseIdentifier());case j.braceL:return this.flowParseObjectType(!1,!1);case j.braceBarL:return this.flowParseObjectType(!1,!0);case j.bracketL:return this.flowParseTupleType();case j.relational:if("<"===this.state.value)return r.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(j.parenL),n=this.flowParseFunctionTypeParams(),r.params=n.params,r.rest=n.rest,this.expect(j.parenR),this.expect(j.arrow),r.returnType=this.flowParseType(),this.finishNode(r,"FunctionTypeAnnotation");break;case j.parenL:if(this.next(),!this.match(j.parenR)&&!this.match(j.ellipsis))if(this.match(j.name)){var o=this.lookahead().type;s=o!==j.question&&o!==j.colon}else s=!0;if(s){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(j.comma)||this.match(j.parenR)&&this.lookahead().type===j.arrow))return this.expect(j.parenR),i;this.eat(j.comma)}return n=i?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):this.flowParseFunctionTypeParams(),r.params=n.params,r.rest=n.rest,this.expect(j.parenR),this.expect(j.arrow),r.returnType=this.flowParseType(),r.typeParameters=null,this.finishNode(r,"FunctionTypeAnnotation");case j.string:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case j._true:case j._false:return r.value=this.match(j._true),this.next(),this.finishNode(r,"BooleanLiteralTypeAnnotation");case j.plusMin:if("-"===this.state.value)return this.next(),this.match(j.num)||this.unexpected(null,"Unexpected token, expected number"),this.parseLiteral(-this.state.value,"NumericLiteralTypeAnnotation",r.start,r.loc.start);this.unexpected();case j.num:return this.parseLiteral(this.state.value,"NumericLiteralTypeAnnotation");case j._null:return r.value=this.match(j._null),this.next(),this.finishNode(r,"NullLiteralTypeAnnotation");case j._this:return r.value=this.match(j._this),this.next(),this.finishNode(r,"ThisTypeAnnotation");case j.star:return this.next(),this.finishNode(r,"ExistentialTypeParam");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType()}this.unexpected()},le.flowParsePostfixType=function(){for(var e=this.state.start,t=this.state.startLoc,r=this.flowParsePrimaryType();!this.canInsertSemicolon()&&this.match(j.bracketL);){var n=this.startNodeAt(e,t);n.elementType=r,this.expect(j.bracketL),this.expect(j.bracketR),r=this.finishNode(n,"ArrayTypeAnnotation")}return r},le.flowParsePrefixType=function(){var e=this.startNode();return this.eat(j.question)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()},le.flowParseAnonFunctionWithoutParens=function(){var e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(j.arrow)){var t=this.startNodeAt(e.start,e.loc);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e},le.flowParseIntersectionType=function(){var e=this.startNode();this.eat(j.bitwiseAND);var t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(j.bitwiseAND);)e.types.push(this.flowParseAnonFunctionWithoutParens());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")},le.flowParseUnionType=function(){var e=this.startNode();this.eat(j.bitwiseOR);var t=this.flowParseIntersectionType();for(e.types=[t];this.eat(j.bitwiseOR);)e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")},le.flowParseType=function(){var e=this.state.inType;this.state.inType=!0;var t=this.flowParseUnionType();return this.state.inType=e,t},le.flowParseTypeAnnotation=function(){var e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")},le.flowParseTypeAndPredicateAnnotation=function(){var e=this.startNode(),t=this.flowParseTypeAndPredicateInitialiser();return e.typeAnnotation=t[0],e.predicate=t[1],this.finishNode(e,"TypeAnnotation")},le.flowParseTypeAnnotatableIdentifier=function(){var e=this.flowParseRestrictedIdentifier();return this.match(j.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(e,e.type)),e},le.typeCastToParameter=function(e){return e.expression.typeAnnotation=e.typeAnnotation,this.finishNodeAt(e.expression,e.expression.type,e.typeAnnotation.end,e.typeAnnotation.loc.end)},le.flowParseVariance=function(){var e=null;return this.match(j.plusMin)&&("+"===this.state.value?e="plus":"-"===this.state.value&&(e="minus"),this.next()),e};var ce=function(e){e.extend("parseFunctionBody",function(e){return function(t,r){return this.match(j.colon)&&!r&&(t.returnType=this.flowParseTypeAndPredicateAnnotation()),e.call(this,t,r)}}),e.extend("parseStatement",function(e){return function(t,r){if(this.state.strict&&this.match(j.name)&&"interface"===this.state.value){var n=this.startNode();return this.next(),this.flowParseInterface(n)}return e.call(this,t,r)}}),e.extend("parseExpressionStatement",function(e){return function(t,r){if("Identifier"===r.type)if("declare"===r.name){if(this.match(j._class)||this.match(j.name)||this.match(j._function)||this.match(j._var))return this.flowParseDeclare(t)}else if(this.match(j.name)){if("interface"===r.name)return this.flowParseInterface(t);if("type"===r.name)return this.flowParseTypeAlias(t)}return e.call(this,t,r)}}),e.extend("shouldParseExportDeclaration",function(e){return function(){return this.isContextual("type")||this.isContextual("interface")||e.call(this)}}),e.extend("parseConditional",function(e){return function(t,r,n,i,s){if(s&&this.match(j.question)){var a=this.state.clone();try{return e.call(this,t,r,n,i)}catch(e){if(e instanceof SyntaxError)return this.state=a,s.start=e.pos||this.state.start,t;throw e}}return e.call(this,t,r,n,i)}}),e.extend("parseParenItem",function(e){return function(t,r,n){if(t=e.call(this,t,r,n),this.eat(j.question)&&(t.optional=!0),this.match(j.colon)){var i=this.startNodeAt(r,n);return i.expression=t,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return t}}),e.extend("parseExport",function(e){return function(t){return t=e.call(this,t),"ExportNamedDeclaration"===t.type&&(t.exportKind=t.exportKind||"value"),t}}),e.extend("parseExportDeclaration",function(e){return function(t){if(this.isContextual("type")){t.exportKind="type";var r=this.startNode();return this.next(),this.match(j.braceL)?(t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t),null):this.flowParseTypeAlias(r)}if(this.isContextual("interface")){t.exportKind="type";var n=this.startNode();return this.next(),this.flowParseInterface(n)}return e.call(this,t)}}),e.extend("parseClassId",function(e){return function(t){e.apply(this,arguments),this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}}),e.extend("isKeyword",function(e){return function(t){return(!this.state.inType||"void"!==t)&&e.call(this,t)}}),e.extend("readToken",function(e){return function(t){return!this.state.inType||62!==t&&60!==t?e.call(this,t):this.finishOp(j.relational,1)}}),e.extend("jsx_readToken",function(e){return function(){if(!this.state.inType)return e.call(this)}}),e.extend("toAssignable",function(e){return function(t,r,n){return"TypeCastExpression"===t.type?e.call(this,this.typeCastToParameter(t),r,n):e.call(this,t,r,n)}}),e.extend("toAssignableList",function(e){return function(t,r,n){for(var i=0;i<t.length;i++){var s=t[i];s&&"TypeCastExpression"===s.type&&(t[i]=this.typeCastToParameter(s))}return e.call(this,t,r,n)}}),e.extend("toReferencedList",function(){return function(e){for(var t=0;t<e.length;t++){var r=e[t];r&&r._exprListItem&&"TypeCastExpression"===r.type&&this.raise(r.start,"Unexpected type cast")}return e}}),e.extend("parseExprListItem",function(e){return function(){for(var t=this.startNode(),r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];var s=e.call.apply(e,[this].concat(n));return this.match(j.colon)?(t._exprListItem=!0,t.expression=s,t.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(t,"TypeCastExpression")):s}}),e.extend("checkLVal",function(e){return function(t){if("TypeCastExpression"!==t.type)return e.apply(this,arguments)}}),e.extend("parseClassProperty",function(e){return function(t){return delete t.variancePos,this.match(j.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),e.call(this,t)}}),e.extend("isClassProperty",function(e){return function(){return this.match(j.colon)||e.call(this)}}),e.extend("parseClassMethod",function(e){return function(t,r){r.variance&&this.unexpected(r.variancePos),delete r.variance,delete r.variancePos,this.isRelational("<")&&(r.typeParameters=this.flowParseTypeParameterDeclaration());for(var n=arguments.length,i=Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];e.call.apply(e,[this,t,r].concat(i))}}),e.extend("parseClassSuper",function(e){return function(t,r){if(e.call(this,t,r),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();var n=t.implements=[];do{var i=this.startNode();i.id=this.parseIdentifier(),this.isRelational("<")?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,n.push(this.finishNode(i,"ClassImplements"))}while(this.eat(j.comma))}}}),e.extend("parsePropertyName",function(e){return function(t){var r=this.state.start,n=this.flowParseVariance(),i=e.call(this,t);return t.variance=n,t.variancePos=r,i}}),e.extend("parseObjPropValue",function(e){return function(t){t.variance&&this.unexpected(t.variancePos),delete t.variance,delete t.variancePos;var r=void 0;this.isRelational("<")&&(r=this.flowParseTypeParameterDeclaration(),this.match(j.parenL)||this.unexpected()),e.apply(this,arguments),r&&((t.value||t).typeParameters=r)}}),e.extend("parseAssignableListItemTypes",function(){return function(e){return this.eat(j.question)&&(e.optional=!0),this.match(j.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),this.finishNode(e,e.type),e}}),e.extend("parseMaybeDefault",function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=e.apply(this,r);return"AssignmentPattern"===i.type&&i.typeAnnotation&&i.right.start<i.typeAnnotation.start&&this.raise(i.typeAnnotation.start,"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`"),i}}),e.extend("parseImportSpecifiers",function(e){return function(t){t.importKind="value";var r=null;if(this.match(j._typeof)?r="typeof":this.isContextual("type")&&(r="type"),r){var n=this.lookahead();(n.type===j.name&&"from"!==n.value||n.type===j.braceL||n.type===j.star)&&(this.next(),t.importKind=r)}e.call(this,t)}}),e.extend("parseImportSpecifier",function(){return function(e){var t=this.startNode(),r=this.state.start,n=this.parseIdentifier(!0),i=null;"type"===n.name?i="type":"typeof"===n.name&&(i="typeof");var s=!1;if(this.isContextual("as")){var a=this.parseIdentifier(!0);null===i||this.match(j.name)||this.state.type.keyword?(t.imported=n,t.importKind=null,t.local=this.parseIdentifier()):(t.imported=a,t.importKind=i,t.local=a.__clone())}else null!==i&&(this.match(j.name)||this.state.type.keyword)?(t.imported=this.parseIdentifier(!0),t.importKind=i,this.eatContextual("as")?t.local=this.parseIdentifier():(s=!0,t.local=t.imported.__clone())):(s=!0,t.imported=n,t.importKind=null,t.local=t.imported.__clone());"type"!==e.importKind&&"typeof"!==e.importKind||"type"!==t.importKind&&"typeof"!==t.importKind||this.raise(r,"`The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements`"),s&&this.checkReservedWord(t.local.name,t.start,!0,!0),this.checkLVal(t.local,!0,void 0,"import specifier"),e.specifiers.push(this.finishNode(t,"ImportSpecifier"))}}),e.extend("parseFunctionParams",function(e){return function(t){this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),e.call(this,t)}}),e.extend("parseVarHead",function(e){return function(t){e.call(this,t),this.match(j.colon)&&(t.id.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(t.id,t.id.type))}}),e.extend("parseAsyncArrowFromCallExpression",function(e){return function(t,r){if(this.match(j.colon)){var n=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,t.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=n}return e.call(this,t,r)}}),e.extend("shouldParseAsyncArrow",function(e){return function(){return this.match(j.colon)||e.call(this)}}),e.extend("parseMaybeAssign",function(e){return function(){for(var t=null,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];if(j.jsxTagStart&&this.match(j.jsxTagStart)){var s=this.state.clone();try{return e.apply(this,n)}catch(e){if(!(e instanceof SyntaxError))throw e;this.state=s,t=e}}if(this.state.context.push(U.parenExpression),null!=t||this.isRelational("<")){var a=void 0,o=void 0;try{o=this.flowParseTypeParameterDeclaration(),a=e.apply(this,n),a.typeParameters=o,a.start=o.start,a.loc.start=o.loc.start}catch(e){throw t||e}if("ArrowFunctionExpression"===a.type)return a;if(null!=t)throw t;this.raise(o.start,"Expected an arrow function after this type parameter declaration")}return this.state.context.pop(),e.apply(this,n)}}),e.extend("parseArrow",function(e){return function(t){if(this.match(j.colon)){var r=this.state.clone();try{var n=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;var i=this.flowParseTypeAndPredicateAnnotation();this.state.noAnonFunctionType=n,this.canInsertSemicolon()&&this.unexpected(),this.match(j.arrow)||this.unexpected(),t.returnType=i}catch(e){if(!(e instanceof SyntaxError))throw e;this.state=r}}return e.call(this,t)}}),e.extend("shouldParseArrow",function(e){return function(){return this.match(j.colon)||e.call(this)}}),e.extend("isClassMutatorStarter",function(e){return function(){return!!this.isRelational("<")||e.call(this)}})},pe=String.fromCodePoint;if(!pe){var he=String.fromCharCode,fe=Math.floor;pe=function(){var e=[],t=void 0,r=void 0,n=-1,i=arguments.length;if(!i)return"";for(var s="";++n<i;){var a=Number(arguments[n]);if(!isFinite(a)||a<0||a>1114111||fe(a)!=a)throw RangeError("Invalid code point: "+a);a<=65535?e.push(a):(a-=65536,t=55296+(a>>10),r=a%1024+56320,e.push(t,r)),(n+1==i||e.length>16384)&&(s+=he.apply(null,e),e.length=0)}return s}}var de=pe,me={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:"♦"},ye=/^[\da-fA-F]+$/,ge=/^\d+$/;U.j_oTag=new R("<tag",!1),U.j_cTag=new R("</tag",!1),U.j_expr=new R("<tag>...</tag>",!0,!0),j.jsxName=new P("jsxName"),j.jsxText=new P("jsxText",{beforeExpr:!0}),j.jsxTagStart=new P("jsxTagStart",{startsExpr:!0}),j.jsxTagEnd=new P("jsxTagEnd"),j.jsxTagStart.updateContext=function(){this.state.context.push(U.j_expr),this.state.context.push(U.j_oTag),this.state.exprAllowed=!1},j.jsxTagEnd.updateContext=function(e){var t=this.state.context.pop();t===U.j_oTag&&e===j.slash||t===U.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===U.j_expr):this.state.exprAllowed=!0};var be=z.prototype;be.jsxReadToken=function(){for(var e="",t=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated JSX contents");var r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:return this.state.pos===this.state.start?60===r&&this.state.exprAllowed?(++this.state.pos,this.finishToken(j.jsxTagStart)):this.getTokenFromCode(r):(e+=this.input.slice(t,this.state.pos),this.finishToken(j.jsxText,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:u(r)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}},be.jsxReadNewLine=function(e){var t=this.input.charCodeAt(this.state.pos),r=void 0;return++this.state.pos,13===t&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,r=e?"\n":"\r\n"):r=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,r},be.jsxReadString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;38===n?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos):u(n)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}return t+=this.input.slice(r,this.state.pos++),this.finishToken(j.string,t)},be.jsxReadEntity=function(){for(var e="",t=0,r=void 0,n=this.input[this.state.pos],i=++this.state.pos;this.state.pos<this.input.length&&t++<10;){if(";"===(n=this.input[this.state.pos++])){"#"===e[0]?"x"===e[1]?(e=e.substr(2),ye.test(e)&&(r=de(parseInt(e,16)))):(e=e.substr(1),ge.test(e)&&(r=de(parseInt(e,10)))):r=me[e];break}e+=n}return r||(this.state.pos=i,"&")},be.jsxReadWord=function(){var e=void 0,t=this.state.pos;do{e=this.input.charCodeAt(++this.state.pos)}while(a(e)||45===e);return this.finishToken(j.jsxName,this.input.slice(t,this.state.pos))},be.jsxParseIdentifier=function(){var e=this.startNode();return this.match(j.jsxName)?e.name=this.state.value:this.state.type.keyword?e.name=this.state.type.keyword:this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")},be.jsxParseNamespacedName=function(){var e=this.state.start,t=this.state.startLoc,r=this.jsxParseIdentifier();if(!this.eat(j.colon))return r;var n=this.startNodeAt(e,t);return n.namespace=r,n.name=this.jsxParseIdentifier(),this.finishNode(n,"JSXNamespacedName")},be.jsxParseElementName=function(){for(var e=this.state.start,t=this.state.startLoc,r=this.jsxParseNamespacedName();this.eat(j.dot);){var n=this.startNodeAt(e,t);n.object=r,n.property=this.jsxParseIdentifier(),r=this.finishNode(n,"JSXMemberExpression")}return r},be.jsxParseAttributeValue=function(){var e=void 0;switch(this.state.type){case j.braceL:if(e=this.jsxParseExpressionContainer(),"JSXEmptyExpression"!==e.expression.type)return e;this.raise(e.start,"JSX attributes must only be assigned a non-empty expression");case j.jsxTagStart:case j.string:return e=this.parseExprAtom(),e.extra=null,e;default:this.raise(this.state.start,"JSX value should be either an expression or a quoted JSX text")}},be.jsxParseEmptyExpression=function(){var e=this.startNodeAt(this.state.lastTokEnd,this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.start,this.state.startLoc)},be.jsxParseSpreadChild=function(){var e=this.startNode();return this.expect(j.braceL),this.expect(j.ellipsis),e.expression=this.parseExpression(),this.expect(j.braceR),this.finishNode(e,"JSXSpreadChild")},be.jsxParseExpressionContainer=function(){var e=this.startNode();return this.next(),this.match(j.braceR)?e.expression=this.jsxParseEmptyExpression():e.expression=this.parseExpression(),this.expect(j.braceR),this.finishNode(e,"JSXExpressionContainer")},be.jsxParseAttribute=function(){var e=this.startNode();return this.eat(j.braceL)?(this.expect(j.ellipsis),e.argument=this.parseMaybeAssign(),this.expect(j.braceR),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(j.eq)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))},be.jsxParseOpeningElementAt=function(e,t){var r=this.startNodeAt(e,t);for(r.attributes=[],r.name=this.jsxParseElementName();!this.match(j.slash)&&!this.match(j.jsxTagEnd);)r.attributes.push(this.jsxParseAttribute());return r.selfClosing=this.eat(j.slash),this.expect(j.jsxTagEnd),this.finishNode(r,"JSXOpeningElement")},be.jsxParseClosingElementAt=function(e,t){var r=this.startNodeAt(e,t);return r.name=this.jsxParseElementName(),this.expect(j.jsxTagEnd),this.finishNode(r,"JSXClosingElement")},be.jsxParseElementAt=function(e,t){var r=this.startNodeAt(e,t),n=[],i=this.jsxParseOpeningElementAt(e,t),s=null;if(!i.selfClosing){e:for(;;)switch(this.state.type){case j.jsxTagStart:if(e=this.state.start,t=this.state.startLoc,this.next(),this.eat(j.slash)){s=this.jsxParseClosingElementAt(e,t);break e}n.push(this.jsxParseElementAt(e,t));break;case j.jsxText:n.push(this.parseExprAtom());break;case j.braceL:this.lookahead().type===j.ellipsis?n.push(this.jsxParseSpreadChild()):n.push(this.jsxParseExpressionContainer());break;default:this.unexpected()}d(s.name)!==d(i.name)&&this.raise(s.start,"Expected corresponding JSX closing tag for <"+d(i.name)+">")}return r.openingElement=i,r.closingElement=s,r.children=n,this.match(j.relational)&&"<"===this.state.value&&this.raise(this.state.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(r,"JSXElement")},be.jsxParseElement=function(){var e=this.state.start,t=this.state.startLoc;return this.next(),this.jsxParseElementAt(e,t)};var ve=function(e){e.extend("parseExprAtom",function(e){return function(t){if(this.match(j.jsxText)){var r=this.parseLiteral(this.state.value,"JSXText");return r.extra=null,r}return this.match(j.jsxTagStart)?this.jsxParseElement():e.call(this,t)}}),e.extend("readToken",function(e){return function(t){if(this.state.inPropertyName)return e.call(this,t);var r=this.curContext();if(r===U.j_expr)return this.jsxReadToken();if(r===U.j_oTag||r===U.j_cTag){if(s(t))return this.jsxReadWord();if(62===t)return++this.state.pos,this.finishToken(j.jsxTagEnd);if((34===t||39===t)&&r===U.j_oTag)return this.jsxReadString(t)}return 60===t&&this.state.exprAllowed?(++this.state.pos,this.finishToken(j.jsxTagStart)):e.call(this,t)}}),e.extend("updateContext",function(e){return function(t){if(this.match(j.braceL)){var r=this.curContext();r===U.j_oTag?this.state.context.push(U.braceExpression):r===U.j_expr?this.state.context.push(U.templateQuasi):e.call(this,t),this.state.exprAllowed=!0}else{if(!this.match(j.slash)||t!==j.jsxTagStart)return e.call(this,t);this.state.context.length-=2,this.state.context.push(U.j_cTag),this.state.exprAllowed=!1}}})};W.estree=oe,W.flow=ce,W.jsx=ve,r.parse=m,r.parseExpression=y,r.tokTypes=j},{}],178:[function(e,t,r){function n(e,t,r){e instanceof RegExp&&(e=i(e,r)),t instanceof RegExp&&(t=i(t,r));var n=s(e,t,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+e.length,n[1]),post:r.slice(n[1]+t.length)}}function i(e,t){var r=t.match(e);return r?r[0]:null}function s(e,t,r){var n,i,s,a,o,u=r.indexOf(e),l=r.indexOf(t,u+1),c=u;if(u>=0&&l>0){for(n=[],s=r.length;c>=0&&!o;)c==u?(n.push(c),
+u=r.indexOf(e,c+1)):1==n.length?o=[n.pop(),l]:(i=n.pop(),i<s&&(s=i,a=l),l=r.indexOf(t,c+1)),c=u<l&&u>=0?u:l;n.length&&(o=[s,a])}return o}t.exports=n,n.range=s},{}],179:[function(e,t,r){"use strict";function n(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-n(e)}function s(e){var t,r,i,s,a,o,u=e.length;a=n(e),o=new p(3*u/4-a),i=a>0?u-4:u;var l=0;for(t=0,r=0;t<i;t+=4,r+=3)s=c[e.charCodeAt(t)]<<18|c[e.charCodeAt(t+1)]<<12|c[e.charCodeAt(t+2)]<<6|c[e.charCodeAt(t+3)],o[l++]=s>>16&255,o[l++]=s>>8&255,o[l++]=255&s;return 2===a?(s=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,o[l++]=255&s):1===a&&(s=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,o[l++]=s>>8&255,o[l++]=255&s),o}function a(e){return l[e>>18&63]+l[e>>12&63]+l[e>>6&63]+l[63&e]}function o(e,t,r){for(var n,i=[],s=t;s<r;s+=3)n=(e[s]<<16)+(e[s+1]<<8)+e[s+2],i.push(a(n));return i.join("")}function u(e){for(var t,r=e.length,n=r%3,i="",s=[],a=0,u=r-n;a<u;a+=16383)s.push(o(e,a,a+16383>u?u:a+16383));return 1===n?(t=e[r-1],i+=l[t>>2],i+=l[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=l[t>>10],i+=l[t>>4&63],i+=l[t<<2&63],i+="="),s.push(i),s.join("")}r.byteLength=i,r.toByteArray=s,r.fromByteArray=u;for(var l=[],c=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,d=h.length;f<d;++f)l[f]=h[f],c[h.charCodeAt(f)]=f;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},{}],180:[function(e,t,r){function n(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function i(e){return e.split("\\\\").join(m).split("\\{").join(y).split("\\}").join(g).split("\\,").join(b).split("\\.").join(v)}function s(e){return e.split(m).join("\\").split(y).join("{").split(g).join("}").split(b).join(",").split(v).join(".")}function a(e){if(!e)return[""];var t=[],r=d("{","}",e);if(!r)return e.split(",");var n=r.pre,i=r.body,s=r.post,o=n.split(",");o[o.length-1]+="{"+i+"}";var u=a(s);return s.length&&(o[o.length-1]+=u.shift(),o.push.apply(o,u)),t.push.apply(t,o),t}function o(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),h(i(e),!0).map(s)):[]}function u(e){return"{"+e+"}"}function l(e){return/^-?0\d/.test(e)}function c(e,t){return e<=t}function p(e,t){return e>=t}function h(e,t){var r=[],i=d("{","}",e);if(!i||/\$$/.test(i.pre))return[e];var s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),m=s||o,y=/^(.*,)+(.+)?$/.test(i.body);if(!m&&!y)return i.post.match(/,.*\}/)?(e=i.pre+"{"+i.body+g+i.post,h(e)):[e];var b;if(m)b=i.body.split(/\.\./);else if(b=a(i.body),1===b.length&&(b=h(b[0],!1).map(u),1===b.length)){var v=i.post.length?h(i.post,!1):[""];return v.map(function(e){return i.pre+b[0]+e})}var x,E=i.pre,v=i.post.length?h(i.post,!1):[""];if(m){var A=n(b[0]),D=n(b[1]),C=Math.max(b[0].length,b[1].length),S=3==b.length?Math.abs(n(b[2])):1,_=c;D<A&&(S*=-1,_=p);var w=b.some(l);x=[];for(var k=A;_(k,D);k+=S){var F;if(o)"\\"===(F=String.fromCharCode(k))&&(F="");else if(F=String(k),w){var T=C-F.length;if(T>0){var P=new Array(T+1).join("0");F=k<0?"-"+P+F.slice(1):P+F}}x.push(F)}}else x=f(b,function(e){return h(e,!1)});for(var B=0;B<x.length;B++)for(var O=0;O<v.length;O++){var j=E+x[B]+v[O];(!t||m||j)&&r.push(j)}return r}var f=e("concat-map"),d=e("balanced-match");t.exports=o;var m="\0SLASH"+Math.random()+"\0",y="\0OPEN"+Math.random()+"\0",g="\0CLOSE"+Math.random()+"\0",b="\0COMMA"+Math.random()+"\0",v="\0PERIOD"+Math.random()+"\0"},{"balanced-match":178,"concat-map":186}],181:[function(e,t,r){},{}],182:[function(e,t,r){arguments[4][181][0].apply(r,arguments)},{dup:181}],183:[function(e,t,r){(function(t){"use strict";var n=e("buffer"),i=n.Buffer,s=n.SlowBuffer,a=n.kMaxLength||2147483647;r.alloc=function(e,t,r){if("function"==typeof i.alloc)return i.alloc(e,t,r);if("number"==typeof r)throw new TypeError("encoding must not be number");if("number"!=typeof e)throw new TypeError("size must be a number");if(e>a)throw new RangeError("size is too large");var n=r,s=t;void 0===s&&(n=void 0,s=0);var o=new i(e);if("string"==typeof s)for(var u=new i(s,n),l=u.length,c=-1;++c<e;)o[c]=u[c%l];else o.fill(s);return o},r.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>a)throw new RangeError("size is too large");return new i(e)},r.from=function(e,r,n){if("function"==typeof i.from&&(!t.Uint8Array||Uint8Array.from!==i.from))return i.from(e,r,n);if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("string"==typeof e)return new i(e,r);if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer){var s=r;if(1===arguments.length)return new i(e);void 0===s&&(s=0);var a=n;if(void 0===a&&(a=e.byteLength-s),s>=e.byteLength)throw new RangeError("'offset' is out of bounds");if(a>e.byteLength-s)throw new RangeError("'length' is out of bounds");return new i(e.slice(s,s+a))}if(i.isBuffer(e)){var o=new i(e.length);return e.copy(o,0,0,e.length),o}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.")},r.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>=a)throw new RangeError("size is too large");return new s(e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:184}],184:[function(e,t,r){"use strict";function n(e){if(e>Y)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=i.prototype,t}function i(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return u(e)}return s(e,t,r)}function s(e,t,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return e instanceof ArrayBuffer?p(e,t,r):"string"==typeof e?l(e,t):h(e)}function a(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 o(e,t,r){return a(e),e<=0?n(e):void 0!==t?"string"==typeof r?n(e).fill(t,r):n(e).fill(t):n(e)}function u(e){return a(e),n(e<0?0:0|f(e))}function l(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!i.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var r=0|m(e,t),s=n(r),a=s.write(e,t);return a!==r&&(s=s.slice(0,a)),s}function c(e){for(var t=e.length<0?0:0|f(e.length),r=n(t),i=0;i<t;i+=1)r[i]=255&e[i];return r}function p(e,t,r){if(t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(r||0))throw new RangeError("'length' is out of bounds");var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),n.__proto__=i.prototype,n}function h(e){if(i.isBuffer(e)){var t=0|f(e.length),r=n(t);return 0===r.length?r:(e.copy(r,0,0,t),r)}if(e){if(ArrayBuffer.isView(e)||"length"in e)return"number"!=typeof e.length||W(e.length)?n(0):c(e);if("Buffer"===e.type&&Array.isArray(e.data))return c(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function f(e){if(e>=Y)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Y.toString(16)+" bytes");return 0|e}function d(e){return+e!=e&&(e=0),i.alloc(+e)}function m(e,t){if(i.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return X(e).length;default:if(n)return V(e).length;t=(""+t).toLowerCase(),n=!0}}function y(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return w(this,t,r);case"ascii":return F(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return _(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,s){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=s?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(s)return-1;r=e.length-1}else if(r<0){if(!s)return-1;r=0}if("string"==typeof t&&(t=i.from(t,n)),i.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,s);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){function s(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,o=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,o/=2,u/=2,r/=2}var l;if(i){var c=-1;for(l=r;l<o;l++)if(s(e,l)===s(t,-1===c?0:l-c)){if(-1===c&&(c=l),l-c+1===u)return c*a}else-1!==c&&(l-=l-c),c=-1}else for(r+u>o&&(r=o-u),l=r;l>=0;l--){for(var p=!0,h=0;h<u;h++)if(s(e,l+h)!==s(t,h)){p=!1;break}if(p)return l}return-1}function x(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var a=0;a<n;++a){var o=parseInt(t.substr(2*a,2),16);if(W(o))return a;e[r+a]=o}return a}function E(e,t,r,n){return J(V(t,e.length-r),e,r,n)}function A(e,t,r,n){return J(q(t),e,r,n)}function D(e,t,r,n){return A(e,t,r,n)}function C(e,t,r,n){return J(X(t),e,r,n)}function S(e,t,r,n){return J(G(t,e.length-r),e,r,n)}function _(e,t,r){return 0===t&&r===e.length?K.fromByteArray(e):K.fromByteArray(e.slice(t,r))}function w(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var s=e[i],a=null,o=s>239?4:s>223?3:s>191?2:1;if(i+o<=r){var u,l,c,p;switch(o){case 1:s<128&&(a=s);break;case 2:u=e[i+1],128==(192&u)&&(p=(31&s)<<6|63&u)>127&&(a=p);break;case 3:u=e[i+1],l=e[i+2],128==(192&u)&&128==(192&l)&&(p=(15&s)<<12|(63&u)<<6|63&l)>2047&&(p<55296||p>57343)&&(a=p);break;case 4:u=e[i+1],l=e[i+2],c=e[i+3],128==(192&u)&&128==(192&l)&&128==(192&c)&&(p=(15&s)<<18|(63&u)<<12|(63&l)<<6|63&c)>65535&&p<1114112&&(a=p)}}null===a?(a=65533,o=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=o}return k(n)}function k(e){var t=e.length;if(t<=H)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=H));return r}function F(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function T(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function P(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",s=t;s<r;++s)i+=U(e[s]);return i}function B(e,t,r){for(var n=e.slice(t,r),i="",s=0;s<n.length;s+=2)i+=String.fromCharCode(n[s]+256*n[s+1]);return i}function O(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,r,n,s,a){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<a)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function N(e,t,r,n,i,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function I(e,t,r,n,i){return t=+t,r>>>=0,i||N(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),z.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,i){return t=+t,r>>>=0,i||N(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),z.write(e,t,r,n,52,8),r+8}function M(e){if(e=R(e).replace($,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function R(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function U(e){return e<16?"0"+e.toString(16):e.toString(16)}function V(e,t){t=t||1/0;for(var r,n=e.length,i=null,s=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function q(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function G(e,t){for(var r,n,i,s=[],a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,s.push(i),s.push(n);return s}function X(e){return K.toByteArray(M(e))}function J(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function W(e){return e!==e}var K=e("base64-js"),z=e("ieee754");r.Buffer=i,r.SlowBuffer=d,r.INSPECT_MAX_BYTES=50;var Y=2147483647;r.kMaxLength=Y,i.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),i.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(e,t,r){return s(e,t,r)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(e,t,r){return o(e,t,r)},i.allocUnsafe=function(e){return u(e)},i.allocUnsafeSlow=function(e){return u(e)},i.isBuffer=function(e){return null!=e&&!0===e._isBuffer},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,s=0,a=Math.min(r,n);s<a;++s)if(e[s]!==t[s]){r=e[s],n=t[s];break}return r<n?-1:n<r?1:0},i.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}},i.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return i.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=i.allocUnsafe(t),s=0;for(r=0;r<e.length;++r){var a=e[r];if(!i.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,s),s+=a.length}return n},i.byteLength=m,i.prototype._isBuffer=!0,i.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)g(this,t,t+1);return this},i.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)g(this,t,t+3),g(this,t+1,t+2);return this},i.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)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},i.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?w(this,0,e):y.apply(this,arguments)},i.prototype.equals=function(e){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===i.compare(this,e)},i.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},i.prototype.compare=function(e,t,r,n,s){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===s&&(s=this.length),t<0||r>e.length||n<0||s>this.length)throw new RangeError("out of range index");if(n>=s&&t>=r)return 0;if(n>=s)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,s>>>=0,this===e)return 0;for(var a=s-n,o=r-t,u=Math.min(a,o),l=this.slice(n,s),c=e.slice(t,r),p=0;p<u;++p)if(l[p]!==c[p]){a=l[p],o=c[p];break}return a<o?-1:o<a?1:0},i.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},i.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},i.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},i.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return x(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":return A(this,e,t,r);case"latin1":case"binary":return D(this,e,t,r);case"base64":return C(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var H=4096;i.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return n.__proto__=i.prototype,n},i.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return n},i.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},i.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},i.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=t,i=1,s=this[e+--n];n>0&&(i*=256);)s+=this[e+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},i.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e>>>=0,t||O(e,4,this.length),z.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),z.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),z.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),z.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){j(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=1,s=0;for(this[t]=255&e;++s<r&&(i*=256);)this[t+s]=e/i&255;return t+r},i.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){j(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},i.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},i.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var s=0,a=1,o=0;for(this[t]=255&e;++s<r&&(a*=256);)e<0&&0===o&&0!==this[t+s-1]&&(o=1),this[t+s]=(e/a>>0)-o&255;return t+r},i.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var s=r-1,a=1,o=0;for(this[t+s]=255&e;--s>=0&&(a*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/a>>0)-o&255;return t+r},i.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeFloatLE=function(e,t,r){return I(this,e,t,!0,r)},i.prototype.writeFloatBE=function(e,t,r){return I(this,e,t,!1,r)},i.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},i.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},i.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,s=n-r;if(this===e&&r<t&&t<n)for(i=s-1;i>=0;--i)e[i+t]=this[i+r];else if(s<1e3)for(i=0;i<s;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+s),t);return s},i.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var s=e.charCodeAt(0);s<256&&(e=s)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!i.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a<r;++a)this[a]=e;else{var o=i.isBuffer(e)?e:new i(e,n),u=o.length;for(a=0;a<r-t;++a)this[a+t]=o[a%u]}return this};var $=/[^+\/0-9A-Za-z-_]/g},{"base64-js":179,ieee754:305}],185:[function(e,t,r){(function(r){"use strict";function n(e){this.enabled=e&&void 0!==e.enabled?e.enabled:c}function i(e){var t=function(){return s.apply(t,arguments)};return t._styles=e,t.enabled=this.enabled,t.__proto__=d,t}function s(){var e=arguments,t=e.length,r=0!==t&&String(arguments[0]);if(t>1)for(var n=1;n<t;n++)r+=" "+e[n];if(!this.enabled||!r)return r;var i=this._styles,s=i.length,a=o.dim.open;for(!h||-1===i.indexOf("gray")&&-1===i.indexOf("grey")||(o.dim.open="");s--;){var u=o[i[s]];r=u.open+r.replace(u.closeRe,u.open)+u.close}return o.dim.open=a,r}var a=e("escape-string-regexp"),o=e("ansi-styles"),u=e("strip-ansi"),l=e("has-ansi"),c=e("supports-color"),p=Object.defineProperties,h="win32"===r.platform&&!/^xterm/i.test(r.env.TERM);h&&(o.blue.open="");var f=function(){var e={};return Object.keys(o).forEach(function(t){o[t].closeRe=new RegExp(a(o[t].close),"g"),e[t]={get:function(){return i.call(this,this._styles.concat(t))}}}),e}(),d=p(function(){},f);p(n.prototype,function(){var e={};return Object.keys(f).forEach(function(t){e[t]={get:function(){return i.call(this,[t])}}}),e}()),t.exports=new n,t.exports.styles=o,t.exports.hasColor=l,t.exports.stripColor=u,t.exports.supportsColor=c}).call(this,e("_process"))},{_process:539,"ansi-styles":2,"escape-string-regexp":300,"has-ansi":304,"strip-ansi":592,"supports-color":593}],186:[function(e,t,r){t.exports=function(e,t){for(var r=[],i=0;i<e.length;i++){var s=t(e[i],i);n(s)?r.push.apply(r,s):r.push(s)}return r};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],187:[function(e,t,r){(function(t){"use strict";function n(e){return new t(e,"base64").toString()}function i(e){return e.split(",").pop()}function s(e,t){var r=p.exec(e);p.lastIndex=0;var n=r[1]||r[2],i=l.join(t,n);try{return u.readFileSync(i,"utf8")}catch(e){throw new Error("An error occurred while trying to read the map file at "+i+"\n"+e)}}function a(e,t){t=t||{},t.isFileComment&&(e=s(e,t.commentFileDir)),t.hasComment&&(e=i(e)),t.isEncoded&&(e=n(e)),(t.isJSON||t.isEncoded)&&(e=JSON.parse(e)),this.sourcemap=e}function o(e){for(var t,n=e.split("\n"),i=n.length-1;i>0;i--)if(t=n[i],~t.indexOf("sourceMappingURL=data:"))return r.fromComment(t)}var u=e("fs"),l=e("path"),c=/^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+;)?base64,(.*)$/gm,p=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/gm;a.prototype.toJSON=function(e){return JSON.stringify(this.sourcemap,null,e)},a.prototype.toBase64=function(){var e=this.toJSON();return new t(e).toString("base64")},a.prototype.toComment=function(e){var t=this.toBase64(),r="sourceMappingURL=data:application/json;base64,"+t;return e&&e.multiline?"/*# "+r+" */":"//# "+r},a.prototype.toObject=function(){return JSON.parse(this.toJSON())},a.prototype.addProperty=function(e,t){if(this.sourcemap.hasOwnProperty(e))throw new Error("property %s already exists on the sourcemap, use set property instead");return this.setProperty(e,t)},a.prototype.setProperty=function(e,t){return this.sourcemap[e]=t,this},a.prototype.getProperty=function(e){return this.sourcemap[e]},r.fromObject=function(e){return new a(e)},r.fromJSON=function(e){return new a(e,{isJSON:!0})},r.fromBase64=function(e){return new a(e,{isEncoded:!0})},r.fromComment=function(e){return e=e.replace(/^\/\*/g,"//").replace(/\*\/$/g,""),new a(e,{isEncoded:!0,hasComment:!0})},r.fromMapFileComment=function(e,t){return new a(e,{commentFileDir:t,isFileComment:!0,isJSON:!0})},r.fromSource=function(e,t){if(t){var n=o(e);return n||null}var i=e.match(c);return c.lastIndex=0,i?r.fromComment(i.pop()):null},r.fromMapFileSource=function(e,t){var n=e.match(p);return p.lastIndex=0,n?r.fromMapFileComment(n.pop(),t):null},r.removeComments=function(e){return c.lastIndex=0,e.replace(c,"")},r.removeMapFileComments=function(e){return p.lastIndex=0,e.replace(p,"")},Object.defineProperty(r,"commentRegex",{get:function(){return c.lastIndex=0,c}}),Object.defineProperty(r,"mapFileCommentRegex",{get:function(){return p.lastIndex=0,p}})}).call(this,e("buffer").Buffer)},{buffer:184,fs:182,path:535}],188:[function(e,t,r){e("../modules/web.dom.iterable"),e("../modules/es6.string.iterator"),t.exports=e("../modules/core.get-iterator")},{"../modules/core.get-iterator":277,"../modules/es6.string.iterator":286,"../modules/web.dom.iterable":293}],189:[function(e,t,r){var n=e("../../modules/_core"),i=n.JSON||(n.JSON={stringify:JSON.stringify});t.exports=function(e){return i.stringify.apply(i,arguments)}},{"../../modules/_core":217}],190:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/es6.string.iterator"),e("../modules/web.dom.iterable"),e("../modules/es6.map"),e("../modules/es7.map.to-json"),t.exports=e("../modules/_core").Map},{"../modules/_core":217,"../modules/es6.map":279,"../modules/es6.object.to-string":285,"../modules/es6.string.iterator":286,"../modules/es7.map.to-json":290,"../modules/web.dom.iterable":293}],191:[function(e,t,r){e("../../modules/es6.number.max-safe-integer"),t.exports=9007199254740991},{"../../modules/es6.number.max-safe-integer":280}],192:[function(e,t,r){e("../../modules/es6.object.assign"),t.exports=e("../../modules/_core").Object.assign},{"../../modules/_core":217,"../../modules/es6.object.assign":281}],193:[function(e,t,r){e("../../modules/es6.object.create");var n=e("../../modules/_core").Object;t.exports=function(e,t){return n.create(e,t)}},{"../../modules/_core":217,"../../modules/es6.object.create":282}],194:[function(e,t,r){e("../../modules/es6.symbol"),t.exports=e("../../modules/_core").Object.getOwnPropertySymbols},{"../../modules/_core":217,"../../modules/es6.symbol":287}],195:[function(e,t,r){e("../../modules/es6.object.keys"),t.exports=e("../../modules/_core").Object.keys},{"../../modules/_core":217,"../../modules/es6.object.keys":283}],196:[function(e,t,r){e("../../modules/es6.object.set-prototype-of"),t.exports=e("../../modules/_core").Object.setPrototypeOf},{"../../modules/_core":217,"../../modules/es6.object.set-prototype-of":284}],197:[function(e,t,r){e("../../modules/es6.symbol"),t.exports=e("../../modules/_core").Symbol.for},{"../../modules/_core":217,"../../modules/es6.symbol":287}],198:[function(e,t,r){e("../../modules/es6.symbol"),e("../../modules/es6.object.to-string"),e("../../modules/es7.symbol.async-iterator"),e("../../modules/es7.symbol.observable"),t.exports=e("../../modules/_core").Symbol},{"../../modules/_core":217,"../../modules/es6.object.to-string":285,"../../modules/es6.symbol":287,"../../modules/es7.symbol.async-iterator":291,"../../modules/es7.symbol.observable":292}],199:[function(e,t,r){e("../../modules/es6.string.iterator"),e("../../modules/web.dom.iterable"),t.exports=e("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":274,"../../modules/es6.string.iterator":286,"../../modules/web.dom.iterable":293}],200:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/web.dom.iterable"),e("../modules/es6.weak-map"),t.exports=e("../modules/_core").WeakMap},{"../modules/_core":217,"../modules/es6.object.to-string":285,"../modules/es6.weak-map":288,"../modules/web.dom.iterable":293}],201:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/web.dom.iterable"),e("../modules/es6.weak-set"),
+t.exports=e("../modules/_core").WeakSet},{"../modules/_core":217,"../modules/es6.object.to-string":285,"../modules/es6.weak-set":289,"../modules/web.dom.iterable":293}],202:[function(e,t,r){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},{}],203:[function(e,t,r){t.exports=function(){}},{}],204:[function(e,t,r){t.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},{}],205:[function(e,t,r){var n=e("./_is-object");t.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},{"./_is-object":235}],206:[function(e,t,r){var n=e("./_for-of");t.exports=function(e,t){var r=[];return n(e,!1,r.push,r,t),r}},{"./_for-of":226}],207:[function(e,t,r){var n=e("./_to-iobject"),i=e("./_to-length"),s=e("./_to-index");t.exports=function(e){return function(t,r,a){var o,u=n(t),l=i(u.length),c=s(a,l);if(e&&r!=r){for(;l>c;)if((o=u[c++])!=o)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===r)return e||c||0;return!e&&-1}}},{"./_to-index":266,"./_to-iobject":268,"./_to-length":269}],208:[function(e,t,r){var n=e("./_ctx"),i=e("./_iobject"),s=e("./_to-object"),a=e("./_to-length"),o=e("./_array-species-create");t.exports=function(e,t){var r=1==e,u=2==e,l=3==e,c=4==e,p=6==e,h=5==e||p,f=t||o;return function(t,o,d){for(var m,y,g=s(t),b=i(g),v=n(o,d,3),x=a(b.length),E=0,A=r?f(t,x):u?f(t,0):void 0;x>E;E++)if((h||E in b)&&(m=b[E],y=v(m,E,g),e))if(r)A[E]=y;else if(y)switch(e){case 3:return!0;case 5:return m;case 6:return E;case 2:A.push(m)}else if(c)return!1;return p?-1:l||c?c:A}}},{"./_array-species-create":210,"./_ctx":218,"./_iobject":232,"./_to-length":269,"./_to-object":270}],209:[function(e,t,r){var n=e("./_is-object"),i=e("./_is-array"),s=e("./_wks")("species");t.exports=function(e){var t;return i(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!i(t.prototype)||(t=void 0),n(t)&&null===(t=t[s])&&(t=void 0)),void 0===t?Array:t}},{"./_is-array":234,"./_is-object":235,"./_wks":275}],210:[function(e,t,r){var n=e("./_array-species-constructor");t.exports=function(e,t){return new(n(e))(t)}},{"./_array-species-constructor":209}],211:[function(e,t,r){var n=e("./_cof"),i=e("./_wks")("toStringTag"),s="Arguments"==n(function(){return arguments}()),a=function(e,t){try{return e[t]}catch(e){}};t.exports=function(e){var t,r,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=a(t=Object(e),i))?r:s?n(t):"Object"==(o=n(t))&&"function"==typeof t.callee?"Arguments":o}},{"./_cof":212,"./_wks":275}],212:[function(e,t,r){var n={}.toString;t.exports=function(e){return n.call(e).slice(8,-1)}},{}],213:[function(e,t,r){"use strict";var n=e("./_object-dp").f,i=e("./_object-create"),s=e("./_redefine-all"),a=e("./_ctx"),o=e("./_an-instance"),u=e("./_defined"),l=e("./_for-of"),c=e("./_iter-define"),p=e("./_iter-step"),h=e("./_set-species"),f=e("./_descriptors"),d=e("./_meta").fastKey,m=f?"_s":"size",y=function(e,t){var r,n=d(t);if("F"!==n)return e._i[n];for(r=e._f;r;r=r.n)if(r.k==t)return r};t.exports={getConstructor:function(e,t,r,c){var p=e(function(e,n){o(e,p,t,"_i"),e._i=i(null),e._f=void 0,e._l=void 0,e[m]=0,void 0!=n&&l(n,r,e[c],e)});return s(p.prototype,{clear:function(){for(var e=this,t=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete t[r.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var t=this,r=y(t,e);if(r){var n=r.n,i=r.p;delete t._i[r.i],r.r=!0,i&&(i.n=n),n&&(n.p=i),t._f==r&&(t._f=n),t._l==r&&(t._l=i),t[m]--}return!!r},forEach:function(e){o(this,p,"forEach");for(var t,r=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(r(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!y(this,e)}}),f&&n(p.prototype,"size",{get:function(){return u(this[m])}}),p},def:function(e,t,r){var n,i,s=y(e,t);return s?s.v=r:(e._l=s={i:i=d(t,!0),k:t,v:r,p:n=e._l,n:void 0,r:!1},e._f||(e._f=s),n&&(n.n=s),e[m]++,"F"!==i&&(e._i[i]=s)),e},getEntry:y,setStrong:function(e,t,r){c(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,r=e._l;r&&r.r;)r=r.p;return e._t&&(e._l=r=r?r.n:e._t._f)?"keys"==t?p(0,r.k):"values"==t?p(0,r.v):p(0,[r.k,r.v]):(e._t=void 0,p(1))},r?"entries":"values",!r,!0),h(t)}}},{"./_an-instance":204,"./_ctx":218,"./_defined":219,"./_descriptors":220,"./_for-of":226,"./_iter-define":238,"./_iter-step":239,"./_meta":243,"./_object-create":245,"./_object-dp":246,"./_redefine-all":258,"./_set-species":261}],214:[function(e,t,r){var n=e("./_classof"),i=e("./_array-from-iterable");t.exports=function(e){return function(){if(n(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},{"./_array-from-iterable":206,"./_classof":211}],215:[function(e,t,r){"use strict";var n=e("./_redefine-all"),i=e("./_meta").getWeak,s=e("./_an-object"),a=e("./_is-object"),o=e("./_an-instance"),u=e("./_for-of"),l=e("./_array-methods"),c=e("./_has"),p=l(5),h=l(6),f=0,d=function(e){return e._l||(e._l=new m)},m=function(){this.a=[]},y=function(e,t){return p(e.a,function(e){return e[0]===t})};m.prototype={get:function(e){var t=y(this,e);if(t)return t[1]},has:function(e){return!!y(this,e)},set:function(e,t){var r=y(this,e);r?r[1]=t:this.a.push([e,t])},delete:function(e){var t=h(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},t.exports={getConstructor:function(e,t,r,s){var l=e(function(e,n){o(e,l,t,"_i"),e._i=f++,e._l=void 0,void 0!=n&&u(n,r,e[s],e)});return n(l.prototype,{delete:function(e){if(!a(e))return!1;var t=i(e);return!0===t?d(this).delete(e):t&&c(t,this._i)&&delete t[this._i]},has:function(e){if(!a(e))return!1;var t=i(e);return!0===t?d(this).has(e):t&&c(t,this._i)}}),l},def:function(e,t,r){var n=i(s(t),!0);return!0===n?d(e).set(t,r):n[e._i]=r,e},ufstore:d}},{"./_an-instance":204,"./_an-object":205,"./_array-methods":208,"./_for-of":226,"./_has":228,"./_is-object":235,"./_meta":243,"./_redefine-all":258}],216:[function(e,t,r){"use strict";var n=e("./_global"),i=e("./_export"),s=e("./_meta"),a=e("./_fails"),o=e("./_hide"),u=e("./_redefine-all"),l=e("./_for-of"),c=e("./_an-instance"),p=e("./_is-object"),h=e("./_set-to-string-tag"),f=e("./_object-dp").f,d=e("./_array-methods")(0),m=e("./_descriptors");t.exports=function(e,t,r,y,g,b){var v=n[e],x=v,E=g?"set":"add",A=x&&x.prototype,D={};return m&&"function"==typeof x&&(b||A.forEach&&!a(function(){(new x).entries().next()}))?(x=t(function(t,r){c(t,x,e,"_c"),t._c=new v,void 0!=r&&l(r,g,t[E],t)}),d("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in A&&(!b||"clear"!=e)&&o(x.prototype,e,function(r,n){if(c(this,x,e),!t&&b&&!p(r))return"get"==e&&void 0;var i=this._c[e](0===r?0:r,n);return t?this:i})}),"size"in A&&f(x.prototype,"size",{get:function(){return this._c.size}})):(x=y.getConstructor(t,e,g,E),u(x.prototype,r),s.NEED=!0),h(x,e),D[e]=x,i(i.G+i.W+i.F,D),b||y.setStrong(x,e,g),x}},{"./_an-instance":204,"./_array-methods":208,"./_descriptors":220,"./_export":224,"./_fails":225,"./_for-of":226,"./_global":227,"./_hide":229,"./_is-object":235,"./_meta":243,"./_object-dp":246,"./_redefine-all":258,"./_set-to-string-tag":262}],217:[function(e,t,r){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},{}],218:[function(e,t,r){var n=e("./_a-function");t.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},{"./_a-function":202}],219:[function(e,t,r){t.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},{}],220:[function(e,t,r){t.exports=!e("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":225}],221:[function(e,t,r){var n=e("./_is-object"),i=e("./_global").document,s=n(i)&&n(i.createElement);t.exports=function(e){return s?i.createElement(e):{}}},{"./_global":227,"./_is-object":235}],222:[function(e,t,r){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],223:[function(e,t,r){var n=e("./_object-keys"),i=e("./_object-gops"),s=e("./_object-pie");t.exports=function(e){var t=n(e),r=i.f;if(r)for(var a,o=r(e),u=s.f,l=0;o.length>l;)u.call(e,a=o[l++])&&t.push(a);return t}},{"./_object-gops":251,"./_object-keys":254,"./_object-pie":255}],224:[function(e,t,r){var n=e("./_global"),i=e("./_core"),s=e("./_ctx"),a=e("./_hide"),o=function(e,t,r){var u,l,c,p=e&o.F,h=e&o.G,f=e&o.S,d=e&o.P,m=e&o.B,y=e&o.W,g=h?i:i[t]||(i[t]={}),b=g.prototype,v=h?n:f?n[t]:(n[t]||{}).prototype;h&&(r=t);for(u in r)(l=!p&&v&&void 0!==v[u])&&u in g||(c=l?v[u]:r[u],g[u]=h&&"function"!=typeof v[u]?r[u]:m&&l?s(c,n):y&&v[u]==c?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(c):d&&"function"==typeof c?s(Function.call,c):c,d&&((g.virtual||(g.virtual={}))[u]=c,e&o.R&&b&&!b[u]&&a(b,u,c)))};o.F=1,o.G=2,o.S=4,o.P=8,o.B=16,o.W=32,o.U=64,o.R=128,t.exports=o},{"./_core":217,"./_ctx":218,"./_global":227,"./_hide":229}],225:[function(e,t,r){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],226:[function(e,t,r){var n=e("./_ctx"),i=e("./_iter-call"),s=e("./_is-array-iter"),a=e("./_an-object"),o=e("./_to-length"),u=e("./core.get-iterator-method"),l={},c={},r=t.exports=function(e,t,r,p,h){var f,d,m,y,g=h?function(){return e}:u(e),b=n(r,p,t?2:1),v=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(s(g)){for(f=o(e.length);f>v;v++)if((y=t?b(a(d=e[v])[0],d[1]):b(e[v]))===l||y===c)return y}else for(m=g.call(e);!(d=m.next()).done;)if((y=i(m,b,d.value,t))===l||y===c)return y};r.BREAK=l,r.RETURN=c},{"./_an-object":205,"./_ctx":218,"./_is-array-iter":233,"./_iter-call":236,"./_to-length":269,"./core.get-iterator-method":276}],227:[function(e,t,r){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},{}],228:[function(e,t,r){var n={}.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}},{}],229:[function(e,t,r){var n=e("./_object-dp"),i=e("./_property-desc");t.exports=e("./_descriptors")?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},{"./_descriptors":220,"./_object-dp":246,"./_property-desc":257}],230:[function(e,t,r){t.exports=e("./_global").document&&document.documentElement},{"./_global":227}],231:[function(e,t,r){t.exports=!e("./_descriptors")&&!e("./_fails")(function(){return 7!=Object.defineProperty(e("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":220,"./_dom-create":221,"./_fails":225}],232:[function(e,t,r){var n=e("./_cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},{"./_cof":212}],233:[function(e,t,r){var n=e("./_iterators"),i=e("./_wks")("iterator"),s=Array.prototype;t.exports=function(e){return void 0!==e&&(n.Array===e||s[i]===e)}},{"./_iterators":240,"./_wks":275}],234:[function(e,t,r){var n=e("./_cof");t.exports=Array.isArray||function(e){return"Array"==n(e)}},{"./_cof":212}],235:[function(e,t,r){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],236:[function(e,t,r){var n=e("./_an-object");t.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(t){var s=e.return;throw void 0!==s&&n(s.call(e)),t}}},{"./_an-object":205}],237:[function(e,t,r){"use strict";var n=e("./_object-create"),i=e("./_property-desc"),s=e("./_set-to-string-tag"),a={};e("./_hide")(a,e("./_wks")("iterator"),function(){return this}),t.exports=function(e,t,r){e.prototype=n(a,{next:i(1,r)}),s(e,t+" Iterator")}},{"./_hide":229,"./_object-create":245,"./_property-desc":257,"./_set-to-string-tag":262,"./_wks":275}],238:[function(e,t,r){"use strict";var n=e("./_library"),i=e("./_export"),s=e("./_redefine"),a=e("./_hide"),o=e("./_has"),u=e("./_iterators"),l=e("./_iter-create"),c=e("./_set-to-string-tag"),p=e("./_object-gpo"),h=e("./_wks")("iterator"),f=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(e,t,r,m,y,g,b){l(r,t,m);var v,x,E,A=function(e){if(!f&&e in _)return _[e];switch(e){case"keys":case"values":return function(){return new r(this,e)}}return function(){return new r(this,e)}},D=t+" Iterator",C="values"==y,S=!1,_=e.prototype,w=_[h]||_["@@iterator"]||y&&_[y],k=w||A(y),F=y?C?A("entries"):k:void 0,T="Array"==t?_.entries||w:w;if(T&&(E=p(T.call(new e)))!==Object.prototype&&(c(E,D,!0),n||o(E,h)||a(E,h,d)),C&&w&&"values"!==w.name&&(S=!0,k=function(){return w.call(this)}),n&&!b||!f&&!S&&_[h]||a(_,h,k),u[t]=k,u[D]=d,y)if(v={values:C?k:A("values"),keys:g?k:A("keys"),entries:F},b)for(x in v)x in _||s(_,x,v[x]);else i(i.P+i.F*(f||S),t,v);return v}},{"./_export":224,"./_has":228,"./_hide":229,"./_iter-create":237,"./_iterators":240,"./_library":242,"./_object-gpo":252,"./_redefine":259,"./_set-to-string-tag":262,"./_wks":275}],239:[function(e,t,r){t.exports=function(e,t){return{value:t,done:!!e}}},{}],240:[function(e,t,r){t.exports={}},{}],241:[function(e,t,r){var n=e("./_object-keys"),i=e("./_to-iobject");t.exports=function(e,t){for(var r,s=i(e),a=n(s),o=a.length,u=0;o>u;)if(s[r=a[u++]]===t)return r}},{"./_object-keys":254,"./_to-iobject":268}],242:[function(e,t,r){t.exports=!0},{}],243:[function(e,t,r){var n=e("./_uid")("meta"),i=e("./_is-object"),s=e("./_has"),a=e("./_object-dp").f,o=0,u=Object.isExtensible||function(){return!0},l=!e("./_fails")(function(){return u(Object.preventExtensions({}))}),c=function(e){a(e,n,{value:{i:"O"+ ++o,w:{}}})},p=function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,n)){if(!u(e))return"F";if(!t)return"E";c(e)}return e[n].i},h=function(e,t){if(!s(e,n)){if(!u(e))return!0;if(!t)return!1;c(e)}return e[n].w},f=function(e){return l&&d.NEED&&u(e)&&!s(e,n)&&c(e),e},d=t.exports={KEY:n,NEED:!1,fastKey:p,getWeak:h,onFreeze:f}},{"./_fails":225,"./_has":228,"./_is-object":235,"./_object-dp":246,"./_uid":272}],244:[function(e,t,r){"use strict";var n=e("./_object-keys"),i=e("./_object-gops"),s=e("./_object-pie"),a=e("./_to-object"),o=e("./_iobject"),u=Object.assign;t.exports=!u||e("./_fails")(function(){var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(e){t[e]=e}),7!=u({},e)[r]||Object.keys(u({},t)).join("")!=n})?function(e,t){for(var r=a(e),u=arguments.length,l=1,c=i.f,p=s.f;u>l;)for(var h,f=o(arguments[l++]),d=c?n(f).concat(c(f)):n(f),m=d.length,y=0;m>y;)p.call(f,h=d[y++])&&(r[h]=f[h]);return r}:u},{"./_fails":225,"./_iobject":232,"./_object-gops":251,"./_object-keys":254,"./_object-pie":255,"./_to-object":270}],245:[function(e,t,r){var n=e("./_an-object"),i=e("./_object-dps"),s=e("./_enum-bug-keys"),a=e("./_shared-key")("IE_PROTO"),o=function(){},u=function(){var t,r=e("./_dom-create")("iframe"),n=s.length;for(r.style.display="none",e("./_html").appendChild(r),r.src="javascript:",t=r.contentWindow.document,t.open(),t.write("<script>document.F=Object</script>"),t.close(),u=t.F;n--;)delete u.prototype[s[n]];return u()};t.exports=Object.create||function(e,t){var r;return null!==e?(o.prototype=n(e),r=new o,o.prototype=null,r[a]=e):r=u(),void 0===t?r:i(r,t)}},{"./_an-object":205,"./_dom-create":221,"./_enum-bug-keys":222,"./_html":230,"./_object-dps":247,"./_shared-key":263}],246:[function(e,t,r){var n=e("./_an-object"),i=e("./_ie8-dom-define"),s=e("./_to-primitive"),a=Object.defineProperty;r.f=e("./_descriptors")?Object.defineProperty:function(e,t,r){if(n(e),t=s(t,!0),n(r),i)try{return a(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},{"./_an-object":205,"./_descriptors":220,"./_ie8-dom-define":231,"./_to-primitive":271}],247:[function(e,t,r){var n=e("./_object-dp"),i=e("./_an-object"),s=e("./_object-keys");t.exports=e("./_descriptors")?Object.defineProperties:function(e,t){i(e);for(var r,a=s(t),o=a.length,u=0;o>u;)n.f(e,r=a[u++],t[r]);return e}},{"./_an-object":205,"./_descriptors":220,"./_object-dp":246,"./_object-keys":254}],248:[function(e,t,r){var n=e("./_object-pie"),i=e("./_property-desc"),s=e("./_to-iobject"),a=e("./_to-primitive"),o=e("./_has"),u=e("./_ie8-dom-define"),l=Object.getOwnPropertyDescriptor;r.f=e("./_descriptors")?l:function(e,t){if(e=s(e),t=a(t,!0),u)try{return l(e,t)}catch(e){}if(o(e,t))return i(!n.f.call(e,t),e[t])}},{"./_descriptors":220,"./_has":228,"./_ie8-dom-define":231,"./_object-pie":255,"./_property-desc":257,"./_to-iobject":268,"./_to-primitive":271}],249:[function(e,t,r){var n=e("./_to-iobject"),i=e("./_object-gopn").f,s={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(e){try{return i(e)}catch(e){return a.slice()}};t.exports.f=function(e){return a&&"[object Window]"==s.call(e)?o(e):i(n(e))}},{"./_object-gopn":250,"./_to-iobject":268}],250:[function(e,t,r){var n=e("./_object-keys-internal"),i=e("./_enum-bug-keys").concat("length","prototype");r.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},{"./_enum-bug-keys":222,"./_object-keys-internal":253}],251:[function(e,t,r){r.f=Object.getOwnPropertySymbols},{}],252:[function(e,t,r){var n=e("./_has"),i=e("./_to-object"),s=e("./_shared-key")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(e){return e=i(e),n(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},{"./_has":228,"./_shared-key":263,"./_to-object":270}],253:[function(e,t,r){var n=e("./_has"),i=e("./_to-iobject"),s=e("./_array-includes")(!1),a=e("./_shared-key")("IE_PROTO");t.exports=function(e,t){var r,o=i(e),u=0,l=[];for(r in o)r!=a&&n(o,r)&&l.push(r);for(;t.length>u;)n(o,r=t[u++])&&(~s(l,r)||l.push(r));return l}},{"./_array-includes":207,"./_has":228,"./_shared-key":263,"./_to-iobject":268}],254:[function(e,t,r){var n=e("./_object-keys-internal"),i=e("./_enum-bug-keys");t.exports=Object.keys||function(e){return n(e,i)}},{"./_enum-bug-keys":222,"./_object-keys-internal":253}],255:[function(e,t,r){r.f={}.propertyIsEnumerable},{}],256:[function(e,t,r){var n=e("./_export"),i=e("./_core"),s=e("./_fails");t.exports=function(e,t){var r=(i.Object||{})[e]||Object[e],a={};a[e]=t(r),n(n.S+n.F*s(function(){r(1)}),"Object",a)}},{"./_core":217,"./_export":224,"./_fails":225}],257:[function(e,t,r){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],258:[function(e,t,r){var n=e("./_hide");t.exports=function(e,t,r){for(var i in t)r&&e[i]?e[i]=t[i]:n(e,i,t[i]);return e}},{"./_hide":229}],259:[function(e,t,r){t.exports=e("./_hide")},{"./_hide":229}],260:[function(e,t,r){var n=e("./_is-object"),i=e("./_an-object"),s=function(e,t){if(i(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,r,n){try{n=e("./_ctx")(Function.call,e("./_object-gopd").f(Object.prototype,"__proto__").set,2),n(t,[]),r=!(t instanceof Array)}catch(e){r=!0}return function(e,t){return s(e,t),r?e.__proto__=t:n(e,t),e}}({},!1):void 0),check:s}},{"./_an-object":205,"./_ctx":218,"./_is-object":235,"./_object-gopd":248}],261:[function(e,t,r){"use strict";var n=e("./_global"),i=e("./_core"),s=e("./_object-dp"),a=e("./_descriptors"),o=e("./_wks")("species");t.exports=function(e){var t="function"==typeof i[e]?i[e]:n[e];a&&t&&!t[o]&&s.f(t,o,{configurable:!0,get:function(){return this}})}},{"./_core":217,"./_descriptors":220,"./_global":227,"./_object-dp":246,"./_wks":275}],262:[function(e,t,r){var n=e("./_object-dp").f,i=e("./_has"),s=e("./_wks")("toStringTag");t.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,s)&&n(e,s,{configurable:!0,value:t})}},{"./_has":228,"./_object-dp":246,"./_wks":275}],263:[function(e,t,r){var n=e("./_shared")("keys"),i=e("./_uid");t.exports=function(e){return n[e]||(n[e]=i(e))}},{"./_shared":264,"./_uid":272}],264:[function(e,t,r){var n=e("./_global"),i=n["__core-js_shared__"]||(n["__core-js_shared__"]={});t.exports=function(e){return i[e]||(i[e]={})}},{"./_global":227}],265:[function(e,t,r){var n=e("./_to-integer"),i=e("./_defined");t.exports=function(e){return function(t,r){var s,a,o=String(i(t)),u=n(r),l=o.length;return u<0||u>=l?e?"":void 0:(s=o.charCodeAt(u),s<55296||s>56319||u+1===l||(a=o.charCodeAt(u+1))<56320||a>57343?e?o.charAt(u):s:e?o.slice(u,u+2):a-56320+(s-55296<<10)+65536)}}},{"./_defined":219,"./_to-integer":267}],266:[function(e,t,r){var n=e("./_to-integer"),i=Math.max,s=Math.min;t.exports=function(e,t){return e=n(e),e<0?i(e+t,0):s(e,t)}},{"./_to-integer":267}],267:[function(e,t,r){var n=Math.ceil,i=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},{}],268:[function(e,t,r){var n=e("./_iobject"),i=e("./_defined");t.exports=function(e){return n(i(e))}},{"./_defined":219,"./_iobject":232}],269:[function(e,t,r){var n=e("./_to-integer"),i=Math.min;t.exports=function(e){return e>0?i(n(e),9007199254740991):0}},{"./_to-integer":267}],270:[function(e,t,r){var n=e("./_defined");t.exports=function(e){return Object(n(e))}},{"./_defined":219}],271:[function(e,t,r){var n=e("./_is-object");t.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":235}],272:[function(e,t,r){var n=0,i=Math.random();t.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},{}],273:[function(e,t,r){var n=e("./_global"),i=e("./_core"),s=e("./_library"),a=e("./_wks-ext"),o=e("./_object-dp").f;t.exports=function(e){var t=i.Symbol||(i.Symbol=s?{}:n.Symbol||{});"_"==e.charAt(0)||e in t||o(t,e,{value:a.f(e)})}},{"./_core":217,"./_global":227,"./_library":242,"./_object-dp":246,"./_wks-ext":274}],274:[function(e,t,r){r.f=e("./_wks")},{"./_wks":275}],275:[function(e,t,r){var n=e("./_shared")("wks"),i=e("./_uid"),s=e("./_global").Symbol,a="function"==typeof s;(t.exports=function(e){return n[e]||(n[e]=a&&s[e]||(a?s:i)("Symbol."+e))}).store=n},{"./_global":227,"./_shared":264,"./_uid":272}],276:[function(e,t,r){var n=e("./_classof"),i=e("./_wks")("iterator"),s=e("./_iterators");t.exports=e("./_core").getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||s[n(e)]}},{"./_classof":211,"./_core":217,"./_iterators":240,"./_wks":275}],277:[function(e,t,r){var n=e("./_an-object"),i=e("./core.get-iterator-method");t.exports=e("./_core").getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return n(t.call(e))}},{"./_an-object":205,"./_core":217,"./core.get-iterator-method":276}],278:[function(e,t,r){"use strict";var n=e("./_add-to-unscopables"),i=e("./_iter-step"),s=e("./_iterators"),a=e("./_to-iobject");t.exports=e("./_iter-define")(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,r):"values"==t?i(0,e[r]):i(0,[r,e[r]])},"values"),s.Arguments=s.Array,n("keys"),n("values"),n("entries")},{"./_add-to-unscopables":203,"./_iter-define":238,"./_iter-step":239,"./_iterators":240,"./_to-iobject":268}],279:[function(e,t,r){"use strict";var n=e("./_collection-strong");t.exports=e("./_collection")("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=n.getEntry(this,e);return t&&t.v},set:function(e,t){return n.def(this,0===e?0:e,t)}},n,!0)},{"./_collection":216,"./_collection-strong":213}],280:[function(e,t,r){var n=e("./_export");n(n.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},{"./_export":224}],281:[function(e,t,r){var n=e("./_export");n(n.S+n.F,"Object",{assign:e("./_object-assign")})},{"./_export":224,"./_object-assign":244}],282:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{create:e("./_object-create")})},{"./_export":224,"./_object-create":245}],283:[function(e,t,r){var n=e("./_to-object"),i=e("./_object-keys");e("./_object-sap")("keys",function(){return function(e){return i(n(e))}})},{"./_object-keys":254,"./_object-sap":256,"./_to-object":270}],284:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{setPrototypeOf:e("./_set-proto").set})},{"./_export":224,"./_set-proto":260}],285:[function(e,t,r){arguments[4][181][0].apply(r,arguments)},{dup:181}],286:[function(e,t,r){"use strict";var n=e("./_string-at")(!0);e("./_iter-define")(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})})},{"./_iter-define":238,"./_string-at":265}],287:[function(e,t,r){"use strict";var n=e("./_global"),i=e("./_has"),s=e("./_descriptors"),a=e("./_export"),o=e("./_redefine"),u=e("./_meta").KEY,l=e("./_fails"),c=e("./_shared"),p=e("./_set-to-string-tag"),h=e("./_uid"),f=e("./_wks"),d=e("./_wks-ext"),m=e("./_wks-define"),y=e("./_keyof"),g=e("./_enum-keys"),b=e("./_is-array"),v=e("./_an-object"),x=e("./_to-iobject"),E=e("./_to-primitive"),A=e("./_property-desc"),D=e("./_object-create"),C=e("./_object-gopn-ext"),S=e("./_object-gopd"),_=e("./_object-dp"),w=e("./_object-keys"),k=S.f,F=_.f,T=C.f,P=n.Symbol,B=n.JSON,O=B&&B.stringify,j=f("_hidden"),N=f("toPrimitive"),I={}.propertyIsEnumerable,L=c("symbol-registry"),M=c("symbols"),R=c("op-symbols"),U=Object.prototype,V="function"==typeof P,q=n.QObject,G=!q||!q.prototype||!q.prototype.findChild,X=s&&l(function(){return 7!=D(F({},"a",{get:function(){return F(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=k(U,t);n&&delete U[t],F(e,t,r),n&&e!==U&&F(U,t,n)}:F,J=function(e){var t=M[e]=D(P.prototype);return t._k=e,t},W=V&&"symbol"==typeof P.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof P},K=function(e,t,r){return e===U&&K(R,t,r),v(e),t=E(t,!0),v(r),i(M,t)?(r.enumerable?(i(e,j)&&e[j][t]&&(e[j][t]=!1),r=D(r,{enumerable:A(0,!1)})):(i(e,j)||F(e,j,A(1,{})),e[j][t]=!0),X(e,t,r)):F(e,t,r)},z=function(e,t){v(e);for(var r,n=g(t=x(t)),i=0,s=n.length;s>i;)K(e,r=n[i++],t[r]);return e},Y=function(e,t){return void 0===t?D(e):z(D(e),t)},H=function(e){var t=I.call(this,e=E(e,!0));return!(this===U&&i(M,e)&&!i(R,e))&&(!(t||!i(this,e)||!i(M,e)||i(this,j)&&this[j][e])||t)},$=function(e,t){if(e=x(e),t=E(t,!0),e!==U||!i(M,t)||i(R,t)){var r=k(e,t);return!r||!i(M,t)||i(e,j)&&e[j][t]||(r.enumerable=!0),r}},Q=function(e){for(var t,r=T(x(e)),n=[],s=0;r.length>s;)i(M,t=r[s++])||t==j||t==u||n.push(t);return n},Z=function(e){for(var t,r=e===U,n=T(r?R:x(e)),s=[],a=0;n.length>a;)!i(M,t=n[a++])||r&&!i(U,t)||s.push(M[t]);return s};V||(P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var e=h(arguments.length>0?arguments[0]:void 0),t=function(r){this===U&&t.call(R,r),i(this,j)&&i(this[j],e)&&(this[j][e]=!1),X(this,e,A(1,r))};return s&&G&&X(U,e,{configurable:!0,set:t}),J(e)},o(P.prototype,"toString",function(){return this._k}),S.f=$,_.f=K,e("./_object-gopn").f=C.f=Q,e("./_object-pie").f=H,e("./_object-gops").f=Z,s&&!e("./_library")&&o(U,"propertyIsEnumerable",H,!0),d.f=function(e){return J(f(e))}),a(a.G+a.W+a.F*!V,{Symbol:P});for(var ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;ee.length>te;)f(ee[te++]);for(var ee=w(f.store),te=0;ee.length>te;)m(ee[te++]);a(a.S+a.F*!V,"Symbol",{for:function(e){return i(L,e+="")?L[e]:L[e]=P(e)},keyFor:function(e){if(W(e))return y(L,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){G=!0},useSimple:function(){G=!1}}),a(a.S+a.F*!V,"Object",{create:Y,defineProperty:K,defineProperties:z,getOwnPropertyDescriptor:$,getOwnPropertyNames:Q,getOwnPropertySymbols:Z}),B&&a(a.S+a.F*(!V||l(function(){var e=P();return"[null]"!=O([e])||"{}"!=O({a:e})||"{}"!=O(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!W(e)){for(var t,r,n=[e],i=1;arguments.length>i;)n.push(arguments[i++]);return t=n[1],"function"==typeof t&&(r=t),!r&&b(t)||(t=function(e,t){if(r&&(t=r.call(this,e,t)),!W(t))return t}),n[1]=t,O.apply(B,n)}}}),P.prototype[N]||e("./_hide")(P.prototype,N,P.prototype.valueOf),p(P,"Symbol"),p(Math,"Math",!0),p(n.JSON,"JSON",!0)},{"./_an-object":205,"./_descriptors":220,"./_enum-keys":223,"./_export":224,"./_fails":225,"./_global":227,"./_has":228,"./_hide":229,"./_is-array":234,"./_keyof":241,"./_library":242,"./_meta":243,"./_object-create":245,"./_object-dp":246,"./_object-gopd":248,"./_object-gopn":250,"./_object-gopn-ext":249,"./_object-gops":251,"./_object-keys":254,"./_object-pie":255,"./_property-desc":257,"./_redefine":259,"./_set-to-string-tag":262,"./_shared":264,"./_to-iobject":268,"./_to-primitive":271,"./_uid":272,"./_wks":275,"./_wks-define":273,"./_wks-ext":274}],288:[function(e,t,r){"use strict";var n,i=e("./_array-methods")(0),s=e("./_redefine"),a=e("./_meta"),o=e("./_object-assign"),u=e("./_collection-weak"),l=e("./_is-object"),c=a.getWeak,p=Object.isExtensible,h=u.ufstore,f={},d=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(e){if(l(e)){var t=c(e);return!0===t?h(this).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(this,e,t)}},y=t.exports=e("./_collection")("WeakMap",d,m,u,!0,!0);7!=(new y).set((Object.freeze||Object)(f),7).get(f)&&(n=u.getConstructor(d),o(n.prototype,m),a.NEED=!0,i(["delete","has","get","set"],function(e){var t=y.prototype,r=t[e];s(t,e,function(t,i){if(l(t)&&!p(t)){this._f||(this._f=new n);var s=this._f[e](t,i);return"set"==e?this:s}return r.call(this,t,i)})}))},{"./_array-methods":208,"./_collection":216,"./_collection-weak":215,"./_is-object":235,"./_meta":243,"./_object-assign":244,"./_redefine":259}],289:[function(e,t,r){"use strict";var n=e("./_collection-weak");e("./_collection")("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return n.def(this,e,!0)}},n,!1,!0)},{"./_collection":216,"./_collection-weak":215}],290:[function(e,t,r){var n=e("./_export");n(n.P+n.R,"Map",{toJSON:e("./_collection-to-json")("Map")})},{"./_collection-to-json":214,"./_export":224}],291:[function(e,t,r){e("./_wks-define")("asyncIterator")},{"./_wks-define":273}],292:[function(e,t,r){e("./_wks-define")("observable")},{"./_wks-define":273}],293:[function(e,t,r){e("./es6.array.iterator");for(var n=e("./_global"),i=e("./_hide"),s=e("./_iterators"),a=e("./_wks")("toStringTag"),o=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;u<5;u++){var l=o[u],c=n[l],p=c&&c.prototype;p&&!p[a]&&i(p,a,l),s[l]=s.Array}},{"./_global":227,"./_hide":229,"./_iterators":240,"./_wks":275,"./es6.array.iterator":278}],294:[function(e,t,r){(function(e){function t(e){return Array.isArray?Array.isArray(e):"[object Array]"===y(e)}function n(e){return"boolean"==typeof e}function i(e){return null===e}function s(e){return null==e}function a(e){return"number"==typeof e}function o(e){return"string"==typeof e}function u(e){return"symbol"==typeof e}function l(e){return void 0===e}function c(e){return"[object RegExp]"===y(e)}function p(e){return"object"==typeof e&&null!==e}function h(e){return"[object Date]"===y(e)}function f(e){return"[object Error]"===y(e)||e instanceof Error}function d(e){return"function"==typeof e}function m(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function y(e){return Object.prototype.toString.call(e)}r.isArray=t,r.isBoolean=n,r.isNull=i,r.isNullOrUndefined=s,r.isNumber=a,r.isString=o,r.isSymbol=u,r.isUndefined=l,r.isRegExp=c,r.isObject=p,r.isDate=h,r.isError=f,r.isFunction=d,r.isPrimitive=m,
+r.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":308}],295:[function(e,t,r){t.exports=e("./src/node")},{"./src/node":298}],296:[function(e,t,r){(function(n){function i(){return!("undefined"==typeof window||!window||void 0===window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document&&"WebkitAppearance"in document.documentElement.style||"undefined"!=typeof window&&window&&window.console&&(console.firebug||console.exception&&console.table)||"undefined"!=typeof navigator&&navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function s(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+r.humanize(this.diff),t){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,s=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(s=i))}),e.splice(s,0,n)}}function a(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function o(e){try{null==e?r.storage.removeItem("debug"):r.storage.debug=e}catch(e){}}function u(){var e;try{e=r.storage.debug}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e}r=t.exports=e("./debug"),r.log=a,r.formatArgs=s,r.save=o,r.load=u,r.useColors=i,r.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},r.enable(u())}).call(this,e("_process"))},{"./debug":297,_process:539}],297:[function(e,t,r){function n(e){var t,n=0;for(t in e)n=(n<<5)-n+e.charCodeAt(t),n|=0;return r.colors[Math.abs(n)%r.colors.length]}function i(e){function t(){if(t.enabled){var e=t,n=+new Date,i=n-(l||n);e.diff=i,e.prev=l,e.curr=n,l=n;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=r.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var o=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(t,n){if("%%"===t)return t;o++;var i=r.formatters[n];if("function"==typeof i){var a=s[o];t=i.call(e,a),s.splice(o,1),o--}return t}),r.formatArgs.call(e,s);(t.log||r.log||console.log.bind(console)).apply(e,s)}}return t.namespace=e,t.enabled=r.enabled(e),t.useColors=r.useColors(),t.color=n(e),"function"==typeof r.init&&r.init(t),t}function s(e){r.save(e),r.names=[],r.skips=[];for(var t=(e||"").split(/[\s,]+/),n=t.length,i=0;i<n;i++)t[i]&&(e=t[i].replace(/\*/g,".*?"),"-"===e[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")))}function a(){r.enable("")}function o(e){var t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1}function u(e){return e instanceof Error?e.stack||e.message:e}r=t.exports=i.debug=i.default=i,r.coerce=u,r.disable=a,r.enable=s,r.enabled=o,r.humanize=e("ms"),r.names=[],r.skips=[],r.formatters={};var l},{ms:532}],298:[function(e,t,r){(function(n){function i(){return"colors"in r.inspectOpts?Boolean(r.inspectOpts.colors):c.isatty(h)}function s(e){var t=this.namespace;if(this.useColors){var n=this.color,i=" [3"+n+";1m"+t+" ";e[0]=i+e[0].split("\n").join("\n"+i),e.push("[3"+n+"m+"+r.humanize(this.diff)+"")}else e[0]=(new Date).toUTCString()+" "+t+" "+e[0]}function a(){return f.write(p.format.apply(p,arguments)+"\n")}function o(e){null==e?delete n.env.DEBUG:n.env.DEBUG=e}function u(){return n.env.DEBUG}function l(e){e.inspectOpts=p._extend({},r.inspectOpts)}var c=e("tty"),p=e("util");r=t.exports=e("./debug"),r.init=l,r.log=a,r.formatArgs=s,r.save=o,r.load=u,r.useColors=i,r.colors=[6,2,3,4,5,1],r.inspectOpts=Object.keys(n.env).filter(function(e){return/^debug_/i.test(e)}).reduce(function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,function(e,t){return t.toUpperCase()}),i=n.env[t];return i=!!/^(yes|on|true|enabled)$/i.test(i)||!/^(no|off|false|disabled)$/i.test(i)&&("null"===i?null:Number(i)),e[r]=i,e},{});var h=parseInt(n.env.DEBUG_FD,10)||2;1!==h&&2!==h&&p.deprecate(function(){},"except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)")();var f=1===h?n.stdout:2===h?n.stderr:function(t){var r;switch(n.binding("tty_wrap").guessHandleType(t)){case"TTY":r=new c.WriteStream(t),r._type="tty",r._handle&&r._handle.unref&&r._handle.unref();break;case"FILE":r=new(e("fs").SyncWriteStream)(t,{autoClose:!1}),r._type="fs";break;case"PIPE":case"TCP":r=new(e("net").Socket)({fd:t,readable:!1,writable:!0}),r.readable=!1,r.read=null,r._type="pipe",r._handle&&r._handle.unref&&r._handle.unref();break;default:throw new Error("Implement me. Unknown stream file type!")}return r.fd=t,r._isStdio=!0,r}(h);r.formatters.o=function(e){return this.inspectOpts.colors=this.useColors,p.inspect(e,this.inspectOpts).replace(/\s*\n\s*/g," ")},r.formatters.O=function(e){return this.inspectOpts.colors=this.useColors,p.inspect(e,this.inspectOpts)},r.enable(u())}).call(this,e("_process"))},{"./debug":297,_process:539,fs:182,net:182,tty:597,util:601}],299:[function(e,t,r){"use strict";function n(e){var t=0,r=0,n=0;for(var i in e){var s=e[i],a=s[0],o=s[1];(a>r||a===r&&o>n)&&(r=a,n=o,t=Number(i))}return t}var i=e("repeating");t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");var t,r,s=0,a=0,o=0,u={};e.split(/\n/g).forEach(function(e){if(e){var n,i=e.match(/^(?:( )+|\t+)/);i?(n=i[0].length,i[1]?a++:s++):n=0;var l=n-o;o=n,l?(r=l>0,t=u[r?l:-l],t?t[0]++:t=u[l]=[1,0]):t&&(t[1]+=Number(r))}});var l,c,p=n(u);return p?a>=s?(l="space",c=i(" ",p)):(l="tab",c=i("\t",p)):(l=null,c=""),{amount:p,type:l,indent:c}}},{repeating:588}],300:[function(e,t,r){"use strict";t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")}},{}],301:[function(e,t,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function s(e){return"number"==typeof e}function a(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!s(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,r,n,s,u,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(r=this._events[e],o(r))return!1;if(i(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(a(r))for(s=Array.prototype.slice.call(arguments,1),l=r.slice(),n=l.length,u=0;u<n;u++)l[u].apply(this,s);return!0},n.prototype.addListener=function(e,t){var r;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]?a(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,a(this._events[e])&&!this._events[e].warned&&(r=o(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&r>0&&this._events[e].length>r&&(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},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var n=!1;return r.listener=t,this.on(e,r),this},n.prototype.removeListener=function(e,t){var r,n,s,o;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],s=r.length,n=-1,r===t||i(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(r)){for(o=s;o-- >0;)if(r[o]===t||r[o].listener&&r[o].listener===t){n=o;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,r;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(r=this._events[e],i(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},{}],302:[function(e,t,r){t.exports={builtin:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},es5:{Array:!1,Boolean:!1,constructor:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,propertyIsEnumerable:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1},es6:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},browser:{addEventListener:!1,alert:!1,AnalyserNode:!1,Animation:!1,AnimationEffectReadOnly:!1,AnimationEffectTiming:!1,AnimationEffectTimingReadOnly:!1,AnimationEvent:!1,AnimationPlaybackEvent:!1,AnimationTimeline:!1,applicationCache:!1,ApplicationCache:!1,ApplicationCacheErrorEvent:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBufferSourceNode:!1,AudioContext:!1,AudioDestinationNode:!1,AudioListener:!1,AudioNode:!1,AudioParam:!1,AudioProcessingEvent:!1,AutocompleteErrorEvent:!1,BarProp:!1,BatteryManager:!1,BeforeUnloadEvent:!1,BiquadFilterNode:!1,Blob:!1,blur:!1,btoa:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CDATASection:!1,ChannelMergerNode:!1,ChannelSplitterNode:!1,CharacterData:!1,clearInterval:!1,clearTimeout:!1,clientInformation:!1,ClientRect:!1,ClientRectList:!1,ClipboardEvent:!1,close:!1,closed:!1,CloseEvent:!1,Comment:!1,CompositionEvent:!1,confirm:!1,console:!1,ConvolverNode:!1,Credential:!1,CredentialsContainer:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSS:!1,CSSAnimation:!1,CSSFontFaceRule:!1,CSSImportRule:!1,CSSKeyframeRule:!1,CSSKeyframesRule:!1,CSSMediaRule:!1,CSSPageRule:!1,CSSRule:!1,CSSRuleList:!1,CSSStyleDeclaration:!1,CSSStyleRule:!1,CSSStyleSheet:!1,CSSSupportsRule:!1,CSSTransition:!1,CSSUnknownRule:!1,CSSViewportRule:!1,customElements:!1,CustomEvent:!1,DataTransfer:!1,DataTransferItem:!1,DataTransferItemList:!1,Debug:!1,defaultStatus:!1,defaultstatus:!1,DelayNode:!1,DeviceMotionEvent:!1,DeviceOrientationEvent:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,DocumentTimeline:!1,DocumentType:!1,DOMError:!1,DOMException:!1,DOMImplementation:!1,DOMParser:!1,DOMSettableTokenList:!1,DOMStringList:!1,DOMStringMap:!1,DOMTokenList:!1,DragEvent:!1,DynamicsCompressorNode:!1,Element:!1,ElementTimeControl:!1,ErrorEvent:!1,event:!1,Event:!1,EventSource:!1,EventTarget:!1,external:!1,FederatedCredential:!1,fetch:!1,File:!1,FileError:!1,FileList:!1,FileReader:!1,find:!1,focus:!1,FocusEvent:!1,FontFace:!1,FormData:!1,frameElement:!1,frames:!1,GainNode:!1,Gamepad:!1,GamepadButton:!1,GamepadEvent:!1,getComputedStyle:!1,getSelection:!1,HashChangeEvent:!1,Headers:!1,history:!1,History:!1,HTMLAllCollection:!1,HTMLAnchorElement:!1,HTMLAppletElement:!1,HTMLAreaElement:!1,HTMLAudioElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLContentElement:!1,HTMLDataListElement:!1,HTMLDetailsElement:!1,HTMLDialogElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLDocument:!1,HTMLElement:!1,HTMLEmbedElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormControlsCollection:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLKeygenElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMarqueeElement:!1,HTMLMediaElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLMeterElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLOptionsCollection:!1,HTMLOutputElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPictureElement:!1,HTMLPreElement:!1,HTMLProgressElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLShadowElement:!1,HTMLSourceElement:!1,HTMLSpanElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLTrackElement:!1,HTMLUListElement:!1,HTMLUnknownElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBEnvironment:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,Image:!1,ImageBitmap:!1,ImageData:!1,indexedDB:!1,innerHeight:!1,innerWidth:!1,InputEvent:!1,InputMethodContext:!1,IntersectionObserver:!1,IntersectionObserverEntry:!1,Intl:!1,KeyboardEvent:!1,KeyframeEffect:!1,KeyframeEffectReadOnly:!1,length:!1,localStorage:!1,location:!1,Location:!1,locationbar:!1,matchMedia:!1,MediaElementAudioSourceNode:!1,MediaEncryptedEvent:!1,MediaError:!1,MediaKeyError:!1,MediaKeyEvent:!1,MediaKeyMessageEvent:!1,MediaKeys:!1,MediaKeySession:!1,MediaKeyStatusMap:!1,MediaKeySystemAccess:!1,MediaList:!1,MediaQueryList:!1,MediaQueryListEvent:!1,MediaSource:!1,MediaRecorder:!1,MediaStream:!1,MediaStreamAudioDestinationNode:!1,MediaStreamAudioSourceNode:!1,MediaStreamEvent:!1,MediaStreamTrack:!1,menubar:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MIDIAccess:!1,MIDIConnectionEvent:!1,MIDIInput:!1,MIDIInputMap:!1,MIDIMessageEvent:!1,MIDIOutput:!1,MIDIOutputMap:!1,MIDIPort:!1,MimeType:!1,MimeTypeArray:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationEvent:!1,MutationObserver:!1,MutationRecord:!1,name:!1,NamedNodeMap:!1,navigator:!1,Navigator:!1,Node:!1,NodeFilter:!1,NodeIterator:!1,NodeList:!1,Notification:!1,OfflineAudioCompletionEvent:!1,OfflineAudioContext:!1,offscreenBuffering:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,opera:!1,Option:!1,OscillatorNode:!1,outerHeight:!1,outerWidth:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,parent:!1,PasswordCredential:!1,Path2D:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,PeriodicWave:!1,Permissions:!1,PermissionStatus:!1,personalbar:!1,Plugin:!1,PluginArray:!1,PopStateEvent:!1,postMessage:!1,print:!1,ProcessingInstruction:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,prompt:!1,PushManager:!1,PushSubscription:!1,RadioNodeList:!1,Range:!1,ReadableByteStream:!1,ReadableStream:!1,removeEventListener:!1,Request:!1,requestAnimationFrame:!1,requestIdleCallback:!1,resizeBy:!1,resizeTo:!1,Response:!1,RTCIceCandidate:!1,RTCSessionDescription:!1,RTCPeerConnection:!1,screen:!1,Screen:!1,screenLeft:!1,ScreenOrientation:!1,screenTop:!1,screenX:!1,screenY:!1,ScriptProcessorNode:!1,scroll:!1,scrollbars:!1,scrollBy:!1,scrollTo:!1,scrollX:!1,scrollY:!1,SecurityPolicyViolationEvent:!1,Selection:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerRegistration:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,ShadowRoot:!1,SharedKeyframeList:!1,SharedWorker:!1,showModalDialog:!1,SiteBoundCredential:!1,speechSynthesis:!1,SpeechSynthesisEvent:!1,SpeechSynthesisUtterance:!1,status:!1,statusbar:!1,stop:!1,Storage:!1,StorageEvent:!1,styleMedia:!1,StyleSheet:!1,StyleSheetList:!1,SubtleCrypto:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCSSRule:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDiscardElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGEvent:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEDropShadowElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGeometryElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGGraphicsElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGLocatable:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformable:!1,SVGTransformList:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGURIReference:!1,SVGUseElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGVKernElement:!1,SVGZoomAndPan:!1,SVGZoomEvent:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TextEvent:!1,TextMetrics:!1,TextTrack:!1,TextTrackCue:!1,TextTrackCueList:!1,TextTrackList:!1,TimeEvent:!1,TimeRanges:!1,toolbar:!1,top:!1,Touch:!1,TouchEvent:!1,TouchList:!1,TrackEvent:!1,TransitionEvent:!1,TreeWalker:!1,UIEvent:!1,URL:!1,URLSearchParams:!1,ValidityState:!1,VTTCue:!1,WaveShaperNode:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLTexture:!1,WebGLUniformLocation:!1,WebSocket:!1,WheelEvent:!1,window:!1,Window:!1,Worker:!1,XDomainRequest:!1,XMLDocument:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestProgressEvent:!1,XMLHttpRequestUpload:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1,XSLTProcessor:!1},worker:{applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Cache:!1,caches:!1,clearInterval:!1,clearTimeout:!1,close:!0,console:!1,fetch:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!0,indexedDB:!1,location:!1,MessageChannel:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onlanguagechange:!0,onmessage:!0,onoffline:!0,ononline:!0,onrejectionhandled:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,Promise:!1,Request:!1,Response:!1,self:!0,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,TextDecoder:!1,TextEncoder:!1,URL:!1,URLSearchParams:!1,WebSocket:!1,Worker:!1,XMLHttpRequest:!1},node:{__dirname:!1,__filename:!1,arguments:!1,Buffer:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,console:!1,exports:!0,GLOBAL:!1,global:!1,Intl:!1,module:!1,process:!1,require:!1,root:!1,setImmediate:!1,setInterval:!1,setTimeout:!1},commonjs:{exports:!0,module:!1,require:!1,global:!1},amd:{define:!1,require:!1},mocha:{after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,run:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},jasmine:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},jest:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,check:!1,describe:!1,expect:!1,gen:!1,it:!1,fdescribe:!1,fit:!1,jest:!1,pit:!1,require:!1,test:!1,xdescribe:!1,xit:!1,xtest:!1},qunit:{asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notOk:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},phantomjs:{console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},couch:{emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},rhino:{defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},nashorn:{__DIR__:!1,__FILE__:!1,__LINE__:!1,com:!1,edu:!1,exit:!1,Java:!1,java:!1,javafx:!1,JavaImporter:!1,javax:!1,JSAdapter:!1,load:!1,loadWithNewGlobal:!1,org:!1,Packages:!1,print:!1,quit:!1},wsh:{ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WScript:!0,WSH:!0,XDomainRequest:!0},jquery:{$:!1,jQuery:!1},yui:{Y:!1,YUI:!1,YUI_config:!1},shelljs:{cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,ls:!1,ln:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,set:!1,target:!1,tempdir:!1,test:!1,touch:!1,which:!1},prototypejs:{$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},meteor:{$:!1,_:!1,Accounts:!1,AccountsClient:!1,AccountsServer:!1,AccountsCommon:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPServer:!1,DDPRateLimiter:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,ServiceConfiguration:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},mongo:{_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,ISODate:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,NumberInt:!1,NumberLong:!1,ObjectId:!1,PlanCache:!1,print:!1,printjson:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},applescript:{$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1},serviceworker:{caches:!1,Cache:!1,CacheStorage:!1,Client:!1,clients:!1,Clients:!1,ExtendableEvent:!1,ExtendableMessageEvent:!1,FetchEvent:!1,importScripts:!1,registration:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerGlobalScope:!1,ServiceWorkerMessageEvent:!1,ServiceWorkerRegistration:!1,skipWaiting:!1,WindowClient:!1},atomtest:{advanceClock:!1,fakeClearInterval:!1,fakeClearTimeout:!1,fakeSetInterval:!1,fakeSetTimeout:!1,resetTimeouts:!1,waitsForPromise:!1},embertest:{andThen:!1,click:!1,currentPath:!1,currentRouteName:!1,currentURL:!1,fillIn:!1,find:!1,findWithAssert:!1,keyEvent:!1,pauseTest:!1,resumeTest:!1,triggerEvent:!1,visit:!1},protractor:{$:!1,$$:!1,browser:!1,By:!1,by:!1,DartObject:!1,element:!1,protractor:!1},"shared-node-browser":{clearInterval:!1,clearTimeout:!1,console:!1,setInterval:!1,setTimeout:!1},webextensions:{browser:!1,chrome:!1,opr:!1},greasemonkey:{GM_addStyle:!1,GM_deleteValue:!1,GM_getResourceText:!1,GM_getResourceURL:!1,GM_getValue:!1,GM_info:!1,GM_listValues:!1,GM_log:!1,GM_openInTab:!1,GM_registerMenuCommand:!1,GM_setClipboard:!1,GM_setValue:!1,GM_xmlhttpRequest:!1,unsafeWindow:!1}}},{}],303:[function(e,t,r){t.exports=e("./globals.json")},{"./globals.json":302}],304:[function(e,t,r){"use strict";var n=e("ansi-regex"),i=new RegExp(n().source);t.exports=i.test.bind(i)},{"ansi-regex":1}],305:[function(e,t,r){r.read=function(e,t,r,n,i){var s,a,o=8*i-n-1,u=(1<<o)-1,l=u>>1,c=-7,p=r?i-1:0,h=r?-1:1,f=e[t+p];for(p+=h,s=f&(1<<-c)-1,f>>=-c,c+=o;c>0;s=256*s+e[t+p],p+=h,c-=8);for(a=s&(1<<-c)-1,s>>=-c,c+=n;c>0;a=256*a+e[t+p],p+=h,c-=8);if(0===s)s=1-l;else{if(s===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),s-=l}return(f?-1:1)*a*Math.pow(2,s-n)},r.write=function(e,t,r,n,i,s){var a,o,u,l=8*s-i-1,c=(1<<l)-1,p=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:s-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+p>=1?h/u:h*Math.pow(2,1-p),t*u>=2&&(a++,u/=2),a+p>=c?(o=0,a=c):a+p>=1?(o=(t*u-1)*Math.pow(2,i),a+=p):(o=t*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;e[r+f]=255&o,f+=d,o/=256,i-=8);for(a=a<<i|o,l+=i;l>0;e[r+f]=255&a,f+=d,a/=256,l-=8);e[r+f-d]|=128*m}},{}],306:[function(e,t,r){"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 r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],307:[function(e,t,r){"use strict";var n=function(e,t,r,n,i,s,a,o){if(void 0===t)throw new Error("invariant requires an error message argument");if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,n,i,s,a,o],c=0;u=new Error(t.replace(/%s/g,function(){return l[c++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}};t.exports=n},{}],308:[function(e,t,r){function n(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&&n(e.slice(0,0))}t.exports=function(e){return null!=e&&(n(e)||i(e)||!!e._isBuffer)}},{}],309:[function(e,t,r){"use strict";var n=e("number-is-nan");t.exports=Number.isFinite||function(e){return!("number"!=typeof e||n(e)||e===1/0||e===-1/0)}},{"number-is-nan":533}],310:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],311:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),
+r.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,r.matchToToken=function(e){var t={type:"invalid",value:e[0]};return e[1]?(t.type="string",t.closed=!(!e[3]&&!e[4])):e[5]?t.type="comment":e[6]?(t.type="comment",t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}},{}],312:[function(e,t,r){(function(e){!function(n){var i="object"==typeof r&&r,s="object"==typeof t&&t&&t.exports==i&&t,a="object"==typeof e&&e;a.global!==a&&a.window!==a||(n=a);var o={},u=o.hasOwnProperty,l=function(e,t){var r;for(r in e)u.call(e,r)&&t(r,e[r])},c=function(e,t){return t?(l(t,function(t,r){e[t]=r}),e):e},p=function(e,t){for(var r=e.length,n=-1;++n<r;)t(e[n])},h=o.toString,f=function(e){return"[object Array]"==h.call(e)},d=function(e){return"[object Object]"==h.call(e)},m=function(e){return"string"==typeof e||"[object String]"==h.call(e)},y=function(e){return"number"==typeof e||"[object Number]"==h.call(e)},g=function(e){return"function"==typeof e||"[object Function]"==h.call(e)},b=function(e){return"[object Map]"==h.call(e)},v=function(e){return"[object Set]"==h.call(e)},x={'"':'\\"',"'":"\\'","\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},E=/["'\\\b\f\n\r\t]/,A=/[0-9]/,D=/[ !#-&\(-\[\]-~]/,C=function(e,t){var r={escapeEverything:!1,escapeEtago:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:"\t",__indent__:"",__inline1__:!1,__inline2__:!1},n=t&&t.json;n&&(r.quotes="double",r.wrap=!0),t=c(r,t),"single"!=t.quotes&&"double"!=t.quotes&&(t.quotes="single");var i,s="double"==t.quotes?'"':"'",a=t.compact,o=t.indent,u=t.lowercaseHex,h="",S=t.__inline1__,_=t.__inline2__,w=a?"":"\n",k=!0,F="binary"==t.numbers,T="octal"==t.numbers,P="decimal"==t.numbers,B="hexadecimal"==t.numbers;if(n&&e&&g(e.toJSON)&&(e=e.toJSON()),!m(e)){if(b(e))return 0==e.size?"new Map()":(a||(t.__inline1__=!0),"new Map("+C(Array.from(e),t)+")");if(v(e))return 0==e.size?"new Set()":"new Set("+C(Array.from(e),t)+")";if(f(e))return i=[],t.wrap=!0,S?(t.__inline1__=!1,t.__inline2__=!0):(h=t.__indent__,o+=h,t.__indent__=o),p(e,function(e){k=!1,_&&(t.__inline2__=!1),i.push((a||_?"":o)+C(e,t))}),k?"[]":_?"["+i.join(", ")+"]":"["+w+i.join(","+w)+w+(a?"":h)+"]";if(!y(e))return d(e)?(i=[],t.wrap=!0,h=t.__indent__,o+=h,t.__indent__=o,l(e,function(e,r){k=!1,i.push((a?"":o)+C(e,t)+":"+(a?"":" ")+C(r,t))}),k?"{}":"{"+w+i.join(","+w)+w+(a?"":h)+"}"):n?JSON.stringify(e)||"null":String(e);if(n)return JSON.stringify(e);if(P)return String(e);if(B){var O=e.toString(16);return u||(O=O.toUpperCase()),"0x"+O}if(F)return"0b"+e.toString(2);if(T)return"0o"+e.toString(8)}var j,N,I,L=e,M=-1,R=L.length;for(i="";++M<R;){var U=L.charAt(M);if(t.es6&&(j=L.charCodeAt(M))>=55296&&j<=56319&&R>M+1&&(N=L.charCodeAt(M+1))>=56320&&N<=57343){I=1024*(j-55296)+N-56320+65536;var V=I.toString(16);u||(V=V.toUpperCase()),i+="\\u{"+V+"}",M++}else{if(!t.escapeEverything){if(D.test(U)){i+=U;continue}if('"'==U){i+=s==U?'\\"':U;continue}if("'"==U){i+=s==U?"\\'":U;continue}}if("\0"!=U||n||A.test(L.charAt(M+1)))if(E.test(U))i+=x[U];else{var q=U.charCodeAt(0),V=q.toString(16);u||(V=V.toUpperCase());var G=V.length>2||n,X="\\"+(G?"u":"x")+("0000"+V).slice(G?-4:-2);i+=X}else i+="\\0"}}return t.wrap&&(i=s+i+s),t.escapeEtago?i.replace(/<\/(script|style)/gi,"<\\/$1"):i};C.version="1.3.0","function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return C}):i&&!i.nodeType?s?s.exports=C:i.jsesc=C:n.jsesc=C}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],313:[function(e,t,r){var n="object"==typeof r?r:{};n.parse=function(){"use strict";var e,t,r,n,i,s,a={"'":"'",'"':'"',"\\":"\\","/":"/","\n":"",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},o=[" ","\t","\r","\n","\v","\f"," ","\ufeff"],u=function(e){return""===e?"EOF":"'"+e+"'"},l=function(n){var s=new SyntaxError;throw s.message=n+" at line "+t+" column "+r+" of the JSON5 data. Still to read: "+JSON.stringify(i.substring(e-1,e+19)),s.at=e,s.lineNumber=t,s.columnNumber=r,s},c=function(s){return s&&s!==n&&l("Expected "+u(s)+" instead of "+u(n)),n=i.charAt(e),e++,r++,("\n"===n||"\r"===n&&"\n"!==p())&&(t++,r=0),n},p=function(){return i.charAt(e)},h=function(){var e=n;for("_"!==n&&"$"!==n&&(n<"a"||n>"z")&&(n<"A"||n>"Z")&&l("Bad identifier as unquoted key");c()&&("_"===n||"$"===n||n>="a"&&n<="z"||n>="A"&&n<="Z"||n>="0"&&n<="9");)e+=n;return e},f=function(){var e,t="",r="",i=10;if("-"!==n&&"+"!==n||(t=n,c(n)),"I"===n)return e=v(),("number"!=typeof e||isNaN(e))&&l("Unexpected word for number"),"-"===t?-e:e;if("N"===n)return e=v(),isNaN(e)||l("expected word to be NaN"),e;switch("0"===n&&(r+=n,c(),"x"===n||"X"===n?(r+=n,c(),i=16):n>="0"&&n<="9"&&l("Octal literal")),i){case 10:for(;n>="0"&&n<="9";)r+=n,c();if("."===n)for(r+=".";c()&&n>="0"&&n<="9";)r+=n;if("e"===n||"E"===n)for(r+=n,c(),"-"!==n&&"+"!==n||(r+=n,c());n>="0"&&n<="9";)r+=n,c();break;case 16:for(;n>="0"&&n<="9"||n>="A"&&n<="F"||n>="a"&&n<="f";)r+=n,c()}if(e="-"===t?-r:+r,isFinite(e))return e;l("Bad number")},d=function(){var e,t,r,i,s="";if('"'===n||"'"===n)for(r=n;c();){if(n===r)return c(),s;if("\\"===n)if(c(),"u"===n){for(i=0,t=0;t<4&&(e=parseInt(c(),16),isFinite(e));t+=1)i=16*i+e;s+=String.fromCharCode(i)}else if("\r"===n)"\n"===p()&&c();else{if("string"!=typeof a[n])break;s+=a[n]}else{if("\n"===n)break;s+=n}}l("Bad string")},m=function(){"/"!==n&&l("Not an inline comment");do{if(c(),"\n"===n||"\r"===n)return void c()}while(n)},y=function(){"*"!==n&&l("Not a block comment");do{for(c();"*"===n;)if(c("*"),"/"===n)return void c("/")}while(n);l("Unterminated block comment")},g=function(){"/"!==n&&l("Not a comment"),c("/"),"/"===n?m():"*"===n?y():l("Unrecognized comment")},b=function(){for(;n;)if("/"===n)g();else{if(!(o.indexOf(n)>=0))return;c()}},v=function(){switch(n){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;case"I":return c("I"),c("n"),c("f"),c("i"),c("n"),c("i"),c("t"),c("y"),1/0;case"N":return c("N"),c("a"),c("N"),NaN}l("Unexpected "+u(n))},x=function(){var e=[];if("["===n)for(c("["),b();n;){if("]"===n)return c("]"),e;if(","===n?l("Missing array element"):e.push(s()),b(),","!==n)return c("]"),e;c(","),b()}l("Bad array")},E=function(){var e,t={};if("{"===n)for(c("{"),b();n;){if("}"===n)return c("}"),t;if(e='"'===n||"'"===n?d():h(),b(),c(":"),t[e]=s(),b(),","!==n)return c("}"),t;c(","),b()}l("Bad object")};return s=function(){switch(b(),n){case"{":return E();case"[":return x();case'"':case"'":return d();case"-":case"+":case".":return f();default:return n>="0"&&n<="9"?f():v()}},function(a,o){var u;return i=String(a),e=0,t=1,r=1,n=" ",u=s(),b(),n&&l("Syntax error"),"function"==typeof o?function e(t,r){var n,i,s=t[r];if(s&&"object"==typeof s)for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(i=e(s,n),void 0!==i?s[n]=i:delete s[n]);return o.call(t,r,s)}({"":u},""):u}}(),n.stringify=function(e,t,r){function i(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"_"===e||"$"===e}function s(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"_"===e||"$"===e}function a(e){if("string"!=typeof e)return!1;if(!s(e[0]))return!1;for(var t=1,r=e.length;t<r;){if(!i(e[t]))return!1;t++}return!0}function o(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function u(e){return"[object Date]"===Object.prototype.toString.call(e)}function l(e){for(var t=0;t<m.length;t++)if(m[t]===e)throw new TypeError("Converting circular structure to JSON")}function c(e,t,r){if(!e)return"";e.length>10&&(e=e.substring(0,10));for(var n=r?"":"\n",i=0;i<t;i++)n+=e;return n}function p(e){return y.lastIndex=0,y.test(e)?'"'+e.replace(y,function(e){var t=g[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function h(e,t,r){var n,i,s=f(e,t,r);switch(s&&!u(s)&&(s=s.valueOf()),typeof s){case"boolean":return s.toString();case"number":return isNaN(s)||!isFinite(s)?"null":s.toString();case"string":return p(s.toString());case"object":if(null===s)return"null";if(o(s)){l(s),n="[",m.push(s);for(var y=0;y<s.length;y++)i=h(s,y,!1),n+=c(d,m.length),n+=null===i||void 0===i?"null":i,y<s.length-1?n+=",":d&&(n+="\n");m.pop(),s.length&&(n+=c(d,m.length,!0)),n+="]"}else{l(s),n="{";var g=!1;m.push(s);for(var b in s)if(s.hasOwnProperty(b)){var v=h(s,b,!1);r=!1,void 0!==v&&null!==v&&(n+=c(d,m.length),g=!0,t=a(b)?b:p(b),n+=t+":"+(d?" ":"")+v+",")}m.pop(),n=g?n.substring(0,n.length-1)+c(d,m.length)+"}":"{}"}return n;default:return}}if(t&&"function"!=typeof t&&!o(t))throw new Error("Replacer must be a function or an array");var f=function(e,r,n){var i=e[r];return i&&i.toJSON&&"function"==typeof i.toJSON&&(i=i.toJSON()),"function"==typeof t?t.call(e,r,i):t?n||o(e)||t.indexOf(r)>=0?i:void 0:i};n.isWord=a;var d,m=[];r&&("string"==typeof r?d=r:"number"==typeof r&&r>=0&&(d=c(" ",r,!0)));var y=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},b={"":e};return void 0===e?f(b,"",!0):h(b,"",!0)}},{}],314:[function(e,t,r){var n=e("./_getNative"),i=e("./_root"),s=n(i,"DataView");t.exports=s},{"./_getNative":418,"./_root":462}],315:[function(e,t,r){function n(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var i=e("./_hashClear"),s=e("./_hashDelete"),a=e("./_hashGet"),o=e("./_hashHas"),u=e("./_hashSet");n.prototype.clear=i,n.prototype.delete=s,n.prototype.get=a,n.prototype.has=o,n.prototype.set=u,t.exports=n},{"./_hashClear":426,"./_hashDelete":427,"./_hashGet":428,"./_hashHas":429,"./_hashSet":430}],316:[function(e,t,r){function n(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var i=e("./_listCacheClear"),s=e("./_listCacheDelete"),a=e("./_listCacheGet"),o=e("./_listCacheHas"),u=e("./_listCacheSet");n.prototype.clear=i,n.prototype.delete=s,n.prototype.get=a,n.prototype.has=o,n.prototype.set=u,t.exports=n},{"./_listCacheClear":442,"./_listCacheDelete":443,"./_listCacheGet":444,"./_listCacheHas":445,"./_listCacheSet":446}],317:[function(e,t,r){var n=e("./_getNative"),i=e("./_root"),s=n(i,"Map");t.exports=s},{"./_getNative":418,"./_root":462}],318:[function(e,t,r){function n(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var i=e("./_mapCacheClear"),s=e("./_mapCacheDelete"),a=e("./_mapCacheGet"),o=e("./_mapCacheHas"),u=e("./_mapCacheSet");n.prototype.clear=i,n.prototype.delete=s,n.prototype.get=a,n.prototype.has=o,n.prototype.set=u,t.exports=n},{"./_mapCacheClear":447,"./_mapCacheDelete":448,"./_mapCacheGet":449,"./_mapCacheHas":450,"./_mapCacheSet":451}],319:[function(e,t,r){var n=e("./_getNative"),i=e("./_root"),s=n(i,"Promise");t.exports=s},{"./_getNative":418,"./_root":462}],320:[function(e,t,r){var n=e("./_getNative"),i=e("./_root"),s=n(i,"Set");t.exports=s},{"./_getNative":418,"./_root":462}],321:[function(e,t,r){function n(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new i;++t<r;)this.add(e[t])}var i=e("./_MapCache"),s=e("./_setCacheAdd"),a=e("./_setCacheHas");n.prototype.add=n.prototype.push=s,n.prototype.has=a,t.exports=n},{"./_MapCache":318,"./_setCacheAdd":463,"./_setCacheHas":464}],322:[function(e,t,r){function n(e){var t=this.__data__=new i(e);this.size=t.size}var i=e("./_ListCache"),s=e("./_stackClear"),a=e("./_stackDelete"),o=e("./_stackGet"),u=e("./_stackHas"),l=e("./_stackSet");n.prototype.clear=s,n.prototype.delete=a,n.prototype.get=o,n.prototype.has=u,n.prototype.set=l,t.exports=n},{"./_ListCache":316,"./_stackClear":468,"./_stackDelete":469,"./_stackGet":470,"./_stackHas":471,"./_stackSet":472}],323:[function(e,t,r){var n=e("./_root"),i=n.Symbol;t.exports=i},{"./_root":462}],324:[function(e,t,r){var n=e("./_root"),i=n.Uint8Array;t.exports=i},{"./_root":462}],325:[function(e,t,r){var n=e("./_getNative"),i=e("./_root"),s=n(i,"WeakMap");t.exports=s},{"./_getNative":418,"./_root":462}],326:[function(e,t,r){function n(e,t){return e.set(t[0],t[1]),e}t.exports=n},{}],327:[function(e,t,r){function n(e,t){return e.add(t),e}t.exports=n},{}],328:[function(e,t,r){function n(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}t.exports=n},{}],329:[function(e,t,r){function n(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}t.exports=n},{}],330:[function(e,t,r){function n(e,t){for(var r=-1,n=null==e?0:e.length,i=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[i++]=a)}return s}t.exports=n},{}],331:[function(e,t,r){function n(e,t){return!!(null==e?0:e.length)&&i(e,t,0)>-1}var i=e("./_baseIndexOf");t.exports=n},{"./_baseIndexOf":357}],332:[function(e,t,r){function n(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}t.exports=n},{}],333:[function(e,t,r){function n(e,t){var r=a(e),n=!r&&s(e),c=!r&&!n&&o(e),h=!r&&!n&&!c&&l(e),f=r||n||c||h,d=f?i(e.length,String):[],m=d.length;for(var y in e)!t&&!p.call(e,y)||f&&("length"==y||c&&("offset"==y||"parent"==y)||h&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||u(y,m))||d.push(y);return d}var i=e("./_baseTimes"),s=e("./isArguments"),a=e("./isArray"),o=e("./isBuffer"),u=e("./_isIndex"),l=e("./isTypedArray"),c=Object.prototype,p=c.hasOwnProperty;t.exports=n},{"./_baseTimes":381,"./_isIndex":435,"./isArguments":497,"./isArray":498,"./isBuffer":501,"./isTypedArray":511}],334:[function(e,t,r){function n(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}t.exports=n},{}],335:[function(e,t,r){function n(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}t.exports=n},{}],336:[function(e,t,r){function n(e,t,r,n){var i=-1,s=null==e?0:e.length;for(n&&s&&(r=e[++i]);++i<s;)r=t(r,e[i],i,e);return r}t.exports=n},{}],337:[function(e,t,r){function n(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}t.exports=n},{}],338:[function(e,t,r){function n(e,t,r){(void 0===r||s(e[t],r))&&(void 0!==r||t in e)||i(e,t,r)}var i=e("./_baseAssignValue"),s=e("./eq");t.exports=n},{"./_baseAssignValue":343,"./eq":485}],339:[function(e,t,r){function n(e,t,r){var n=e[t];o.call(e,t)&&s(n,r)&&(void 0!==r||t in e)||i(e,t,r)}var i=e("./_baseAssignValue"),s=e("./eq"),a=Object.prototype,o=a.hasOwnProperty;t.exports=n},{"./_baseAssignValue":343,"./eq":485}],340:[function(e,t,r){function n(e,t){for(var r=e.length;r--;)if(i(e[r][0],t))return r;return-1}var i=e("./eq");t.exports=n},{"./eq":485}],341:[function(e,t,r){function n(e,t){return e&&i(t,s(t),e)}var i=e("./_copyObject"),s=e("./keys");t.exports=n},{"./_copyObject":399,"./keys":512}],342:[function(e,t,r){function n(e,t){return e&&i(t,s(t),e)}var i=e("./_copyObject"),s=e("./keysIn");t.exports=n},{"./_copyObject":399,"./keysIn":513}],343:[function(e,t,r){function n(e,t,r){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var i=e("./_defineProperty");t.exports=n},{"./_defineProperty":409}],344:[function(e,t,r){function n(e,t,r){return e===e&&(void 0!==r&&(e=e<=r?e:r),void 0!==t&&(e=e>=t?e:t)),e}t.exports=n},{}],345:[function(e,t,r){function n(e,t,r,P,B,O){var j,N=t&D,I=t&C,L=t&S;if(r&&(j=B?r(e,P,B,O):r(e)),void 0!==j)return j;if(!E(e))return e;var M=v(e);if(M){if(j=y(e),!N)return c(e,j)}else{var R=m(e),U=R==w||R==k;if(x(e))return l(e,N);if(R==F||R==_||U&&!B){if(j=I||U?{}:b(e),!N)return I?h(e,u(j,e)):p(e,o(j,e))}else{if(!T[R])return B?e:{};j=g(e,R,n,N)}}O||(O=new i);var V=O.get(e);if(V)return V;O.set(e,j);var q=L?I?d:f:I?keysIn:A,G=M?void 0:q(e);return s(G||e,function(i,s){G&&(s=i,i=e[s]),a(j,s,n(i,t,r,s,e,O))}),j}var i=e("./_Stack"),s=e("./_arrayEach"),a=e("./_assignValue"),o=e("./_baseAssign"),u=e("./_baseAssignIn"),l=e("./_cloneBuffer"),c=e("./_copyArray"),p=e("./_copySymbols"),h=e("./_copySymbolsIn"),f=e("./_getAllKeys"),d=e("./_getAllKeysIn"),m=e("./_getTag"),y=e("./_initCloneArray"),g=e("./_initCloneByTag"),b=e("./_initCloneObject"),v=e("./isArray"),x=e("./isBuffer"),E=e("./isObject"),A=e("./keys"),D=1,C=2,S=4,_="[object Arguments]",w="[object Function]",k="[object GeneratorFunction]",F="[object Object]",T={};T[_]=T["[object Array]"]=T["[object ArrayBuffer]"]=T["[object DataView]"]=T["[object Boolean]"]=T["[object Date]"]=T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Map]"]=T["[object Number]"]=T[F]=T["[object RegExp]"]=T["[object Set]"]=T["[object String]"]=T["[object Symbol]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T["[object Error]"]=T[w]=T["[object WeakMap]"]=!1,t.exports=n},{"./_Stack":322,"./_arrayEach":329,"./_assignValue":339,"./_baseAssign":341,"./_baseAssignIn":342,"./_cloneBuffer":389,"./_copyArray":398,"./_copySymbols":400,"./_copySymbolsIn":401,"./_getAllKeys":414,"./_getAllKeysIn":415,"./_getTag":423,"./_initCloneArray":431,"./_initCloneByTag":432,"./_initCloneObject":433,"./isArray":498,"./isBuffer":501,"./isObject":505,"./keys":512}],346:[function(e,t,r){var n=e("./isObject"),i=Object.create,s=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();t.exports=s},{"./isObject":505}],347:[function(e,t,r){var n=e("./_baseForOwn"),i=e("./_createBaseEach"),s=i(n);t.exports=s},{"./_baseForOwn":351,"./_createBaseEach":404}],348:[function(e,t,r){function n(e,t,r,n){for(var i=e.length,s=r+(n?1:-1);n?s--:++s<i;)if(t(e[s],s,e))return s;return-1}t.exports=n},{}],349:[function(e,t,r){function n(e,t,r,a,o){var u=-1,l=e.length;for(r||(r=s),o||(o=[]);++u<l;){var c=e[u];t>0&&r(c)?t>1?n(c,t-1,r,a,o):i(o,c):a||(o[o.length]=c)}return o}var i=e("./_arrayPush"),s=e("./_isFlattenable");t.exports=n},{"./_arrayPush":335,"./_isFlattenable":434}],350:[function(e,t,r){var n=e("./_createBaseFor"),i=n();t.exports=i},{"./_createBaseFor":405}],351:[function(e,t,r){function n(e,t){return e&&i(e,t,s)}var i=e("./_baseFor"),s=e("./keys");t.exports=n},{"./_baseFor":350,"./keys":512}],352:[function(e,t,r){function n(e,t){t=i(t,e);for(var r=0,n=t.length;null!=e&&r<n;)e=e[s(t[r++])];return r&&r==n?e:void 0}var i=e("./_castPath"),s=e("./_toKey");t.exports=n},{"./_castPath":387,"./_toKey":475}],353:[function(e,t,r){function n(e,t,r){var n=t(e);return s(e)?n:i(n,r(e))}var i=e("./_arrayPush"),s=e("./isArray");t.exports=n},{"./_arrayPush":335,"./isArray":498}],354:[function(e,t,r){function n(e){return null==e?void 0===e?u:o:l&&l in Object(e)?s(e):a(e)}var i=e("./_Symbol"),s=e("./_getRawTag"),a=e("./_objectToString"),o="[object Null]",u="[object Undefined]",l=i?i.toStringTag:void 0;t.exports=n},{"./_Symbol":323,"./_getRawTag":420,"./_objectToString":459}],355:[function(e,t,r){function n(e,t){return null!=e&&s.call(e,t)}var i=Object.prototype,s=i.hasOwnProperty;t.exports=n},{}],356:[function(e,t,r){function n(e,t){return null!=e&&t in Object(e)}t.exports=n},{}],357:[function(e,t,r){function n(e,t,r){return t===t?a(e,t,r):i(e,s,r)}var i=e("./_baseFindIndex"),s=e("./_baseIsNaN"),a=e("./_strictIndexOf");t.exports=n},{"./_baseFindIndex":348,"./_baseIsNaN":362,"./_strictIndexOf":473}],358:[function(e,t,r){function n(e){return s(e)&&i(e)==a}var i=e("./_baseGetTag"),s=e("./isObjectLike"),a="[object Arguments]";t.exports=n},{"./_baseGetTag":354,"./isObjectLike":506}],359:[function(e,t,r){function n(e,t,r,a,o){return e===t||(null==e||null==t||!s(e)&&!s(t)?e!==e&&t!==t:i(e,t,r,a,n,o))}var i=e("./_baseIsEqualDeep"),s=e("./isObjectLike");t.exports=n},{"./_baseIsEqualDeep":360,"./isObjectLike":506}],360:[function(e,t,r){function n(e,t,r,n,y,b){var v=l(e),x=l(t),E=v?d:u(e),A=x?d:u(t);E=E==f?m:E,A=A==f?m:A;var D=E==m,C=A==m,S=E==A;if(S&&c(e)){if(!c(t))return!1;v=!0,D=!1}if(S&&!D)return b||(b=new i),v||p(e)?s(e,t,r,n,y,b):a(e,t,E,r,n,y,b);if(!(r&h)){var _=D&&g.call(e,"__wrapped__"),w=C&&g.call(t,"__wrapped__");if(_||w){var k=_?e.value():e,F=w?t.value():t;return b||(b=new i),y(k,F,r,n,b)}}return!!S&&(b||(b=new i),o(e,t,r,n,y,b))}var i=e("./_Stack"),s=e("./_equalArrays"),a=e("./_equalByTag"),o=e("./_equalObjects"),u=e("./_getTag"),l=e("./isArray"),c=e("./isBuffer"),p=e("./isTypedArray"),h=1,f="[object Arguments]",d="[object Array]",m="[object Object]",y=Object.prototype,g=y.hasOwnProperty;t.exports=n},{"./_Stack":322,"./_equalArrays":410,"./_equalByTag":411,"./_equalObjects":412,"./_getTag":423,"./isArray":498,"./isBuffer":501,"./isTypedArray":511}],361:[function(e,t,r){function n(e,t,r,n){var u=r.length,l=u,c=!n;if(null==e)return!l;for(e=Object(e);u--;){var p=r[u];if(c&&p[2]?p[1]!==e[p[0]]:!(p[0]in e))return!1}for(;++u<l;){p=r[u];var h=p[0],f=e[h],d=p[1];if(c&&p[2]){if(void 0===f&&!(h in e))return!1}else{var m=new i;if(n)var y=n(f,d,h,e,t,m);if(!(void 0===y?s(d,f,a|o,n,m):y))return!1}}return!0}var i=e("./_Stack"),s=e("./_baseIsEqual"),a=1,o=2;t.exports=n},{"./_Stack":322,"./_baseIsEqual":359}],362:[function(e,t,r){function n(e){return e!==e}t.exports=n},{}],363:[function(e,t,r){function n(e){return!(!a(e)||s(e))&&(i(e)?f:u).test(o(e))}var i=e("./isFunction"),s=e("./_isMasked"),a=e("./isObject"),o=e("./_toSource"),u=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,p=l.toString,h=c.hasOwnProperty,f=RegExp("^"+p.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=n},{"./_isMasked":439,"./_toSource":476,"./isFunction":502,"./isObject":505}],364:[function(e,t,r){function n(e){return s(e)&&i(e)==a}var i=e("./_baseGetTag"),s=e("./isObjectLike"),a="[object RegExp]";t.exports=n},{"./_baseGetTag":354,"./isObjectLike":506}],365:[function(e,t,r){function n(e){return a(e)&&s(e.length)&&!!o[i(e)]}var i=e("./_baseGetTag"),s=e("./isLength"),a=e("./isObjectLike"),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,t.exports=n},{"./_baseGetTag":354,"./isLength":504,"./isObjectLike":506}],366:[function(e,t,r){function n(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?o(e)?s(e[0],e[1]):i(e):u(e)}var i=e("./_baseMatches"),s=e("./_baseMatchesProperty"),a=e("./identity"),o=e("./isArray"),u=e("./property");t.exports=n},{"./_baseMatches":370,"./_baseMatchesProperty":371,"./identity":495,"./isArray":498,"./property":518}],367:[function(e,t,r){function n(e){if(!i(e))return s(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}var i=e("./_isPrototype"),s=e("./_nativeKeys"),a=Object.prototype,o=a.hasOwnProperty;t.exports=n},{"./_isPrototype":440,"./_nativeKeys":456}],368:[function(e,t,r){function n(e){if(!i(e))return a(e);var t=s(e),r=[];for(var n in e)("constructor"!=n||!t&&u.call(e,n))&&r.push(n);return r}var i=e("./isObject"),s=e("./_isPrototype"),a=e("./_nativeKeysIn"),o=Object.prototype,u=o.hasOwnProperty;t.exports=n},{"./_isPrototype":440,"./_nativeKeysIn":457,"./isObject":505}],369:[function(e,t,r){function n(e,t){var r=-1,n=s(e)?Array(e.length):[];return i(e,function(e,i,s){n[++r]=t(e,i,s)}),n}var i=e("./_baseEach"),s=e("./isArrayLike");t.exports=n},{"./_baseEach":347,"./isArrayLike":499}],370:[function(e,t,r){function n(e){var t=s(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(r){return r===e||i(r,e,t)}}var i=e("./_baseIsMatch"),s=e("./_getMatchData"),a=e("./_matchesStrictComparable");t.exports=n},{"./_baseIsMatch":361,"./_getMatchData":417,"./_matchesStrictComparable":453}],371:[function(e,t,r){function n(e,t){return o(e)&&u(t)?l(c(e),t):function(r){var n=s(r,e);return void 0===n&&n===t?a(r,e):i(t,n,p|h)}}var i=e("./_baseIsEqual"),s=e("./get"),a=e("./hasIn"),o=e("./_isKey"),u=e("./_isStrictComparable"),l=e("./_matchesStrictComparable"),c=e("./_toKey"),p=1,h=2;t.exports=n},{"./_baseIsEqual":359,"./_isKey":437,"./_isStrictComparable":441,"./_matchesStrictComparable":453,"./_toKey":475,"./get":492,"./hasIn":494}],372:[function(e,t,r){function n(e,t,r,c,p){e!==t&&a(t,function(a,l){if(u(a))p||(p=new i),o(e,t,l,r,n,c,p);else{var h=c?c(e[l],a,l+"",e,t,p):void 0;void 0===h&&(h=a),s(e,l,h)}},l)}var i=e("./_Stack"),s=e("./_assignMergeValue"),a=e("./_baseFor"),o=e("./_baseMergeDeep"),u=e("./isObject"),l=e("./keysIn");t.exports=n},{"./_Stack":322,"./_assignMergeValue":338,"./_baseFor":350,"./_baseMergeDeep":373,"./isObject":505,"./keysIn":513}],373:[function(e,t,r){function n(e,t,r,n,b,v,x){var E=e[r],A=t[r],D=x.get(A);if(D)return void i(e,r,D);var C=v?v(E,A,r+"",e,t,x):void 0,S=void 0===C;if(S){var _=c(A),w=!_&&h(A),k=!_&&!w&&y(A);C=A,_||w||k?c(E)?C=E:p(E)?C=o(E):w?(S=!1,C=s(A,!0)):k?(S=!1,C=a(A,!0)):C=[]:m(A)||l(A)?(C=E,l(E)?C=g(E):(!d(E)||n&&f(E))&&(C=u(A))):S=!1}S&&(x.set(A,C),b(C,A,n,v,x),x.delete(A)),i(e,r,C)}var i=e("./_assignMergeValue"),s=e("./_cloneBuffer"),a=e("./_cloneTypedArray"),o=e("./_copyArray"),u=e("./_initCloneObject"),l=e("./isArguments"),c=e("./isArray"),p=e("./isArrayLikeObject"),h=e("./isBuffer"),f=e("./isFunction"),d=e("./isObject"),m=e("./isPlainObject"),y=e("./isTypedArray"),g=e("./toPlainObject");t.exports=n},{"./_assignMergeValue":338,"./_cloneBuffer":389,"./_cloneTypedArray":395,"./_copyArray":398,"./_initCloneObject":433,"./isArguments":497,"./isArray":498,"./isArrayLikeObject":500,"./isBuffer":501,"./isFunction":502,"./isObject":505,"./isPlainObject":507,"./isTypedArray":511,"./toPlainObject":527}],374:[function(e,t,r){function n(e,t,r){var n=-1;t=i(t.length?t:[c],u(s));var p=a(e,function(e,r,s){return{criteria:i(t,function(t){return t(e)}),index:++n,value:e}});return o(p,function(e,t){return l(e,t,r)})}var i=e("./_arrayMap"),s=e("./_baseIteratee"),a=e("./_baseMap"),o=e("./_baseSortBy"),u=e("./_baseUnary"),l=e("./_compareMultiple"),c=e("./identity");t.exports=n},{"./_arrayMap":334,"./_baseIteratee":366,"./_baseMap":369,"./_baseSortBy":380,"./_baseUnary":383,"./_compareMultiple":397,"./identity":495}],375:[function(e,t,r){function n(e){return function(t){return null==t?void 0:t[e]}}t.exports=n},{}],376:[function(e,t,r){function n(e){return function(t){return i(t,e)}}var i=e("./_baseGet");t.exports=n},{"./_baseGet":352}],377:[function(e,t,r){function n(e,t){var r="";if(!e||t<1||t>i)return r;do{t%2&&(r+=e),(t=s(t/2))&&(e+=e)}while(t);return r}var i=9007199254740991,s=Math.floor;t.exports=n},{}],378:[function(e,t,r){function n(e,t){return a(s(e,t,i),e+"")}var i=e("./identity"),s=e("./_overRest"),a=e("./_setToString");t.exports=n},{"./_overRest":461,"./_setToString":466,"./identity":495}],379:[function(e,t,r){var n=e("./constant"),i=e("./_defineProperty"),s=e("./identity"),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:s;t.exports=a},{"./_defineProperty":409,"./constant":483,"./identity":495}],380:[function(e,t,r){function n(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}t.exports=n},{}],381:[function(e,t,r){function n(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}t.exports=n},{}],382:[function(e,t,r){function n(e){if("string"==typeof e)return e;if(a(e))return s(e,n)+"";if(o(e))return c?c.call(e):"";var t=e+"";return"0"==t&&1/e==-u?"-0":t}var i=e("./_Symbol"),s=e("./_arrayMap"),a=e("./isArray"),o=e("./isSymbol"),u=1/0,l=i?i.prototype:void 0,c=l?l.toString:void 0;t.exports=n},{"./_Symbol":323,"./_arrayMap":334,"./isArray":498,"./isSymbol":510}],383:[function(e,t,r){function n(e){return function(t){return e(t)}}t.exports=n},{}],384:[function(e,t,r){function n(e,t,r){var n=-1,p=s,h=e.length,f=!0,d=[],m=d;if(r)f=!1,p=a;else if(h>=c){var y=t?null:u(e);if(y)return l(y);f=!1,p=o,m=new i}else m=t?[]:d;e:for(;++n<h;){var g=e[n],b=t?t(g):g;if(g=r||0!==g?g:0,f&&b===b){for(var v=m.length;v--;)if(m[v]===b)continue e;t&&m.push(b),d.push(g)}else p(m,b,r)||(m!==d&&m.push(b),d.push(g))}return d}var i=e("./_SetCache"),s=e("./_arrayIncludes"),a=e("./_arrayIncludesWith"),o=e("./_cacheHas"),u=e("./_createSet"),l=e("./_setToArray"),c=200;t.exports=n},{"./_SetCache":321,"./_arrayIncludes":331,"./_arrayIncludesWith":332,"./_cacheHas":386,"./_createSet":407,"./_setToArray":465}],385:[function(e,t,r){function n(e,t){return i(t,function(t){return e[t]})}var i=e("./_arrayMap");t.exports=n},{"./_arrayMap":334}],386:[function(e,t,r){function n(e,t){return e.has(t)}t.exports=n},{}],387:[function(e,t,r){function n(e,t){return i(e)?e:s(e,t)?[e]:a(o(e))}var i=e("./isArray"),s=e("./_isKey"),a=e("./_stringToPath"),o=e("./toString");t.exports=n},{"./_isKey":437,"./_stringToPath":474,"./isArray":498,"./toString":528}],388:[function(e,t,r){function n(e){var t=new e.constructor(e.byteLength);return new i(t).set(new i(e)),t}var i=e("./_Uint8Array");t.exports=n},{"./_Uint8Array":324}],389:[function(e,t,r){function n(e,t){if(t)return e.slice();var r=e.length,n=l?l(r):new e.constructor(r);return e.copy(n),n}var i=e("./_root"),s="object"==typeof r&&r&&!r.nodeType&&r,a=s&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===s,u=o?i.Buffer:void 0,l=u?u.allocUnsafe:void 0;t.exports=n},{"./_root":462}],390:[function(e,t,r){function n(e,t){var r=t?i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var i=e("./_cloneArrayBuffer");t.exports=n},{"./_cloneArrayBuffer":388}],391:[function(e,t,r){function n(e,t,r){var n=t?r(a(e),o):a(e);return s(n,i,new e.constructor)}var i=e("./_addMapEntry"),s=e("./_arrayReduce"),a=e("./_mapToArray"),o=1;t.exports=n},{"./_addMapEntry":326,"./_arrayReduce":336,"./_mapToArray":452}],392:[function(e,t,r){function n(e){var t=new e.constructor(e.source,i.exec(e));return t.lastIndex=e.lastIndex,t}var i=/\w*$/;t.exports=n},{}],393:[function(e,t,r){function n(e,t,r){var n=t?r(a(e),o):a(e);return s(n,i,new e.constructor)}var i=e("./_addSetEntry"),s=e("./_arrayReduce"),a=e("./_setToArray"),o=1;t.exports=n},{"./_addSetEntry":327,"./_arrayReduce":336,"./_setToArray":465}],394:[function(e,t,r){function n(e){return a?Object(a.call(e)):{}}var i=e("./_Symbol"),s=i?i.prototype:void 0,a=s?s.valueOf:void 0;t.exports=n},{"./_Symbol":323}],395:[function(e,t,r){function n(e,t){var r=t?i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var i=e("./_cloneArrayBuffer");t.exports=n},{"./_cloneArrayBuffer":388}],396:[function(e,t,r){function n(e,t){if(e!==t){var r=void 0!==e,n=null===e,s=e===e,a=i(e),o=void 0!==t,u=null===t,l=t===t,c=i(t);if(!u&&!c&&!a&&e>t||a&&o&&l&&!u&&!c||n&&o&&l||!r&&l||!s)return 1;if(!n&&!a&&!c&&e<t||c&&r&&s&&!n&&!a||u&&r&&s||!o&&s||!l)return-1}return 0}var i=e("./isSymbol");t.exports=n},{"./isSymbol":510}],397:[function(e,t,r){function n(e,t,r){for(var n=-1,s=e.criteria,a=t.criteria,o=s.length,u=r.length;++n<o;){var l=i(s[n],a[n]);if(l){if(n>=u)return l;return l*("desc"==r[n]?-1:1)}}return e.index-t.index}var i=e("./_compareAscending");t.exports=n},{"./_compareAscending":396}],398:[function(e,t,r){function n(e,t){var r=-1,n=e.length
+;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}t.exports=n},{}],399:[function(e,t,r){function n(e,t,r,n){var a=!r;r||(r={});for(var o=-1,u=t.length;++o<u;){var l=t[o],c=n?n(r[l],e[l],l,r,e):void 0;void 0===c&&(c=e[l]),a?s(r,l,c):i(r,l,c)}return r}var i=e("./_assignValue"),s=e("./_baseAssignValue");t.exports=n},{"./_assignValue":339,"./_baseAssignValue":343}],400:[function(e,t,r){function n(e,t){return i(e,s(e),t)}var i=e("./_copyObject"),s=e("./_getSymbols");t.exports=n},{"./_copyObject":399,"./_getSymbols":421}],401:[function(e,t,r){function n(e,t){return i(e,s(e),t)}var i=e("./_copyObject"),s=e("./_getSymbolsIn");t.exports=n},{"./_copyObject":399,"./_getSymbolsIn":422}],402:[function(e,t,r){var n=e("./_root"),i=n["__core-js_shared__"];t.exports=i},{"./_root":462}],403:[function(e,t,r){function n(e){return i(function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,o&&s(r[0],r[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++n<i;){var u=r[n];u&&e(t,u,n,a)}return t})}var i=e("./_baseRest"),s=e("./_isIterateeCall");t.exports=n},{"./_baseRest":378,"./_isIterateeCall":436}],404:[function(e,t,r){function n(e,t){return function(r,n){if(null==r)return r;if(!i(r))return e(r,n);for(var s=r.length,a=t?s:-1,o=Object(r);(t?a--:++a<s)&&!1!==n(o[a],a,o););return r}}var i=e("./isArrayLike");t.exports=n},{"./isArrayLike":499}],405:[function(e,t,r){function n(e){return function(t,r,n){for(var i=-1,s=Object(t),a=n(t),o=a.length;o--;){var u=a[e?o:++i];if(!1===r(s[u],u,s))break}return t}}t.exports=n},{}],406:[function(e,t,r){function n(e){return function(t,r,n){var o=Object(t);if(!s(t)){var u=i(r,3);t=a(t),r=function(e){return u(o[e],e,o)}}var l=e(t,r,n);return l>-1?o[u?t[l]:l]:void 0}}var i=e("./_baseIteratee"),s=e("./isArrayLike"),a=e("./keys");t.exports=n},{"./_baseIteratee":366,"./isArrayLike":499,"./keys":512}],407:[function(e,t,r){var n=e("./_Set"),i=e("./noop"),s=e("./_setToArray"),a=n&&1/s(new n([,-0]))[1]==1/0?function(e){return new n(e)}:i;t.exports=a},{"./_Set":320,"./_setToArray":465,"./noop":517}],408:[function(e,t,r){function n(e,t,r,n){return void 0===e||i(e,s[r])&&!a.call(n,r)?t:e}var i=e("./eq"),s=Object.prototype,a=s.hasOwnProperty;t.exports=n},{"./eq":485}],409:[function(e,t,r){var n=e("./_getNative"),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();t.exports=i},{"./_getNative":418}],410:[function(e,t,r){function n(e,t,r,n,l,c){var p=r&o,h=e.length,f=t.length;if(h!=f&&!(p&&f>h))return!1;var d=c.get(e);if(d&&c.get(t))return d==t;var m=-1,y=!0,g=r&u?new i:void 0;for(c.set(e,t),c.set(t,e);++m<h;){var b=e[m],v=t[m];if(n)var x=p?n(v,b,m,t,e,c):n(b,v,m,e,t,c);if(void 0!==x){if(x)continue;y=!1;break}if(g){if(!s(t,function(e,t){if(!a(g,t)&&(b===e||l(b,e,r,n,c)))return g.push(t)})){y=!1;break}}else if(b!==v&&!l(b,v,r,n,c)){y=!1;break}}return c.delete(e),c.delete(t),y}var i=e("./_SetCache"),s=e("./_arraySome"),a=e("./_cacheHas"),o=1,u=2;t.exports=n},{"./_SetCache":321,"./_arraySome":337,"./_cacheHas":386}],411:[function(e,t,r){function n(e,t,r,n,i,D,S){switch(r){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case E:return!(e.byteLength!=t.byteLength||!D(new s(e),new s(t)));case h:case f:case y:return a(+e,+t);case d:return e.name==t.name&&e.message==t.message;case g:case v:return e==t+"";case m:var _=u;case b:var w=n&c;if(_||(_=l),e.size!=t.size&&!w)return!1;var k=S.get(e);if(k)return k==t;n|=p,S.set(e,t);var F=o(_(e),_(t),n,i,D,S);return S.delete(e),F;case x:if(C)return C.call(e)==C.call(t)}return!1}var i=e("./_Symbol"),s=e("./_Uint8Array"),a=e("./eq"),o=e("./_equalArrays"),u=e("./_mapToArray"),l=e("./_setToArray"),c=1,p=2,h="[object Boolean]",f="[object Date]",d="[object Error]",m="[object Map]",y="[object Number]",g="[object RegExp]",b="[object Set]",v="[object String]",x="[object Symbol]",E="[object ArrayBuffer]",A="[object DataView]",D=i?i.prototype:void 0,C=D?D.valueOf:void 0;t.exports=n},{"./_Symbol":323,"./_Uint8Array":324,"./_equalArrays":410,"./_mapToArray":452,"./_setToArray":465,"./eq":485}],412:[function(e,t,r){function n(e,t,r,n,a,u){var l=r&s,c=i(e),p=c.length;if(p!=i(t).length&&!l)return!1;for(var h=p;h--;){var f=c[h];if(!(l?f in t:o.call(t,f)))return!1}var d=u.get(e);if(d&&u.get(t))return d==t;var m=!0;u.set(e,t),u.set(t,e);for(var y=l;++h<p;){f=c[h];var g=e[f],b=t[f];if(n)var v=l?n(b,g,f,t,e,u):n(g,b,f,e,t,u);if(!(void 0===v?g===b||a(g,b,r,n,u):v)){m=!1;break}y||(y="constructor"==f)}if(m&&!y){var x=e.constructor,E=t.constructor;x!=E&&"constructor"in e&&"constructor"in t&&!("function"==typeof x&&x instanceof x&&"function"==typeof E&&E instanceof E)&&(m=!1)}return u.delete(e),u.delete(t),m}var i=e("./_getAllKeys"),s=1,a=Object.prototype,o=a.hasOwnProperty;t.exports=n},{"./_getAllKeys":414}],413:[function(e,t,r){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],414:[function(e,t,r){function n(e){return i(e,a,s)}var i=e("./_baseGetAllKeys"),s=e("./_getSymbols"),a=e("./keys");t.exports=n},{"./_baseGetAllKeys":353,"./_getSymbols":421,"./keys":512}],415:[function(e,t,r){function n(e){return i(e,a,s)}var i=e("./_baseGetAllKeys"),s=e("./_getSymbolsIn"),a=e("./keysIn");t.exports=n},{"./_baseGetAllKeys":353,"./_getSymbolsIn":422,"./keysIn":513}],416:[function(e,t,r){function n(e,t){var r=e.__data__;return i(t)?r["string"==typeof t?"string":"hash"]:r.map}var i=e("./_isKeyable");t.exports=n},{"./_isKeyable":438}],417:[function(e,t,r){function n(e){for(var t=s(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,i(a)]}return t}var i=e("./_isStrictComparable"),s=e("./keys");t.exports=n},{"./_isStrictComparable":441,"./keys":512}],418:[function(e,t,r){function n(e,t){var r=s(e,t);return i(r)?r:void 0}var i=e("./_baseIsNative"),s=e("./_getValue");t.exports=n},{"./_baseIsNative":363,"./_getValue":424}],419:[function(e,t,r){var n=e("./_overArg"),i=n(Object.getPrototypeOf,Object);t.exports=i},{"./_overArg":460}],420:[function(e,t,r){function n(e){var t=a.call(e,u),r=e[u];try{e[u]=void 0}catch(e){}var n=o.call(e);return t?e[u]=r:delete e[u],n}var i=e("./_Symbol"),s=Object.prototype,a=s.hasOwnProperty,o=s.toString,u=i?i.toStringTag:void 0;t.exports=n},{"./_Symbol":323}],421:[function(e,t,r){var n=e("./_arrayFilter"),i=e("./stubArray"),s=Object.prototype,a=s.propertyIsEnumerable,o=Object.getOwnPropertySymbols,u=o?function(e){return null==e?[]:(e=Object(e),n(o(e),function(t){return a.call(e,t)}))}:i;t.exports=u},{"./_arrayFilter":330,"./stubArray":522}],422:[function(e,t,r){var n=e("./_arrayPush"),i=e("./_getPrototype"),s=e("./_getSymbols"),a=e("./stubArray"),o=Object.getOwnPropertySymbols,u=o?function(e){for(var t=[];e;)n(t,s(e)),e=i(e);return t}:a;t.exports=u},{"./_arrayPush":335,"./_getPrototype":419,"./_getSymbols":421,"./stubArray":522}],423:[function(e,t,r){var n=e("./_DataView"),i=e("./_Map"),s=e("./_Promise"),a=e("./_Set"),o=e("./_WeakMap"),u=e("./_baseGetTag"),l=e("./_toSource"),c=l(n),p=l(i),h=l(s),f=l(a),d=l(o),m=u;(n&&"[object DataView]"!=m(new n(new ArrayBuffer(1)))||i&&"[object Map]"!=m(new i)||s&&"[object Promise]"!=m(s.resolve())||a&&"[object Set]"!=m(new a)||o&&"[object WeakMap]"!=m(new o))&&(m=function(e){var t=u(e),r="[object Object]"==t?e.constructor:void 0,n=r?l(r):"";if(n)switch(n){case c:return"[object DataView]";case p:return"[object Map]";case h:return"[object Promise]";case f:return"[object Set]";case d:return"[object WeakMap]"}return t}),t.exports=m},{"./_DataView":314,"./_Map":317,"./_Promise":319,"./_Set":320,"./_WeakMap":325,"./_baseGetTag":354,"./_toSource":476}],424:[function(e,t,r){function n(e,t){return null==e?void 0:e[t]}t.exports=n},{}],425:[function(e,t,r){function n(e,t,r){t=i(t,e);for(var n=-1,c=t.length,p=!1;++n<c;){var h=l(t[n]);if(!(p=null!=e&&r(e,h)))break;e=e[h]}return p||++n!=c?p:!!(c=null==e?0:e.length)&&u(c)&&o(h,c)&&(a(e)||s(e))}var i=e("./_castPath"),s=e("./isArguments"),a=e("./isArray"),o=e("./_isIndex"),u=e("./isLength"),l=e("./_toKey");t.exports=n},{"./_castPath":387,"./_isIndex":435,"./_toKey":475,"./isArguments":497,"./isArray":498,"./isLength":504}],426:[function(e,t,r){function n(){this.__data__=i?i(null):{},this.size=0}var i=e("./_nativeCreate");t.exports=n},{"./_nativeCreate":455}],427:[function(e,t,r){function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}t.exports=n},{}],428:[function(e,t,r){function n(e){var t=this.__data__;if(i){var r=t[e];return r===s?void 0:r}return o.call(t,e)?t[e]:void 0}var i=e("./_nativeCreate"),s="__lodash_hash_undefined__",a=Object.prototype,o=a.hasOwnProperty;t.exports=n},{"./_nativeCreate":455}],429:[function(e,t,r){function n(e){var t=this.__data__;return i?void 0!==t[e]:a.call(t,e)}var i=e("./_nativeCreate"),s=Object.prototype,a=s.hasOwnProperty;t.exports=n},{"./_nativeCreate":455}],430:[function(e,t,r){function n(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=i&&void 0===t?s:t,this}var i=e("./_nativeCreate"),s="__lodash_hash_undefined__";t.exports=n},{"./_nativeCreate":455}],431:[function(e,t,r){function n(e){var t=e.length,r=e.constructor(t);return t&&"string"==typeof e[0]&&s.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var i=Object.prototype,s=i.hasOwnProperty;t.exports=n},{}],432:[function(e,t,r){function n(e,t,r,n){var T=e.constructor;switch(t){case v:return i(e);case p:case h:return new T(+e);case x:return s(e,n);case E:case A:case D:case C:case S:case _:case w:case k:case F:return c(e,n);case f:return a(e,n,r);case d:case g:return new T(e);case m:return o(e);case y:return u(e,n,r);case b:return l(e)}}var i=e("./_cloneArrayBuffer"),s=e("./_cloneDataView"),a=e("./_cloneMap"),o=e("./_cloneRegExp"),u=e("./_cloneSet"),l=e("./_cloneSymbol"),c=e("./_cloneTypedArray"),p="[object Boolean]",h="[object Date]",f="[object Map]",d="[object Number]",m="[object RegExp]",y="[object Set]",g="[object String]",b="[object Symbol]",v="[object ArrayBuffer]",x="[object DataView]",E="[object Float32Array]",A="[object Float64Array]",D="[object Int8Array]",C="[object Int16Array]",S="[object Int32Array]",_="[object Uint8Array]",w="[object Uint8ClampedArray]",k="[object Uint16Array]",F="[object Uint32Array]";t.exports=n},{"./_cloneArrayBuffer":388,"./_cloneDataView":390,"./_cloneMap":391,"./_cloneRegExp":392,"./_cloneSet":393,"./_cloneSymbol":394,"./_cloneTypedArray":395}],433:[function(e,t,r){function n(e){return"function"!=typeof e.constructor||a(e)?{}:i(s(e))}var i=e("./_baseCreate"),s=e("./_getPrototype"),a=e("./_isPrototype");t.exports=n},{"./_baseCreate":346,"./_getPrototype":419,"./_isPrototype":440}],434:[function(e,t,r){function n(e){return a(e)||s(e)||!!(o&&e&&e[o])}var i=e("./_Symbol"),s=e("./isArguments"),a=e("./isArray"),o=i?i.isConcatSpreadable:void 0;t.exports=n},{"./_Symbol":323,"./isArguments":497,"./isArray":498}],435:[function(e,t,r){function n(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||s.test(e))&&e>-1&&e%1==0&&e<t}var i=9007199254740991,s=/^(?:0|[1-9]\d*)$/;t.exports=n},{}],436:[function(e,t,r){function n(e,t,r){if(!o(r))return!1;var n=typeof t;return!!("number"==n?s(r)&&a(t,r.length):"string"==n&&t in r)&&i(r[t],e)}var i=e("./eq"),s=e("./isArrayLike"),a=e("./_isIndex"),o=e("./isObject");t.exports=n},{"./_isIndex":435,"./eq":485,"./isArrayLike":499,"./isObject":505}],437:[function(e,t,r){function n(e,t){if(i(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!s(e))||(o.test(e)||!a.test(e)||null!=t&&e in Object(t))}var i=e("./isArray"),s=e("./isSymbol"),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;t.exports=n},{"./isArray":498,"./isSymbol":510}],438:[function(e,t,r){function n(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}t.exports=n},{}],439:[function(e,t,r){function n(e){return!!s&&s in e}var i=e("./_coreJsData"),s=function(){var e=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();t.exports=n},{"./_coreJsData":402}],440:[function(e,t,r){function n(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||i)}var i=Object.prototype;t.exports=n},{}],441:[function(e,t,r){function n(e){return e===e&&!i(e)}var i=e("./isObject");t.exports=n},{"./isObject":505}],442:[function(e,t,r){function n(){this.__data__=[],this.size=0}t.exports=n},{}],443:[function(e,t,r){function n(e){var t=this.__data__,r=i(t,e);return!(r<0)&&(r==t.length-1?t.pop():a.call(t,r,1),--this.size,!0)}var i=e("./_assocIndexOf"),s=Array.prototype,a=s.splice;t.exports=n},{"./_assocIndexOf":340}],444:[function(e,t,r){function n(e){var t=this.__data__,r=i(t,e);return r<0?void 0:t[r][1]}var i=e("./_assocIndexOf");t.exports=n},{"./_assocIndexOf":340}],445:[function(e,t,r){function n(e){return i(this.__data__,e)>-1}var i=e("./_assocIndexOf");t.exports=n},{"./_assocIndexOf":340}],446:[function(e,t,r){function n(e,t){var r=this.__data__,n=i(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var i=e("./_assocIndexOf");t.exports=n},{"./_assocIndexOf":340}],447:[function(e,t,r){function n(){this.size=0,this.__data__={hash:new i,map:new(a||s),string:new i}}var i=e("./_Hash"),s=e("./_ListCache"),a=e("./_Map");t.exports=n},{"./_Hash":315,"./_ListCache":316,"./_Map":317}],448:[function(e,t,r){function n(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}var i=e("./_getMapData");t.exports=n},{"./_getMapData":416}],449:[function(e,t,r){function n(e){return i(this,e).get(e)}var i=e("./_getMapData");t.exports=n},{"./_getMapData":416}],450:[function(e,t,r){function n(e){return i(this,e).has(e)}var i=e("./_getMapData");t.exports=n},{"./_getMapData":416}],451:[function(e,t,r){function n(e,t){var r=i(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var i=e("./_getMapData");t.exports=n},{"./_getMapData":416}],452:[function(e,t,r){function n(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}t.exports=n},{}],453:[function(e,t,r){function n(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}t.exports=n},{}],454:[function(e,t,r){function n(e){var t=i(e,function(e){return r.size===s&&r.clear(),e}),r=t.cache;return t}var i=e("./memoize"),s=500;t.exports=n},{"./memoize":515}],455:[function(e,t,r){var n=e("./_getNative"),i=n(Object,"create");t.exports=i},{"./_getNative":418}],456:[function(e,t,r){var n=e("./_overArg"),i=n(Object.keys,Object);t.exports=i},{"./_overArg":460}],457:[function(e,t,r){function n(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}t.exports=n},{}],458:[function(e,t,r){var n=e("./_freeGlobal"),i="object"==typeof r&&r&&!r.nodeType&&r,s=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=s&&s.exports===i,o=a&&n.process,u=function(){try{return o&&o.binding&&o.binding("util")}catch(e){}}();t.exports=u},{"./_freeGlobal":413}],459:[function(e,t,r){function n(e){return s.call(e)}var i=Object.prototype,s=i.toString;t.exports=n},{}],460:[function(e,t,r){function n(e,t){return function(r){return e(t(r))}}t.exports=n},{}],461:[function(e,t,r){function n(e,t,r){return t=s(void 0===t?e.length-1:t,0),function(){for(var n=arguments,a=-1,o=s(n.length-t,0),u=Array(o);++a<o;)u[a]=n[t+a];a=-1;for(var l=Array(t+1);++a<t;)l[a]=n[a];return l[t]=r(u),i(e,this,l)}}var i=e("./_apply"),s=Math.max;t.exports=n},{"./_apply":328}],462:[function(e,t,r){var n=e("./_freeGlobal"),i="object"==typeof self&&self&&self.Object===Object&&self,s=n||i||Function("return this")();t.exports=s},{"./_freeGlobal":413}],463:[function(e,t,r){function n(e){return this.__data__.set(e,i),this}var i="__lodash_hash_undefined__";t.exports=n},{}],464:[function(e,t,r){function n(e){return this.__data__.has(e)}t.exports=n},{}],465:[function(e,t,r){function n(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}t.exports=n},{}],466:[function(e,t,r){var n=e("./_baseSetToString"),i=e("./_shortOut"),s=i(n);t.exports=s},{"./_baseSetToString":379,"./_shortOut":467}],467:[function(e,t,r){function n(e){var t=0,r=0;return function(){var n=a(),o=s-(n-r);if(r=n,o>0){if(++t>=i)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var i=800,s=16,a=Date.now;t.exports=n},{}],468:[function(e,t,r){function n(){this.__data__=new i,this.size=0}var i=e("./_ListCache");t.exports=n},{"./_ListCache":316}],469:[function(e,t,r){function n(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}t.exports=n},{}],470:[function(e,t,r){function n(e){return this.__data__.get(e)}t.exports=n},{}],471:[function(e,t,r){function n(e){return this.__data__.has(e)}t.exports=n},{}],472:[function(e,t,r){function n(e,t){var r=this.__data__;if(r instanceof i){var n=r.__data__;if(!s||n.length<o-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new a(n)}return r.set(e,t),this.size=r.size,this}var i=e("./_ListCache"),s=e("./_Map"),a=e("./_MapCache"),o=200;t.exports=n},{"./_ListCache":316,"./_Map":317,"./_MapCache":318}],473:[function(e,t,r){function n(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}t.exports=n},{}],474:[function(e,t,r){var n=e("./_memoizeCapped"),i=/^\./,s=n(function(e){var t=[];return i.test(e)&&t.push(""),e.replace(/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,function(e,r,n,i){t.push(n?i.replace(/\\(\\)?/g,"$1"):r||e)}),t});t.exports=s},{"./_memoizeCapped":454}],475:[function(e,t,r){function n(e){if("string"==typeof e||i(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}var i=e("./isSymbol"),s=1/0;t.exports=n},{"./isSymbol":510}],476:[function(e,t,r){function n(e){if(null!=e){try{return s.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var i=Function.prototype,s=i.toString;t.exports=n},{}],477:[function(e,t,r){var n=e("./_assignValue"),i=e("./_copyObject"),s=e("./_createAssigner"),a=e("./isArrayLike"),o=e("./_isPrototype"),u=e("./keys"),l=Object.prototype,c=l.hasOwnProperty,p=s(function(e,t){if(o(t)||a(t))return void i(t,u(t),e);for(var r in t)c.call(t,r)&&n(e,r,t[r])});t.exports=p},{"./_assignValue":339,"./_copyObject":399,"./_createAssigner":403,"./_isPrototype":440,"./isArrayLike":499,"./keys":512}],478:[function(e,t,r){var n=e("./_copyObject"),i=e("./_createAssigner"),s=e("./keysIn"),a=i(function(e,t){n(t,s(t),e)});t.exports=a},{"./_copyObject":399,"./_createAssigner":403,"./keysIn":513}],479:[function(e,t,r){var n=e("./_copyObject"),i=e("./_createAssigner"),s=e("./keysIn"),a=i(function(e,t,r,i){n(t,s(t),e,i)});t.exports=a},{"./_copyObject":399,"./_createAssigner":403,"./keysIn":513}],480:[function(e,t,r){function n(e){return i(e,s)}var i=e("./_baseClone"),s=4;t.exports=n},{"./_baseClone":345}],481:[function(e,t,r){function n(e){return i(e,s|a)}var i=e("./_baseClone"),s=1,a=4;t.exports=n},{"./_baseClone":345}],482:[function(e,t,r){function n(e,t){return t="function"==typeof t?t:void 0,i(e,s|a,t)}var i=e("./_baseClone"),s=1,a=4;t.exports=n},{"./_baseClone":345}],483:[function(e,t,r){function n(e){return function(){return e}}t.exports=n},{}],484:[function(e,t,r){var n=e("./_apply"),i=e("./assignInWith"),s=e("./_baseRest"),a=e("./_customDefaultsAssignIn"),o=s(function(e){return e.push(void 0,a),n(i,void 0,e)});t.exports=o},{"./_apply":328,"./_baseRest":378,"./_customDefaultsAssignIn":408,"./assignInWith":479}],485:[function(e,t,r){function n(e,t){return e===t||e!==e&&t!==t}t.exports=n},{}],486:[function(e,t,r){function n(e){return e=i(e),e&&a.test(e)?e.replace(s,"\\$&"):e}var i=e("./toString"),s=/[\\^$.*+?()[\]{}|]/g,a=RegExp(s.source);t.exports=n},{"./toString":528}],487:[function(e,t,r){t.exports=e("./assignIn")},{"./assignIn":478}],488:[function(e,t,r){var n=e("./_createFind"),i=e("./findIndex"),s=n(i);t.exports=s},{"./_createFind":406,"./findIndex":489}],489:[function(e,t,r){function n(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var u=null==r?0:a(r);return u<0&&(u=o(n+u,0)),i(e,s(t,3),u)}var i=e("./_baseFindIndex"),s=e("./_baseIteratee"),a=e("./toInteger"),o=Math.max;t.exports=n},{"./_baseFindIndex":348,"./_baseIteratee":366,"./toInteger":525}],490:[function(e,t,r){var n=e("./_createFind"),i=e("./findLastIndex"),s=n(i);t.exports=s},{"./_createFind":406,"./findLastIndex":491}],491:[function(e,t,r){function n(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var l=n-1;return void 0!==r&&(l=a(r),l=r<0?o(n+l,0):u(l,n-1)),i(e,s(t,3),l,!0)}var i=e("./_baseFindIndex"),s=e("./_baseIteratee"),a=e("./toInteger"),o=Math.max,u=Math.min;t.exports=n},{"./_baseFindIndex":348,"./_baseIteratee":366,"./toInteger":525}],492:[function(e,t,r){function n(e,t,r){var n=null==e?void 0:i(e,t);return void 0===n?r:n}var i=e("./_baseGet");t.exports=n},{"./_baseGet":352}],493:[function(e,t,r){function n(e,t){return null!=e&&s(e,t,i)}var i=e("./_baseHas"),s=e("./_hasPath");t.exports=n},{"./_baseHas":355,"./_hasPath":425}],494:[function(e,t,r){function n(e,t){return null!=e&&s(e,t,i)}var i=e("./_baseHasIn"),s=e("./_hasPath");t.exports=n},{"./_baseHasIn":356,"./_hasPath":425}],495:[function(e,t,r){function n(e){return e}t.exports=n},{}],496:[function(e,t,r){function n(e,t,r,n){e=s(e)?e:u(e),r=r&&!n?o(r):0;var c=e.length;return r<0&&(r=l(c+r,0)),a(e)?r<=c&&e.indexOf(t,r)>-1:!!c&&i(e,t,r)>-1}var i=e("./_baseIndexOf"),s=e("./isArrayLike"),a=e("./isString"),o=e("./toInteger"),u=e("./values"),l=Math.max;t.exports=n},{"./_baseIndexOf":357,"./isArrayLike":499,"./isString":509,"./toInteger":525,"./values":530}],497:[function(e,t,r){var n=e("./_baseIsArguments"),i=e("./isObjectLike"),s=Object.prototype,a=s.hasOwnProperty,o=s.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return i(e)&&a.call(e,"callee")&&!o.call(e,"callee")};t.exports=u},{"./_baseIsArguments":358,"./isObjectLike":506}],498:[function(e,t,r){var n=Array.isArray;t.exports=n},{}],499:[function(e,t,r){function n(e){return null!=e&&s(e.length)&&!i(e)}var i=e("./isFunction"),s=e("./isLength");t.exports=n},{"./isFunction":502,"./isLength":504}],500:[function(e,t,r){function n(e){return s(e)&&i(e)}var i=e("./isArrayLike"),s=e("./isObjectLike");t.exports=n},{"./isArrayLike":499,"./isObjectLike":506}],501:[function(e,t,r){var n=e("./_root"),i=e("./stubFalse"),s="object"==typeof r&&r&&!r.nodeType&&r,a=s&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===s,u=o?n.Buffer:void 0,l=u?u.isBuffer:void 0,c=l||i;t.exports=c},{"./_root":462,"./stubFalse":523}],502:[function(e,t,r){function n(e){if(!s(e))return!1;var t=i(e);return t==o||t==u||t==a||t==l}var i=e("./_baseGetTag"),s=e("./isObject"),a="[object AsyncFunction]",o="[object Function]",u="[object GeneratorFunction]",l="[object Proxy]";t.exports=n},{"./_baseGetTag":354,"./isObject":505}],503:[function(e,t,r){function n(e){return"number"==typeof e&&e==i(e)}var i=e("./toInteger");t.exports=n},{"./toInteger":525}],504:[function(e,t,r){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}var i=9007199254740991;t.exports=n},{}],505:[function(e,t,r){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}t.exports=n},{}],506:[function(e,t,r){function n(e){return null!=e&&"object"==typeof e}t.exports=n},{}],507:[function(e,t,r){function n(e){if(!a(e)||i(e)!=o)return!1;var t=s(e);if(null===t)return!0;var r=p.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&c.call(r)==h}var i=e("./_baseGetTag"),s=e("./_getPrototype"),a=e("./isObjectLike"),o="[object Object]",u=Function.prototype,l=Object.prototype,c=u.toString,p=l.hasOwnProperty,h=c.call(Object);t.exports=n},{"./_baseGetTag":354,"./_getPrototype":419,"./isObjectLike":506}],508:[function(e,t,r){var n=e("./_baseIsRegExp"),i=e("./_baseUnary"),s=e("./_nodeUtil"),a=s&&s.isRegExp,o=a?i(a):n;t.exports=o},{"./_baseIsRegExp":364,"./_baseUnary":383,"./_nodeUtil":458}],509:[function(e,t,r){function n(e){return"string"==typeof e||!s(e)&&a(e)&&i(e)==o}var i=e("./_baseGetTag"),s=e("./isArray"),a=e("./isObjectLike"),o="[object String]";t.exports=n},{"./_baseGetTag":354,"./isArray":498,"./isObjectLike":506}],510:[function(e,t,r){function n(e){return"symbol"==typeof e||s(e)&&i(e)==a}var i=e("./_baseGetTag"),s=e("./isObjectLike"),a="[object Symbol]";t.exports=n},{"./_baseGetTag":354,"./isObjectLike":506}],511:[function(e,t,r){var n=e("./_baseIsTypedArray"),i=e("./_baseUnary"),s=e("./_nodeUtil"),a=s&&s.isTypedArray,o=a?i(a):n;t.exports=o},{"./_baseIsTypedArray":365,"./_baseUnary":383,"./_nodeUtil":458}],512:[function(e,t,r){function n(e){return a(e)?i(e):s(e)}var i=e("./_arrayLikeKeys"),s=e("./_baseKeys"),a=e("./isArrayLike");t.exports=n},{"./_arrayLikeKeys":333,"./_baseKeys":367,"./isArrayLike":499}],513:[function(e,t,r){function n(e){return a(e)?i(e,!0):s(e)}var i=e("./_arrayLikeKeys"),s=e("./_baseKeysIn"),a=e("./isArrayLike");t.exports=n},{"./_arrayLikeKeys":333,"./_baseKeysIn":368,"./isArrayLike":499}],514:[function(e,t,r){function n(e,t){return(o(e)?i:a)(e,s(t,3))}var i=e("./_arrayMap"),s=e("./_baseIteratee"),a=e("./_baseMap"),o=e("./isArray");t.exports=n},{"./_arrayMap":334,"./_baseIteratee":366,"./_baseMap":369,"./isArray":498}],515:[function(e,t,r){function n(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(s);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=e.apply(this,n);return r.cache=s.set(i,a)||s,a};return r.cache=new(n.Cache||i),r}var i=e("./_MapCache"),s="Expected a function";n.Cache=i,t.exports=n},{"./_MapCache":318}],516:[function(e,t,r){var n=e("./_baseMerge"),i=e("./_createAssigner"),s=i(function(e,t,r,i){n(e,t,r,i)});t.exports=s},{"./_baseMerge":372,"./_createAssigner":403}],517:[function(e,t,r){function n(){}t.exports=n},{}],518:[function(e,t,r){function n(e){return a(e)?i(o(e)):s(e)}var i=e("./_baseProperty"),s=e("./_basePropertyDeep"),a=e("./_isKey"),o=e("./_toKey");t.exports=n},{"./_baseProperty":375,"./_basePropertyDeep":376,"./_isKey":437,"./_toKey":475}],519:[function(e,t,r){function n(e,t,r){return t=(r?s(e,t,r):void 0===t)?1:a(t),i(o(e),t)}var i=e("./_baseRepeat"),s=e("./_isIterateeCall"),a=e("./toInteger"),o=e("./toString");t.exports=n},{"./_baseRepeat":377,"./_isIterateeCall":436,"./toInteger":525,"./toString":528}],520:[function(e,t,r){var n=e("./_baseFlatten"),i=e("./_baseOrderBy"),s=e("./_baseRest"),a=e("./_isIterateeCall"),o=s(function(e,t){if(null==e)return[];var r=t.length;return r>1&&a(e,t[0],t[1])?t=[]:r>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,n(t,1),[])});t.exports=o},{"./_baseFlatten":349,"./_baseOrderBy":374,"./_baseRest":378,"./_isIterateeCall":436}],521:[function(e,t,r){function n(e,t,r){return e=o(e),r=null==r?0:i(a(r),0,e.length),t=s(t),e.slice(r,r+t.length)==t}var i=e("./_baseClamp"),s=e("./_baseToString"),a=e("./toInteger"),o=e("./toString");t.exports=n},{"./_baseClamp":344,"./_baseToString":382,"./toInteger":525,"./toString":528}],522:[function(e,t,r){function n(){return[]}t.exports=n},{}],523:[function(e,t,r){function n(){return!1}t.exports=n},{}],524:[function(e,t,r){function n(e){if(!e)return 0===e?e:0;if((e=i(e))===s||e===-s){return(e<0?-1:1)*a}return e===e?e:0}var i=e("./toNumber"),s=1/0,a=1.7976931348623157e308;t.exports=n},{"./toNumber":526}],525:[function(e,t,r){function n(e){var t=i(e),r=t%1;return t===t?r?t-r:t:0}var i=e("./toFinite");t.exports=n},{"./toFinite":524}],526:[function(e,t,r){function n(e){if("number"==typeof e)return e;if(s(e))return a;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var r=l.test(e);return r||c.test(e)?p(e.slice(2),r?2:8):u.test(e)?a:+e}var i=e("./isObject"),s=e("./isSymbol"),a=NaN,o=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,p=parseInt;t.exports=n},{"./isObject":505,"./isSymbol":510}],527:[function(e,t,r){function n(e){return i(e,s(e))}var i=e("./_copyObject"),s=e("./keysIn");t.exports=n},{"./_copyObject":399,"./keysIn":513}],528:[function(e,t,r){function n(e){return null==e?"":i(e)}var i=e("./_baseToString");t.exports=n},{"./_baseToString":382}],529:[function(e,t,r){function n(e){return e&&e.length?i(e):[]}var i=e("./_baseUniq");t.exports=n},{"./_baseUniq":384}],530:[function(e,t,r){function n(e){return null==e?[]:i(e,s(e))}var i=e("./_baseValues"),s=e("./keys");t.exports=n},{"./_baseValues":385,"./keys":512}],531:[function(e,t,r){function n(e,t){return t=t||{},function(r,n,i){return s(r,e,t)}}function i(e,t){e=e||{},t=t||{};var r={};return Object.keys(t).forEach(function(e){r[e]=t[e]}),Object.keys(e).forEach(function(t){r[t]=e[t]}),r}function s(e,t,r){if("string"!=typeof t)throw new TypeError("glob pattern string required");return r||(r={}),!(!r.nocomment&&"#"===t.charAt(0))&&(""===t.trim()?""===e:new a(t,r).match(e))}function a(e,t){if(!(this instanceof a))return new a(e,t);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),"/"!==m.sep&&(e=e.split(m.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function o(){if(!this._made){var e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();var r=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error),this.debug(this.pattern,r),r=this.globParts=r.map(function(e){return e.split(C)}),this.debug(this.pattern,r),r=r.map(function(e,t,r){return e.map(this.parse,this)},this),this.debug(this.pattern,r),r=r.filter(function(e){return-1===e.indexOf(!1)}),this.debug(this.pattern,r),this.set=r}}function u(){var e=this.pattern,t=!1,r=this.options,n=0;if(!r.nonegate){for(var i=0,s=e.length;i<s&&"!"===e.charAt(i);i++)t=!t,n++;n&&(this.pattern=e.substr(n)),this.negate=t}}function l(e,t){if(t||(t=this instanceof a?this.options:{}),void 0===(e=void 0===e?this.pattern:e))throw new TypeError("undefined pattern");return t.nobrace||!e.match(/\{.*\}/)?[e]:g(e)}function c(e,t){function r(){if(i){switch(i){case"*":a+=x,o=!0;break;case"?":a+=v,o=!0;break;default:a+="\\"+i}g.debug("clearStateChar %j %j",i,a),i=!1}}if(e.length>65536)throw new TypeError("pattern is too long");var n=this.options;if(!n.noglobstar&&"**"===e)return y;if(""===e)return"";for(var i,s,a="",o=!!n.nocase,u=!1,l=[],c=[],p=!1,h=-1,d=-1,m="."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",g=this,E=0,A=e.length;E<A&&(s=e.charAt(E));E++)if(this.debug("%s\t%s %s %j",e,E,a,s),u&&D[s])a+="\\"+s,u=!1;else switch(s){case"/":return!1;case"\\":r(),u=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,E,a,s),p){this.debug(" in class"),"!"===s&&E===d+1&&(s="^"),a+=s;continue}g.debug("call clearStateChar %j",i),r(),i=s,n.noext&&r();continue;case"(":if(p){a+="(";continue}if(!i){a+="\\(";continue}l.push({type:i,start:E-1,reStart:a.length,open:b[i].open,close:b[i].close}),a+="!"===i?"(?:(?!(?:":"(?:",this.debug("plType %j %j",i,a),i=!1;continue;case")":if(p||!l.length){a+="\\)";continue}r(),o=!0;var C=l.pop();a+=C.close,"!"===C.type&&c.push(C),C.reEnd=a.length;continue;case"|":if(p||!l.length||u){a+="\\|",u=!1;continue}r(),a+="|";continue;case"[":if(r(),p){a+="\\"+s;continue}p=!0,d=E,h=a.length,a+=s;continue;case"]":if(E===d+1||!p){a+="\\"+s,u=!1;continue}if(p){var _=e.substring(d+1,E);try{RegExp("["+_+"]")}catch(e){var w=this.parse(_,S);a=a.substr(0,h)+"\\["+w[0]+"\\]",o=o||w[1],p=!1;continue}}o=!0,p=!1,a+=s;continue;default:r(),u?u=!1:!D[s]||"^"===s&&p||(a+="\\"),a+=s}for(p&&(_=e.substr(d+1),w=this.parse(_,S),a=a.substr(0,h)+"\\["+w[0],o=o||w[1]),C=l.pop();C;C=l.pop()){var k=a.slice(C.reStart+C.open.length);this.debug("setting tail",a,C),k=k.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(e,t,r){return r||(r="\\"),t+t+r+"|"}),this.debug("tail=%j\n %s",k,k,C,a);var F="*"===C.type?x:"?"===C.type?v:"\\"+C.type;o=!0,a=a.slice(0,C.reStart)+F+"\\("+k}r(),u&&(a+="\\\\");var T=!1;switch(a.charAt(0)){case".":case"[":case"(":T=!0}for(var P=c.length-1;P>-1;P--){
+var B=c[P],O=a.slice(0,B.reStart),j=a.slice(B.reStart,B.reEnd-8),N=a.slice(B.reEnd-8,B.reEnd),I=a.slice(B.reEnd);N+=I;var L=O.split("(").length-1,M=I;for(E=0;E<L;E++)M=M.replace(/\)[+*?]?/,"");I=M;var R="";""===I&&t!==S&&(R="$");a=O+j+I+R+N}if(""!==a&&o&&(a="(?=.)"+a),T&&(a=m+a),t===S)return[a,o];if(!o)return f(e);var U=n.nocase?"i":"";try{var V=new RegExp("^"+a+"$",U)}catch(e){return new RegExp("$.")}return V._glob=e,V._src=a,V}function p(){if(this.regexp||!1===this.regexp)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,r=t.noglobstar?x:t.dot?E:A,n=t.nocase?"i":"",i=e.map(function(e){return e.map(function(e){return e===y?r:"string"==typeof e?d(e):e._src}).join("\\/")}).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch(e){this.regexp=!1}return this.regexp}function h(e,t){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var r=this.options;"/"!==m.sep&&(e=e.split(m.sep).join("/")),e=e.split(C),this.debug(this.pattern,"split",e);var n=this.set;this.debug(this.pattern,"set",n);var i,s;for(s=e.length-1;s>=0&&!(i=e[s]);s--);for(s=0;s<n.length;s++){var a=n[s],o=e;r.matchBase&&1===a.length&&(o=[i]);if(this.matchOne(o,a,t))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate}function f(e){return e.replace(/\\(.)/g,"$1")}function d(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}t.exports=s,s.Minimatch=a;var m={sep:"/"};try{m=e("path")}catch(e){}var y=s.GLOBSTAR=a.GLOBSTAR={},g=e("brace-expansion"),b={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},v="[^/]",x=v+"*?",E="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",A="(?:(?!(?:\\/|^)\\.).)*?",D=function(e){return e.split("").reduce(function(e,t){return e[t]=!0,e},{})}("().*{}+?[]^$\\!"),C=/\/+/;s.filter=n,s.defaults=function(e){if(!e||!Object.keys(e).length)return s;var t=s,r=function(r,n,s){return t.minimatch(r,n,i(e,s))};return r.Minimatch=function(r,n){return new t.Minimatch(r,i(e,n))},r},a.defaults=function(e){return e&&Object.keys(e).length?s.defaults(e).Minimatch:a},a.prototype.debug=function(){},a.prototype.make=o,a.prototype.parseNegate=u,s.braceExpand=function(e,t){return l(e,t)},a.prototype.braceExpand=l,a.prototype.parse=c;var S={};s.makeRe=function(e,t){return new a(e,t||{}).makeRe()},a.prototype.makeRe=p,s.match=function(e,t,r){r=r||{};var n=new a(t,r);return e=e.filter(function(e){return n.match(e)}),n.options.nonull&&!e.length&&e.push(t),e},a.prototype.match=h,a.prototype.matchOne=function(e,t,r){var n=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var i=0,s=0,a=e.length,o=t.length;i<a&&s<o;i++,s++){this.debug("matchOne loop");var u=t[s],l=e[i];if(this.debug(t,u,l),!1===u)return!1;if(u===y){this.debug("GLOBSTAR",[t,u,l]);var c=i,p=s+1;if(p===o){for(this.debug("** at the end");i<a;i++)if("."===e[i]||".."===e[i]||!n.dot&&"."===e[i].charAt(0))return!1;return!0}for(;c<a;){var h=e[c];if(this.debug("\nglobstar while",e,c,t,p,h),this.matchOne(e.slice(c),t.slice(p),r))return this.debug("globstar found match!",c,a,h),!0;if("."===h||".."===h||!n.dot&&"."===h.charAt(0)){this.debug("dot detected!",e,c,t,p);break}this.debug("globstar swallow a segment, and continue"),c++}return!(!r||(this.debug("\n>>> no match, partial?",e,c,t,p),c!==a))}var f;if("string"==typeof u?(f=n.nocase?l.toLowerCase()===u.toLowerCase():l===u,this.debug("string match",u,l,f)):(f=l.match(u),this.debug("pattern match",u,l,f)),!f)return!1}if(i===a&&s===o)return!0;if(i===a)return r;if(s===o){return i===a-1&&""===e[i]}throw new Error("wtf?")}},{"brace-expansion":180,path:535}],532:[function(e,t,r){function n(e){if(e=String(e),!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*p;case"days":case"day":case"d":return r*c;case"hours":case"hour":case"hrs":case"hr":case"h":return r*l;case"minutes":case"minute":case"mins":case"min":case"m":return r*u;case"seconds":case"second":case"secs":case"sec":case"s":return r*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function i(e){return e>=c?Math.round(e/c)+"d":e>=l?Math.round(e/l)+"h":e>=u?Math.round(e/u)+"m":e>=o?Math.round(e/o)+"s":e+"ms"}function s(e){return a(e,c,"day")||a(e,l,"hour")||a(e,u,"minute")||a(e,o,"second")||e+" ms"}function a(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}var o=1e3,u=60*o,l=60*u,c=24*l,p=365.25*c;t.exports=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return n(e);if("number"===r&&!1===isNaN(e))return t.long?s(e):i(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],533:[function(e,t,r){"use strict";t.exports=Number.isNaN||function(e){return e!==e}},{}],534:[function(e,t,r){r.endianness=function(){return"LE"},r.hostname=function(){return"undefined"!=typeof location?location.hostname:""},r.loadavg=function(){return[]},r.uptime=function(){return 0},r.freemem=function(){return Number.MAX_VALUE},r.totalmem=function(){return Number.MAX_VALUE},r.cpus=function(){return[]},r.type=function(){return"Browser"},r.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},r.networkInterfaces=r.getNetworkInterfaces=function(){return{}},r.arch=function(){return"javascript"},r.platform=function(){return"browser"},r.tmpdir=r.tmpDir=function(){return"/tmp"},r.EOL="\n"},{}],535:[function(e,t,r){(function(e){function t(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n<e.length;n++)t(e[n],n,e)&&r.push(e[n]);return r}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,s=function(e){return i.exec(e).slice(1)};r.resolve=function(){for(var r="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var a=s>=0?arguments[s]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(r=a+"/"+r,i="/"===a.charAt(0))}return r=t(n(r.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+r||"."},r.normalize=function(e){var i=r.isAbsolute(e),s="/"===a(e,-1);return e=t(n(e.split("/"),function(e){return!!e}),!i).join("/"),e||i||(e="."),e&&s&&(e+="/"),(i?"/":"")+e},r.isAbsolute=function(e){return"/"===e.charAt(0)},r.join=function(){var e=Array.prototype.slice.call(arguments,0);return r.normalize(n(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},r.relative=function(e,t){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=r.resolve(e).substr(1),t=r.resolve(t).substr(1);for(var i=n(e.split("/")),s=n(t.split("/")),a=Math.min(i.length,s.length),o=a,u=0;u<a;u++)if(i[u]!==s[u]){o=u;break}for(var l=[],u=o;u<i.length;u++)l.push("..");return l=l.concat(s.slice(o)),l.join("/")},r.sep="/",r.delimiter=":",r.dirname=function(e){var t=s(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},r.basename=function(e,t){var r=s(e)[2];return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},r.extname=function(e){return s(e)[3]};var a="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,e("_process"))},{_process:539}],536:[function(e,t,r){(function(e){"use strict";function r(e){return"/"===e.charAt(0)}function n(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,r=t.exec(e),n=r[1]||"",i=Boolean(n&&":"!==n.charAt(1));return Boolean(r[2]||i)}t.exports="win32"===e.platform?n:r,t.exports.posix=r,t.exports.win32=n}).call(this,e("_process"))},{_process:539}],537:[function(e,t,r){"use strict";function n(e,t,r){if(p)try{p.call(c,e,t,{value:r})}catch(n){e[t]=r}else e[t]=r}function i(e){return e&&(n(e,"call",e.call),n(e,"apply",e.apply)),e}function s(e){return h?h.call(c,e):(y.prototype=e||null,new y)}function a(){do{var e=o(m.call(d.call(g(),36),2))}while(f.call(b,e));return b[e]=e}function o(e){var t={};return t[e]=!0,Object.keys(t)[0]}function u(e){return s(null)}function l(e){function t(t){function r(r,n){if(r===o)return n?s=null:s||(s=e(t))}var s;n(t,i,r)}function r(e){return f.call(e,i)||t(e),e[i](o)}var i=a(),o=s(null);return e=e||u,r.forget=function(e){f.call(e,i)&&e[i](o,!0)},r}var c=Object,p=Object.defineProperty,h=Object.create;i(p),i(h);var f=i(Object.prototype.hasOwnProperty),d=i(Number.prototype.toString),m=i(String.prototype.slice),y=function(){},g=Math.random,b=s(null);r.makeUniqueKey=a;var v=Object.getOwnPropertyNames;Object.getOwnPropertyNames=function(e){for(var t=v(e),r=0,n=0,i=t.length;r<i;++r)f.call(b,t[r])||(r>n&&(t[n]=t[r]),++n);return t.length=n,t},r.makeAccessor=l},{}],538:[function(e,t,r){(function(e){"use strict";function r(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var s,a,o=arguments.length;switch(o){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,i)});default:for(s=new Array(o-1),a=0;a<s.length;)s[a++]=arguments[a];return e.nextTick(function(){t.apply(null,s)})}}!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports=r:t.exports=e.nextTick}).call(this,e("_process"))},{_process:539}],539:[function(e,t,r){function n(){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===n||!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 a(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 o(){y&&d&&(y=!1,d.length?m=d.concat(m):g=-1,m.length&&u())}function u(){if(!y){var e=s(o);y=!0;for(var t=m.length;t;){for(d=m,m=[];++g<t;)d&&d[g].run();g=-1,t=m.length}d=null,y=!1,a(e)}}function l(e,t){this.fun=e,this.array=t}function c(){}var p,h,f=t.exports={};!function(){try{p="function"==typeof setTimeout?setTimeout:n}catch(e){p=n}try{h="function"==typeof clearTimeout?clearTimeout:i}catch(e){h=i}}();var d,m=[],y=!1,g=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];m.push(new l(e,t)),1!==m.length||y||s(u)},l.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=c,f.addListener=c,f.once=c,f.off=c,f.removeListener=c,f.removeAllListeners=c,f.emit=c,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}},{}],540:[function(e,t,r){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":541}],541:[function(e,t,r){"use strict";function n(e){if(!(this instanceof n))return new n(e);l.call(this,e),c.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",i)}function i(){this.allowHalfOpen||this._writableState.ended||o(s,this)}function s(e){e.end()}var a=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=n;var o=e("process-nextick-args"),u=e("core-util-is");u.inherits=e("inherits");var l=e("./_stream_readable"),c=e("./_stream_writable");u.inherits(n,l);for(var p=a(c.prototype),h=0;h<p.length;h++){var f=p[h];n.prototype[f]||(n.prototype[f]=c.prototype[f])}},{"./_stream_readable":543,"./_stream_writable":545,"core-util-is":294,inherits:306,"process-nextick-args":538}],542:[function(e,t,r){"use strict";function n(e){if(!(this instanceof n))return new n(e);i.call(this,e)}t.exports=n;var i=e("./_stream_transform"),s=e("core-util-is");s.inherits=e("inherits"),s.inherits(n,i),n.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":544,"core-util-is":294,inherits:306}],543:[function(e,t,r){(function(r){"use strict";function n(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?P(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}function i(t,r){F=F||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,r instanceof F&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i,this.highWaterMark=~~this.highWaterMark,this.buffer=new U,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&&(R||(R=e("string_decoder/").StringDecoder),this.decoder=new R(t.encoding),this.encoding=t.encoding)}function s(t){if(F=F||e("./_stream_duplex"),!(this instanceof s))return new s(t);this._readableState=new i(t,this),this.readable=!0,t&&"function"==typeof t.read&&(this._read=t.read),B.call(this)}function a(e,t,r,n,i){var s=c(t,r);if(s)e.emit("error",s);else if(null===r)t.reading=!1,p(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!i){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&i){var u=new Error("stream.unshift() after end event");e.emit("error",u)}else{var l;!t.decoder||i||n||(r=t.decoder.write(r),l=!t.objectMode&&0===r.length),i||(t.reading=!1),l||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&h(e))),d(e,t)}else i||(t.reading=!1);return o(t)}function o(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function u(e){return e>=V?e=V:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function l(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=u(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function c(e,t){var r=null;return j.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function p(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,h(e)}}function h(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(M("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?T(f,e):f(e))}function f(e){M("emit readable"),e.emit("readable"),x(e)}function d(e,t){t.readingMore||(t.readingMore=!0,T(m,e,t))}function m(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(M("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function y(e){return function(){var t=e._readableState;M("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&O(e,"data")&&(t.flowing=!0,x(e))}}function g(e){M("readable nexttick read 0"),e.read(0)}function b(e,t){t.resumeScheduled||(t.resumeScheduled=!0,T(v,e,t))}function v(e,t){t.reading||(M("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),x(e),t.flowing&&!t.reading&&e.read(0)}function x(e){var t=e._readableState;for(M("flow",t.flowing);t.flowing&&null!==e.read(););}function E(e,t){if(0===t.length)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=A(e,t.buffer,t.decoder),r}function A(e,t,r){var n;return e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?D(e,t):C(e,t),n}function D(e,t){var r=t.head,n=1,i=r.data;for(e-=i.length;r=r.next;){var s=r.data,a=e>s.length?s.length:e;if(a===s.length?i+=s:i+=s.slice(0,e),0===(e-=a)){a===s.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(a));break}++n}return t.length-=n,i}function C(e,t){var r=N.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var s=n.data,a=e>s.length?s.length:e;if(s.copy(r,r.length-e,0,a),0===(e-=a)){a===s.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(a));break}++i}return t.length-=i,r}function S(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,T(_,t,e))}function _(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function w(e,t){for(var r=0,n=e.length;r<n;r++)t(e[r],r)}function k(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}t.exports=s;var F,T=e("process-nextick-args"),P=e("isarray");s.ReadableState=i;var B,O=(e("events").EventEmitter,function(e,t){return e.listeners(t).length});!function(){try{B=e("stream")}catch(e){}finally{B||(B=e("events").EventEmitter)}}();var j=e("buffer").Buffer,N=e("buffer-shims"),I=e("core-util-is");I.inherits=e("inherits");var L=e("util"),M=void 0;M=L&&L.debuglog?L.debuglog("stream"):function(){};var R,U=e("./internal/streams/BufferList");I.inherits(s,B),s.prototype.push=function(e,t){var r=this._readableState;return r.objectMode||"string"!=typeof e||(t=t||r.defaultEncoding)!==r.encoding&&(e=N.from(e,t),t=""),a(this,r,e,t,!1)},s.prototype.unshift=function(e){return a(this,this._readableState,e,"",!0)},s.prototype.isPaused=function(){return!1===this._readableState.flowing},s.prototype.setEncoding=function(t){return R||(R=e("string_decoder/").StringDecoder),this._readableState.decoder=new R(t),this._readableState.encoding=t,this};var V=8388608;s.prototype.read=function(e){M("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return M("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?S(this):h(this),null;if(0===(e=l(e,t))&&t.ended)return 0===t.length&&S(this),null;var n=t.needReadable;M("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&(n=!0,M("length less than watermark",n)),t.ended||t.reading?(n=!1,M("reading or ended",n)):n&&(M("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=l(r,t)));var i;return i=e>0?E(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&S(this)),null!==i&&this.emit("data",i),i},s.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},s.prototype.pipe=function(e,t){function i(e){M("onunpipe"),e===h&&a()}function s(){M("onend"),e.end()}function a(){M("cleanup"),e.removeListener("close",l),e.removeListener("finish",c),e.removeListener("drain",g),e.removeListener("error",u),e.removeListener("unpipe",i),h.removeListener("end",s),h.removeListener("end",a),h.removeListener("data",o),b=!0,!f.awaitDrain||e._writableState&&!e._writableState.needDrain||g()}function o(t){M("ondata"),v=!1,!1!==e.write(t)||v||((1===f.pipesCount&&f.pipes===e||f.pipesCount>1&&-1!==k(f.pipes,e))&&!b&&(M("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,v=!0),h.pause())}function u(t){M("onerror",t),p(),e.removeListener("error",u),0===O(e,"error")&&e.emit("error",t)}function l(){e.removeListener("finish",c),p()}function c(){M("onfinish"),e.removeListener("close",l),p()}function p(){M("unpipe"),h.unpipe(e)}var h=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=e;break;case 1:f.pipes=[f.pipes,e];break;default:f.pipes.push(e)}f.pipesCount+=1,M("pipe count=%d opts=%j",f.pipesCount,t);var d=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,m=d?s:a;f.endEmitted?T(m):h.once("end",m),e.on("unpipe",i);var g=y(h);e.on("drain",g);var b=!1,v=!1;return h.on("data",o),n(e,"error",u),e.once("close",l),e.once("finish",c),e.emit("pipe",h),f.flowing||(M("pipe resume"),h.resume()),e},s.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 r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<n;i++)r[i].emit("unpipe",this);return this}var s=k(t.pipes,e);return-1===s?this:(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},s.prototype.on=function(e,t){var r=B.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&h(this):T(g,this))}return r},s.prototype.addListener=s.prototype.on,s.prototype.resume=function(){var e=this._readableState;return e.flowing||(M("resume"),e.flowing=!0,b(this,e)),this},s.prototype.pause=function(){return M("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(M("pause"),this._readableState.flowing=!1,this.emit("pause")),this},s.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;e.on("end",function(){if(M("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)}),e.on("data",function(i){if(M("wrapped data"),t.decoder&&(i=t.decoder.write(i)),(!t.objectMode||null!==i&&void 0!==i)&&(t.objectMode||i&&i.length)){n.push(i)||(r=!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));return w(["error","close","destroy","pause","resume"],function(t){e.on(t,n.emit.bind(n,t))}),n._read=function(t){M("wrapped _read",t),r&&(r=!1,e.resume())},n},s._fromList=E}).call(this,e("_process"))},{"./_stream_duplex":541,"./internal/streams/BufferList":546,_process:539,buffer:184,"buffer-shims":183,"core-util-is":294,events:301,inherits:306,isarray:310,"process-nextick-args":538,"string_decoder/":591,util:181}],544:[function(e,t,r){"use strict";function n(e){this.afterTransform=function(t,r){return i(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function i(e,t,r){var n=e._transformState;n.transforming=!1;var i=n.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,null!==r&&void 0!==r&&e.push(r),i(t);var s=e._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&e._read(s.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);o.call(this,e),this._transformState=new n(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,r){a(t,e,r)}):a(t)})}function a(e,t,r){if(t)return e.emit("error",t);null!==r&&void 0!==r&&e.push(r);var n=e._writableState,i=e._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(i.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}t.exports=s;var o=e("./_stream_duplex"),u=e("core-util-is");u.inherits=e("inherits"),u.inherits(s,o),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,o.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.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":541,"core-util-is":294,inherits:306}],545:[function(e,t,r){(function(r){"use strict";function n(){}function i(e,t,r){this.chunk=e,this.encoding=t,this.callback=r,this.next=null}function s(t,r){D=D||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,r instanceof D&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){d(r,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 A(this)}function a(t){if(D=D||e("./_stream_duplex"),!(P.call(a,this)||this instanceof D))return new a(t);this._writableState=new s(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev)),w.call(this)}function o(e,t){var r=new Error("write after end");e.emit("error",r),C(t,r)}function u(e,t,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),C(n,s),i=!1),i}function l(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=T.from(t,r)),t}function c(e,t,r,n,s,a){r||(n=l(t,n,s),F.isBuffer(n)&&(s="buffer"));var o=t.objectMode?1:n.length;t.length+=o;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest=new i(n,s,a),c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else p(e,t,!1,o,n,s,a);return u}function p(e,t,r,n,i,s,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function h(e,t,r,n,i){--t.pendingcb,r?C(i,n):i(n),e._writableState.errorEmitted=!0,e.emit("error",n)}function f(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function d(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(f(r),t)h(e,r,n,t,i);else{var s=b(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||g(e,r),n?S(m,e,r,s,i):m(e,r,s,i)}}function m(e,t,r,n){r||y(e,t),t.pendingcb--,n(),x(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 r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),s=t.corkedRequestsFree;s.entry=r;for(var a=0;r;)i[a]=r,r=r.next,a+=1;p(e,t,!0,t.length,i,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new A(t)}else{for(;r;){var o=r.chunk,u=r.encoding,l=r.callback;if(p(e,t,!1,t.objectMode?1:o.length,o,u,l),r=r.next,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=r,t.bufferProcessing=!1}function b(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function v(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function x(e,t){var r=b(t);return r&&(0===t.pendingcb?(v(e,t),t.finished=!0,e.emit("finish")):v(e,t)),r}function E(e,t,r){t.ending=!0,x(e,t),r&&(t.finished?C(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function A(e){var t=this;this.next=null,this.entry=null,this.finish=function(r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}t.exports=a;var D,C=e("process-nextick-args"),S=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?setImmediate:C;a.WritableState=s;var _=e("core-util-is");_.inherits=e("inherits");var w,k={deprecate:e("util-deprecate")};!function(){try{w=e("stream")}catch(e){}finally{w||(w=e("events").EventEmitter)}}();var F=e("buffer").Buffer,T=e("buffer-shims");_.inherits(a,w),s.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(s.prototype,"buffer",{get:k.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var P;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(P=Function.prototype[Symbol.hasInstance],Object.defineProperty(a,Symbol.hasInstance,{value:function(e){return!!P.call(this,e)||e&&e._writableState instanceof s}})):P=function(e){return e instanceof this},a.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},a.prototype.write=function(e,t,r){var i=this._writableState,s=!1,a=F.isBuffer(e);return"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=n),i.ended?o(this,r):(a||u(this,i,e,r))&&(i.pendingcb++,s=c(this,i,a,e,t,r)),s},a.prototype.cork=function(){this._writableState.corked++},a.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||g(this,e))},a.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},a.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},a.prototype._writev=null,a.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||E(this,n,r)}}).call(this,e("_process"))},{"./_stream_duplex":541,_process:539,buffer:184,"buffer-shims":183,"core-util-is":294,events:301,inherits:306,"process-nextick-args":538,"util-deprecate":598}],546:[function(e,t,r){"use strict";function n(){this.head=null,this.tail=null,this.length=0}var i=(e("buffer").Buffer,e("buffer-shims"));t.exports=n,n.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},n.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},n.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}},n.prototype.clear=function(){this.head=this.tail=null,this.length=0},n.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},n.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),r=this.head,n=0;r;)r.data.copy(t,n),n+=r.data.length,r=r.next;return t}},{buffer:184,"buffer-shims":183}],547:[function(e,t,r){t.exports=e("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":542}],548:[function(e,t,r){(function(n){var i=function(){try{return e("stream")}catch(e){}}();r=t.exports=e("./lib/_stream_readable.js"),r.Stream=i||r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"),!n.browser&&"disable"===n.env.READABLE_STREAM&&i&&(t.exports=i)}).call(this,e("_process"))},{"./lib/_stream_duplex.js":541,"./lib/_stream_passthrough.js":542,"./lib/_stream_readable.js":543,"./lib/_stream_transform.js":544,"./lib/_stream_writable.js":545,_process:539}],549:[function(e,t,r){t.exports=e("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":544}],550:[function(e,t,r){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":545}],551:[function(e,t,r){function n(e,t,r){if(e){if(x.fixFaultyLocations(e,t),r){if(d.Node.check(e)&&d.SourceLocation.check(e.loc)){for(var i=r.length-1;i>=0&&!(E(r[i].loc.end,e.loc.start)<=0);--i);return void r.splice(i+1,0,e)}}else if(e[A])return e[A];var s;if(m.check(e))s=Object.keys(e);else{if(!y.check(e))return;s=f.getFieldNames(e)}r||Object.defineProperty(e,A,{value:r=[],enumerable:!1});for(var i=0,a=s.length;i<a;++i)n(e[s[i]],t,r);return r}}function i(e,t,r){for(var s=n(e,r),a=0,o=s.length;a<o;){var u=a+o>>1,l=s[u];if(E(l.loc.start,t.loc.start)<=0&&E(t.loc.end,l.loc.end)<=0)return void i(t.enclosingNode=l,t,r);if(E(l.loc.end,t.loc.start)<=0){var c=l;a=u+1}else{if(!(E(t.loc.end,l.loc.start)<=0))throw new Error("Comment location overlaps with node location");var p=l;o=u}}c&&(t.precedingNode=c),p&&(t.followingNode=p)}function s(e,t){var r=e.length;if(0!==r){for(var n=e[0].precedingNode,i=e[0].followingNode,s=i.loc.start,a=r;a>0;--a){var u=e[a-1];h.strictEqual(u.precedingNode,n),h.strictEqual(u.followingNode,i);var c=t.sliceString(u.loc.end,s);if(/\S/.test(c))break;s=u.loc.start}for(;a<=r&&(u=e[a])&&("Line"===u.type||"CommentLine"===u.type)&&u.loc.start.column>i.loc.start.column;)++a;e.forEach(function(e,t){t<a?l(n,e):o(i,e)}),e.length=0}}function a(e,t){(e.comments||(e.comments=[])).push(t)}function o(e,t){t.leading=!0,t.trailing=!1,a(e,t)}function u(e,t){t.leading=!1,t.trailing=!1,a(e,t)}function l(e,t){t.leading=!1,t.trailing=!0,a(e,t)}function c(e,t){var r=e.getValue();d.Comment.assert(r);var n=r.loc,i=n&&n.lines,s=[t(e)];if(r.trailing)s.push("\n");else if(i instanceof b){var a=i.slice(n.end,i.skipSpaces(n.end));1===a.length?s.push(a):s.push(new Array(a.length).join("\n"))}else s.push("\n");return v(s)}function p(e,t){var r=e.getValue(e);d.Comment.assert(r);var n=r.loc,i=n&&n.lines,s=[];if(i instanceof b){var a=i.skipSpaces(n.start,!0)||i.firstPos(),o=i.slice(a,n.start);1===o.length?s.push(o):s.push(new Array(o.length).join("\n"))}return s.push(t(e)),v(s)}var h=e("assert"),f=e("./types"),d=f.namedTypes,m=f.builtInTypes.array,y=f.builtInTypes.object,g=e("./lines"),b=(g.fromString,g.Lines),v=g.concat,x=e("./util"),E=x.comparePos,A=e("private").makeUniqueKey();r.attach=function(e,t,r){if(m.check(e)){var n=[];e.forEach(function(e){e.loc.lines=r,i(t,e,r);var a=e.precedingNode,c=e.enclosingNode,p=e.followingNode;if(a&&p){var f=n.length;if(f>0){var d=n[f-1];h.strictEqual(d.precedingNode===e.precedingNode,d.followingNode===e.followingNode),d.followingNode!==e.followingNode&&s(n,r)}n.push(e)}else if(a)s(n,r),l(a,e);else if(p)s(n,r),o(p,e);else{if(!c)throw new Error("AST contains no nodes at all?");s(n,r),u(c,e)}}),s(n,r),e.forEach(function(e){delete e.precedingNode,delete e.enclosingNode,delete e.followingNode})}},r.printComments=function(e,t){var r=e.getValue(),n=t(e),i=d.Node.check(r)&&f.getFieldValue(r,"comments");if(!i||0===i.length)return n;var s=[],a=[n];return e.each(function(e){var n=e.getValue(),i=f.getFieldValue(n,"leading"),o=f.getFieldValue(n,"trailing");i||o&&!d.Statement.check(r)&&"Block"!==n.type&&"CommentBlock"!==n.type?s.push(c(e,t)):o&&a.push(p(e,t))},"comments"),s.push.apply(s,a),v(s)}},{"./lines":553,"./types":559,"./util":560,assert:3,private:537}],552:[function(e,t,r){function n(e){o.ok(this instanceof n),this.stack=[e]}function i(e,t){for(var r=e.stack,n=r.length-1;n>=0;n-=2){var i=r[n];if(l.Node.check(i)&&--t<0)return i}return null}function s(e){return l.BinaryExpression.check(e)||l.LogicalExpression.check(e)}function a(e){return!!l.CallExpression.check(e)||(c.check(e)?e.some(a):!!l.Node.check(e)&&u.someField(e,function(e,t){return a(t)}))}var o=e("assert"),u=e("./types"),l=u.namedTypes,c=(l.Node,u.builtInTypes.array),p=u.builtInTypes.number,h=n.prototype;t.exports=n,n.from=function(e){if(e instanceof n)return e.copy();if(e instanceof u.NodePath){for(var t,r=Object.create(n.prototype),i=[e.value];t=e.parentPath;e=t)i.push(e.name,t.value);return r.stack=i.reverse(),r}return new n(e)},h.copy=function(){var e=Object.create(n.prototype);return e.stack=this.stack.slice(0),e},h.getName=function(){var e=this.stack,t=e.length;return t>1?e[t-2]:null},h.getValue=function(){var e=this.stack;return e[e.length-1]},h.getNode=function(e){return i(this,~~e)},h.getParentNode=function(e){return i(this,1+~~e)},h.getRootValue=function(){var e=this.stack;return e.length%2==0?e[1]:e[0]},h.call=function(e){for(var t=this.stack,r=t.length,n=t[r-1],i=arguments.length,s=1;s<i;++s){var a=arguments[s];n=n[a],t.push(a,n)}var o=e(this);return t.length=r,o},h.each=function(e){for(var t=this.stack,r=t.length,n=t[r-1],i=arguments.length,s=1;s<i;++s){var a=arguments[s];n=n[a],t.push(a,n)}for(var s=0;s<n.length;++s)s in n&&(t.push(s,n[s]),e(this),t.length-=2);t.length=r},h.map=function(e){for(var t=this.stack,r=t.length,n=t[r-1],i=arguments.length,s=1;s<i;++s){var a=arguments[s];n=n[a],t.push(a,n)}for(var o=new Array(n.length),s=0;s<n.length;++s)s in n&&(t.push(s,n[s]),o[s]=e(this,s),t.length-=2);return t.length=r,o},h.needsParens=function(e){var t=this.getParentNode();if(!t)return!1;var r=this.getName(),n=this.getNode();if(this.getValue()!==n)return!1;if(l.Statement.check(n))return!1;if("Identifier"===n.type)return!1;if("ParenthesizedExpression"===t.type)return!1;switch(n.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return"MemberExpression"===t.type&&"object"===r&&t.object===n;case"BinaryExpression":case"LogicalExpression":switch(t.type){case"CallExpression":return"callee"===r&&t.callee===n;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return"object"===r&&t.object===n;case"BinaryExpression":case"LogicalExpression":var i=t.operator,u=f[i],c=n.operator,h=f[c];if(u>h)return!0;if(u===h&&"right"===r)return o.strictEqual(t.right,n),!0;default:return!1}case"SequenceExpression":switch(t.type){case"ReturnStatement":case"ForStatement":return!1;case"ExpressionStatement":return"expression"!==r;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"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return"NullableTypeAnnotation"===t.type;case"Literal":return"MemberExpression"===t.type&&p.check(n.value)&&"object"===r&&t.object===n;case"AssignmentExpression":case"ConditionalExpression":switch(t.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return"callee"===r&&t.callee===n;case"ConditionalExpression":return"test"===r&&t.test===n;case"MemberExpression":return"object"===r&&t.object===n;default:return!1}case"ArrowFunctionExpression":return!(!l.CallExpression.check(t)||"callee"!==r)||(!(!l.MemberExpression.check(t)||"object"!==r)||s(t));case"ObjectExpression":if("ArrowFunctionExpression"===t.type&&"body"===r)return!0;default:if("NewExpression"===t.type&&"callee"===r&&t.callee===n)return a(n)}return!(!0===e||this.canBeFirstInStatement()||!this.firstInStatement())};var f={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%","**"]].forEach(function(e,t){e.forEach(function(e){f[e]=t})}),h.canBeFirstInStatement=function(){var e=this.getNode();return!l.FunctionExpression.check(e)&&!l.ObjectExpression.check(e)},h.firstInStatement=function(){for(var e,t,r,n,i=this.stack,a=i.length-1;a>=0;a-=2)if(l.Node.check(i[a])&&(r=e,n=t,e=i[a-1],t=i[a]),t&&n){if(l.BlockStatement.check(t)&&"body"===e&&0===r)return o.strictEqual(t.body[0],n),!0;if(l.ExpressionStatement.check(t)&&"expression"===r)return o.strictEqual(t.expression,n),!0;if(l.SequenceExpression.check(t)&&"expressions"===e&&0===r)o.strictEqual(t.expressions[0],n);else if(l.CallExpression.check(t)&&"callee"===r)o.strictEqual(t.callee,n);else if(l.MemberExpression.check(t)&&"object"===r)o.strictEqual(t.object,n);else if(l.ConditionalExpression.check(t)&&"test"===r)o.strictEqual(t.test,n);else if(s(t)&&"left"===r)o.strictEqual(t.left,n);else{if(!l.UnaryExpression.check(t)||t.prefix||"argument"!==r)return!1;o.strictEqual(t.argument,n)}}return!0}},{"./types":559,assert:3}],553:[function(e,t,r){function n(e){return e[f]}function i(e,t){c.ok(this instanceof i),c.ok(e.length>0),t?m.assert(t):t=null,Object.defineProperty(this,f,{value:{infos:e,mappings:[],name:t,cachedSourceMap:null}}),t&&n(this).mappings.push(new g(this,{start:this.firstPos(),end:this.lastPos()}))}function s(e){return{line:e.line,indent:e.indent,locked:e.locked,sliceStart:e.sliceStart,sliceEnd:e.sliceEnd}}function a(e,t){for(var r=0,n=e.length,i=0;i<n;++i)switch(e.charCodeAt(i)){case 9:c.strictEqual(typeof t,"number"),c.ok(t>0);var s=Math.ceil(r/t)*t;s===r?r+=t:r=s;break;case 11:case 12:case 13:case 65279:break;case 32:default:r+=1}return r}function o(e,t){if(e instanceof i)return e;e+="";var r=t&&t.tabWidth,n=e.indexOf("\t")<0,s=!(!t||!t.locked),o=!t&&n&&e.length<=E;if(c.ok(r||n,"No tab width specified but encountered tabs in string\n"+e),o&&x.call(v,e))return v[e];var u=new i(e.split(D).map(function(e){var t=A.exec(e)[0];return{line:e,indent:a(t,r),locked:s,sliceStart:t.length,sliceEnd:e.length}}),h(t).sourceFileName);return o&&(v[e]=u),u}function u(e){return!/\S/.test(e)}function l(e,t,r){var n=e.sliceStart,i=e.sliceEnd,s=Math.max(e.indent,0),a=s+i-n;return void 0===r&&(r=a),t=Math.max(t,0),r=Math.min(r,a),r=Math.max(r,t),r<s?(s=r,i=n):i-=a-r,a=r,a-=t,t<s?s-=t:(t-=s,s=0,n+=t),c.ok(s>=0),c.ok(n<=i),c.strictEqual(a,s+i-n),e.indent===s&&e.sliceStart===n&&e.sliceEnd===i?e:{line:e.line,indent:s,locked:!1,sliceStart:n,sliceEnd:i}}var c=e("assert"),p=e("source-map"),h=e("./options").normalize,f=e("private").makeUniqueKey(),d=e("./types"),m=d.builtInTypes.string,y=e("./util").comparePos,g=e("./mapping");r.Lines=i;var b=i.prototype;Object.defineProperties(b,{length:{get:function(){return n(this).infos.length}},name:{get:function(){return n(this).name}}});var v={},x=v.hasOwnProperty,E=10;r.countSpaces=a;var A=/^\s*/,D=/\u000D\u000A|\u000D(?!\u000A)|\u000A|\u2028|\u2029/;r.fromString=o,b.toString=function(e){return this.sliceString(this.firstPos(),this.lastPos(),e)},b.getSourceMap=function(e,t){function r(r){return r=r||{},m.assert(e),r.file=e,t&&(m.assert(t),r.sourceRoot=t),r}if(!e)return null;var i=this,s=n(i);if(s.cachedSourceMap)return r(s.cachedSourceMap.toJSON());var a=new p.SourceMapGenerator(r()),o={};return s.mappings.forEach(function(e){for(var t=e.sourceLines.skipSpaces(e.sourceLoc.start)||e.sourceLines.lastPos(),r=i.skipSpaces(e.targetLoc.start)||i.lastPos();y(t,e.sourceLoc.end)<0&&y(r,e.targetLoc.end)<0;){var n=e.sourceLines.charAt(t),s=i.charAt(r);c.strictEqual(n,s);var u=e.sourceLines.name;if(a.addMapping({source:u,original:{line:t.line,column:t.column},generated:{line:r.line,column:r.column}}),!x.call(o,u)){var l=e.sourceLines.toString();a.setSourceContent(u,l),o[u]=l}i.nextPos(r,!0),e.sourceLines.nextPos(t,!0)}}),s.cachedSourceMap=a,a.toJSON()},b.bootstrapCharAt=function(e){c.strictEqual(typeof e,"object"),c.strictEqual(typeof e.line,"number"),c.strictEqual(typeof e.column,"number");var t=e.line,r=e.column,n=this.toString().split(D),i=n[t-1];return void 0===i?"":r===i.length&&t<n.length?"\n":r>=i.length?"":i.charAt(r)},b.charAt=function(e){c.strictEqual(typeof e,"object"),c.strictEqual(typeof e.line,"number"),c.strictEqual(typeof e.column,"number");var t=e.line,r=e.column,i=n(this),s=i.infos,a=s[t-1],o=r;if(void 0===a||o<0)return"";var u=this.getIndentAt(t);return o<u?" ":(o+=a.sliceStart-u,o===a.sliceEnd&&t<this.length?"\n":o>=a.sliceEnd?"":a.line.charAt(o))},b.stripMargin=function(e,t){if(0===e)return this;if(c.ok(e>0,"negative margin: "+e),t&&1===this.length)return this;var r=n(this),a=new i(r.infos.map(function(r,n){return r.line&&(n>0||!t)&&(r=s(r),r.indent=Math.max(0,r.indent-e)),r}));if(r.mappings.length>0){var o=n(a).mappings;c.strictEqual(o.length,0),r.mappings.forEach(function(r){o.push(r.indent(e,t,!0))})}return a},b.indent=function(e){if(0===e)return this;var t=n(this),r=new i(t.infos.map(function(t){return t.line&&!t.locked&&(t=s(t),t.indent+=e),t}));if(t.mappings.length>0){var a=n(r).mappings;c.strictEqual(a.length,0),t.mappings.forEach(function(t){a.push(t.indent(e))})}return r},b.indentTail=function(e){if(0===e)return this;if(this.length<2)return this;var t=n(this),r=new i(t.infos.map(function(t,r){return r>0&&t.line&&!t.locked&&(t=s(t),t.indent+=e),t}));if(t.mappings.length>0){var a=n(r).mappings;c.strictEqual(a.length,0),t.mappings.forEach(function(t){a.push(t.indent(e,!0))})}return r},b.lockIndentTail=function(){return this.length<2?this:new i(n(this).infos.map(function(e,t){return e=s(e),e.locked=t>0,e}))},b.getIndentAt=function(e){c.ok(e>=1,"no line "+e+" (line numbers start from 1)");var t=n(this),r=t.infos[e-1];return Math.max(r.indent,0)},b.guessTabWidth=function(){var e=n(this);if(x.call(e,"cachedTabWidth"))return e.cachedTabWidth;for(var t=[],r=0,i=1,s=this.length;i<=s;++i){var a=e.infos[i-1];if(!u(a.line.slice(a.sliceStart,a.sliceEnd))){var o=Math.abs(a.indent-r);t[o]=1+~~t[o],r=a.indent}}for(var l=-1,c=2,p=1;p<t.length;p+=1)x.call(t,p)&&t[p]>l&&(l=t[p],c=p);return e.cachedTabWidth=c},b.startsWithComment=function(){var e=n(this);if(0===e.infos.length)return!1;var t=e.infos[0],r=t.sliceStart,i=t.sliceEnd,s=t.line.slice(r,i).trim();return 0===s.length||"//"===s.slice(0,2)||"/*"===s.slice(0,2)},b.isOnlyWhitespace=function(){return u(this.toString())},b.isPrecededOnlyByWhitespace=function(e){var t=n(this),r=t.infos[e.line-1],i=Math.max(r.indent,0),s=e.column-i;if(s<=0)return!0;var a=r.sliceStart,o=Math.min(a+s,r.sliceEnd);return u(r.line.slice(a,o))},b.getLineLength=function(e){var t=n(this),r=t.infos[e-1];return this.getIndentAt(e)+r.sliceEnd-r.sliceStart},b.nextPos=function(e,t){var r=Math.max(e.line,0);return Math.max(e.column,0)<this.getLineLength(r)?(e.column+=1,!t||!!this.skipSpaces(e,!1,!0)):r<this.length&&(e.line+=1,e.column=0,!t||!!this.skipSpaces(e,!1,!0))},b.prevPos=function(e,t){var r=e.line,n=e.column;if(n<1){if((r-=1)<1)return!1;n=this.getLineLength(r)}else n=Math.min(n-1,this.getLineLength(r));return e.line=r,e.column=n,!t||!!this.skipSpaces(e,!0,!0)},b.firstPos=function(){return{line:1,column:0}},b.lastPos=function(){return{line:this.length,column:this.getLineLength(this.length)}},b.skipSpaces=function(e,t,r){if(e=e?r?e:{line:e.line,column:e.column}:t?this.lastPos():this.firstPos(),t){for(;this.prevPos(e);)if(!u(this.charAt(e))&&this.nextPos(e))return e;return null}for(;u(this.charAt(e));)if(!this.nextPos(e))return null;return e},b.trimLeft=function(){var e=this.skipSpaces(this.firstPos(),!1,!0);return e?this.slice(e):C},b.trimRight=function(){var e=this.skipSpaces(this.lastPos(),!0,!0);return e?this.slice(this.firstPos(),e):C},b.trim=function(){var e=this.skipSpaces(this.firstPos(),!1,!0);if(null===e)return C;var t=this.skipSpaces(this.lastPos(),!0,!0);return c.notStrictEqual(t,null),this.slice(e,t)},b.eachPos=function(e,t,r){var n=this.firstPos();if(t&&(n.line=t.line,n.column=t.column),!r||this.skipSpaces(n,!1,!0))do{e.call(this,n)}while(this.nextPos(n,r))},b.bootstrapSlice=function(e,t){var r=this.toString().split(D).slice(e.line-1,t.line);return r.push(r.pop().slice(0,t.column)),r[0]=r[0].slice(e.column),o(r.join("\n"))},b.slice=function(e,t){if(!t){if(!e)return this;t=this.lastPos()}var r=n(this),s=r.infos.slice(e.line-1,t.line);e.line===t.line?s[0]=l(s[0],e.column,t.column):(c.ok(e.line<t.line),s[0]=l(s[0],e.column),s.push(l(s.pop(),0,t.column)));var a=new i(s);if(r.mappings.length>0){var o=n(a).mappings;c.strictEqual(o.length,0),r.mappings.forEach(function(r){var n=r.slice(this,e,t);n&&o.push(n)},this)}return a},b.bootstrapSliceString=function(e,t,r){return this.slice(e,t).toString(r)},b.sliceString=function(e,t,r){if(!t){if(!e)return this;t=this.lastPos()}r=h(r);for(var i=n(this).infos,s=[],o=r.tabWidth,c=e.line;c<=t.line;++c){var p=i[c-1];c===e.line?p=c===t.line?l(p,e.column,t.column):l(p,e.column):c===t.line&&(p=l(p,0,t.column));var f=Math.max(p.indent,0),d=p.line.slice(0,p.sliceStart);if(r.reuseWhitespace&&u(d)&&a(d,r.tabWidth)===f)s.push(p.line.slice(0,p.sliceEnd));else{var m=0,y=f;r.useTabs&&(m=Math.floor(f/o),y-=m*o);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),s.push(g)}}return s.join(r.lineTerminator)},b.isEmpty=function(){return this.length<2&&this.getLineLength(1)<1},b.join=function(e){function t(e){if(null!==e){if(a){var t=e.infos[0],r=new Array(t.indent+1).join(" "),n=c.length,i=Math.max(a.indent,0)+a.sliceEnd-a.sliceStart;a.line=a.line.slice(0,a.sliceEnd)+r+t.line.slice(t.sliceStart,t.sliceEnd),a.locked=a.locked||t.locked,a.sliceEnd=a.line.length,e.mappings.length>0&&e.mappings.forEach(function(e){p.push(e.add(n,i))})}else e.mappings.length>0&&p.push.apply(p,e.mappings);e.infos.forEach(function(e,t){(!a||t>0)&&(a=s(e),c.push(a))})}}function r(e,r){r>0&&t(l),t(e)}var a,u=this,l=n(u),c=[],p=[];if(e.map(function(e){var t=o(e);return t.isEmpty()?null:n(t)}).forEach(u.isEmpty()?t:r),c.length<1)return C;var h=new i(c);return n(h).mappings=p,h},r.concat=function(e){return C.join(e)},b.concat=function(e){var t=arguments,r=[this];return r.push.apply(r,t),c.strictEqual(r.length,t.length+1),C.join(r)};var C=o("")},{"./mapping":554,"./options":555,"./types":559,"./util":560,assert:3,private:537,"source-map":573}],554:[function(e,t,r){function n(e,t,r){o.ok(this instanceof n),o.ok(e instanceof h.Lines),c.assert(t),r?o.ok(l.check(r.start.line)&&l.check(r.start.column)&&l.check(r.end.line)&&l.check(r.end.column)):r=t,Object.defineProperties(this,{sourceLines:{value:e},sourceLoc:{value:t},targetLoc:{value:r}})}function i(e,t,r){return{line:e.line+t-1,column:1===e.line?e.column+r:e.column}}function s(e,t,r){return{line:e.line-t+1,column:e.line===t?e.column-r:e.column}}function a(e,t,r,n,i){o.ok(e instanceof h.Lines),o.ok(r instanceof h.Lines),p.assert(t),p.assert(n),p.assert(i);var s=f(n,i);if(0===s)return t;if(s<0){var a=e.skipSpaces(t),u=r.skipSpaces(n),l=i.line-u.line;for(a.line+=l,u.line+=l,l>0?(a.column=0,u.column=0):o.strictEqual(l,0);f(u,i)<0&&r.nextPos(u,!0);)o.ok(e.nextPos(a,!0)),o.strictEqual(e.charAt(a),r.charAt(u))}else{var a=e.skipSpaces(t,!0),u=r.skipSpaces(n,!0),l=i.line-u.line;for(a.line+=l,u.line+=l,l<0?(a.column=e.getLineLength(a.line),u.column=r.getLineLength(u.line)):o.strictEqual(l,0);f(i,u)<0&&r.prevPos(u,!0);)o.ok(e.prevPos(a,!0)),o.strictEqual(e.charAt(a),r.charAt(u))}return a}var o=e("assert"),u=e("./types"),l=(u.builtInTypes.string,u.builtInTypes.number),c=u.namedTypes.SourceLocation,p=u.namedTypes.Position,h=e("./lines"),f=e("./util").comparePos,d=n.prototype;t.exports=n,d.slice=function(e,t,r){function i(n){var i=l[n],s=c[n],p=t;return"end"===n?p=r:o.strictEqual(n,"start"),a(u,i,e,s,p)}o.ok(e instanceof h.Lines),p.assert(t),r?p.assert(r):r=e.lastPos();var u=this.sourceLines,l=this.sourceLoc,c=this.targetLoc;if(f(t,c.start)<=0)if(f(c.end,r)<=0)c={start:s(c.start,t.line,t.column),end:s(c.end,t.line,t.column)};else{if(f(r,c.start)<=0)return null;l={start:l.start,end:i("end")},c={start:s(c.start,t.line,t.column),end:s(r,t.line,t.column)}}else{if(f(c.end,t)<=0)return null;f(c.end,r)<=0?(l={start:i("start"),end:l.end},c={start:{line:1,column:0},end:s(c.end,t.line,t.column)}):(l={start:i("start"),end:i("end")},c={start:{line:1,column:0},end:s(r,t.line,t.column)})}return new n(this.sourceLines,l,c)},d.add=function(e,t){return new n(this.sourceLines,this.sourceLoc,{start:i(this.targetLoc.start,e,t),end:i(this.targetLoc.end,e,t)})},d.subtract=function(e,t){return new n(this.sourceLines,this.sourceLoc,{start:s(this.targetLoc.start,e,t),end:s(this.targetLoc.end,e,t)})},d.indent=function(e,t,r){if(0===e)return this;var i=this.targetLoc,s=i.start.line,a=i.end.line;if(t&&1===s&&1===a)return this;if(i={start:i.start,end:i.end},!t||s>1){var o=i.start.column+e;i.start={line:s,column:r?Math.max(0,o):o}}if(!t||a>1){var u=i.end.column+e;i.end={line:a,column:r?Math.max(0,u):u}}return new n(this.sourceLines,this.sourceLoc,i)}},{"./lines":553,"./types":559,"./util":560,assert:3}],555:[function(e,t,r){var n={parser:e("esprima"),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,arrayBracketSpacing:!1,objectCurlySpacing:!0,arrowParensAlways:!1,flowObjectCommas:!0},i=n.hasOwnProperty;r.normalize=function(e){function t(t){return i.call(e,t)?e[t]:n[t]}return e=e||n,{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"),parser:t("esprima")||t("parser"),range:t("range"),tolerant:t("tolerant"),quote:t("quote"),trailingComma:t("trailingComma"),arrayBracketSpacing:t("arrayBracketSpacing"),objectCurlySpacing:t("objectCurlySpacing"),arrowParensAlways:t("arrowParensAlways"),flowObjectCommas:t("flowObjectCommas")}}},{esprima:562,os:534}],556:[function(e,t,r){function n(e){i.ok(this instanceof n),this.lines=e,this.indent=0}var i=e("assert"),s=e("./types"),a=(s.namedTypes,s.builders),o=s.builtInTypes.object,u=s.builtInTypes.array,l=(s.builtInTypes.function,e("./patcher").Patcher,e("./options").normalize),c=e("./lines").fromString,p=e("./comments").attach,h=e("./util");r.parse=function(e,t){t=l(t);var r=c(e,t),i=r.toString({tabWidth:t.tabWidth,reuseWhitespace:!1,useTabs:!1}),s=[],o=t.parser.parse(i,{jsx:!0,loc:!0,locations:!0,range:t.range,comment:!0,onComment:s,tolerant:t.tolerant,ecmaVersion:6,sourceType:"module"});h.fixFaultyLocations(o,r),o.loc=o.loc||{start:r.firstPos(),end:r.lastPos()},o.loc.lines=r,o.loc.indent=0;var u=h.getTrueLoc(o,r);o.loc.start=u.start,o.loc.end=u.end,o.comments&&(s=o.comments,delete o.comments);var f=o;if("Program"===f.type){var f=a.file(o,t.sourceFileName||null);f.loc={lines:r,indent:0,start:r.firstPos(),end:r.lastPos()}}else"File"===f.type&&(o=f.program);return p(s,o.body.length?f.program:f,r),new n(r).copy(f)},n.prototype.copy=function(e){if(u.check(e))return e.map(this.copy,this);if(!o.check(e))return e;h.fixFaultyLocations(e,this.lines);var t=Object.create(Object.getPrototypeOf(e),{original:{value:e,configurable:!1,enumerable:!1,writable:!0}}),r=e.loc,n=this.indent,i=n;r&&(("Block"===e.type||"Line"===e.type||"CommentBlock"===e.type||"CommentLine"===e.type||this.lines.isPrecededOnlyByWhitespace(r.start))&&(i=this.indent=r.start.column),r.lines=this.lines,r.indent=i);for(var s=Object.keys(e),a=s.length,l=0;l<a;++l){var c=s[l];"loc"===c?t[c]=e[c]:"tokens"===c&&"File"===e.type?t[c]=e[c]:t[c]=this.copy(e[c])}return this.indent=n,t}},{"./comments":551,"./lines":553,"./options":555,"./patcher":557,"./types":559,"./util":560,assert:3}],557:[function(e,t,r){function n(e){m.ok(this instanceof n),m.ok(e instanceof y.Lines);var t=this,r=[];t.replace=function(e,t){w.check(t)&&(t=y.fromString(t)),r.push({lines:t,start:e.start,end:e.end})},t.get=function(t){function n(t,r){m.ok(D(t,r)<=0),s.push(e.slice(t,r))}t=t||{start:{line:1,column:0},end:{line:e.length,column:e.getLineLength(e.length)}};var i=t.start,s=[];return r.sort(function(e,t){return D(e.start,t.start)}).forEach(function(e){D(i,e.start)>0||(n(i,e.start),s.push(e.lines),i=e.end)}),n(i,t.end),y.concat(s)}}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 s(e,t,r){var n=A.copyPos(t.start),i=e.prevPos(n)&&e.charAt(n),s=r.charAt(r.firstPos());return i&&k.test(i)&&s&&k.test(s)}function a(e,t,r){var n=e.charAt(t.end),i=r.lastPos(),s=r.prevPos(i)&&r.charAt(i);return s&&k.test(s)&&n&&k.test(n)}function o(e,t){var r=e.getValue();b.assert(r);var n=r.original;if(b.assert(n),m.deepEqual(t,[]),r.type!==n.type)return!1;var i=new C(n),s=d(e,i,t);return s||(t.length=0),s}function u(e,t,r){var n=e.getValue();return n===t.getValue()||(_.check(n)?l(e,t,r):!!S.check(n)&&c(e,t,r))}function l(e,t,r){var n=e.getValue(),i=t.getValue();_.assert(n);var s=n.length;if(!_.check(i)||i.length!==s)return!1;for(var a=0;a<s;++a){e.stack.push(a,n[a]),t.stack.push(a,i[a]);var o=u(e,t,r);if(e.stack.length-=2,t.stack.length-=2,!o)return!1}return!0}function c(e,t,r){var n=e.getValue();if(S.assert(n),null===n.original)return!1;var i=t.getValue();if(!S.check(i))return!1;if(b.check(n)){if(!b.check(i))return!1;if(n.type===i.type){var s=[];if(d(e,t,s))r.push.apply(r,s);else{if(!i.loc)return!1;r.push({oldPath:t.copy(),newPath:e.copy()})}return!0}return!!(v.check(n)&&v.check(i)&&i.loc)&&(r.push({oldPath:t.copy(),newPath:e.copy()}),!0)}return d(e,t,r)}function p(e){var t=e.getValue(),r=t.loc,n=r&&r.lines;if(n){var i=T;for(i.line=r.start.line,i.column=r.start.column;n.prevPos(i);){var s=n.charAt(i);if("("===s)return D(e.getRootValue().loc.start,i)<=0;if(P.test(s))return!1}}return!1}function h(e){var t=e.getValue(),r=t.loc,n=r&&r.lines;if(n){var i=T;i.line=r.end.line,i.column=r.end.column;do{var s=n.charAt(i);if(")"===s)return D(i,e.getRootValue().loc.end)<=0;if(P.test(s))return!1}while(n.nextPos(i))}return!1}function f(e){return p(e)&&h(e)}function d(e,t,r){var n=e.getValue(),i=t.getValue();if(S.assert(n),S.assert(i),null===n.original)return!1;if(!e.canBeFirstInStatement()&&e.firstInStatement()&&!p(t))return!1;if(e.needsParens(!0)&&!f(t))return!1;var s=A.getUnionOfKeys(i,n);"File"!==i.type&&"File"!==n.type||delete s.tokens,delete s.loc;var a=r.length;for(var o in s){e.stack.push(o,g.getFieldValue(n,o)),t.stack.push(o,g.getFieldValue(i,o));var l=u(e,t,r);if(e.stack.length-=2,t.stack.length-=2,!l)return!1}return!(x.check(e.getNode())&&r.length>a)}var m=e("assert"),y=e("./lines"),g=e("./types"),b=(g.getFieldValue,g.namedTypes.Printable),v=g.namedTypes.Expression,x=g.namedTypes.ReturnStatement,E=g.namedTypes.SourceLocation,A=e("./util"),D=A.comparePos,C=e("./fast-path"),S=g.builtInTypes.object,_=g.builtInTypes.array,w=g.builtInTypes.string,k=/[0-9a-z_$]/i;r.Patcher=n;var F=n.prototype;F.tryToReprintComments=function(e,t,r){var n=this;if(!e.comments&&!t.comments)return!0;var s=C.from(e),a=C.from(t);s.stack.push("comments",i(e)),a.stack.push("comments",i(t));var o=[],u=l(s,a,o);return u&&o.length>0&&o.forEach(function(e){var t=e.oldPath.getValue();m.ok(t.leading||t.trailing),n.replace(t.loc,r(e.newPath).indentTail(t.loc.indent))}),u},F.deleteComments=function(e){if(e.comments){var t=this;e.comments.forEach(function(r){r.leading?t.replace({start:r.loc.start,end:e.loc.lines.skipSpaces(r.loc.end,!1,!1)},""):r.trailing&&t.replace({start:e.loc.lines.skipSpaces(r.loc.start,!0,!1),end:r.loc.end},"")})}},r.getReprinter=function(e){m.ok(e instanceof C);var t=e.getValue();if(b.check(t)){var r=t.original,i=r&&r.loc,u=i&&i.lines,l=[];if(u&&o(e,l))return function(e){var t=new n(u);return l.forEach(function(r){var n=r.newPath.getValue(),i=r.oldPath.getValue();E.assert(i.loc,!0);var o=!t.tryToReprintComments(n,i,e);o&&t.deleteComments(i);var l=e(r.newPath,o).indentTail(i.loc.indent),c=s(u,i.loc,l),p=a(u,i.loc,l);if(c||p){var h=[];c&&h.push(" "),h.push(l),p&&h.push(" "),l=y.concat(h)}t.replace(i.loc,l)}),t.get(i).indentTail(-r.loc.indent)}}};var T={line:1,column:0},P=/\S/},{"./fast-path":552,"./lines":553,"./types":559,"./util":560,assert:3}],558:[function(e,t,r){function n(e,t){D.ok(this instanceof n),B.assert(e),this.code=e,t&&(O.assert(t),this.map=t)}function i(e){function t(e){return D.ok(e instanceof j),C(e,r)}function r(e,r){if(r)return t(e);if(D.ok(e instanceof j),!c){var n=p.tabWidth,i=e.getNode().loc;if(i&&i.lines&&i.lines.guessTabWidth){p.tabWidth=i.lines.guessTabWidth();var s=o(e);return p.tabWidth=n,s}}return o(e)}function o(e){var t=F(e);return t?s(e,t(r)):u(e)}function u(e,r){return r?C(e,u):a(e,p,t)}function l(e){return a(e,p,l)}D.ok(this instanceof i);var c=e&&e.tabWidth,p=k(e);D.notStrictEqual(p,e),p.sourceFileName=null,this.print=function(e){if(!e)return M;var t=r(j.from(e),!0);return new n(t.toString(p),N.composeSourceMaps(p.inputSourceMap,t.getSourceMap(p.sourceMapName,p.sourceRoot)))},this.printGenerically=function(e){if(!e)return M;var t=j.from(e),r=p.reuseWhitespace;p.reuseWhitespace=!1;var i=new n(l(t).toString(p));return p.reuseWhitespace=r,i}}function s(e,t){return e.needsParens()?w(["(",t,")"]):t}function a(e,t,r){D.ok(e instanceof j);var n=e.getValue(),i=[],s=!1,a=o(e,t,r);return!n||a.isEmpty()?a:(n.decorators&&n.decorators.length>0&&!N.getParentExportDeclaration(e)?e.each(function(e){i.push(r(e),"\n")},"decorators"):N.isExportDeclaration(n)&&n.declaration&&n.declaration.decorators?e.each(function(e){i.push(r(e),"\n")},"declaration","decorators"):s=e.needsParens(),s&&i.unshift("("),i.push(a),s&&i.push(")"),w(i))}function o(e,t,r){var n=e.getValue();if(!n)return _("");if("string"==typeof n)return _(n,t);P.Printable.assert(n);var i=[];switch(n.type){case"File":return e.call(r,"program");case"Program":return n.directives&&e.each(function(e){i.push(r(e),";\n")},"directives"),i.push(e.call(function(e){return u(e,t,r)},"body")),w(i);case"Noop":case"EmptyStatement":return _("");case"ExpressionStatement":return w([e.call(r,"expression"),";"]);case"ParenthesizedExpression":return w(["(",e.call(r,"expression"),")"]);case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":return _(" ").join([e.call(r,"left"),n.operator,e.call(r,"right")]);case"AssignmentPattern":return w([e.call(r,"left")," = ",e.call(r,"right")]);case"MemberExpression":i.push(e.call(r,"object"));var s=e.call(r,"property");return n.computed?i.push("[",s,"]"):i.push(".",s),w(i);case"MetaProperty":return w([e.call(r,"meta"),".",e.call(r,"property")]);case"BindExpression":return n.object&&i.push(e.call(r,"object")),i.push("::",e.call(r,"callee")),w(i);case"Path":return _(".").join(n.body);case"Identifier":return w([_(n.name,t),e.call(r,"typeAnnotation")]);case"SpreadElement":case"SpreadElementPattern":case"RestProperty":case"SpreadProperty":case"SpreadPropertyPattern":case"RestElement":return w(["...",e.call(r,"argument")]);case"FunctionDeclaration":case"FunctionExpression":return n.async&&i.push("async "),i.push("function"),n.generator&&i.push("*"),n.id&&i.push(" ",e.call(r,"id"),e.call(r,"typeParameters")),i.push("(",f(e,t,r),")",e.call(r,"returnType")," ",e.call(r,"body")),w(i);case"ArrowFunctionExpression":return n.async&&i.push("async "),n.typeParameters&&i.push(e.call(r,"typeParameters")),t.arrowParensAlways||1!==n.params.length||n.rest||"Identifier"!==n.params[0].type||n.params[0].typeAnnotation||n.returnType?i.push("(",f(e,t,r),")",e.call(r,"returnType")):i.push(e.call(r,"params",0)),i.push(" => ",e.call(r,"body")),w(i);case"MethodDefinition":
+return n.static&&i.push("static "),i.push(c(e,t,r)),w(i);case"YieldExpression":return i.push("yield"),n.delegate&&i.push("*"),n.argument&&i.push(" ",e.call(r,"argument")),w(i);case"AwaitExpression":return i.push("await"),n.all&&i.push("*"),n.argument&&i.push(" ",e.call(r,"argument")),w(i);case"ModuleDeclaration":return i.push("module",e.call(r,"id")),n.source?(D.ok(!n.body),i.push("from",e.call(r,"source"))):i.push(e.call(r,"body")),_(" ").join(i);case"ImportSpecifier":return n.imported?(i.push(e.call(r,"imported")),n.local&&n.local.name!==n.imported.name&&i.push(" as ",e.call(r,"local"))):n.id&&(i.push(e.call(r,"id")),n.name&&i.push(" as ",e.call(r,"name"))),w(i);case"ExportSpecifier":return n.local?(i.push(e.call(r,"local")),n.exported&&n.exported.name!==n.local.name&&i.push(" as ",e.call(r,"exported"))):n.id&&(i.push(e.call(r,"id")),n.name&&i.push(" as ",e.call(r,"name"))),w(i);case"ExportBatchSpecifier":return _("*");case"ImportNamespaceSpecifier":return i.push("* as "),n.local?i.push(e.call(r,"local")):n.id&&i.push(e.call(r,"id")),w(i);case"ImportDefaultSpecifier":return n.local?e.call(r,"local"):e.call(r,"id");case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":return m(e,t,r);case"ExportAllDeclaration":return i.push("export *"),n.exported&&i.push(" as ",e.call(r,"exported")),i.push(" from ",e.call(r,"source")),w(i);case"ExportNamespaceSpecifier":return w(["* as ",e.call(r,"exported")]);case"ExportDefaultSpecifier":return e.call(r,"exported");case"Import":return _("import",t);case"ImportDeclaration":if(i.push("import "),n.importKind&&"value"!==n.importKind&&i.push(n.importKind+" "),n.specifiers&&n.specifiers.length>0){var a=!1;e.each(function(e){e.getName()>0&&i.push(", ");var n=e.getValue();P.ImportDefaultSpecifier.check(n)||P.ImportNamespaceSpecifier.check(n)?D.strictEqual(a,!1):(P.ImportSpecifier.assert(n),a||(a=!0,i.push(t.objectCurlySpacing?"{ ":"{"))),i.push(r(e))},"specifiers"),a&&i.push(t.objectCurlySpacing?" }":"}"),i.push(" from ")}return i.push(e.call(r,"source"),";"),w(i);case"BlockStatement":var o=e.call(function(e){return u(e,t,r)},"body");return!o.isEmpty()||n.directives&&0!==n.directives.length?(i.push("{\n"),n.directives&&e.each(function(e){i.push(r(e).indent(t.tabWidth),";",n.directives.length>1||!o.isEmpty()?"\n":"")},"directives"),i.push(o.indent(t.tabWidth)),i.push("\n}"),w(i)):_("{}");case"ReturnStatement":if(i.push("return"),n.argument){var l=e.call(r,"argument");l.startsWithComment()||l.length>1&&P.JSXElement&&P.JSXElement.check(n.argument)?i.push(" (\n",l.indent(t.tabWidth),"\n)"):i.push(" ",l)}return i.push(";"),w(i);case"CallExpression":return w([e.call(r,"callee"),h(e,t,r)]);case"ObjectExpression":case"ObjectPattern":case"ObjectTypeAnnotation":var b=!1,x="ObjectTypeAnnotation"===n.type,A=t.flowObjectCommas?",":x?";":",",C=[];x&&C.push("indexers","callProperties"),C.push("properties");var S=0;C.forEach(function(e){S+=n[e].length});var k=x&&1===S||0===S,F=n.exact?"{|":"{",T=n.exact?"|}":"}";i.push(k?F:F+"\n");var B=i.length-1,O=0;return C.forEach(function(n){e.each(function(e){var n=r(e);k||(n=n.indent(t.tabWidth));var s=!x&&n.length>1;s&&b&&i.push("\n"),i.push(n),O<S-1?(i.push(A+(s?"\n\n":"\n")),b=!s):1!==S&&x?i.push(A):!k&&N.isTrailingCommaEnabled(t,"objects")&&i.push(A),O++},n)}),i.push(k?T:"\n"+T),0!==O&&k&&t.objectCurlySpacing&&(i[B]=F+" ",i[i.length-1]=" "+T),w(i);case"PropertyPattern":return w([e.call(r,"key"),": ",e.call(r,"pattern")]);case"ObjectProperty":case"Property":if(n.method||"get"===n.kind||"set"===n.kind)return c(e,t,r);var j=e.call(r,"key");return n.computed?i.push("[",j,"]"):i.push(j),n.shorthand||i.push(": ",e.call(r,"value")),w(i);case"ClassMethod":return n.static&&i.push("static "),w([i,d(e,t,r)]);case"ObjectMethod":return d(e,t,r);case"Decorator":return w(["@",e.call(r,"expression")]);case"ArrayExpression":case"ArrayPattern":var I=n.elements,S=I.length,L=e.map(r,"elements"),M=_(", ").join(L),k=M.getLineLength(1)<=t.wrapColumn;return k?t.arrayBracketSpacing?i.push("[ "):i.push("["):i.push("[\n"),e.each(function(e){var r=e.getName();if(e.getValue()){var n=L[r];k?r>0&&i.push(" "):n=n.indent(t.tabWidth),i.push(n),(r<S-1||!k&&N.isTrailingCommaEnabled(t,"arrays"))&&i.push(","),k||i.push("\n")}else i.push(",")},"elements"),k&&t.arrayBracketSpacing?i.push(" ]"):i.push("]"),w(i);case"SequenceExpression":return _(", ").join(e.map(r,"expressions"));case"ThisExpression":return _("this");case"Super":return _("super");case"NullLiteral":return _("null");case"RegExpLiteral":return _(n.extra.raw);case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"Literal":return"string"!=typeof n.value?_(n.value,t):_(E(n.value,t),t);case"Directive":return e.call(r,"value");case"DirectiveLiteral":return _(E(n.value,t));case"ModuleSpecifier":if(n.local)throw new Error("The ESTree ModuleSpecifier type should be abstract");return _(E(n.value,t),t);case"UnaryExpression":return i.push(n.operator),/[a-z]$/.test(n.operator)&&i.push(" "),i.push(e.call(r,"argument")),w(i);case"UpdateExpression":return i.push(e.call(r,"argument"),n.operator),n.prefix&&i.reverse(),w(i);case"ConditionalExpression":return w(["(",e.call(r,"test")," ? ",e.call(r,"consequent")," : ",e.call(r,"alternate"),")"]);case"NewExpression":i.push("new ",e.call(r,"callee"));return n.arguments&&i.push(h(e,t,r)),w(i);case"VariableDeclaration":i.push(n.kind," ");var R=0,L=e.map(function(e){var t=r(e);return R=Math.max(t.length,R),t},"declarations");1===R?i.push(_(", ").join(L)):L.length>1?i.push(_(",\n").join(L).indentTail(n.kind.length+1)):i.push(L[0]);var U=e.getParentNode();return P.ForStatement.check(U)||P.ForInStatement.check(U)||P.ForOfStatement&&P.ForOfStatement.check(U)||P.ForAwaitStatement&&P.ForAwaitStatement.check(U)||i.push(";"),w(i);case"VariableDeclarator":return n.init?_(" = ").join([e.call(r,"id"),e.call(r,"init")]):e.call(r,"id");case"WithStatement":return w(["with (",e.call(r,"object"),") ",e.call(r,"body")]);case"IfStatement":var V=g(e.call(r,"consequent"),t),i=["if (",e.call(r,"test"),")",V];return n.alternate&&i.push(v(V)?" else":"\nelse",g(e.call(r,"alternate"),t)),w(i);case"ForStatement":var q=e.call(r,"init"),G=q.length>1?";\n":"; ",X=_(G).join([q,e.call(r,"test"),e.call(r,"update")]).indentTail("for (".length),J=w(["for (",X,")"]),W=g(e.call(r,"body"),t),i=[J];return J.length>1&&(i.push("\n"),W=W.trimLeft()),i.push(W),w(i);case"WhileStatement":return w(["while (",e.call(r,"test"),")",g(e.call(r,"body"),t)]);case"ForInStatement":return w([n.each?"for each (":"for (",e.call(r,"left")," in ",e.call(r,"right"),")",g(e.call(r,"body"),t)]);case"ForOfStatement":return w(["for (",e.call(r,"left")," of ",e.call(r,"right"),")",g(e.call(r,"body"),t)]);case"ForAwaitStatement":return w(["for await (",e.call(r,"left")," of ",e.call(r,"right"),")",g(e.call(r,"body"),t)]);case"DoWhileStatement":var K=w(["do",g(e.call(r,"body"),t)]),i=[K];return v(K)?i.push(" while"):i.push("\nwhile"),i.push(" (",e.call(r,"test"),");"),w(i);case"DoExpression":var z=e.call(function(e){return u(e,t,r)},"body");return w(["do {\n",z.indent(t.tabWidth),"\n}"]);case"BreakStatement":return i.push("break"),n.label&&i.push(" ",e.call(r,"label")),i.push(";"),w(i);case"ContinueStatement":return i.push("continue"),n.label&&i.push(" ",e.call(r,"label")),i.push(";"),w(i);case"LabeledStatement":return w([e.call(r,"label"),":\n",e.call(r,"body")]);case"TryStatement":return i.push("try ",e.call(r,"block")),n.handler?i.push(" ",e.call(r,"handler")):n.handlers&&e.each(function(e){i.push(" ",r(e))},"handlers"),n.finalizer&&i.push(" finally ",e.call(r,"finalizer")),w(i);case"CatchClause":return i.push("catch (",e.call(r,"param")),n.guard&&i.push(" if ",e.call(r,"guard")),i.push(") ",e.call(r,"body")),w(i);case"ThrowStatement":return w(["throw ",e.call(r,"argument"),";"]);case"SwitchStatement":return w(["switch (",e.call(r,"discriminant"),") {\n",_("\n").join(e.map(r,"cases")),"\n}"]);case"SwitchCase":return n.test?i.push("case ",e.call(r,"test"),":"):i.push("default:"),n.consequent.length>0&&i.push("\n",e.call(function(e){return u(e,t,r)},"consequent").indent(t.tabWidth)),w(i);case"DebuggerStatement":return _("debugger;");case"JSXAttribute":return i.push(e.call(r,"name")),n.value&&i.push("=",e.call(r,"value")),w(i);case"JSXIdentifier":return _(n.name,t);case"JSXNamespacedName":return _(":").join([e.call(r,"namespace"),e.call(r,"name")]);case"JSXMemberExpression":return _(".").join([e.call(r,"object"),e.call(r,"property")]);case"JSXSpreadAttribute":return w(["{...",e.call(r,"argument"),"}"]);case"JSXExpressionContainer":return w(["{",e.call(r,"expression"),"}"]);case"JSXElement":var Y=e.call(r,"openingElement");if(n.openingElement.selfClosing)return D.ok(!n.closingElement),Y;var H=w(e.map(function(e){var t=e.getValue();if(P.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 r(e)},"children")).indentTail(t.tabWidth),$=e.call(r,"closingElement");return w([Y,H,$]);case"JSXOpeningElement":i.push("<",e.call(r,"name"));var Q=[];e.each(function(e){Q.push(" ",r(e))},"attributes");var Z=w(Q);return(Z.length>1||Z.getLineLength(1)>t.wrapColumn)&&(Q.forEach(function(e,t){" "===e&&(D.strictEqual(t%2,0),Q[t]="\n")}),Z=w(Q).indentTail(t.tabWidth)),i.push(Z,n.selfClosing?" />":">"),w(i);case"JSXClosingElement":return w(["</",e.call(r,"name"),">"]);case"JSXText":return _(n.value,t);case"JSXEmptyExpression":return _("");case"TypeAnnotatedIdentifier":return w([e.call(r,"annotation")," ",e.call(r,"identifier")]);case"ClassBody":return 0===n.body.length?_("{}"):w(["{\n",e.call(function(e){return u(e,t,r)},"body").indent(t.tabWidth),"\n}"]);case"ClassPropertyDefinition":return i.push("static ",e.call(r,"definition")),P.MethodDefinition.check(n.definition)||i.push(";"),w(i);case"ClassProperty":n.static&&i.push("static ");var j=e.call(r,"key");return n.computed?j=w(["[",j,"]"]):"plus"===n.variance?j=w(["+",j]):"minus"===n.variance&&(j=w(["-",j])),i.push(j),n.typeAnnotation&&i.push(e.call(r,"typeAnnotation")),n.value&&i.push(" = ",e.call(r,"value")),i.push(";"),w(i);case"ClassDeclaration":case"ClassExpression":return i.push("class"),n.id&&i.push(" ",e.call(r,"id"),e.call(r,"typeParameters")),n.superClass&&i.push(" extends ",e.call(r,"superClass"),e.call(r,"superTypeParameters")),n.implements&&n.implements.length>0&&i.push(" implements ",_(", ").join(e.map(r,"implements"))),i.push(" ",e.call(r,"body")),w(i);case"TemplateElement":return _(n.value.raw,t).lockIndentTail();case"TemplateLiteral":var ee=e.map(r,"expressions");return i.push("`"),e.each(function(e){var t=e.getName();i.push(r(e)),t<ee.length&&i.push("${",ee[t],"}")},"quasis"),i.push("`"),w(i).lockIndentTail();case"TaggedTemplateExpression":return w([e.call(r,"tag"),e.call(r,"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(n.type));case"CommentBlock":case"Block":return w(["/*",_(n.value,t),"*/"]);case"CommentLine":case"Line":return w(["//",_(n.value,t)]);case"TypeAnnotation":return n.typeAnnotation?("FunctionTypeAnnotation"!==n.typeAnnotation.type&&i.push(": "),i.push(e.call(r,"typeAnnotation")),w(i)):_("");case"ExistentialTypeParam":case"ExistsTypeAnnotation":return _("*",t);case"EmptyTypeAnnotation":return _("empty",t);case"AnyTypeAnnotation":return _("any",t);case"MixedTypeAnnotation":return _("mixed",t);case"ArrayTypeAnnotation":return w([e.call(r,"elementType"),"[]"]);case"BooleanTypeAnnotation":return _("boolean",t);case"BooleanLiteralTypeAnnotation":return D.strictEqual(typeof n.value,"boolean"),_(""+n.value,t);case"DeclareClass":return y(e,["class ",e.call(r,"id")," ",e.call(r,"body")]);case"DeclareFunction":return y(e,["function ",e.call(r,"id"),";"]);case"DeclareModule":return y(e,["module ",e.call(r,"id")," ",e.call(r,"body")]);case"DeclareModuleExports":return y(e,["module.exports",e.call(r,"typeAnnotation")]);case"DeclareVariable":return y(e,["var ",e.call(r,"id"),";"]);case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return w(["declare ",m(e,t,r)]);case"FunctionTypeAnnotation":var te=e.getParentNode(0),re=!(P.ObjectTypeCallProperty.check(te)||P.DeclareFunction.check(e.getParentNode(2)));return re&&!P.FunctionTypeParam.check(te)&&i.push(": "),i.push("(",_(", ").join(e.map(r,"params")),")"),n.returnType&&i.push(re?" => ":": ",e.call(r,"returnType")),w(i);case"FunctionTypeParam":return w([e.call(r,"name"),n.optional?"?":"",": ",e.call(r,"typeAnnotation")]);case"GenericTypeAnnotation":return w([e.call(r,"id"),e.call(r,"typeParameters")]);case"DeclareInterface":i.push("declare ");case"InterfaceDeclaration":return i.push(_("interface ",t),e.call(r,"id"),e.call(r,"typeParameters")," "),n.extends&&i.push("extends ",_(", ").join(e.map(r,"extends"))),i.push(" ",e.call(r,"body")),w(i);case"ClassImplements":case"InterfaceExtends":return w([e.call(r,"id"),e.call(r,"typeParameters")]);case"IntersectionTypeAnnotation":return _(" & ").join(e.map(r,"types"));case"NullableTypeAnnotation":return w(["?",e.call(r,"typeAnnotation")]);case"NullLiteralTypeAnnotation":return _("null",t);case"ThisTypeAnnotation":return _("this",t);case"NumberTypeAnnotation":return _("number",t);case"ObjectTypeCallProperty":return e.call(r,"value");case"ObjectTypeIndexer":var ne="plus"===n.variance?"+":"minus"===n.variance?"-":"";return w([ne,"[",e.call(r,"id"),": ",e.call(r,"key"),"]: ",e.call(r,"value")]);case"ObjectTypeProperty":var ne="plus"===n.variance?"+":"minus"===n.variance?"-":"";return w([ne,e.call(r,"key"),n.optional?"?":"",": ",e.call(r,"value")]);case"QualifiedTypeIdentifier":return w([e.call(r,"qualification"),".",e.call(r,"id")]);case"StringLiteralTypeAnnotation":return _(E(n.value,t),t);case"NumberLiteralTypeAnnotation":case"NumericLiteralTypeAnnotation":return D.strictEqual(typeof n.value,"number"),_(JSON.stringify(n.value),t);case"StringTypeAnnotation":return _("string",t);case"DeclareTypeAlias":i.push("declare ");case"TypeAlias":return w(["type ",e.call(r,"id"),e.call(r,"typeParameters")," = ",e.call(r,"right"),";"]);case"TypeCastExpression":return w(["(",e.call(r,"expression"),e.call(r,"typeAnnotation"),")"]);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return w(["<",_(", ").join(e.map(r,"params")),">"]);case"TypeParameter":switch(n.variance){case"plus":i.push("+");break;case"minus":i.push("-")}return i.push(e.call(r,"name")),n.bound&&i.push(e.call(r,"bound")),n.default&&i.push("=",e.call(r,"default")),w(i);case"TypeofTypeAnnotation":return w([_("typeof ",t),e.call(r,"argument")]);case"UnionTypeAnnotation":return _(" | ").join(e.map(r,"types"));case"VoidTypeAnnotation":return _("void",t);case"NullTypeAnnotation":return _("null",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(n.type))}return p}function u(e,t,r){var n=(P.ClassBody&&P.ClassBody.check(e.getParentNode()),[]),i=!1,s=!1;e.each(function(e){var t=(e.getName(),e.getValue());t&&"EmptyStatement"!==t.type&&(P.Comment.check(t)?i=!0:P.Statement.check(t)?s=!0:B.assert(t),n.push({node:t,printed:r(e)}))}),i&&D.strictEqual(s,!1,"Comments may appear as statements in otherwise empty statement lists, but may not coexist with non-Comment nodes.");var a=null,o=n.length,u=[];return n.forEach(function(e,r){var n,i,s=e.printed,c=e.node,p=s.length>1,h=r>0,f=r<o-1,d=c&&c.loc&&c.loc.lines,m=d&&t.reuseWhitespace&&N.getTrueLoc(c,d);if(h)if(m){var y=d.skipSpaces(m.start,!0),g=y?y.line:1,b=m.start.line-g;n=Array(b+1).join("\n")}else n=p?"\n\n":"\n";else n="";if(f)if(m){var v=d.skipSpaces(m.end),x=v?v.line:d.length,E=x-m.end.line;i=Array(E+1).join("\n")}else i=p?"\n\n":"\n";else i="";u.push(l(a,n),s),f?a=i:i&&u.push(i)}),w(u)}function l(e,t){if(!e&&!t)return _("");if(!e)return _(t);if(!t)return _(e);var r=_(e),n=_(t);return n.length>r.length?n:r}function c(e,t,r){var n=e.getNode(),i=n.kind,s=[];"ObjectMethod"===n.type||"ClassMethod"===n.type?n.value=n:P.FunctionExpression.assert(n.value),n.value.async&&s.push("async "),i&&"init"!==i&&"method"!==i&&"constructor"!==i?(D.ok("get"===i||"set"===i),s.push(i," ")):n.value.generator&&s.push("*");var a=e.call(r,"key");return n.computed&&(a=w(["[",a,"]"])),s.push(a,e.call(r,"value","typeParameters"),"(",e.call(function(e){return f(e,t,r)},"value"),")",e.call(r,"value","returnType")," ",e.call(r,"value","body")),w(s)}function h(e,t,r){var n=e.map(r,"arguments"),i=N.isTrailingCommaEnabled(t,"parameters"),s=_(", ").join(n);return s.getLineLength(1)>t.wrapColumn?(s=_(",\n").join(n),w(["(\n",s.indent(t.tabWidth),i?",\n)":"\n)"])):w(["(",s,")"])}function f(e,t,r){var n=e.getValue();P.Function.assert(n);var i=e.map(r,"params");n.defaults&&e.each(function(e){var t=e.getName(),n=i[t];n&&e.getValue()&&(i[t]=w([n," = ",r(e)]))},"defaults"),n.rest&&i.push(w(["...",e.call(r,"rest")]));var s=_(", ").join(i);return s.length>1||s.getLineLength(1)>t.wrapColumn?(s=_(",\n").join(i),s=w(N.isTrailingCommaEnabled(t,"parameters")&&!n.rest&&"RestElement"!==n.params[n.params.length-1].type?[s,",\n"]:[s,"\n"]),w(["\n",s.indent(t.tabWidth)])):s}function d(e,t,r){var n=e.getValue(),i=[];if(n.async&&i.push("async "),n.generator&&i.push("*"),n.method||"get"===n.kind||"set"===n.kind)return c(e,t,r);var s=e.call(r,"key");return n.computed?i.push("[",s,"]"):i.push(s),i.push("(",f(e,t,r),")",e.call(r,"returnType")," ",e.call(r,"body")),w(i)}function m(e,t,r){var n=e.getValue(),i=["export "],s=t.objectCurlySpacing;P.Declaration.assert(n),(n.default||"ExportDefaultDeclaration"===n.type)&&i.push("default "),n.declaration?i.push(e.call(r,"declaration")):n.specifiers&&n.specifiers.length>0&&(1===n.specifiers.length&&"ExportBatchSpecifier"===n.specifiers[0].type?i.push("*"):i.push(s?"{ ":"{",_(", ").join(e.map(r,"specifiers")),s?" }":"}"),n.source&&i.push(" from ",e.call(r,"source")));var a=w(i);return";"===b(a)||n.declaration&&("FunctionDeclaration"===n.declaration.type||"ClassDeclaration"===n.declaration.type)||(a=w([a,";"])),a}function y(e,t){var r=N.getParentExportDeclaration(e);return r?D.strictEqual(r.type,"DeclareExportDeclaration"):t.unshift("declare "),w(t)}function g(e,t){return w(e.length>1?[" ",e]:["\n",A(e).indent(t.tabWidth)])}function b(e){var t=e.lastPos();do{var r=e.charAt(t);if(/\S/.test(r))return r}while(e.prevPos(t))}function v(e){return"}"===b(e)}function x(e){return e.replace(/['"]/g,function(e){return'"'===e?"'":'"'})}function E(e,t){switch(B.assert(e),t.quote){case"auto":var r=JSON.stringify(e),n=x(JSON.stringify(x(e)));return r.length>n.length?n:r;case"single":return x(JSON.stringify(x(e)));case"double":default:return JSON.stringify(e)}}function A(e){var t=b(e);return!t||"\n};".indexOf(t)<0?w([e,";"]):e}var D=e("assert"),C=(e("source-map"),e("./comments").printComments),S=e("./lines"),_=S.fromString,w=S.concat,k=e("./options").normalize,F=e("./patcher").getReprinter,T=e("./types"),P=T.namedTypes,B=T.builtInTypes.string,O=T.builtInTypes.object,j=e("./fast-path"),N=e("./util"),I=n.prototype,L=!1;I.toString=function(){return L||(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."),L=!0),this.code};var M=new n("");r.Printer=i},{"./comments":551,"./fast-path":552,"./lines":553,"./options":555,"./patcher":557,"./types":559,"./util":560,assert:3,"source-map":573}],559:[function(e,t,r){t.exports=e("ast-types")},{"ast-types":22}],560:[function(e,t,r){function n(){for(var e={},t=arguments.length,r=0;r<t;++r)for(var n=Object.keys(arguments[r]),i=n.length,s=0;s<i;++s)e[n[s]]=!0;return e}function i(e,t){return e.line-t.line||e.column-t.column}function s(e){return{line:e.line,column:e.column}}function a(e,t){e&&t&&(i(t.start,e.start)<0&&(e.start=t.start),i(e.end,t.end)<0&&(e.end=t.end))}function o(e,t){if(u.strictEqual(e.type,"TemplateLiteral"),0!==e.quasis.length){var r=s(e.loc.start);u.strictEqual(t.charAt(r),"`"),u.ok(t.nextPos(r));var n=e.quasis[0];i(n.loc.start,r)<0&&(n.loc.start=r);var a=s(e.loc.end);u.ok(t.prevPos(a)),u.strictEqual(t.charAt(a),"`");var o=e.quasis[e.quasis.length-1];i(a,o.loc.end)<0&&(o.loc.end=a),e.expressions.forEach(function(r,n){var s=t.skipSpaces(r.loc.start,!0,!1);if(t.prevPos(s)&&"{"===t.charAt(s)&&t.prevPos(s)&&"$"===t.charAt(s)){var a=e.quasis[n];i(s,a.loc.end)<0&&(a.loc.end=s)}var o=t.skipSpaces(r.loc.end,!1,!1);if("}"===t.charAt(o)){u.ok(t.nextPos(o));var l=e.quasis[n+1];i(l.loc.start,o)<0&&(l.loc.start=o)}})}}var u=e("assert"),l=e("./types"),c=(l.getFieldValue,l.namedTypes),p=e("source-map"),h=p.SourceMapConsumer,f=p.SourceMapGenerator,d=Object.prototype.hasOwnProperty,m=r;m.getUnionOfKeys=n,m.comparePos=i,m.copyPos=s,m.composeSourceMaps=function(e,t){if(!e)return t||null;if(!t)return e;var r=new h(e),n=new h(t),i=new f({file:t.file,sourceRoot:t.sourceRoot}),a={};return n.eachMapping(function(e){var t=r.originalPositionFor({line:e.originalLine,column:e.originalColumn}),n=t.source;if(null!==n){i.addMapping({source:n,original:s(t),generated:{line:e.generatedLine,column:e.generatedColumn},name:e.name});var o=r.sourceContentFor(n);o&&!d.call(a,n)&&(a[n]=o,i.setSourceContent(n,o))}}),i.toJSON()},m.getTrueLoc=function(e,t){function r(e){a(n,e.loc)}if(!e.loc)return null;var n={start:e.loc.start,end:e.loc.end};return e.comments&&e.comments.forEach(r),e.declaration&&m.isExportDeclaration(e)&&e.declaration.decorators&&e.declaration.decorators.forEach(r),i(n.start,n.end)<0&&(n.start=s(n.start),t.skipSpaces(n.start,!1,!0),i(n.start,n.end)<0&&(n.end=s(n.end),t.skipSpaces(n.end,!0,!0))),n},m.fixFaultyLocations=function(e,t){var r=e.loc;if(r&&(r.start.line<1&&(r.start.line=1),r.end.line<1&&(r.end.line=1)),"File"===e.type&&(r.start=t.firstPos(),r.end=t.lastPos()),"TemplateLiteral"===e.type)o(e,t);else if(r&&e.decorators)e.decorators.forEach(function(e){a(r,e.loc)});else if(e.declaration&&m.isExportDeclaration(e)){e.declaration.loc=null;var n=e.declaration.decorators;n&&n.forEach(function(e){a(r,e.loc)})}else if(c.MethodDefinition&&c.MethodDefinition.check(e)||c.Property.check(e)&&(e.method||e.shorthand))e.value.loc=null,c.FunctionExpression.check(e.value)&&(e.value.id=null);else if("ObjectTypeProperty"===e.type){var r=e.loc,i=r&&r.end;i&&(i=s(i),t.prevPos(i)&&","===t.charAt(i)&&(i=t.skipSpaces(i,!0,!0))&&(r.end=i))}},m.isExportDeclaration=function(e){if(e)switch(e.type){case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1},m.getParentExportDeclaration=function(e){var t=e.getParentNode();return"declaration"===e.getName()&&m.isExportDeclaration(t)?t:null},m.isTrailingCommaEnabled=function(e,t){var r=e.trailingComma;return"object"==typeof r?!!r[t]:!!r}},{"./types":559,assert:3,"source-map":573}],561:[function(e,t,r){(function(t){function n(e,t){return new p(t).print(e)}function i(e,t){return new p(t).printGenerically(e)}function s(e,r){return a(t.argv[2],e,r)}function a(t,r,n){e("fs").readFile(t,"utf-8",function(e,t){if(e)return void console.error(e);u(t,r,n)})}function o(e){t.stdout.write(e)}function u(e,t,r){var i=r&&r.writeback||o;t(c(e,r),function(e){i(n(e,r).code)})}var l=e("./lib/types"),c=e("./lib/parser").parse,p=e("./lib/printer").Printer;Object.defineProperties(r,{parse:{enumerable:!0,value:c},visit:{enumerable:!0,value:l.visit},print:{enumerable:!0,value:n},prettyPrint:{enumerable:!1,value:i},types:{enumerable:!1,value:l},run:{enumerable:!1,value:s}})}).call(this,e("_process"))},{"./lib/parser":556,"./lib/printer":558,"./lib/types":559,_process:539,fs:181}],562:[function(e,t,r){!function(e,n){"object"==typeof r&&"object"==typeof t?t.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof r?r.esprima=n():e.esprima=n()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e,t,r){var n=null,i=function(e,t){r&&r(e,t),n&&n.visit(e,t)},u="function"==typeof r?i:null,l=!1;if(t){l="boolean"==typeof t.comment&&t.comment;var c="boolean"==typeof t.attachComment&&t.attachComment;(l||c)&&(n=new s.CommentHandler,n.attach=c,t.comment=!0,u=i)}var p;p=t&&"boolean"==typeof t.jsx&&t.jsx?new o.JSXParser(e,t,u):new a.Parser(e,t,u);var h=p.parseProgram();return l&&(h.comments=n.comments),p.config.tokens&&(h.tokens=p.tokens),p.config.tolerant&&(h.errors=p.errorHandler.errors),h}function i(e,t,r){var n,i=new u.Tokenizer(e,t);n=[];try{for(;;){var s=i.getNextToken();if(!s)break;r&&(s=r(s)),n.push(s)}}catch(e){i.errorHandler.tolerate(e)}return i.errorHandler.tolerant&&(n.errors=i.errors()),n}var s=r(1),a=r(3),o=r(11),u=r(15);t.parse=n,t.tokenize=i;var l=r(2);t.Syntax=l.Syntax,t.version="3.1.3"},function(e,t,r){"use strict";var n=r(2),i=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===n.Syntax.BlockStatement&&0===e.body.length){for(var r=[],i=this.leading.length-1;i>=0;--i){var s=this.leading[i];t.end.offset>=s.start&&(r.unshift(s.comment),this.leading.splice(i,1),this.trailing.splice(i,1))}r.length&&(e.innerComments=r)}},e.prototype.findTrailingComments=function(e,t){var r=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var i=this.trailing[n];i.start>=t.end.offset&&r.unshift(i.comment)}return this.trailing.length=0,r}var s=this.stack[this.stack.length-1];if(s&&s.node.trailingComments){var a=s.node.trailingComments[0];a&&a.range[0]>=t.end.offset&&(r=s.node.trailingComments,delete s.node.trailingComments)}return r},e.prototype.findLeadingComments=function(e,t){for(var r,n=[];this.stack.length>0;){var i=this.stack[this.stack.length-1];if(!(i&&i.start>=t.start.offset))break;r=this.stack.pop().node}if(r){for(var s=r.leadingComments?r.leadingComments.length:0,a=s-1;a>=0;--a){var o=r.leadingComments[a];o.range[1]<=t.start.offset&&(n.unshift(o),r.leadingComments.splice(a,1))}return r.leadingComments&&0===r.leadingComments.length&&delete r.leadingComments,n}for(var a=this.leading.length-1;a>=0;--a){var i=this.leading[a];i.start<=t.start.offset&&(n.unshift(i.comment),this.leading.splice(a,1))}return n},e.prototype.visitNode=function(e,t){if(!(e.type===n.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var r=this.findTrailingComments(e,t),i=this.findLeadingComments(e,t);i.length>0&&(e.leadingComments=i),r.length>0&&(e.trailingComments=r),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var r="L"===e.type[0]?"Line":"Block",n={type:r,value:e.value};if(e.range&&(n.range=e.range),e.loc&&(n.loc=e.loc),this.comments.push(n),this.attach){var i={comment:{type:r,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(i.comment.loc=e.loc),e.type=r,this.leading.push(i),this.trailing.push(i)}},e.prototype.visit=function(e,t){"LineComment"===e.type?this.visitComment(e,t):"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=i},function(e,t){"use strict";t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,r){"use strict";var n=r(4),i=r(5),s=r(6),a=r(7),o=r(8),u=r(2),l=r(10),c=function(){function e(e,t,r){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=r,this.errorHandler=new s.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new o.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.sourceType=t&&"module"===t.sourceType?"module":"script",this.lookahead=null,this.hasLineTerminator=!1,this.context={allowIn:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:"module"===this.sourceType},this.tokens=[],this.startMarker={index:0,lineNumber:this.scanner.lineNumber,lineStart:0},this.lastMarker={index:0,lineNumber:this.scanner.lineNumber,lineStart:0},this.nextToken(),this.lastMarker={index:this.scanner.index,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.prototype.slice.call(arguments,1),s=e.replace(/%(\d)/g,function(e,t){return n.assert(t<i.length,"Message reference must be in range"),i[t]
+}),a=this.lastMarker.index,o=this.lastMarker.lineNumber,u=this.lastMarker.index-this.lastMarker.lineStart+1;throw this.errorHandler.createError(a,o,u,s)},e.prototype.tolerateError=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.prototype.slice.call(arguments,1),s=e.replace(/%(\d)/g,function(e,t){return n.assert(t<i.length,"Message reference must be in range"),i[t]}),a=this.lastMarker.index,o=this.scanner.lineNumber,u=this.lastMarker.index-this.lastMarker.lineStart+1;this.errorHandler.tolerateError(a,o,u,s)},e.prototype.unexpectedTokenError=function(e,t){var r,n=t||i.Messages.UnexpectedToken;if(e?(t||(n=e.type===a.Token.EOF?i.Messages.UnexpectedEOS:e.type===a.Token.Identifier?i.Messages.UnexpectedIdentifier:e.type===a.Token.NumericLiteral?i.Messages.UnexpectedNumber:e.type===a.Token.StringLiteral?i.Messages.UnexpectedString:e.type===a.Token.Template?i.Messages.UnexpectedTemplate:i.Messages.UnexpectedToken,e.type===a.Token.Keyword&&(this.scanner.isFutureReservedWord(e.value)?n=i.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(e.value)&&(n=i.Messages.StrictReservedWord))),r=e.type===a.Token.Template?e.value.raw:e.value):r="ILLEGAL",n=n.replace("%0",r),e&&"number"==typeof e.lineNumber){var s=e.start,o=e.lineNumber,u=e.start-this.lastMarker.lineStart+1;return this.errorHandler.createError(s,o,u,n)}var s=this.lastMarker.index,o=this.lastMarker.lineNumber,u=s-this.lastMarker.lineStart+1;return this.errorHandler.createError(s,o,u,n)},e.prototype.throwUnexpectedToken=function(e,t){throw this.unexpectedTokenError(e,t)},e.prototype.tolerateUnexpectedToken=function(e,t){this.errorHandler.tolerate(this.unexpectedTokenError(e,t))},e.prototype.collectComments=function(){if(this.config.comment){var e=this.scanner.scanComments();if(e.length>0&&this.delegate)for(var t=0;t<e.length;++t){var r=e[t],n=void 0;n={type:r.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(r.slice[0],r.slice[1])},this.config.range&&(n.range=r.range),this.config.loc&&(n.loc=r.loc);var i={start:{line:r.loc.start.line,column:r.loc.start.column,offset:r.range[0]},end:{line:r.loc.end.line,column:r.loc.end.column,offset:r.range[1]}};this.delegate(n,i)}}else this.scanner.scanComments()},e.prototype.getTokenRaw=function(e){return this.scanner.source.slice(e.start,e.end)},e.prototype.convertToken=function(e){var t;return t={type:a.TokenName[e.type],value:this.getTokenRaw(e)},this.config.range&&(t.range=[e.start,e.end]),this.config.loc&&(t.loc={start:{line:this.startMarker.lineNumber,column:this.startMarker.index-this.startMarker.lineStart},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),e.regex&&(t.regex=e.regex),t},e.prototype.nextToken=function(){var e=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;var t;return t=this.scanner.lex(),this.hasLineTerminator=!(!e||!t)&&e.lineNumber!==t.lineNumber,t&&this.context.strict&&t.type===a.Token.Identifier&&this.scanner.isStrictModeReservedWord(t.value)&&(t.type=a.Token.Keyword),this.lookahead=t,this.config.tokens&&t.type!==a.Token.EOF&&this.tokens.push(this.convertToken(t)),e},e.prototype.nextRegexToken=function(){this.collectComments();var e=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(e))),this.lookahead=e,this.nextToken(),e},e.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.lineNumber,column:this.startMarker.index-this.startMarker.lineStart}},e.prototype.startNode=function(e){return{index:e.start,line:e.lineNumber,column:e.start-e.lineStart}},e.prototype.finalize=function(e,t){if(this.config.range&&(t.range=[e.index,this.lastMarker.index]),this.config.loc&&(t.loc={start:{line:e.line,column:e.column},end:{line:this.lastMarker.lineNumber,column:this.lastMarker.index-this.lastMarker.lineStart}},this.config.source&&(t.loc.source=this.config.source)),this.delegate){var r={start:{line:e.line,column:e.column,offset:e.index},end:{line:this.lastMarker.lineNumber,column:this.lastMarker.index-this.lastMarker.lineStart,offset:this.lastMarker.index}};this.delegate(t,r)}return t},e.prototype.expect=function(e){var t=this.nextToken();t.type===a.Token.Punctuator&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var e=this.lookahead;e.type===a.Token.Punctuator&&","===e.value?this.nextToken():e.type===a.Token.Punctuator&&";"===e.value?(this.nextToken(),this.tolerateUnexpectedToken(e)):this.tolerateUnexpectedToken(e,i.Messages.UnexpectedToken)}else this.expect(",")},e.prototype.expectKeyword=function(e){var t=this.nextToken();t.type===a.Token.Keyword&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.match=function(e){return this.lookahead.type===a.Token.Punctuator&&this.lookahead.value===e},e.prototype.matchKeyword=function(e){return this.lookahead.type===a.Token.Keyword&&this.lookahead.value===e},e.prototype.matchContextualKeyword=function(e){return this.lookahead.type===a.Token.Identifier&&this.lookahead.value===e},e.prototype.matchAssign=function(){if(this.lookahead.type!==a.Token.Punctuator)return!1;var e=this.lookahead.value;return"="===e||"*="===e||"**="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,r=this.context.isAssignmentTarget,n=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=r,this.context.firstCoverInitializedNameError=n,i},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,r=this.context.isAssignmentTarget,n=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&r,this.context.firstCoverInitializedNameError=n||this.context.firstCoverInitializedNameError,i},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type===a.Token.EOF||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.lineNumber=this.startMarker.lineNumber,this.lastMarker.lineStart=this.startMarker.lineStart)},e.prototype.parsePrimaryExpression=function(){var e,t,r,n=this.createNode();switch(this.lookahead.type){case a.Token.Identifier:"module"===this.sourceType&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.finalize(n,new l.Identifier(this.nextToken().value));break;case a.Token.NumericLiteral:case a.Token.StringLiteral:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,i.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),r=this.getTokenRaw(t),e=this.finalize(n,new l.Literal(t.value,r));break;case a.Token.BooleanLiteral:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),t.value="true"===t.value,r=this.getTokenRaw(t),e=this.finalize(n,new l.Literal(t.value,r));break;case a.Token.NullLiteral:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),t.value=null,r=this.getTokenRaw(t),e=this.finalize(n,new l.Literal(t.value,r));break;case a.Token.Template:e=this.parseTemplateLiteral();break;case a.Token.Punctuator:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),r=this.getTokenRaw(t),e=this.finalize(n,new l.RegexLiteral(t.value,r,t.regex));break;default:this.throwUnexpectedToken(this.nextToken())}break;case a.Token.Keyword:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(n,new l.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(n,new l.ThisExpression)):this.matchKeyword("class")?e=this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new l.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var r=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(r)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new l.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,r=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,r},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!1;var r=this.parseFormalParameters(),n=this.parsePropertyMethod(r);return this.context.allowYield=t,this.finalize(e,new l.FunctionExpression(null,r.params,n,!1))},e.prototype.parseObjectPropertyKey=function(){var e=this.createNode(),t=this.nextToken(),r=null;switch(t.type){case a.Token.StringLiteral:case a.Token.NumericLiteral:this.context.strict&&t.octal&&this.tolerateUnexpectedToken(t,i.Messages.StrictOctalLiteral);var n=this.getTokenRaw(t);r=this.finalize(e,new l.Literal(t.value,n));break;case a.Token.Identifier:case a.Token.BooleanLiteral:case a.Token.NullLiteral:case a.Token.Keyword:r=this.finalize(e,new l.Identifier(t.value));break;case a.Token.Punctuator:"["===t.value?(r=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):this.throwUnexpectedToken(t);break;default:this.throwUnexpectedToken(t)}return r},e.prototype.isPropertyKey=function(e,t){return e.type===u.Syntax.Identifier&&e.name===t||e.type===u.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,r,n,s=this.createNode(),o=this.lookahead,u=!1,c=!1,p=!1;o.type===a.Token.Identifier?(this.nextToken(),r=this.finalize(s,new l.Identifier(o.value))):this.match("*")?this.nextToken():(u=this.match("["),r=this.parseObjectPropertyKey());var h=this.qualifiedPropertyName(this.lookahead);if(o.type===a.Token.Identifier&&"get"===o.value&&h)t="get",u=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,n=this.parseGetterMethod();else if(o.type===a.Token.Identifier&&"set"===o.value&&h)t="set",u=this.match("["),r=this.parseObjectPropertyKey(),n=this.parseSetterMethod();else if(o.type===a.Token.Punctuator&&"*"===o.value&&h)t="init",u=this.match("["),r=this.parseObjectPropertyKey(),n=this.parseGeneratorMethod(),c=!0;else if(r||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":"))!u&&this.isPropertyKey(r,"__proto__")&&(e.value&&this.tolerateError(i.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),n=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))n=this.parsePropertyMethodFunction(),c=!0;else if(o.type===a.Token.Identifier){var f=this.finalize(s,new l.Identifier(o.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),p=!0;var d=this.isolateCoverGrammar(this.parseAssignmentExpression);n=this.finalize(s,new l.AssignmentPattern(f,d))}else p=!0,n=f}else this.throwUnexpectedToken(this.nextToken());return this.finalize(s,new l.Property(t,r,u,n,c,p))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],r={value:!1};!this.match("}");)t.push(this.parseObjectProperty(r)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new l.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){n.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),r={raw:t.value.raw,cooked:t.value.cooked};return this.finalize(e,new l.TemplateElement(r,t.tail))},e.prototype.parseTemplateElement=function(){this.lookahead.type!==a.Token.Template&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),r={raw:t.value.raw,cooked:t.value.cooked};return this.finalize(e,new l.TemplateElement(r,t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],r=[],n=this.parseTemplateHead();for(r.push(n);!n.tail;)t.push(this.parseExpression()),n=this.parseTemplateElement(),r.push(n);return this.finalize(e,new l.TemplateLiteral(r,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case u.Syntax.Identifier:case u.Syntax.MemberExpression:case u.Syntax.RestElement:case u.Syntax.AssignmentPattern:break;case u.Syntax.SpreadElement:e.type=u.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case u.Syntax.ArrayExpression:e.type=u.Syntax.ArrayPattern;for(var t=0;t<e.elements.length;t++)null!==e.elements[t]&&this.reinterpretExpressionAsPattern(e.elements[t]);break;case u.Syntax.ObjectExpression:e.type=u.Syntax.ObjectPattern;for(var t=0;t<e.properties.length;t++)this.reinterpretExpressionAsPattern(e.properties[t].value);break;case u.Syntax.AssignmentExpression:e.type=u.Syntax.AssignmentPattern,delete e.operator,this.reinterpretExpressionAsPattern(e.left)}},e.prototype.parseGroupExpression=function(){var e;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[]};else{var t=this.lookahead,r=[];if(this.match("..."))e=this.parseRestElement(r),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[e]};else{var n=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var i=[];for(this.context.isAssignmentTarget=!1,i.push(e);this.startMarker.index<this.scanner.length&&this.match(",");){if(this.nextToken(),this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),i.push(this.parseRestElement(r)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(var s=0;s<i.length;s++)this.reinterpretExpressionAsPattern(i[s]);n=!0,e={type:"ArrowParameterPlaceHolder",params:i}}else i.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(n)break}n||(e=this.finalize(this.startNode(t),new l.SequenceExpression(i)))}if(!n){if(this.expect(")"),this.match("=>")&&(e.type===u.Syntax.Identifier&&"yield"===e.name&&(n=!0,e={type:"ArrowParameterPlaceHolder",params:[e]}),!n)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===u.Syntax.SequenceExpression)for(var s=0;s<e.expressions.length;s++)this.reinterpretExpressionAsPattern(e.expressions[s]);else this.reinterpretExpressionAsPattern(e);e={type:"ArrowParameterPlaceHolder",params:e.type===u.Syntax.SequenceExpression?e.expressions:[e]}}this.context.isBindingElement=!1}}}return e},e.prototype.parseArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(e.push(t),this.match(")"))break;this.expectCommaSeparator()}return this.expect(")"),e},e.prototype.isIdentifierName=function(e){return e.type===a.Token.Identifier||e.type===a.Token.Keyword||e.type===a.Token.BooleanLiteral||e.type===a.Token.NullLiteral},e.prototype.parseIdentifierName=function(){var e=this.createNode(),t=this.nextToken();return this.isIdentifierName(t)||this.throwUnexpectedToken(t),this.finalize(e,new l.Identifier(t.value))},e.prototype.parseNewExpression=function(){var e=this.createNode(),t=this.parseIdentifierName();n.assert("new"===t.name,"New expression must start with `new`");var r;if(this.match("."))if(this.nextToken(),this.lookahead.type===a.Token.Identifier&&this.context.inFunctionBody&&"target"===this.lookahead.value){var i=this.parseIdentifierName();r=new l.MetaProperty(t,i)}else this.throwUnexpectedToken(this.lookahead);else{var s=this.isolateCoverGrammar(this.parseLeftHandSideExpression),o=this.match("(")?this.parseArguments():[];r=new l.NewExpression(s,o),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(e,r)},e.prototype.parseLeftHandSideExpressionAllowCall=function(){var e=this.lookahead,t=this.context.allowIn;this.context.allowIn=!0;var r;for(this.matchKeyword("super")&&this.context.inFunctionBody?(r=this.createNode(),this.nextToken(),r=this.finalize(r,new l.Super),this.match("(")||this.match(".")||this.match("[")||this.throwUnexpectedToken(this.lookahead)):r=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var n=this.parseIdentifierName();r=this.finalize(this.startNode(e),new l.StaticMemberExpression(r,n))}else if(this.match("(")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var i=this.parseArguments();r=this.finalize(this.startNode(e),new l.CallExpression(r,i))}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var n=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),r=this.finalize(this.startNode(e),new l.ComputedMemberExpression(r,n))}else{if(this.lookahead.type!==a.Token.Template||!this.lookahead.head)break;var s=this.parseTemplateLiteral();r=this.finalize(this.startNode(e),new l.TaggedTemplateExpression(r,s))}return this.context.allowIn=t,r},e.prototype.parseSuper=function(){var e=this.createNode();return this.expectKeyword("super"),this.match("[")||this.match(".")||this.throwUnexpectedToken(this.lookahead),this.finalize(e,new l.Super)},e.prototype.parseLeftHandSideExpression=function(){n.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var e=this.startNode(this.lookahead),t=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var r=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),t=this.finalize(e,new l.ComputedMemberExpression(t,r))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var r=this.parseIdentifierName();t=this.finalize(e,new l.StaticMemberExpression(t,r))}else{if(this.lookahead.type!==a.Token.Template||!this.lookahead.head)break;var i=this.parseTemplateLiteral();t=this.finalize(e,new l.TaggedTemplateExpression(t,i))}return t},e.prototype.parseUpdateExpression=function(){var e,t=this.lookahead;if(this.match("++")||this.match("--")){var r=this.startNode(t),n=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&e.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(i.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(i.Messages.InvalidLHSInAssignment);var s=!0;e=this.finalize(r,new l.UpdateExpression(n.value,e,s)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(e=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&this.lookahead.type===a.Token.Punctuator&&(this.match("++")||this.match("--"))){this.context.strict&&e.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(i.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(i.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var o=this.nextToken().value,s=!1;e=this.finalize(this.startNode(t),new l.UpdateExpression(o,e,s))}return e},e.prototype.parseUnaryExpression=function(){var e;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var t=this.startNode(this.lookahead),r=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),e=this.finalize(t,new l.UnaryExpression(r.value,e)),this.context.strict&&"delete"===e.operator&&e.argument.type===u.Syntax.Identifier&&this.tolerateError(i.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else e=this.parseUpdateExpression();return e},e.prototype.parseExponentiationExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseUnaryExpression);if(t.type!==u.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=t,n=this.isolateCoverGrammar(this.parseExponentiationExpression);t=this.finalize(this.startNode(e),new l.BinaryExpression("**",r,n))}return t},e.prototype.binaryPrecedence=function(e){var t=e.value;return e.type===a.Token.Punctuator?this.operatorPrecedence[t]||0:e.type===a.Token.Keyword&&("instanceof"===t||this.context.allowIn&&"in"===t)?7:0},e.prototype.parseBinaryExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseExponentiationExpression),r=this.lookahead,n=this.binaryPrecedence(r);if(n>0){this.nextToken(),r.prec=n,this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var i=[e,this.lookahead],s=t,a=this.isolateCoverGrammar(this.parseExponentiationExpression),o=[s,r,a];;){if((n=this.binaryPrecedence(this.lookahead))<=0)break;for(;o.length>2&&n<=o[o.length-2].prec;){a=o.pop();var u=o.pop().value;s=o.pop(),i.pop();var c=this.startNode(i[i.length-1]);o.push(this.finalize(c,new l.BinaryExpression(u,s,a)))}r=this.nextToken(),r.prec=n,o.push(r),i.push(this.lookahead),o.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var p=o.length-1;for(t=o[p],i.pop();p>1;){var c=this.startNode(i.pop());t=this.finalize(c,new l.BinaryExpression(o[p-1].value,o[p-2],t)),p-=2}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var r=this.context.allowIn;this.context.allowIn=!0;var n=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=r,this.expect(":");var i=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new l.ConditionalExpression(t,n,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case u.Syntax.Identifier:this.validateParam(e,t,t.name);break;case u.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case u.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case u.Syntax.ArrayPattern:for(var r=0;r<t.elements.length;r++)null!==t.elements[r]&&this.checkPatternParam(e,t.elements[r]);break;case u.Syntax.YieldExpression:break;default:n.assert(t.type===u.Syntax.ObjectPattern,"Invalid type");for(var r=0;r<t.properties.length;r++)this.checkPatternParam(e,t.properties[r].value)}},e.prototype.reinterpretAsCoverFormalsList=function(e){var t,r=[e];switch(e.type){case u.Syntax.Identifier:break;case"ArrowParameterPlaceHolder":r=e.params;break;default:return null}t={paramSet:{}};for(var n=0;n<r.length;++n){var s=r[n];s.type===u.Syntax.AssignmentPattern&&s.right.type===u.Syntax.YieldExpression&&(s.right.argument&&this.throwUnexpectedToken(this.lookahead),s.right.type=u.Syntax.Identifier,s.right.name="yield",delete s.right.argument,delete s.right.delegate),this.checkPatternParam(t,s),r[n]=s}if(this.context.strict||!this.context.allowYield)for(var n=0;n<r.length;++n){var s=r[n];s.type===u.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(t.message===i.Messages.StrictParamDupe){var a=this.context.strict?t.stricted:t.firstRestricted;this.throwUnexpectedToken(a,t.message)}return{params:r,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.parseAssignmentExpression=function(){var e;if(!this.context.allowYield&&this.matchKeyword("yield"))e=this.parseYieldExpression();else{var t=this.lookahead,r=t;if(e=this.parseConditionalExpression(),"ArrowParameterPlaceHolder"===e.type||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var n=this.reinterpretAsCoverFormalsList(e);if(n){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var s=this.context.strict,a=this.context.allowYield;this.context.allowYield=!0;var o=this.startNode(t);this.expect("=>");var c=this.match("{")?this.parseFunctionSourceElements():this.isolateCoverGrammar(this.parseAssignmentExpression),p=c.type!==u.Syntax.BlockStatement;this.context.strict&&n.firstRestricted&&this.throwUnexpectedToken(n.firstRestricted,n.message),this.context.strict&&n.stricted&&this.tolerateUnexpectedToken(n.stricted,n.message),e=this.finalize(o,new l.ArrowFunctionExpression(n.params,c,p)),this.context.strict=s,this.context.allowYield=a}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(i.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===u.Syntax.Identifier){var h=e;this.scanner.isRestrictedWord(h.name)&&this.tolerateUnexpectedToken(r,i.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(h.name)&&this.tolerateUnexpectedToken(r,i.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),r=this.nextToken();var f=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new l.AssignmentExpression(r.value,e,f)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var r=[];for(r.push(t);this.startMarker.index<this.scanner.length&&this.match(",");)this.nextToken(),r.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new l.SequenceExpression(r))}return t},e.prototype.parseStatementListItem=function(){var e=null;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,this.lookahead.type===a.Token.Keyword)switch(this.lookahead.value){case"export":"module"!==this.sourceType&&this.tolerateUnexpectedToken(this.lookahead,i.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":"module"!==this.sourceType&&this.tolerateUnexpectedToken(this.lookahead,i.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];;){if(this.match("}"))break;t.push(this.parseStatementListItem())}return this.expect("}"),this.finalize(e,new l.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var r=this.createNode(),n=[],s=this.parsePattern(n,e);this.context.strict&&s.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(s.name)&&this.tolerateError(i.Messages.StrictVarName);var a=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.expect("="),a=this.isolateCoverGrammar(this.parseAssignmentExpression)):(!t.inFor&&s.type!==u.Syntax.Identifier||this.match("="))&&(this.expect("="),a=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(r,new l.VariableDeclarator(s,a))},e.prototype.parseBindingList=function(e,t){for(var r=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),r.push(this.parseLexicalBinding(e,t));return r},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.index,t=this.scanner.lineNumber,r=this.scanner.lineStart;this.collectComments();var n=this.scanner.lex();return this.scanner.index=e,this.scanner.lineNumber=t,this.scanner.lineStart=r,n.type===a.Token.Identifier||n.type===a.Token.Punctuator&&"["===n.value||n.type===a.Token.Punctuator&&"{"===n.value||n.type===a.Token.Keyword&&"let"===n.value||n.type===a.Token.Keyword&&"yield"===n.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),r=this.nextToken().value;n.assert("let"===r||"const"===r,"Lexical declaration must be either let or const");var i=this.parseBindingList(r,e);return this.consumeSemicolon(),this.finalize(t,new l.VariableDeclaration(i,r))},e.prototype.parseBindingRestElement=function(e,t){var r=this.createNode();this.expect("...");var n=this.parsePattern(e,t);return this.finalize(r,new l.RestElement(n))},e.prototype.parseArrayPattern=function(e,t){var r=this.createNode();this.expect("[");for(var n=[];!this.match("]");)if(this.match(","))this.nextToken(),n.push(null);else{if(this.match("...")){n.push(this.parseBindingRestElement(e,t));break}n.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(r,new l.ArrayPattern(n))},e.prototype.parsePropertyPattern=function(e,t){var r,n,i=this.createNode(),s=!1,o=!1;if(this.lookahead.type===a.Token.Identifier){var u=this.lookahead;r=this.parseVariableIdentifier();var c=this.finalize(i,new l.Identifier(u.value));if(this.match("=")){e.push(u),o=!0,this.nextToken();var p=this.parseAssignmentExpression();n=this.finalize(this.startNode(u),new l.AssignmentPattern(c,p))}else this.match(":")?(this.expect(":"),n=this.parsePatternWithDefault(e,t)):(e.push(u),o=!0,n=c)}else s=this.match("["),r=this.parseObjectPropertyKey(),this.expect(":"),n=this.parsePatternWithDefault(e,t);return this.finalize(i,new l.Property("init",r,s,n,!1,o))},e.prototype.parseObjectPattern=function(e,t){var r=this.createNode(),n=[];for(this.expect("{");!this.match("}");)n.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(r,new l.ObjectPattern(n))},e.prototype.parsePattern=function(e,t){var r
+;return this.match("[")?r=this.parseArrayPattern(e,t):this.match("{")?r=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,i.Messages.UnexpectedToken),e.push(this.lookahead),r=this.parseVariableIdentifier(t)),r},e.prototype.parsePatternWithDefault=function(e,t){var r=this.lookahead,n=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var i=this.context.allowYield;this.context.allowYield=!0;var s=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=i,n=this.finalize(this.startNode(r),new l.AssignmentPattern(n,s))}return n},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),r=this.nextToken();return r.type===a.Token.Keyword&&"yield"===r.value?(this.context.strict&&this.tolerateUnexpectedToken(r,i.Messages.StrictReservedWord),this.context.allowYield||this.throwUnexpectedToken(r)):r.type!==a.Token.Identifier?this.context.strict&&r.type===a.Token.Keyword&&this.scanner.isStrictModeReservedWord(r.value)?this.tolerateUnexpectedToken(r,i.Messages.StrictReservedWord):(this.context.strict||"let"!==r.value||"var"!==e)&&this.throwUnexpectedToken(r):"module"===this.sourceType&&r.type===a.Token.Identifier&&"await"===r.value&&this.tolerateUnexpectedToken(r),this.finalize(t,new l.Identifier(r.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),r=[],n=this.parsePattern(r,"var");this.context.strict&&n.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(i.Messages.StrictVarName);var s=null;return this.match("=")?(this.nextToken(),s=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type===u.Syntax.Identifier||e.inFor||this.expect("="),this.finalize(t,new l.VariableDeclarator(n,s))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},r=[];for(r.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),r.push(this.parseVariableDeclaration(t));return r},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new l.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new l.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new l.ExpressionStatement(t))},e.prototype.parseIfStatement=function(){var e,t=this.createNode(),r=null;this.expectKeyword("if"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new l.EmptyStatement)):(this.expect(")"),e=this.parseStatement(),this.matchKeyword("else")&&(this.nextToken(),r=this.parseStatement())),this.finalize(t,new l.IfStatement(n,e,r))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var r=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();return this.expect(")"),this.match(";")&&this.nextToken(),this.finalize(e,new l.DoWhileStatement(r,n))},e.prototype.parseWhileStatement=function(){var e,t=this.createNode();this.expectKeyword("while"),this.expect("(");var r=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new l.EmptyStatement);else{this.expect(")");var n=this.context.inIteration;this.context.inIteration=!0,e=this.parseStatement(),this.context.inIteration=n}return this.finalize(t,new l.WhileStatement(r,e))},e.prototype.parseForStatement=function(){var e,t,r=null,n=null,s=null,a=!0,o=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){r=this.createNode(),this.nextToken();var c=this.context.allowIn;this.context.allowIn=!1;var p=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=c,1===p.length&&this.matchKeyword("in")){var h=p[0];h.init&&(h.id.type===u.Syntax.ArrayPattern||h.id.type===u.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(i.Messages.ForInOfLoopInitializer,"for-in"),r=this.finalize(r,new l.VariableDeclaration(p,"var")),this.nextToken(),e=r,t=this.parseExpression(),r=null}else 1===p.length&&null===p[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new l.VariableDeclaration(p,"var")),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,a=!1):(r=this.finalize(r,new l.VariableDeclaration(p,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){r=this.createNode();var f=this.nextToken().value;if(this.context.strict||"in"!==this.lookahead.value){var c=this.context.allowIn;this.context.allowIn=!1;var p=this.parseBindingList(f,{inFor:!0});this.context.allowIn=c,1===p.length&&null===p[0].init&&this.matchKeyword("in")?(r=this.finalize(r,new l.VariableDeclaration(p,f)),this.nextToken(),e=r,t=this.parseExpression(),r=null):1===p.length&&null===p[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new l.VariableDeclaration(p,f)),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,a=!1):(this.consumeSemicolon(),r=this.finalize(r,new l.VariableDeclaration(p,f)))}else r=this.finalize(r,new l.Identifier(f)),this.nextToken(),e=r,t=this.parseExpression(),r=null}else{var d=this.lookahead,c=this.context.allowIn;if(this.context.allowIn=!1,r=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=c,this.matchKeyword("in"))this.context.isAssignmentTarget&&r.type!==u.Syntax.AssignmentExpression||this.tolerateError(i.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseExpression(),r=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&r.type!==u.Syntax.AssignmentExpression||this.tolerateError(i.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseAssignmentExpression(),r=null,a=!1;else{if(this.match(",")){for(var m=[r];this.match(",");)this.nextToken(),m.push(this.isolateCoverGrammar(this.parseAssignmentExpression));r=this.finalize(this.startNode(d),new l.SequenceExpression(m))}this.expect(";")}}void 0===e&&(this.match(";")||(n=this.parseExpression()),this.expect(";"),this.match(")")||(s=this.parseExpression()));var y;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),y=this.finalize(this.createNode(),new l.EmptyStatement);else{this.expect(")");var g=this.context.inIteration;this.context.inIteration=!0,y=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=g}return void 0===e?this.finalize(o,new l.ForStatement(r,n,s,y)):a?this.finalize(o,new l.ForInStatement(e,t,y)):this.finalize(o,new l.ForOfStatement(e,t,y))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(this.lookahead.type===a.Token.Identifier&&!this.hasLineTerminator){t=this.parseVariableIdentifier();var r="$"+t.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(i.Messages.UnknownLabel,t.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(i.Messages.IllegalContinue),this.finalize(e,new l.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(this.lookahead.type===a.Token.Identifier&&!this.hasLineTerminator){t=this.parseVariableIdentifier();var r="$"+t.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(i.Messages.UnknownLabel,t.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(i.Messages.IllegalBreak),this.finalize(e,new l.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(i.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==a.Token.EOF,r=t?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(e,new l.ReturnStatement(r))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(i.Messages.StrictModeWith);var e=this.createNode();this.expectKeyword("with"),this.expect("(");var t=this.parseExpression();this.expect(")");var r=this.parseStatement();return this.finalize(e,new l.WithStatement(t,r))},e.prototype.parseSwitchCase=function(){var e,t=this.createNode();this.matchKeyword("default")?(this.nextToken(),e=null):(this.expectKeyword("case"),e=this.parseExpression()),this.expect(":");for(var r=[];;){if(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"))break;r.push(this.parseStatementListItem())}return this.finalize(t,new l.SwitchCase(e,r))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var r=this.context.inSwitch;this.context.inSwitch=!0;var n=[],s=!1;for(this.expect("{");;){if(this.match("}"))break;var a=this.parseSwitchCase();null===a.test&&(s&&this.throwError(i.Messages.MultipleDefaultsInSwitch),s=!0),n.push(a)}return this.expect("}"),this.context.inSwitch=r,this.finalize(e,new l.SwitchStatement(t,n))},e.prototype.parseLabelledStatement=function(){var e,t=this.createNode(),r=this.parseExpression();if(r.type===u.Syntax.Identifier&&this.match(":")){this.nextToken();var n=r,s="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,s)&&this.throwError(i.Messages.Redeclaration,"Label",n.name),this.context.labelSet[s]=!0;var a=this.parseStatement();delete this.context.labelSet[s],e=new l.LabeledStatement(n,a)}else this.consumeSemicolon(),e=new l.ExpressionStatement(r);return this.finalize(t,e)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(i.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new l.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],r=this.parsePattern(t),n={},s=0;s<t.length;s++){var a="$"+t[s].value;Object.prototype.hasOwnProperty.call(n,a)&&this.tolerateError(i.Messages.DuplicateBinding,t[s].value),n[a]=!0}this.context.strict&&r.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(r.name)&&this.tolerateError(i.Messages.StrictCatchVariable),this.expect(")");var o=this.parseBlock();return this.finalize(e,new l.CatchClause(r,o))},e.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},e.prototype.parseTryStatement=function(){var e=this.createNode();this.expectKeyword("try");var t=this.parseBlock(),r=this.matchKeyword("catch")?this.parseCatchClause():null,n=this.matchKeyword("finally")?this.parseFinallyClause():null;return r||n||this.throwError(i.Messages.NoCatchOrFinally),this.finalize(e,new l.TryStatement(t,r,n))},e.prototype.parseDebuggerStatement=function(){var e=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(e,new l.DebuggerStatement)},e.prototype.parseStatement=function(){var e=null;switch(this.lookahead.type){case a.Token.BooleanLiteral:case a.Token.NullLiteral:case a.Token.NumericLiteral:case a.Token.StringLiteral:case a.Token.Template:case a.Token.RegularExpression:e=this.parseExpressionStatement();break;case a.Token.Punctuator:var t=this.lookahead.value;e="{"===t?this.parseBlock():"("===t?this.parseExpressionStatement():";"===t?this.parseEmptyStatement():this.parseExpressionStatement();break;case a.Token.Identifier:e=this.parseLabelledStatement();break;case a.Token.Keyword:switch(this.lookahead.value){case"break":e=this.parseBreakStatement();break;case"continue":e=this.parseContinueStatement();break;case"debugger":e=this.parseDebuggerStatement();break;case"do":e=this.parseDoWhileStatement();break;case"for":e=this.parseForStatement();break;case"function":e=this.parseFunctionDeclaration();break;case"if":e=this.parseIfStatement();break;case"return":e=this.parseReturnStatement();break;case"switch":e=this.parseSwitchStatement();break;case"throw":e=this.parseThrowStatement();break;case"try":e=this.parseTryStatement();break;case"var":e=this.parseVariableStatement();break;case"while":e=this.parseWhileStatement();break;case"with":e=this.parseWithStatement();break;default:e=this.parseExpressionStatement()}break;default:this.throwUnexpectedToken(this.lookahead)}return e},e.prototype.parseFunctionSourceElements=function(){var e=this.createNode();this.expect("{");var t=this.parseDirectivePrologues(),r=this.context.labelSet,n=this.context.inIteration,i=this.context.inSwitch,s=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;this.startMarker.index<this.scanner.length&&!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=r,this.context.inIteration=n,this.context.inSwitch=i,this.context.inFunctionBody=s,this.finalize(e,new l.BlockStatement(t))},e.prototype.validateParam=function(e,t,r){var n="$"+r;this.context.strict?(this.scanner.isRestrictedWord(r)&&(e.stricted=t,e.message=i.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(e.paramSet,n)&&(e.stricted=t,e.message=i.Messages.StrictParamDupe)):e.firstRestricted||(this.scanner.isRestrictedWord(r)?(e.firstRestricted=t,e.message=i.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(r)?(e.firstRestricted=t,e.message=i.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(e.paramSet,n)&&(e.stricted=t,e.message=i.Messages.StrictParamDupe)),"function"==typeof Object.defineProperty?Object.defineProperty(e.paramSet,n,{value:!0,enumerable:!0,writable:!0,configurable:!0}):e.paramSet[n]=!0},e.prototype.parseRestElement=function(e){var t=this.createNode();this.expect("...");var r=this.parsePattern(e);return this.match("=")&&this.throwError(i.Messages.DefaultRestParameter),this.match(")")||this.throwError(i.Messages.ParameterAfterRestParameter),this.finalize(t,new l.RestElement(r))},e.prototype.parseFormalParameter=function(e){for(var t=[],r=this.match("...")?this.parseRestElement(t):this.parsePatternWithDefault(t),n=0;n<t.length;n++)this.validateParam(e,t[n],t[n].value);return e.params.push(r),!this.match(")")},e.prototype.parseFormalParameters=function(e){var t;if(t={params:[],firstRestricted:e},this.expect("("),!this.match(")"))for(t.paramSet={};this.startMarker.index<this.scanner.length&&this.parseFormalParameter(t);)this.expect(",");return this.expect(")"),{params:t.params,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.parseFunctionDeclaration=function(e){var t=this.createNode();this.expectKeyword("function");var r=this.match("*");r&&this.nextToken();var n,s=null,a=null;if(!e||!this.match("(")){var o=this.lookahead;s=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(o.value)&&this.tolerateUnexpectedToken(o,i.Messages.StrictFunctionName):this.scanner.isRestrictedWord(o.value)?(a=o,n=i.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(o.value)&&(a=o,n=i.Messages.StrictReservedWord)}var u=this.context.allowYield;this.context.allowYield=!r;var c=this.parseFormalParameters(a),p=c.params,h=c.stricted;a=c.firstRestricted,c.message&&(n=c.message);var f=this.context.strict,d=this.parseFunctionSourceElements();return this.context.strict&&a&&this.throwUnexpectedToken(a,n),this.context.strict&&h&&this.tolerateUnexpectedToken(h,n),this.context.strict=f,this.context.allowYield=u,this.finalize(t,new l.FunctionDeclaration(s,p,d,r))},e.prototype.parseFunctionExpression=function(){var e=this.createNode();this.expectKeyword("function");var t=this.match("*");t&&this.nextToken();var r,n,s=null,a=this.context.allowYield;if(this.context.allowYield=!t,!this.match("(")){var o=this.lookahead;s=this.context.strict||t||!this.matchKeyword("yield")?this.parseVariableIdentifier():this.parseIdentifierName(),this.context.strict?this.scanner.isRestrictedWord(o.value)&&this.tolerateUnexpectedToken(o,i.Messages.StrictFunctionName):this.scanner.isRestrictedWord(o.value)?(n=o,r=i.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(o.value)&&(n=o,r=i.Messages.StrictReservedWord)}var u=this.parseFormalParameters(n),c=u.params,p=u.stricted;n=u.firstRestricted,u.message&&(r=u.message);var h=this.context.strict,f=this.parseFunctionSourceElements();return this.context.strict&&n&&this.throwUnexpectedToken(n,r),this.context.strict&&p&&this.tolerateUnexpectedToken(p,r),this.context.strict=h,this.context.allowYield=a,this.finalize(e,new l.FunctionExpression(s,c,f,t))},e.prototype.parseDirective=function(){var e=this.lookahead,t=null,r=this.createNode(),n=this.parseExpression();return n.type===u.Syntax.Literal&&(t=this.getTokenRaw(e).slice(1,-1)),this.consumeSemicolon(),this.finalize(r,t?new l.Directive(n,t):new l.ExpressionStatement(n))},e.prototype.parseDirectivePrologues=function(){for(var e=null,t=[];;){var r=this.lookahead;if(r.type!==a.Token.StringLiteral)break;var n=this.parseDirective();t.push(n);var s=n.directive;if("string"!=typeof s)break;"use strict"===s?(this.context.strict=!0,e&&this.tolerateUnexpectedToken(e,i.Messages.StrictOctalLiteral)):!e&&r.octal&&(e=r)}return t},e.prototype.qualifiedPropertyName=function(e){switch(e.type){case a.Token.Identifier:case a.Token.StringLiteral:case a.Token.BooleanLiteral:case a.Token.NullLiteral:case a.Token.NumericLiteral:case a.Token.Keyword:return!0;case a.Token.Punctuator:return"["===e.value}return!1},e.prototype.parseGetterMethod=function(){var e=this.createNode();this.expect("("),this.expect(")");var t={params:[],stricted:null,firstRestricted:null,message:null},r=this.context.allowYield;this.context.allowYield=!1;var n=this.parsePropertyMethod(t);return this.context.allowYield=r,this.finalize(e,new l.FunctionExpression(null,t.params,n,!1))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t={params:[],firstRestricted:null,paramSet:{}},r=this.context.allowYield;this.context.allowYield=!1,this.expect("("),this.match(")")?this.tolerateUnexpectedToken(this.lookahead):this.parseFormalParameter(t),this.expect(")");var n=this.parsePropertyMethod(t);return this.context.allowYield=r,this.finalize(e,new l.FunctionExpression(null,t.params,n,!1))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var r=this.parseFormalParameters();this.context.allowYield=!1;var n=this.parsePropertyMethod(r);return this.context.allowYield=t,this.finalize(e,new l.FunctionExpression(null,r.params,n,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case a.Token.Punctuator:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case a.Token.Keyword:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,r=!1;if(!this.hasLineTerminator){var n=this.context.allowYield;this.context.allowYield=!1,r=this.match("*"),r?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=n}return this.finalize(e,new l.YieldExpression(t,r))},e.prototype.parseClassElement=function(e){var t,r,n,s=this.lookahead,o=this.createNode(),u=!1,c=!1,p=!1;if(this.match("*"))this.nextToken();else{u=this.match("["),r=this.parseObjectPropertyKey();"static"===r.name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(s=this.lookahead,p=!0,u=this.match("["),this.match("*")?this.nextToken():r=this.parseObjectPropertyKey())}var h=this.qualifiedPropertyName(this.lookahead);return s.type===a.Token.Identifier?"get"===s.value&&h?(t="get",u=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,n=this.parseGetterMethod()):"set"===s.value&&h&&(t="set",u=this.match("["),r=this.parseObjectPropertyKey(),n=this.parseSetterMethod()):s.type===a.Token.Punctuator&&"*"===s.value&&h&&(t="init",u=this.match("["),r=this.parseObjectPropertyKey(),n=this.parseGeneratorMethod(),c=!0),!t&&r&&this.match("(")&&(t="init",n=this.parsePropertyMethodFunction(),c=!0),t||this.throwUnexpectedToken(this.lookahead),"init"===t&&(t="method"),u||(p&&this.isPropertyKey(r,"prototype")&&this.throwUnexpectedToken(s,i.Messages.StaticPrototype),!p&&this.isPropertyKey(r,"constructor")&&("method"===t&&c&&!n.generator||this.throwUnexpectedToken(s,i.Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(s,i.Messages.DuplicateConstructor):e.value=!0,t="constructor")),this.finalize(o,new l.MethodDefinition(r,u,n,t,p))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new l.ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),r=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=e&&this.lookahead.type!==a.Token.Identifier?null:this.parseVariableIdentifier(),i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var s=this.parseClassBody();return this.context.strict=r,this.finalize(t,new l.ClassDeclaration(n,i,s))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var r=this.lookahead.type===a.Token.Identifier?this.parseVariableIdentifier():null,n=null;this.matchKeyword("extends")&&(this.nextToken(),n=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var i=this.parseClassBody();return this.context.strict=t,this.finalize(e,new l.ClassExpression(r,n,i))},e.prototype.parseProgram=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();this.startMarker.index<this.scanner.length;)t.push(this.parseStatementListItem());return this.finalize(e,new l.Program(t,this.sourceType))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();this.lookahead.type!==a.Token.StringLiteral&&this.throwError(i.Messages.InvalidModuleSpecifier);var t=this.nextToken(),r=this.getTokenRaw(t);return this.finalize(e,new l.Literal(t.value,r))},e.prototype.parseImportSpecifier=function(){var e,t,r=this.createNode();return this.lookahead.type===a.Token.Identifier?(e=this.parseVariableIdentifier(),t=e,this.matchContextualKeyword("as")&&(this.nextToken(),t=this.parseVariableIdentifier())):(e=this.parseIdentifierName(),t=e,this.matchContextualKeyword("as")?(this.nextToken(),t=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(r,new l.ImportSpecifier(t,e))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new l.ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(i.Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new l.ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(i.Messages.IllegalImportDeclaration);var e=this.createNode();this.expectKeyword("import");var t,r=[];if(this.lookahead.type===a.Token.StringLiteral)t=this.parseModuleSpecifier();else{if(this.match("{")?r=r.concat(this.parseNamedImports()):this.match("*")?r.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(r.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?r.push(this.parseImportNamespaceSpecifier()):this.match("{")?r=r.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var n=this.lookahead.value?i.Messages.UnexpectedToken:i.Messages.MissingFromClause;this.throwError(n,this.lookahead.value)}this.nextToken(),t=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(e,new l.ImportDeclaration(r,t))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),r=t;return this.matchContextualKeyword("as")&&(this.nextToken(),r=this.parseIdentifierName()),this.finalize(e,new l.ExportSpecifier(t,r))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(i.Messages.IllegalExportDeclaration);var e=this.createNode();this.expectKeyword("export");var t;if(this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var r=this.parseFunctionDeclaration(!0);t=this.finalize(e,new l.ExportDefaultDeclaration(r))}else if(this.matchKeyword("class")){var r=this.parseClassDeclaration(!0);t=this.finalize(e,new l.ExportDefaultDeclaration(r))}else{this.matchContextualKeyword("from")&&this.throwError(i.Messages.UnexpectedToken,this.lookahead.value);var r=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),t=this.finalize(e,new l.ExportDefaultDeclaration(r))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var n=this.lookahead.value?i.Messages.UnexpectedToken:i.Messages.MissingFromClause;this.throwError(n,this.lookahead.value)}this.nextToken();var s=this.parseModuleSpecifier();this.consumeSemicolon(),t=this.finalize(e,new l.ExportAllDeclaration(s))}else if(this.lookahead.type===a.Token.Keyword){var r=void 0;switch(this.lookahead.value){case"let":case"const":r=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":r=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}t=this.finalize(e,new l.ExportNamedDeclaration(r,[],null))}else{var o=[],u=null,c=!1;for(this.expect("{");!this.match("}");)c=c||this.matchKeyword("default"),o.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),u=this.parseModuleSpecifier(),this.consumeSemicolon();else if(c){var n=this.lookahead.value?i.Messages.UnexpectedToken:i.Messages.MissingFromClause;this.throwError(n,this.lookahead.value)}else this.consumeSemicolon();t=this.finalize(e,new l.ExportNamedDeclaration(null,o,u))}return t},e}();t.Parser=c},function(e,t){"use strict";function r(e,t){if(!e)throw new Error("ASSERT: "+t)}t.assert=r},function(e,t){"use strict";t.Messages={UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",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",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",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",IllegalReturn:"Illegal return statement",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",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.",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",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",DefaultRestParameter:"Unexpected token =",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ConstructorSpecialMethod:"Class constructor may not be an accessor",DuplicateConstructor:"A class may only have one constructor",StaticPrototype:"Classes may not have static property named prototype",MissingFromClause:"Unexpected token",NoAsAfterImportNamespace:"Unexpected token",InvalidModuleSpecifier:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalExportDeclaration:"Unexpected token",DuplicateBinding:"Duplicate binding %0",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer"}},function(e,t){"use strict";var r=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.tolerate=function(e){if(!this.tolerant)throw e;this.recordError(e)},e.prototype.constructError=function(e,t){var r=new Error(e);try{throw r}catch(e){Object.create&&Object.defineProperty&&(r=Object.create(e),Object.defineProperty(r,"column",{value:t}))}finally{return r}},e.prototype.createError=function(e,t,r,n){var i="Line "+t+": "+n,s=this.constructError(i,r);return s.index=e,s.lineNumber=t,s.description=n,s},e.prototype.throwError=function(e,t,r,n){throw this.createError(e,t,r,n)},e.prototype.tolerateError=function(e,t,r,n){var i=this.createError(e,t,r,n);if(!this.tolerant)throw i;this.recordError(i)},e}();t.ErrorHandler=r},function(e,t){"use strict";!function(e){e[e.BooleanLiteral=1]="BooleanLiteral",e[e.EOF=2]="EOF",e[e.Identifier=3]="Identifier",e[e.Keyword=4]="Keyword",e[e.NullLiteral=5]="NullLiteral",e[e.NumericLiteral=6]="NumericLiteral",e[e.Punctuator=7]="Punctuator",e[e.StringLiteral=8]="StringLiteral",e[e.RegularExpression=9]="RegularExpression",e[e.Template=10]="Template"}(t.Token||(t.Token={}));var r=t.Token;t.TokenName={},t.TokenName[r.BooleanLiteral]="Boolean",t.TokenName[r.EOF]="<end>",t.TokenName[r.Identifier]="Identifier",t.TokenName[r.Keyword]="Keyword",t.TokenName[r.NullLiteral]="Null",t.TokenName[r.NumericLiteral]="Numeric",t.TokenName[r.Punctuator]="Punctuator",t.TokenName[r.StringLiteral]="String",t.TokenName[r.RegularExpression]="RegularExpression",t.TokenName[r.Template]="Template"
+},function(e,t,r){"use strict";function n(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function i(e){return"01234567".indexOf(e)}var s=r(4),a=r(5),o=r(9),u=r(7),l=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){void 0===e&&(e=a.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(){this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,a.Messages.UnexpectedTokenIllegal)},e.prototype.skipSingleLineComment=function(e){var t,r,n;for(this.trackComment&&(t=[],r=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(++this.index,o.Character.isLineTerminator(i)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var s={multiLine:!1,slice:[r+e,this.index-1],range:[r,this.index-1],loc:n};t.push(s)}return 13===i&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t}}if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};var s={multiLine:!1,slice:[r+e,this.index],range:[r,this.index],loc:n};t.push(s)}return t},e.prototype.skipMultiLineComment=function(){var e,t,r;for(this.trackComment&&(e=[],t=this.index-2,r={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var n=this.source.charCodeAt(this.index);if(o.Character.isLineTerminator(n))13===n&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===n){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:r};e.push(i)}return e}++this.index}else++this.index}if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[t+2,this.index],range:[t,this.index],loc:r};e.push(i)}return this.tolerateUnexpectedToken(),e},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var r=this.source.charCodeAt(this.index);if(o.Character.isWhiteSpace(r))++this.index;else if(o.Character.isLineTerminator(r))++this.index,13===r&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===r)if(47===(r=this.source.charCodeAt(this.index+1))){this.index+=2;var n=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(n)),t=!0}else{if(42!==r)break;this.index+=2;var n=this.skipMultiLineComment();this.trackComment&&(e=e.concat(n))}else if(t&&45===r){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3;var n=this.skipSingleLineComment(3);this.trackComment&&(e=e.concat(n))}else{if(60!==r)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4;var n=this.skipSingleLineComment(4);this.trackComment&&(e=e.concat(n))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(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}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){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||"yield"===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}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var r=this.source.charCodeAt(e+1);if(r>=56320&&r<=57343){t=1024*(t-55296)+r-56320+65536}}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,r=0,i=0;i<t;++i){if(this.eof()||!o.Character.isHexDigit(this.source.charCodeAt(this.index)))return"";r=16*r+n(this.source[this.index++])}return String.fromCharCode(r)},e.prototype.scanUnicodeCodePointEscape=function(){var e=this.source[this.index],t=0;for("}"===e&&this.throwUnexpectedToken();!this.eof()&&(e=this.source[this.index++],o.Character.isHexDigit(e.charCodeAt(0)));)t=16*t+n(e);return(t>1114111||"}"!==e)&&this.throwUnexpectedToken(),o.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!o.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e=this.codePointAt(this.index),t=o.Character.fromCodePoint(e);this.index+=t.length;var r;for(92===e&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,r=this.scanUnicodeCodePointEscape()):(r=this.scanHexEscape("u"),e=r.charCodeAt(0),r&&"\\"!==r&&o.Character.isIdentifierStart(e)||this.throwUnexpectedToken()),t=r);!this.eof()&&(e=this.codePointAt(this.index),o.Character.isIdentifierPart(e));)r=o.Character.fromCodePoint(e),t+=r,this.index+=r.length,92===e&&(t=t.substr(0,t.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,r=this.scanUnicodeCodePointEscape()):(r=this.scanHexEscape("u"),e=r.charCodeAt(0),r&&"\\"!==r&&o.Character.isIdentifierPart(e)||this.throwUnexpectedToken()),t+=r);return t},e.prototype.octalToDecimal=function(e){var t="0"!==e,r=i(e);return!this.eof()&&o.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,r=8*r+i(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&o.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(r=8*r+i(this.source[this.index++]))),{code:r,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,r=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();return e=1===r.length?u.Token.Identifier:this.isKeyword(r)?u.Token.Keyword:"null"===r?u.Token.NullLiteral:"true"===r||"false"===r?u.Token.BooleanLiteral:u.Token.Identifier,{type:e,value:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e={type:u.Token.Punctuator,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index},t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:t=this.source.substr(this.index,4),">>>="===t?this.index+=4:(t=t.substr(0,3),"==="===t||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:(t=t.substr(0,2),"&&"===t||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)))}return this.index===e.start&&this.throwUnexpectedToken(),e.end=this.index,e.value=t,e},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&o.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),o.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,r="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)r+=this.source[this.index++];return 0===r.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(o.Character.isIdentifierStart(t)||o.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:u.Token.NumericLiteral,value:parseInt(r,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var r="",n=!1;for(o.Character.isOctalDigit(e.charCodeAt(0))?(n=!0,r="0"+this.source[this.index++]):++this.index;!this.eof()&&o.Character.isOctalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index++];return n||0!==r.length||this.throwUnexpectedToken(),(o.Character.isIdentifierStart(this.source.charCodeAt(this.index))||o.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseInt(r,8),octal:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e<this.length;++e){var t=this.source[e];if("8"===t||"9"===t)return!1;if(!o.Character.isOctalDigit(t.charCodeAt(0)))return!0}return!0},e.prototype.scanNumericLiteral=function(){var e=this.index,t=this.source[e];s.assert(o.Character.isDecimalDigit(t.charCodeAt(0))||"."===t,"Numeric literal must start with a decimal digit or a decimal point");var r="";if("."!==t){if(r=this.source[this.index++],t=this.source[this.index],"0"===r){if("x"===t||"X"===t)return++this.index,this.scanHexLiteral(e);if("b"===t||"B"===t)return++this.index,this.scanBinaryLiteral(e);if("o"===t||"O"===t)return this.scanOctalLiteral(t,e);if(t&&o.Character.isOctalDigit(t.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(t,e)}for(;o.Character.isDecimalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index++];t=this.source[this.index]}if("."===t){for(r+=this.source[this.index++];o.Character.isDecimalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index++];t=this.source[this.index]}if("e"===t||"E"===t)if(r+=this.source[this.index++],t=this.source[this.index],"+"!==t&&"-"!==t||(r+=this.source[this.index++]),o.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;o.Character.isDecimalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index++];else this.throwUnexpectedToken();return o.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseFloat(r),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanStringLiteral=function(){var e=this.index,t=this.source[e];s.assert("'"===t||'"'===t,"String literal must starts with a quote"),++this.index;for(var r=!1,n="";!this.eof();){var i=this.source[this.index++];if(i===t){t="";break}if("\\"===i)if((i=this.source[this.index++])&&o.Character.isLineTerminator(i.charCodeAt(0)))++this.lineNumber,"\r"===i&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(i){case"u":case"x":if("{"===this.source[this.index])++this.index,n+=this.scanUnicodeCodePointEscape();else{var a=this.scanHexEscape(i);a||this.throwUnexpectedToken(),n+=a}break;case"n":n+="\n";break;case"r":n+="\r";break;case"t":n+="\t";break;case"b":n+="\b";break;case"f":n+="\f";break;case"v":n+="\v";break;case"8":case"9":n+=i,this.tolerateUnexpectedToken();break;default:if(i&&o.Character.isOctalDigit(i.charCodeAt(0))){var l=this.octalToDecimal(i);r=l.octal||r,n+=String.fromCharCode(l.code)}else n+=i}else{if(o.Character.isLineTerminator(i.charCodeAt(0)))break;n+=i}}return""!==t&&(this.index=e,this.throwUnexpectedToken()),{type:u.Token.StringLiteral,value:n,octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanTemplate=function(){var e="",t=!1,r=this.index,n="`"===this.source[r],i=!1,s=2;for(++this.index;!this.eof();){var l=this.source[this.index++];if("`"===l){s=1,i=!0,t=!0;break}if("$"===l){if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,t=!0;break}e+=l}else if("\\"===l)if(l=this.source[this.index++],o.Character.isLineTerminator(l.charCodeAt(0)))++this.lineNumber,"\r"===l&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(l){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"u":case"x":if("{"===this.source[this.index])++this.index,e+=this.scanUnicodeCodePointEscape();else{var c=this.index,p=this.scanHexEscape(l);p?e+=p:(this.index=c,e+=l)}break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:"0"===l?(o.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(a.Messages.TemplateOctalLiteral),e+="\0"):o.Character.isOctalDigit(l.charCodeAt(0))?this.throwUnexpectedToken(a.Messages.TemplateOctalLiteral):e+=l}else o.Character.isLineTerminator(l.charCodeAt(0))?(++this.lineNumber,"\r"===l&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,e+="\n"):e+=l}return t||this.throwUnexpectedToken(),n||this.curlyStack.pop(),{type:u.Token.Template,value:{cooked:e,raw:this.source.slice(r+1,this.index-s)},head:n,tail:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:r,end:this.index}},e.prototype.testRegExp=function(e,t){var r=e,n=this;t.indexOf("u")>=0&&(r=r.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,r){var i=parseInt(t||r,16);return i>1114111&&n.throwUnexpectedToken(a.Messages.InvalidRegExp),i<=65535?String.fromCharCode(i):"￿"}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"￿"));try{RegExp(r)}catch(e){this.throwUnexpectedToken(a.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];s.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],r=!1,n=!1;!this.eof();)if(e=this.source[this.index++],t+=e,"\\"===e)e=this.source[this.index++],o.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(a.Messages.UnterminatedRegExp),t+=e;else if(o.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(a.Messages.UnterminatedRegExp);else if(r)"]"===e&&(r=!1);else{if("/"===e){n=!0;break}"["===e&&(r=!0)}return n||this.throwUnexpectedToken(a.Messages.UnterminatedRegExp),{value:t.substr(1,t.length-2),literal:t}},e.prototype.scanRegExpFlags=function(){for(var e="",t="";!this.eof();){var r=this.source[this.index];if(!o.Character.isIdentifierPart(r.charCodeAt(0)))break;if(++this.index,"\\"!==r||this.eof())t+=r,e+=r;else if("u"===(r=this.source[this.index])){++this.index;var n=this.index;if(r=this.scanHexEscape("u"))for(t+=r,e+="\\u";n<this.index;++n)e+=this.source[n];else this.index=n,t+="u",e+="\\u";this.tolerateUnexpectedToken()}else e+="\\",this.tolerateUnexpectedToken()}return{value:t,literal:e}},e.prototype.scanRegExp=function(){var e=this.index,t=this.scanRegExpBody(),r=this.scanRegExpFlags(),n=this.testRegExp(t.value,r.value);return{type:u.Token.RegularExpression,value:n,literal:t.literal+r.literal,regex:{pattern:t.value,flags:r.value},lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.lex=function(){if(this.eof())return{type:u.Token.EOF,lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var e=this.source.charCodeAt(this.index);return o.Character.isIdentifierStart(e)?this.scanIdentifier():40===e||41===e||59===e?this.scanPunctuator():39===e||34===e?this.scanStringLiteral():46===e?o.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():o.Character.isDecimalDigit(e)?this.scanNumericLiteral():96===e||125===e&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():e>=55296&&e<57343&&o.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=l},function(e,t){"use strict";var r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&r.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){
+return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&r.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,r){"use strict";var n=r(2),i=function(){function e(e){this.type=n.Syntax.ArrayExpression,this.elements=e}return e}();t.ArrayExpression=i;var s=function(){function e(e){this.type=n.Syntax.ArrayPattern,this.elements=e}return e}();t.ArrayPattern=s;var a=function(){function e(e,t,r){this.type=n.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=r}return e}();t.ArrowFunctionExpression=a;var o=function(){function e(e,t,r){this.type=n.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=r}return e}();t.AssignmentExpression=o;var u=function(){function e(e,t){this.type=n.Syntax.AssignmentPattern,this.left=e,this.right=t}return e}();t.AssignmentPattern=u;var l=function(){function e(e,t,r){var i="||"===e||"&&"===e;this.type=i?n.Syntax.LogicalExpression:n.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=r}return e}();t.BinaryExpression=l;var c=function(){function e(e){this.type=n.Syntax.BlockStatement,this.body=e}return e}();t.BlockStatement=c;var p=function(){function e(e){this.type=n.Syntax.BreakStatement,this.label=e}return e}();t.BreakStatement=p;var h=function(){function e(e,t){this.type=n.Syntax.CallExpression,this.callee=e,this.arguments=t}return e}();t.CallExpression=h;var f=function(){function e(e,t){this.type=n.Syntax.CatchClause,this.param=e,this.body=t}return e}();t.CatchClause=f;var d=function(){function e(e){this.type=n.Syntax.ClassBody,this.body=e}return e}();t.ClassBody=d;var m=function(){function e(e,t,r){this.type=n.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=r}return e}();t.ClassDeclaration=m;var y=function(){function e(e,t,r){this.type=n.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=r}return e}();t.ClassExpression=y;var g=function(){function e(e,t){this.type=n.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t}return e}();t.ComputedMemberExpression=g;var b=function(){function e(e,t,r){this.type=n.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=r}return e}();t.ConditionalExpression=b;var v=function(){function e(e){this.type=n.Syntax.ContinueStatement,this.label=e}return e}();t.ContinueStatement=v;var x=function(){function e(){this.type=n.Syntax.DebuggerStatement}return e}();t.DebuggerStatement=x;var E=function(){function e(e,t){this.type=n.Syntax.ExpressionStatement,this.expression=e,this.directive=t}return e}();t.Directive=E;var A=function(){function e(e,t){this.type=n.Syntax.DoWhileStatement,this.body=e,this.test=t}return e}();t.DoWhileStatement=A;var D=function(){function e(){this.type=n.Syntax.EmptyStatement}return e}();t.EmptyStatement=D;var C=function(){function e(e){this.type=n.Syntax.ExportAllDeclaration,this.source=e}return e}();t.ExportAllDeclaration=C;var S=function(){function e(e){this.type=n.Syntax.ExportDefaultDeclaration,this.declaration=e}return e}();t.ExportDefaultDeclaration=S;var _=function(){function e(e,t,r){this.type=n.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=r}return e}();t.ExportNamedDeclaration=_;var w=function(){function e(e,t){this.type=n.Syntax.ExportSpecifier,this.exported=t,this.local=e}return e}();t.ExportSpecifier=w;var k=function(){function e(e){this.type=n.Syntax.ExpressionStatement,this.expression=e}return e}();t.ExpressionStatement=k;var F=function(){function e(e,t,r){this.type=n.Syntax.ForInStatement,this.left=e,this.right=t,this.body=r,this.each=!1}return e}();t.ForInStatement=F;var T=function(){function e(e,t,r){this.type=n.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=r}return e}();t.ForOfStatement=T;var P=function(){function e(e,t,r,i){this.type=n.Syntax.ForStatement,this.init=e,this.test=t,this.update=r,this.body=i}return e}();t.ForStatement=P;var B=function(){function e(e,t,r,i){this.type=n.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=r,this.generator=i,this.expression=!1}return e}();t.FunctionDeclaration=B;var O=function(){function e(e,t,r,i){this.type=n.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=r,this.generator=i,this.expression=!1}return e}();t.FunctionExpression=O;var j=function(){function e(e){this.type=n.Syntax.Identifier,this.name=e}return e}();t.Identifier=j;var N=function(){function e(e,t,r){this.type=n.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=r}return e}();t.IfStatement=N;var I=function(){function e(e,t){this.type=n.Syntax.ImportDeclaration,this.specifiers=e,this.source=t}return e}();t.ImportDeclaration=I;var L=function(){function e(e){this.type=n.Syntax.ImportDefaultSpecifier,this.local=e}return e}();t.ImportDefaultSpecifier=L;var M=function(){function e(e){this.type=n.Syntax.ImportNamespaceSpecifier,this.local=e}return e}();t.ImportNamespaceSpecifier=M;var R=function(){function e(e,t){this.type=n.Syntax.ImportSpecifier,this.local=e,this.imported=t}return e}();t.ImportSpecifier=R;var U=function(){function e(e,t){this.type=n.Syntax.LabeledStatement,this.label=e,this.body=t}return e}();t.LabeledStatement=U;var V=function(){function e(e,t){this.type=n.Syntax.Literal,this.value=e,this.raw=t}return e}();t.Literal=V;var q=function(){function e(e,t){this.type=n.Syntax.MetaProperty,this.meta=e,this.property=t}return e}();t.MetaProperty=q;var G=function(){function e(e,t,r,i,s){this.type=n.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=r,this.kind=i,this.static=s}return e}();t.MethodDefinition=G;var X=function(){function e(e,t){this.type=n.Syntax.NewExpression,this.callee=e,this.arguments=t}return e}();t.NewExpression=X;var J=function(){function e(e){this.type=n.Syntax.ObjectExpression,this.properties=e}return e}();t.ObjectExpression=J;var W=function(){function e(e){this.type=n.Syntax.ObjectPattern,this.properties=e}return e}();t.ObjectPattern=W;var K=function(){function e(e,t){this.type=n.Syntax.Program,this.body=e,this.sourceType=t}return e}();t.Program=K;var z=function(){function e(e,t,r,i,s,a){this.type=n.Syntax.Property,this.key=t,this.computed=r,this.value=i,this.kind=e,this.method=s,this.shorthand=a}return e}();t.Property=z;var Y=function(){function e(e,t,r){this.type=n.Syntax.Literal,this.value=e,this.raw=t,this.regex=r}return e}();t.RegexLiteral=Y;var H=function(){function e(e){this.type=n.Syntax.RestElement,this.argument=e}return e}();t.RestElement=H;var $=function(){function e(e){this.type=n.Syntax.ReturnStatement,this.argument=e}return e}();t.ReturnStatement=$;var Q=function(){function e(e){this.type=n.Syntax.SequenceExpression,this.expressions=e}return e}();t.SequenceExpression=Q;var Z=function(){function e(e){this.type=n.Syntax.SpreadElement,this.argument=e}return e}();t.SpreadElement=Z;var ee=function(){function e(e,t){this.type=n.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t}return e}();t.StaticMemberExpression=ee;var te=function(){function e(){this.type=n.Syntax.Super}return e}();t.Super=te;var re=function(){function e(e,t){this.type=n.Syntax.SwitchCase,this.test=e,this.consequent=t}return e}();t.SwitchCase=re;var ne=function(){function e(e,t){this.type=n.Syntax.SwitchStatement,this.discriminant=e,this.cases=t}return e}();t.SwitchStatement=ne;var ie=function(){function e(e,t){this.type=n.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t}return e}();t.TaggedTemplateExpression=ie;var se=function(){function e(e,t){this.type=n.Syntax.TemplateElement,this.value=e,this.tail=t}return e}();t.TemplateElement=se;var ae=function(){function e(e,t){this.type=n.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t}return e}();t.TemplateLiteral=ae;var oe=function(){function e(){this.type=n.Syntax.ThisExpression}return e}();t.ThisExpression=oe;var ue=function(){function e(e){this.type=n.Syntax.ThrowStatement,this.argument=e}return e}();t.ThrowStatement=ue;var le=function(){function e(e,t,r){this.type=n.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=r}return e}();t.TryStatement=le;var ce=function(){function e(e,t){this.type=n.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0}return e}();t.UnaryExpression=ce;var pe=function(){function e(e,t,r){this.type=n.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=r}return e}();t.UpdateExpression=pe;var he=function(){function e(e,t){this.type=n.Syntax.VariableDeclaration,this.declarations=e,this.kind=t}return e}();t.VariableDeclaration=he;var fe=function(){function e(e,t){this.type=n.Syntax.VariableDeclarator,this.id=e,this.init=t}return e}();t.VariableDeclarator=fe;var de=function(){function e(e,t){this.type=n.Syntax.WhileStatement,this.test=e,this.body=t}return e}();t.WhileStatement=de;var me=function(){function e(e,t){this.type=n.Syntax.WithStatement,this.object=e,this.body=t}return e}();t.WithStatement=me;var ye=function(){function e(e,t){this.type=n.Syntax.YieldExpression,this.argument=e,this.delegate=t}return e}();t.YieldExpression=ye},function(e,t,r){"use strict";function n(e){var t;switch(e.type){case c.JSXSyntax.JSXIdentifier:t=e.name;break;case c.JSXSyntax.JSXNamespacedName:var r=e;t=n(r.namespace)+":"+n(r.name);break;case c.JSXSyntax.JSXMemberExpression:var i=e;t=n(i.object)+"."+n(i.property)}return t}var i,s=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},a=r(9),o=r(7),u=r(3),l=r(12),c=r(13),p=r(10),h=r(14);!function(e){e[e.Identifier=100]="Identifier",e[e.Text=101]="Text"}(i||(i={})),o.TokenName[i.Identifier]="JSXIdentifier",o.TokenName[i.Text]="JSXText";var f=function(e){function t(t,r,n){e.call(this,t,r,n)}return s(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.lineNumber,this.scanner.lineStart=this.startMarker.lineStart},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",r=!0,n=!1,i=!1,s=!1;!this.scanner.eof()&&r&&!n;){var o=this.scanner.source[this.scanner.index];if(o===e)break;if(n=";"===o,t+=o,++this.scanner.index,!n)switch(t.length){case 2:i="#"===o;break;case 3:i&&(s="x"===o,r=s||a.Character.isDecimalDigit(o.charCodeAt(0)),i=i&&!s);break;default:r=r&&!(i&&!a.Character.isDecimalDigit(o.charCodeAt(0))),r=r&&!(s&&!a.Character.isHexDigit(o.charCodeAt(0)))}}if(r&&n&&t.length>2){var u=t.substr(1,t.length-2);i&&u.length>1?t=String.fromCharCode(parseInt(u.substr(1),10)):s&&u.length>2?t=String.fromCharCode(parseInt("0"+u.substr(1),16)):i||s||!l.XHTMLEntities[u]||(t=l.XHTMLEntities[u])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e){var t=this.scanner.source[this.scanner.index++];return{type:o.Token.Punctuator,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(34===e||39===e){for(var r=this.scanner.index,n=this.scanner.source[this.scanner.index++],s="";!this.scanner.eof();){var u=this.scanner.source[this.scanner.index++];if(u===n)break;s+="&"===u?this.scanXHTMLEntity(n):u}return{type:o.Token.StringLiteral,value:s,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(46===e){var l=this.scanner.source.charCodeAt(this.scanner.index+1),c=this.scanner.source.charCodeAt(this.scanner.index+2),t=46===l&&46===c?"...":".",r=this.scanner.index;return this.scanner.index+=t.length,{type:o.Token.Punctuator,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(96===e)return{type:o.Token.Template,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(a.Character.isIdentifierStart(e)&&92!==e){var r=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var u=this.scanner.source.charCodeAt(this.scanner.index);if(a.Character.isIdentifierPart(u)&&92!==u)++this.scanner.index;else{if(45!==u)break;++this.scanner.index}}var p=this.scanner.source.slice(r,this.scanner.index);return{type:i.Identifier,value:p,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}this.scanner.throwUnexpectedToken()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var r=this.scanner.source[this.scanner.index];if("{"===r||"<"===r)break;++this.scanner.index,t+=r,a.Character.isLineTerminator(r.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===r&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart;var n={type:i.Text,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(n)),n},t.prototype.peekJSXToken=function(){var e=this.scanner.index,t=this.scanner.lineNumber,r=this.scanner.lineStart;this.scanner.scanComments();var n=this.lexJSX();return this.scanner.index=e,this.scanner.lineNumber=t,this.scanner.lineStart=r,n},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();t.type===o.Token.Punctuator&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return t.type===o.Token.Punctuator&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return t.type!==i.Identifier&&this.throwUnexpectedToken(t),this.finalize(e,new h.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=t;this.expectJSX(":");var n=this.parseJSXIdentifier();t=this.finalize(e,new h.JSXNamespacedName(r,n))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var i=t;this.expectJSX(".");var s=this.parseJSXIdentifier();t=this.finalize(e,new h.JSXMemberExpression(i,s))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),r=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=r;this.expectJSX(":");var i=this.parseJSXIdentifier();e=this.finalize(t,new h.JSXNamespacedName(n,i))}else e=r;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();t.type!==o.Token.StringLiteral&&this.throwUnexpectedToken(t);var r=this.getTokenRaw(t);return this.finalize(e,new p.Literal(t.value,r))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new h.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),r=null;return this.matchJSX("=")&&(this.expectJSX("="),r=this.parseJSXAttributeValue()),this.finalize(e,new h.JSXAttribute(t,r))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new h.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),r=this.parseJSXAttributes(),n=this.matchJSX("/");return n&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new h.JSXOpeningElement(t,n,r))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new h.JSXClosingElement(t))}var r=this.parseJSXElementName(),n=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new h.JSXOpeningElement(r,i,n))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.finalize(e,new h.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e=this.createJSXNode();this.expectJSX("{");var t;return this.matchJSX("}")?(t=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),t=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(e,new h.JSXExpressionContainer(t))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),r=this.nextJSXText();if(r.start<r.end){var n=this.getTokenRaw(r),i=this.finalize(t,new h.JSXText(r.value,n));e.push(i)}if("{"!==this.scanner.source[this.scanner.index])break;var s=this.parseJSXExpressionContainer();e.push(s)}return e},t.prototype.parseComplexJSXElement=function(e){for(var t=[];!this.scanner.eof();){e.children=e.children.concat(this.parseJSXChildren());var r=this.createJSXChildNode(),i=this.parseJSXBoundaryElement();if(i.type===c.JSXSyntax.JSXOpeningElement){var s=i;if(s.selfClosing){var a=this.finalize(r,new h.JSXElement(s,[],null));e.children.push(a)}else t.push(e),e={node:r,opening:s,closing:null,children:[]}}if(i.type===c.JSXSyntax.JSXClosingElement){e.closing=i;var o=n(e.opening.name);if(o!==n(e.closing.name)&&this.tolerateError("Expected corresponding JSX closing tag for %0",o),!(t.length>0))break;var a=this.finalize(e.node,new h.JSXElement(e.opening,e.children,e.closing));e=t.pop(),e.children.push(a)}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),r=[],n=null;if(!t.selfClosing){var i=this.parseComplexJSXElement({node:e,opening:t,closing:n,children:r});r=i.children,n=i.closing}return this.finalize(e,new h.JSXElement(t,r,n))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t}(u.Parser);t.JSXParser=f},function(e,t){"use strict";t.XHTMLEntities={quot:'"',amp:"&",apos:"'",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:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t){"use strict";t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,r){"use strict";var n=r(13),i=function(){function e(e){this.type=n.JSXSyntax.JSXClosingElement,this.name=e}return e}();t.JSXClosingElement=i;var s=function(){function e(e,t,r){this.type=n.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=r}return e}();t.JSXElement=s;var a=function(){function e(){this.type=n.JSXSyntax.JSXEmptyExpression}return e}();t.JSXEmptyExpression=a;var o=function(){function e(e){this.type=n.JSXSyntax.JSXExpressionContainer,this.expression=e}return e}();t.JSXExpressionContainer=o;var u=function(){function e(e){this.type=n.JSXSyntax.JSXIdentifier,this.name=e}return e}();t.JSXIdentifier=u;var l=function(){function e(e,t){this.type=n.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t}return e}();t.JSXMemberExpression=l;var c=function(){function e(e,t){this.type=n.JSXSyntax.JSXAttribute,this.name=e,this.value=t}return e}();t.JSXAttribute=c;var p=function(){function e(e,t){this.type=n.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t}return e}();t.JSXNamespacedName=p;var h=function(){function e(e,t,r){this.type=n.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=r}return e}();t.JSXOpeningElement=h;var f=function(){function e(e){this.type=n.JSXSyntax.JSXSpreadAttribute,this.argument=e}return e}();t.JSXSpreadAttribute=f;var d=function(){function e(e,t){this.type=n.JSXSyntax.JSXText,this.value=e,this.raw=t}return e}();t.JSXText=d},function(e,t,r){"use strict";var n=r(8),i=r(6),s=r(7),a=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var r=this.values[this.paren-1];t="if"===r||"while"===r||"for"===r||"with"===r;break;case"}":if(t=!1,"function"===this.values[this.curly-3]){var n=this.values[this.curly-4];t=!!n&&!this.beforeFunctionExpression(n)}else if("function"===this.values[this.curly-4]){var i=this.values[this.curly-5];t=!i||!this.beforeFunctionExpression(i)}}return t},e.prototype.push=function(e){e.type===s.Token.Punctuator||e.type===s.Token.Keyword?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),o=function(){function e(e,t){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=!!t&&("boolean"==typeof t.tolerant&&t.tolerant),this.scanner=new n.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&("boolean"==typeof t.comment&&t.comment),this.trackRange=!!t&&("boolean"==typeof t.range&&t.range),this.trackLoc=!!t&&("boolean"==typeof t.loc&&t.loc),this.buffer=[],this.reader=new a}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;t<e.length;++t){var r=e[t],n=void 0,i=this.scanner.source.slice(r.slice[0],r.slice[1]);n={type:r.multiLine?"BlockComment":"LineComment",value:i},this.trackRange&&(n.range=r.range),this.trackLoc&&(n.loc=r.loc),this.buffer.push(n)}if(!this.scanner.eof()){var a=void 0;this.trackLoc&&(a={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var o=void 0;o="/"===this.scanner.source[this.scanner.index]?this.reader.isRegexStart()?this.scanner.scanRegExp():this.scanner.scanPunctuator():this.scanner.lex(),this.reader.push(o);var u=void 0;u={type:s.TokenName[o.type],value:this.scanner.source.slice(o.start,o.end)},this.trackRange&&(u.range=[o.start,o.end]),this.trackLoc&&(a.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},u.loc=a),o.regex&&(u.regex=o.regex),this.buffer.push(u)}}return this.buffer.shift()},e}();t.Tokenizer=o}])})},{}],563:[function(e,t,r){arguments[4][55][0].apply(r,arguments)},{"./util":572,dup:55}],564:[function(e,t,r){arguments[4][56][0].apply(r,arguments)},{"./base64":565,dup:56}],565:[function(e,t,r){arguments[4][57][0].apply(r,arguments)},{dup:57}],566:[function(e,t,r){arguments[4][58][0].apply(r,arguments)},{dup:58}],567:[function(e,t,r){arguments[4][59][0].apply(r,arguments)},{"./util":572,dup:59}],568:[function(e,t,r){arguments[4][60][0].apply(r,arguments)},{dup:60}],569:[function(e,t,r){arguments[4][61][0].apply(r,arguments)},{"./array-set":563,"./base64-vlq":564,"./binary-search":566,"./quick-sort":568,"./util":572,dup:61}],570:[function(e,t,r){arguments[4][62][0].apply(r,arguments)},{"./array-set":563,"./base64-vlq":564,"./mapping-list":567,"./util":572,dup:62}],571:[function(e,t,r){arguments[4][63][0].apply(r,arguments)},{"./source-map-generator":570,"./util":572,dup:63}],572:[function(e,t,r){arguments[4][64][0].apply(r,arguments)},{dup:64}],573:[function(e,t,r){arguments[4][65][0].apply(r,arguments)},{"./lib/source-map-consumer":569,"./lib/source-map-generator":570,"./lib/source-node":571,dup:65}],574:[function(e,t,r){t.exports={plugins:[e("babel-plugin-syntax-async-functions"),e("babel-plugin-syntax-async-generators"),e("babel-plugin-transform-es2015-classes"),e("babel-plugin-transform-es2015-arrow-functions"),e("babel-plugin-transform-es2015-block-scoping"),e("babel-plugin-transform-es2015-for-of"),e("regenerator-transform").default]}},{"babel-plugin-syntax-async-functions":104,"babel-plugin-syntax-async-generators":105,"babel-plugin-transform-es2015-arrow-functions":106,"babel-plugin-transform-es2015-block-scoping":107,"babel-plugin-transform-es2015-classes":109,"babel-plugin-transform-es2015-for-of":112,"regenerator-transform":580}],575:[function(e,t,r){(function(t){r.path=e("path").join(t,"runtime.js")}).call(this,"/node_modules/regenerator-runtime")},{path:535}],576:[function(e,t,r){(function(r){var n="object"==typeof r?r:"object"==typeof window?window:"object"==typeof self?self:this,i=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,s=i&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=e("./runtime"),i)n.regeneratorRuntime=s;else try{delete n.regeneratorRuntime}catch(e){n.regeneratorRuntime=void 0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./runtime":577}],577:[function(e,t,r){(function(e,r){!function(r){"use strict";function n(e,t,r,n){var i=t&&t.prototype instanceof s?t:s,a=Object.create(i.prototype),o=new d(n||[]);return a._invoke=c(e,r,o),a}function i(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function s(){}function a(){}function o(){}function u(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function l(t){function r(e,n,s,a){var o=i(t[e],t,n);if("throw"!==o.type){var u=o.arg,l=u.value;return l&&"object"==typeof l&&v.call(l,"__await")?Promise.resolve(l.__await).then(function(e){r("next",e,s,a)},function(e){r("throw",e,s,a)}):Promise.resolve(l).then(function(e){u.value=e,s(u)},a)}a(o.arg)}function n(e,t){function n(){return new Promise(function(n,i){r(e,t,n,i)})}return s=s?s.then(n,n):n()}"object"==typeof e&&e.domain&&(r=e.domain.bind(r));var s;this._invoke=n}function c(e,t,r){var n=S;return function(s,a){if(n===w)throw new Error("Generator is already running");if(n===k){if("throw"===s)throw a;return y()}for(r.method=s,r.arg=a;;){var o=r.delegate;if(o){var u=p(o,r);if(u){if(u===F)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===S)throw n=k,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=w;var l=i(e,t,r);if("normal"===l.type){if(n=r.done?k:_,l.arg===F)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n=k,r.method="throw",r.arg=l.arg)}}}function p(e,t){var r=e.iterator[t.method];if(r===g){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=g,p(e,t),"throw"===t.method))return F;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return F}var n=i(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,F;var s=n.arg;return s?s.done?(t[e.resultName]=s.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=g),t.delegate=null,F):s:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,F)}function h(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 f(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function d(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(h,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 r=-1,n=function t(){for(;++r<e.length;)if(v.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=g,t.done=!0,t};return n.next=n}}return{next:y}}function y(){return{value:g,done:!0}}var g,b=Object.prototype,v=b.hasOwnProperty,x="function"==typeof Symbol?Symbol:{},E=x.iterator||"@@iterator",A=x.toStringTag||"@@toStringTag",D="object"==typeof t,C=r.regeneratorRuntime;if(C)return void(D&&(t.exports=C));C=r.regeneratorRuntime=D?t.exports:{},C.wrap=n;var S="suspendedStart",_="suspendedYield",w="executing",k="completed",F={},T={};T[E]=function(){return this};var P=Object.getPrototypeOf,B=P&&P(P(m([])));B&&B!==b&&v.call(B,E)&&(T=B);var O=o.prototype=s.prototype=Object.create(T);a.prototype=O.constructor=o,o.constructor=a,o[A]=a.displayName="GeneratorFunction",C.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===a||"GeneratorFunction"===(t.displayName||t.name))},C.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,o):(e.__proto__=o,A in e||(e[A]="GeneratorFunction")),e.prototype=Object.create(O),e},C.awrap=function(e){return{__await:e}},u(l.prototype),C.AsyncIterator=l,C.async=function(e,t,r,i){var s=new l(n(e,t,r,i));return C.isGeneratorFunction(t)?s:s.next().then(function(e){return e.done?e.value:s.next()})},u(O),O[A]="Generator",O.toString=function(){return"[object Generator]"},C.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},C.values=m,d.prototype={constructor:d,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(f),!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,n){return s.type="throw",s.arg=e,r.next=t,n&&(r.method="next",r.arg=g),!!n}if(this.done)throw e;for(var r=this,n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],s=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=v.call(i,"catchLoc"),o=v.call(i,"finallyLoc");if(a&&o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!o)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&v.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=e,s.arg=t,i?(this.method="next",this.next=i.finallyLoc,F):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),F},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),f(r),F}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;f(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:m(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=g),F}}}("object"==typeof r?r:"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:539}],578:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){h.default.ok(this instanceof s),d.assertIdentifier(e),this.nextTempId=0,this.contextId=e,this.listing=[],this.marked=[!0],this.finalLoc=a(),this.tryEntries=[],this.leapManager=new y.LeapManager(this)}function a(){return d.numericLiteral(-1)}function o(e){return new Error("all declarations should have been transformed into assignments before the Exploder began its work: "+(0,c.default)(e))}function u(e){var t=e.type;return"normal"===t?!E.call(e,"target"):"break"===t||"continue"===t?!E.call(e,"value")&&d.isLiteral(e.target):("return"===t||"throw"===t)&&(E.call(e,"value")&&!E.call(e,"target"))}var l=e("babel-runtime/core-js/json/stringify"),c=i(l),p=e("assert"),h=i(p),f=e("babel-types"),d=n(f),m=e("./leap"),y=n(m),g=e("./meta"),b=n(g),v=e("./util"),x=n(v),E=Object.prototype.hasOwnProperty,A=s.prototype;r.Emitter=s,A.mark=function(e){d.assertLiteral(e);var t=this.listing.length;return-1===e.value?e.value=t:h.default.strictEqual(e.value,t),this.marked[t]=!0,e},A.emit=function(e){d.isExpression(e)&&(e=d.expressionStatement(e)),d.assertStatement(e),this.listing.push(e)},A.emitAssign=function(e,t){return this.emit(this.assign(e,t)),e},A.assign=function(e,t){return d.expressionStatement(d.assignmentExpression("=",e,t))},A.contextProperty=function(e,t){return d.memberExpression(this.contextId,t?d.stringLiteral(e):d.identifier(e),!!t)},A.stop=function(e){e&&this.setReturnValue(e),this.jump(this.finalLoc)},A.setReturnValue=function(e){d.assertExpression(e.value),this.emitAssign(this.contextProperty("rval"),this.explodeExpression(e))},A.clearPendingException=function(e,t){d.assertLiteral(e);var r=d.callExpression(this.contextProperty("catch",!0),[e]);t?this.emitAssign(t,r):this.emit(r)},A.jump=function(e){this.emitAssign(this.contextProperty("next"),e),this.emit(d.breakStatement())},A.jumpIf=function(e,t){d.assertExpression(e),d.assertLiteral(t),this.emit(d.ifStatement(e,d.blockStatement([this.assign(this.contextProperty("next"),t),d.breakStatement()])))},A.jumpIfNot=function(e,t){d.assertExpression(e),d.assertLiteral(t);var r=void 0;r=d.isUnaryExpression(e)&&"!"===e.operator?e.argument:d.unaryExpression("!",e),this.emit(d.ifStatement(r,d.blockStatement([this.assign(this.contextProperty("next"),t),d.breakStatement()])))},A.makeTempVar=function(){return this.contextProperty("t"+this.nextTempId++)},A.getContextFunction=function(e){return d.functionExpression(e||null,[this.contextId],d.blockStatement([this.getDispatchLoop()]),!1,!1)},A.getDispatchLoop=function(){var e=this,t=[],r=void 0,n=!1;return e.listing.forEach(function(i,s){e.marked.hasOwnProperty(s)&&(t.push(d.switchCase(d.numericLiteral(s),r=[])),n=!1),n||(r.push(i),d.isCompletionStatement(i)&&(n=!0))}),this.finalLoc.value=this.listing.length,t.push(d.switchCase(this.finalLoc,[]),d.switchCase(d.stringLiteral("end"),[d.returnStatement(d.callExpression(this.contextProperty("stop"),[]))])),d.whileStatement(d.numericLiteral(1),d.switchStatement(d.assignmentExpression("=",this.contextProperty("prev"),this.contextProperty("next")),t))},A.getTryLocsList=function(){if(0===this.tryEntries.length)return null;var e=0;return d.arrayExpression(this.tryEntries.map(function(t){var r=t.firstLoc.value;h.default.ok(r>=e,"try entries out of order"),e=r;var n=t.catchEntry,i=t.finallyEntry,s=[t.firstLoc,n?n.firstLoc:null];return i&&(s[2]=i.firstLoc,s[3]=i.afterLoc),d.arrayExpression(s)}))},A.explode=function(e,t){var r=e.node,n=this;if(d.assertNode(r),d.isDeclaration(r))throw o(r);if(d.isStatement(r))return n.explodeStatement(e);if(d.isExpression(r))return n.explodeExpression(e,t);switch(r.type){case"Program":return e.get("body").map(n.explodeStatement,n);case"VariableDeclarator":throw o(r);case"Property":case"SwitchCase":case"CatchClause":throw new Error(r.type+" nodes should be handled by their parents");default:throw new Error("unknown Node of type "+(0,c.default)(r.type))}},A.explodeStatement=function(e,t){var r=e.node,n=this,i=void 0,s=void 0,o=void 0;if(d.assertStatement(r),t?d.assertIdentifier(t):t=null,d.isBlockStatement(r))return void e.get("body").forEach(function(e){n.explodeStatement(e)});if(!b.containsLeap(r))return void n.emit(r);switch(r.type){case"ExpressionStatement":n.explodeExpression(e.get("expression"),!0);break;case"LabeledStatement":s=a(),n.leapManager.withEntry(new y.LabeledEntry(s,r.label),function(){n.explodeStatement(e.get("body"),r.label)}),n.mark(s);break;case"WhileStatement":i=a(),s=a(),n.mark(i),n.jumpIfNot(n.explodeExpression(e.get("test")),s),n.leapManager.withEntry(new y.LoopEntry(s,i,t),function(){n.explodeStatement(e.get("body"))}),n.jump(i),n.mark(s);break;case"DoWhileStatement":var u=a(),l=a();s=a(),n.mark(u),n.leapManager.withEntry(new y.LoopEntry(s,l,t),function(){n.explode(e.get("body"))}),n.mark(l),n.jumpIf(n.explodeExpression(e.get("test")),u),n.mark(s);break;case"ForStatement":o=a();var p=a();s=a(),r.init&&n.explode(e.get("init"),!0),n.mark(o),r.test&&n.jumpIfNot(n.explodeExpression(e.get("test")),s),n.leapManager.withEntry(new y.LoopEntry(s,p,t),function(){n.explodeStatement(e.get("body"))}),n.mark(p),r.update&&n.explode(e.get("update"),!0),n.jump(o),n.mark(s);break;case"TypeCastExpression":return n.explodeExpression(e.get("expression"));case"ForInStatement":o=a(),s=a();var f=n.makeTempVar();n.emitAssign(f,d.callExpression(x.runtimeProperty("keys"),[n.explodeExpression(e.get("right"))])),n.mark(o);var m=n.makeTempVar();n.jumpIf(d.memberExpression(d.assignmentExpression("=",m,d.callExpression(f,[])),d.identifier("done"),!1),s),n.emitAssign(r.left,d.memberExpression(m,d.identifier("value"),!1)),n.leapManager.withEntry(new y.LoopEntry(s,o,t),function(){n.explodeStatement(e.get("body"))}),n.jump(o),n.mark(s);break;case"BreakStatement":n.emitAbruptCompletion({type:"break",target:n.leapManager.getBreakLoc(r.label)});break;case"ContinueStatement":n.emitAbruptCompletion({type:"continue",target:n.leapManager.getContinueLoc(r.label)});break;case"SwitchStatement":var g=n.emitAssign(n.makeTempVar(),n.explodeExpression(e.get("discriminant")));s=a();for(var v=a(),E=v,A=[],C=r.cases||[],S=C.length-1;S>=0;--S){var _=C[S];d.assertSwitchCase(_),_.test?E=d.conditionalExpression(d.binaryExpression("===",g,_.test),A[S]=a(),E):A[S]=v}var w=e.get("discriminant");w.replaceWith(E),n.jump(n.explodeExpression(w)),n.leapManager.withEntry(new y.SwitchEntry(s),function(){e.get("cases").forEach(function(e){var t=e.key;n.mark(A[t]),e.get("consequent").forEach(function(e){n.explodeStatement(e)})})}),n.mark(s),-1===v.value&&(n.mark(v),h.default.strictEqual(s.value,v.value));break;case"IfStatement":var k=r.alternate&&a();s=a(),n.jumpIfNot(n.explodeExpression(e.get("test")),k||s),n.explodeStatement(e.get("consequent")),k&&(n.jump(s),n.mark(k),n.explodeStatement(e.get("alternate"))),n.mark(s);break;case"ReturnStatement":n.emitAbruptCompletion({type:"return",value:n.explodeExpression(e.get("argument"))});break;case"WithStatement":throw new Error("WithStatement not supported in generator functions.");case"TryStatement":s=a();var F=r.handler,T=F&&a(),P=T&&new y.CatchEntry(T,F.param),B=r.finalizer&&a(),O=B&&new y.FinallyEntry(B,s),j=new y.TryEntry(n.getUnmarkedCurrentLoc(),P,O);n.tryEntries.push(j),n.updateContextPrevLoc(j.firstLoc),n.leapManager.withEntry(j,function(){if(n.explodeStatement(e.get("block")),T){B?n.jump(B):n.jump(s),n.updateContextPrevLoc(n.mark(T));var t=e.get("handler.body"),r=n.makeTempVar();n.clearPendingException(j.firstLoc,r),t.traverse(D,{safeParam:r,catchParamName:F.param.name}),n.leapManager.withEntry(P,function(){n.explodeStatement(t)})}B&&(n.updateContextPrevLoc(n.mark(B)),n.leapManager.withEntry(O,function(){n.explodeStatement(e.get("finalizer"))}),n.emit(d.returnStatement(d.callExpression(n.contextProperty("finish"),[O.firstLoc]))))}),n.mark(s);break;case"ThrowStatement":n.emit(d.throwStatement(n.explodeExpression(e.get("argument"))));break;default:throw new Error("unknown Statement of type "+(0,c.default)(r.type))}};var D={Identifier:function(e,t){e.node.name===t.catchParamName&&x.isReference(e)&&e.replaceWith(t.safeParam)},Scope:function(e,t){e.scope.hasOwnBinding(t.catchParamName)&&e.skip()}};A.emitAbruptCompletion=function(e){u(e)||h.default.ok(!1,"invalid completion record: "+(0,c.default)(e)),h.default.notStrictEqual(e.type,"normal","normal completions are not abrupt");var t=[d.stringLiteral(e.type)];"break"===e.type||"continue"===e.type?(d.assertLiteral(e.target),t[1]=e.target):"return"!==e.type&&"throw"!==e.type||e.value&&(d.assertExpression(e.value),t[1]=e.value),this.emit(d.returnStatement(d.callExpression(this.contextProperty("abrupt"),t)))},A.getUnmarkedCurrentLoc=function(){return d.numericLiteral(this.listing.length)},A.updateContextPrevLoc=function(e){e?(d.assertLiteral(e),-1===e.value?e.value=this.listing.length:h.default.strictEqual(e.value,this.listing.length)):e=this.getUnmarkedCurrentLoc(),this.emitAssign(this.contextProperty("prev"),e)},A.explodeExpression=function(e,t){function r(e){if(d.assertExpression(e),!t)return e;s.emit(e)}function n(e,t,r){h.default.ok(!r||!e,"Ignoring the result of a child expression but forcing it to be assigned to a temporary variable?");var n=s.explodeExpression(t,r);return r||(e||l&&!d.isLiteral(n))&&(n=s.emitAssign(e||s.makeTempVar(),n)),n}var i=e.node;if(!i)return i;d.assertExpression(i);var s=this,o=void 0,u=void 0;if(!b.containsLeap(i))return r(i);var l=b.containsLeap.onlyChildren(i);switch(i.type){case"MemberExpression":return r(d.memberExpression(s.explodeExpression(e.get("object")),i.computed?n(null,e.get("property")):i.property,i.computed));case"CallExpression":var p=e.get("callee"),f=e.get("arguments"),m=void 0,y=[],g=!1;if(f.forEach(function(e){g=g||b.containsLeap(e.node)}),d.isMemberExpression(p.node))if(g){var v=n(s.makeTempVar(),p.get("object")),x=p.node.computed?n(null,p.get("property")):p.node.property;y.unshift(v),m=d.memberExpression(d.memberExpression(v,x,p.node.computed),d.identifier("call"),!1)}else m=s.explodeExpression(p);else m=n(null,p),d.isMemberExpression(m)&&(m=d.sequenceExpression([d.numericLiteral(0),m]));return f.forEach(function(e){y.push(n(null,e))}),r(d.callExpression(m,y));case"NewExpression":return r(d.newExpression(n(null,e.get("callee")),e.get("arguments").map(function(e){return n(null,e)})));case"ObjectExpression":return r(d.objectExpression(e.get("properties").map(function(e){return e.isObjectProperty()?d.objectProperty(e.node.key,n(null,e.get("value")),e.node.computed):e.node})));case"ArrayExpression":return r(d.arrayExpression(e.get("elements").map(function(e){return n(null,e)})));case"SequenceExpression":var E=i.expressions.length-1;return e.get("expressions").forEach(function(e){e.key===E?o=s.explodeExpression(e,t):s.explodeExpression(e,!0)}),o;case"LogicalExpression":u=a(),t||(o=s.makeTempVar());var A=n(o,e.get("left"));return"&&"===i.operator?s.jumpIfNot(A,u):(h.default.strictEqual(i.operator,"||"),s.jumpIf(A,u)),n(o,e.get("right"),t),s.mark(u),o;case"ConditionalExpression":var D=a();u=a();var C=s.explodeExpression(e.get("test"));return s.jumpIfNot(C,D),t||(o=s.makeTempVar()),n(o,e.get("consequent"),t),s.jump(u),s.mark(D),n(o,e.get("alternate"),t),s.mark(u),o;case"UnaryExpression":return r(d.unaryExpression(i.operator,s.explodeExpression(e.get("argument")),!!i.prefix));case"BinaryExpression":return r(d.binaryExpression(i.operator,n(null,e.get("left")),n(null,e.get("right"))));case"AssignmentExpression":return r(d.assignmentExpression(i.operator,s.explodeExpression(e.get("left")),s.explodeExpression(e.get("right"))));case"UpdateExpression":return r(d.updateExpression(i.operator,s.explodeExpression(e.get("argument")),i.prefix));case"YieldExpression":u=a();var S=i.argument&&s.explodeExpression(e.get("argument"));if(S&&i.delegate){var _=s.makeTempVar();return s.emit(d.returnStatement(d.callExpression(s.contextProperty("delegateYield"),[S,d.stringLiteral(_.property.name),u]))),s.mark(u),_}return s.emitAssign(s.contextProperty("next"),u),s.emit(d.returnStatement(S||null)),s.mark(u),s.contextProperty("sent");default:throw new Error("unknown Expression of type "+(0,c.default)(i.type))}}},{"./leap":581,"./meta":582,"./util":584,assert:3,"babel-runtime/core-js/json/stringify":114,"babel-types":169}],579:[function(e,t,r){"use strict";var n=e("babel-runtime/core-js/object/keys"),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s=e("babel-types"),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(s),o=Object.prototype.hasOwnProperty;r.hoist=function(e){function t(e,t){a.assertVariableDeclaration(e);var n=[];return e.declarations.forEach(function(e){r[e.id.name]=a.identifier(e.id.name),e.init?n.push(a.assignmentExpression("=",e.id,e.init)):t&&n.push(e.id)}),0===n.length?null:1===n.length?n[0]:a.sequenceExpression(n)}a.assertFunction(e.node);var r={};e.get("body").traverse({VariableDeclaration:{exit:function(e){var r=t(e.node,!1);null===r?e.remove():e.replaceWith(a.expressionStatement(r)),e.skip()}},ForStatement:function(e){var r=e.node.init;a.isVariableDeclaration(r)&&e.get("init").replaceWith(t(r,!1))},ForXStatement:function(e){var r=e.get("left");r.isVariableDeclaration()&&r.replaceWith(t(r.node,!0))},FunctionDeclaration:function(e){var t=e.node;r[t.id.name]=t.id;var n=a.expressionStatement(a.assignmentExpression("=",t.id,a.functionExpression(t.id,t.params,t.body,t.generator,t.expression)));e.parentPath.isBlockStatement()?(e.parentPath.unshiftContainer("body",n),e.remove()):e.replaceWith(n),e.skip()},FunctionExpression:function(e){e.skip()}});var n={};e.get("params").forEach(function(e){var t=e.node;a.isIdentifier(t)&&(n[t.name]=t)});var s=[];return(0,i.default)(r).forEach(function(e){o.call(n,e)||s.push(a.variableDeclarator(r[e],null))}),0===s.length?null:a.variableDeclaration("var",s)}},{"babel-runtime/core-js/object/keys":120,"babel-types":169}],580:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(){return e("./visit")}},{"./visit":585}],581:[function(e,t,r){"use strict";function n(){f.default.ok(this instanceof n)}function i(e){n.call(this),m.assertLiteral(e),this.returnLoc=e}function s(e,t,r){n.call(this),m.assertLiteral(e),m.assertLiteral(t),r?m.assertIdentifier(r):r=null,this.breakLoc=e,this.continueLoc=t,this.label=r}function a(e){n.call(this),m.assertLiteral(e),this.breakLoc=e}function o(e,t,r){n.call(this),m.assertLiteral(e),t?f.default.ok(t instanceof u):t=null,r?f.default.ok(r instanceof l):r=null,f.default.ok(t||r),this.firstLoc=e,this.catchEntry=t,this.finallyEntry=r}function u(e,t){n.call(this),m.assertLiteral(e),m.assertIdentifier(t),this.firstLoc=e,this.paramId=t}function l(e,t){n.call(this),m.assertLiteral(e),m.assertLiteral(t),this.firstLoc=e,this.afterLoc=t}function c(e,t){n.call(this),m.assertLiteral(e),m.assertIdentifier(t),this.breakLoc=e,this.label=t}function p(t){f.default.ok(this instanceof p);var r=e("./emit").Emitter;f.default.ok(t instanceof r),this.emitter=t,this.entryStack=[new i(t.finalLoc)]}var h=e("assert"),f=function(e){return e&&e.__esModule?e:{default:e}}(h),d=e("babel-types"),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(d),y=e("util");(0,y.inherits)(i,n),r.FunctionEntry=i,(0,y.inherits)(s,n),r.LoopEntry=s,(0,y.inherits)(a,n),r.SwitchEntry=a,(0,y.inherits)(o,n),r.TryEntry=o,(0,y.inherits)(u,n),r.CatchEntry=u,(0,y.inherits)(l,n),r.FinallyEntry=l,(0,y.inherits)(c,n),r.LabeledEntry=c;var g=p.prototype;r.LeapManager=p,g.withEntry=function(e,t){f.default.ok(e instanceof n),this.entryStack.push(e);try{t.call(this.emitter)}finally{var r=this.entryStack.pop();f.default.strictEqual(r,e)}},g._findLeapLocation=function(e,t){for(var r=this.entryStack.length-1;r>=0;--r){var n=this.entryStack[r],i=n[e];if(i)if(t){if(n.label&&n.label.name===t.name)return i}else if(!(n instanceof c))return i}return null},g.getBreakLoc=function(e){return this._findLeapLocation("breakLoc",e)},g.getContinueLoc=function(e){return this._findLeapLocation("continueLoc",e)}},{"./emit":578,assert:3,"babel-types":169,util:601}],582:[function(e,t,r){"use strict";function n(e,t){function r(e){function t(e){return r||(Array.isArray(e)?e.some(t):o.isNode(e)&&(s.default.strictEqual(r,!1),r=n(e))),r}o.assertNode(e);var r=!1,i=o.VISITOR_KEYS[e.type];if(i)for(var a=0;a<i.length;a++){var u=i[a],l=e[u];t(l)}return r}function n(n){o.assertNode(n);var i=u(n);return l.call(i,e)?i[e]:l.call(c,n.type)?i[e]=!1:l.call(t,n.type)?i[e]=!0:i[e]=r(n)}return n.onlyChildren=r,n}var i=e("assert"),s=function(e){return e&&e.__esModule?e:{default:e}}(i),a=e("babel-types"),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(a),u=e("private").makeAccessor(),l=Object.prototype.hasOwnProperty,c={FunctionExpression:!0,ArrowFunctionExpression:!0},p={CallExpression:!0,ForInStatement:!0,UnaryExpression:!0,BinaryExpression:!0,AssignmentExpression:!0,UpdateExpression:!0,NewExpression:!0},h={YieldExpression:!0,BreakStatement:!0,ContinueStatement:!0,ReturnStatement:!0,ThrowStatement:!0};for(var f in h)l.call(h,f)&&(p[f]=h[f]);r.hasSideEffects=n("hasSideEffects",p),r.containsLeap=n("containsLeap",h)},{assert:3,"babel-types":169,private:537}],583:[function(e,t,r){"use strict";function n(e){if(!e.node||!s.isFunction(e.node))throw new Error("replaceShorthandObjectMethod can only be called on Function AST node paths.");if(!s.isObjectMethod(e.node))return e;if(!e.node.generator)return e;var t=e.node.params.map(function(e){return s.cloneDeep(e)}),r=s.functionExpression(null,t,s.cloneDeep(e.node.body),e.node.generator,e.node.async);return e.replaceWith(s.objectProperty(s.cloneDeep(e.node.key),r,e.node.computed,!1)),e.get("value")}r.__esModule=!0,r.default=n;var i=e("babel-types"),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(i)},{"babel-types":169}],584:[function(e,t,r){"use strict";function n(e){return a.memberExpression(a.identifier("regeneratorRuntime"),a.identifier(e),!1)}function i(e){return e.isReferenced()||e.parentPath.isAssignmentExpression({left:e.node})}r.__esModule=!0,r.runtimeProperty=n,r.isReference=i;var s=e("babel-types"),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(s)},{"babel-types":169}],585:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=e.node;if(p.assertFunction(t),t.id||(t.id=e.scope.parent.generateUidIdentifier("callee")),t.generator&&p.isFunctionDeclaration(t)){var r=e.findParent(function(e){return e.isProgram()||e.isBlockStatement()});if(!r)return t.id;var n=a(r),i=n.declarations[0].id,s=n.declarations[0].init.callee.object;p.assertArrayExpression(s);var o=s.elements.length;return s.elements.push(t.id),p.memberExpression(i,p.numericLiteral(o),!0)}return t.id}function a(e){var t=e.node;l.default.ok(Array.isArray(t.body));var r=b(t);return r.decl?r.decl:(r.decl=p.variableDeclaration("var",[p.variableDeclarator(e.scope.generateUidIdentifier("marked"),p.callExpression(p.memberExpression(p.arrayExpression([]),p.identifier("map"),!1),[g.runtimeProperty("mark")]))]),e.unshiftContainer("body",r.decl),r.decl)}function o(e,t){var r={didRenameArguments:!1,argsId:t};return e.traverse(v,r),r.didRenameArguments}var u=e("assert"),l=i(u),c=e("babel-types"),p=n(c),h=e("./hoist"),f=e("./emit"),d=e("./replaceShorthandObjectMethod"),m=i(d),y=e("./util"),g=n(y),b=e("private").makeAccessor();r.visitor={Function:{exit:function(e,t){var r=e.node;if(r.generator){if(r.async){if(!1===t.opts.asyncGenerators)return}else if(!1===t.opts.generators)return}else{if(!r.async)return;if(!1===t.opts.async)return}e=(0,m.default)(e),r=e.node;var n=e.scope.generateUidIdentifier("context"),i=e.scope.generateUidIdentifier("args");e.ensureBlock();var a=e.get("body");r.async&&a.traverse(E),a.traverse(x,{context:n});var u=[],l=[];a.get("body").forEach(function(e){var t=e.node;p.isExpressionStatement(t)&&p.isStringLiteral(t.expression)?u.push(t):t&&null!=t._blockHoist?u.push(t):l.push(t)}),u.length>0&&(a.node.body=l);var c=s(e);p.assertIdentifier(r.id);var d=p.identifier(r.id.name+"$"),y=(0,h.hoist)(e);if(o(e,i)){y=y||p.variableDeclaration("var",[]);var b=p.identifier("arguments");b._shadowedFunctionLiteral=e,y.declarations.push(p.variableDeclarator(i,b))}var v=new f.Emitter(n);v.explode(e.get("body")),y&&y.declarations.length>0&&u.push(y);var A=[v.getContextFunction(d),r.generator?c:p.nullLiteral(),p.thisExpression()],D=v.getTryLocsList();D&&A.push(D);var C=p.callExpression(g.runtimeProperty(r.async?"async":"wrap"),A);u.push(p.returnStatement(C)),r.body=p.blockStatement(u);var S=a.node.directives;S&&(r.body.directives=S);var _=r.generator;_&&(r.generator=!1),r.async&&(r.async=!1),_&&p.isExpression(r)&&e.replaceWith(p.callExpression(g.runtimeProperty("mark"),[r])),e.requeue()}}};var v={"FunctionExpression|FunctionDeclaration":function(e){e.skip()},Identifier:function(e,t){"arguments"===e.node.name&&g.isReference(e)&&(e.replaceWith(t.argsId),t.didRenameArguments=!0)}},x={MetaProperty:function(e){var t=e.node;"function"===t.meta.name&&"sent"===t.property.name&&e.replaceWith(p.memberExpression(this.context,p.identifier("_sent")))}},E={Function:function(e){e.skip()},AwaitExpression:function(e){var t=e.node.argument;e.replaceWith(p.yieldExpression(p.callExpression(g.runtimeProperty("awrap"),[t]),!1))}}},{"./emit":578,"./hoist":579,"./replaceShorthandObjectMethod":583,"./util":584,assert:3,"babel-types":169,private:537}],586:[function(e,t,r){var n=(e("assert"),e("recast").types),i=n.namedTypes,s=n.builders,a=Object.prototype.hasOwnProperty;r.defaults=function(e){for(var t,r=arguments.length,n=1;n<r;++n)if(t=arguments[n])for(var i in t)a.call(t,i)&&!a.call(e,i)&&(e[i]=t[i]);return e},r.runtimeProperty=function(e){return s.memberExpression(s.identifier("regeneratorRuntime"),s.identifier(e),!1)},r.isReference=function(e,t){var r=e.value;if(!i.Identifier.check(r))return!1;if(t&&r.name!==t)return!1;var n=e.parent.value;switch(n.type){case"VariableDeclarator":return"init"===e.name;case"MemberExpression":return"object"===e.name||n.computed&&"property"===e.name;case"FunctionExpression":case"FunctionDeclaration":case"ArrowFunctionExpression":return"id"!==e.name&&("params"!==e.parentPath.name||n.params!==e.parentPath.value||n.params[e.name]!==r);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:3,recast:561}],587:[function(e,t,r){function n(t){a.Program.assert(t);var r=e("..").runtime.path,n=fs.readFileSync(r,"utf8"),s=i.parse(n,{sourceFileName:r}).program.body,o=t.body;o.unshift.apply(o,s)}var i=e("recast"),s=i.types,a=s.namedTypes,o=e("./util.js");r.transform=function(t,r){return r=o.defaults(r||{},{includeRuntime:!1}),t=e("babel-core").transformFromAst(t,null,{presets:[e("regenerator-preset")],code:!1,ast:!0}).ast,!0===r.includeRuntime&&n(a.File.check(t)?t.program:t),t}},{"..":"regenerator","./util.js":586,"babel-core":28,recast:561,"regenerator-preset":574}],588:[function(e,t,r){"use strict";var n=e("is-finite");t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("Expected `input` to be a string");if(t<0||!n(t))throw new TypeError("Expected `count` to be a positive finite number");var r="";do{1&t&&(r+=e),e+=e}while(t>>=1);return r}},{"is-finite":309}],589:[function(e,t,r){"use strict";t.exports=function(e){var t=/^\\\\\?\\/.test(e),r=/[^\x00-\x80]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}},{}],590:[function(e,t,r){function n(){i.call(this)}t.exports=n;var i=e("events").EventEmitter;e("inherits")(n,i),n.Readable=e("readable-stream/readable.js"),n.Writable=e("readable-stream/writable.js"),n.Duplex=e("readable-stream/duplex.js"),n.Transform=e("readable-stream/transform.js"),n.PassThrough=e("readable-stream/passthrough.js"),n.Stream=n,n.prototype.pipe=function(e,t){function r(t){e.writable&&!1===e.write(t)&&l.pause&&l.pause()}function n(){l.readable&&l.resume&&l.resume()}function s(){c||(c=!0,e.end())}function a(){c||(c=!0,"function"==typeof e.destroy&&e.destroy())}function o(e){if(u(),0===i.listenerCount(this,"error"))throw e}function u(){l.removeListener("data",r),e.removeListener("drain",n),l.removeListener("end",s),l.removeListener("close",a),l.removeListener("error",o),e.removeListener("error",o),l.removeListener("end",u),l.removeListener("close",u),e.removeListener("close",u)}var l=this;l.on("data",r),e.on("drain",n),e._isStdio||t&&!1===t.end||(l.on("end",s),l.on("close",a));var c=!1;return l.on("error",o),e.on("error",o),l.on("end",u),l.on("close",u),e.on("close",u),e.emit("pipe",l),e}},{events:301,inherits:306,"readable-stream/duplex.js":540,"readable-stream/passthrough.js":547,"readable-stream/readable.js":548,"readable-stream/transform.js":549,"readable-stream/writable.js":550}],591:[function(e,t,r){function n(e){if(e&&!u(e))throw new Error("Unknown encoding: "+e)}function i(e){return e.toString(this.encoding)}function s(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function a(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var o=e("buffer").Buffer,u=o.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}},l=r.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),n(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=s;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=a;break;default:return void(this.write=i)}this.charBuffer=new o(6),this.charReceived=0,this.charLength=0};l.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";e=e.slice(r,e.length),t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=t.charCodeAt(t.length-1);if(!(n>=55296&&n<=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,n=t.charCodeAt(i);if(n>=55296&&n<=56319){var s=this.surrogateSize;return this.charLength+=s,this.charReceived+=s,this.charBuffer.copy(this.charBuffer,s,0,s),e.copy(this.charBuffer,0,0,s),t.substring(0,i)}return t},l.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},l.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t}},{buffer:184}],592:[function(e,t,r){"use strict";var n=e("ansi-regex")();t.exports=function(e){return"string"==typeof e?e.replace(n,""):e}},{"ansi-regex":1}],
+593:[function(e,t,r){(function(e){"use strict";var r=e.argv,n=r.indexOf("--"),i=function(e){e="--"+e;var t=r.indexOf(e);return-1!==t&&(-1===n||t<n)};t.exports=function(){return"FORCE_COLOR"in e.env||!(i("no-color")||i("no-colors")||i("color=false"))&&(!!(i("color")||i("colors")||i("color=true")||i("color=always"))||!(e.stdout&&!e.stdout.isTTY)&&("win32"===e.platform||("COLORTERM"in e.env||"dumb"!==e.env.TERM&&!!/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(e.env.TERM))))}()}).call(this,e("_process"))},{_process:539}],594:[function(e,t,r){(function(n){function i(e,t,r){function i(){for(;l.length&&!p.paused;){var e=l.shift();if(null===e)return p.emit("end");p.emit("data",e)}}function a(){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 o=!1,u=!1,l=[],c=!1,p=new s;return p.readable=p.writable=!0,p.paused=!1,p.autoDestroy=!(r&&!1===r.autoDestroy),p.write=function(t){return e.call(this,t),!p.paused},p.queue=p.push=function(e){return c?p:(null===e&&(c=!0),l.push(e),i(),p)},p.on("end",function(){p.readable=!1,!p.writable&&p.autoDestroy&&n.nextTick(function(){p.destroy()})}),p.end=function(e){if(!o)return o=!0,arguments.length&&p.write(e),a(),p},p.destroy=function(){if(!u)return u=!0,o=!0,l.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 s=e("stream");r=t.exports=i,i.through=i}).call(this,e("_process"))},{_process:539,stream:590}],595:[function(e,t,r){"use strict";t.exports=function e(t){function r(){}r.prototype=t,new r}},{}],596:[function(e,t,r){"use strict";t.exports=function(e){for(var t=e.length;/[\s\uFEFF\u00A0]/.test(e[t-1]);)t--;return e.slice(0,t)}},{}],597:[function(e,t,r){function n(){throw new Error("tty.ReadStream is not implemented")}function i(){throw new Error("tty.ReadStream is not implemented")}r.isatty=function(){return!1},r.ReadStream=n,r.WriteStream=i},{}],598:[function(e,t,r){(function(e){function r(e,t){function r(){if(!i){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}if(n("noDeprecation"))return e;var i=!1;return r}function n(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],599:[function(e,t,r){arguments[4][306][0].apply(r,arguments)},{dup:306}],600:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],601:[function(e,t,r){(function(t,n){function i(e,t){var n={seen:[],stylize:a};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(t)?n.showHidden=t:t&&r._extend(n,t),E(n.showHidden)&&(n.showHidden=!1),E(n.depth)&&(n.depth=2),E(n.colors)&&(n.colors=!1),E(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=s),u(n,e,n.depth)}function s(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function a(e,t){return e}function o(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function u(e,t,n){if(e.customInspect&&t&&_(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return v(i)||(i=u(e,i,n)),i}var s=l(e,t);if(s)return s;var a=Object.keys(t),m=o(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),S(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(t);if(0===a.length){if(_(t)){var y=t.name?": "+t.name:"";return e.stylize("[Function"+y+"]","special")}if(A(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(C(t))return e.stylize(Date.prototype.toString.call(t),"date");if(S(t))return c(t)}var g="",b=!1,x=["{","}"];if(d(t)&&(b=!0,x=["[","]"]),_(t)){g=" [Function"+(t.name?": "+t.name:"")+"]"}if(A(t)&&(g=" "+RegExp.prototype.toString.call(t)),C(t)&&(g=" "+Date.prototype.toUTCString.call(t)),S(t)&&(g=" "+c(t)),0===a.length&&(!b||0==t.length))return x[0]+g+x[1];if(n<0)return A(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var E;return E=b?p(e,t,n,m,a):a.map(function(r){return h(e,t,n,m,r,b)}),e.seen.pop(),f(E,g,x)}function l(e,t){if(E(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return b(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,r,n,i){for(var s=[],a=0,o=t.length;a<o;++a)P(t,String(a))?s.push(h(e,t,r,n,String(a),!0)):s.push("");return i.forEach(function(i){i.match(/^\d+$/)||s.push(h(e,t,r,n,i,!0))}),s}function h(e,t,r,n,i,s){var a,o,l;if(l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},l.get?o=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(o=e.stylize("[Setter]","special")),P(n,i)||(a="["+i+"]"),o||(e.seen.indexOf(l.value)<0?(o=y(r)?u(e,l.value,null):u(e,l.value,r-1),o.indexOf("\n")>-1&&(o=s?o.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+o.split("\n").map(function(e){return" "+e}).join("\n"))):o=e.stylize("[Circular]","special")),E(a)){if(s&&i.match(/^\d+$/))return o;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+o}function f(e,t,r){var n=0;return e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function d(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 b(e){return"number"==typeof e}function v(e){return"string"==typeof e}function x(e){return"symbol"==typeof e}function E(e){return void 0===e}function A(e){return D(e)&&"[object RegExp]"===k(e)}function D(e){return"object"==typeof e&&null!==e}function C(e){return D(e)&&"[object Date]"===k(e)}function S(e){return D(e)&&("[object Error]"===k(e)||e instanceof Error)}function _(e){return"function"==typeof e}function w(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function k(e){return Object.prototype.toString.call(e)}function F(e){return e<10?"0"+e.toString(10):e.toString(10)}function T(){var e=new Date,t=[F(e.getHours()),F(e.getMinutes()),F(e.getSeconds())].join(":");return[e.getDate(),j[e.getMonth()],t].join(" ")}function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.format=function(e){if(!v(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(i(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,s=n.length,a=String(e).replace(/%[sdj%]/g,function(e){if("%%"===e)return"%";if(r>=s)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),o=n[r];r<s;o=n[++r])y(o)||!D(o)?a+=" "+o:a+=" "+i(o);return a},r.deprecate=function(e,i){function s(){if(!a){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),a=!0}return e.apply(this,arguments)}if(E(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(!0===t.noDeprecation)return e;var a=!1;return s};var B,O={};r.debuglog=function(e){if(E(B)&&(B=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!O[e])if(new RegExp("\\b"+e+"\\b","i").test(B)){var n=t.pid;O[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else O[e]=function(){};return O[e]},r.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"},r.isArray=d,r.isBoolean=m,r.isNull=y,r.isNullOrUndefined=g,r.isNumber=b,r.isString=v,r.isSymbol=x,r.isUndefined=E,r.isRegExp=A,r.isObject=D,r.isDate=C,r.isError=S,r.isFunction=_,r.isPrimitive=w,r.isBuffer=e("./support/isBuffer");var j=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",T(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!D(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":600,_process:539,inherits:599}],regenerator:[function(e,t,r){function r(e,t){function r(e){i.push(e)}function n(){try{this.queue(s(i.join(""),t).code),this.queue(null)}catch(e){this.emit("error",e)}}var i=[];return o(r,n)}function n(){regeneratorRuntime=e("regenerator-runtime")}function i(){return p||(p=a.readFileSync(n.path,"utf8"))}function s(t,r){var n;return r=l.defaults(r||{},{includeRuntime:!1}),n=c.test(t)?e("babel-core").transform(t,h):{code:t},!0===r.includeRuntime&&(n.code=i()+"\n"+n.code),n}var a=e("fs"),o=e("through"),u=e("./lib/visit").transform,l=e("./lib/util"),c=/\bfunction\s*\*|\basync\b/;t.exports=r,r.runtime=n,n.path=e("regenerator-runtime/path.js").path;var p,h={presets:[e("regenerator-preset")],parserOpts:{sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,strictMode:!1,plugins:["*","jsx","flow"]}};r.types=e("recast").types,r.compile=s,r.transform=u},{"./lib/util":586,"./lib/visit":587,"babel-core":28,fs:182,recast:561,"regenerator-preset":574,"regenerator-runtime":576,"regenerator-runtime/path.js":575,through:594}]},{},[]); \ No newline at end of file
diff --git a/deps/npm/node_modules/ajv/lib/ajv.d.ts b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/ajv.d.ts
index 9d0cb3cf31..fc3adb7952 100644
--- a/deps/npm/node_modules/ajv/lib/ajv.d.ts
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/ajv.d.ts
@@ -1,61 +1,54 @@
declare var ajv: {
(options?: ajv.Options): ajv.Ajv;
new (options?: ajv.Options): ajv.Ajv;
- ValidationError: ValidationError;
- MissingRefError: MissingRefError;
- $dataMetaSchema: object;
}
declare namespace ajv {
interface Ajv {
/**
* Validate data using schema
- * Schema will be compiled and cached (using serialized JSON as key, [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize by default).
- * @param {string|object|Boolean} schemaKeyRef key, ref or schema object
+ * 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 | boolean, data: any): boolean | Thenable<any>;
+ validate(schemaKeyRef: Object | string, data: any): boolean;
/**
* Create validating function for passed schema.
- * @param {object|Boolean} schema schema object
+ * @param {Object} schema schema object
* @return {Function} validating function
*/
- compile(schema: object | boolean): ValidateFunction;
+ 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|Boolean} schema schema object
- * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped
- * @param {Function} callback optional node-style callback, it is always called with 2 parameters: error (or null) and validating function.
- * @return {Thenable<ValidateFunction>} validating function
+ * @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 | boolean, meta?: Boolean, callback?: (err: Error, validate: ValidateFunction) => any): Thenable<ValidateFunction>;
+ 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`.
- * @return {Ajv} this for method chaining
+ * @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): Ajv;
+ 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
- * @return {Ajv} this for method chaining
+ * @param {Object} schema schema object
+ * @param {String} key optional schema key
*/
- addMetaSchema(schema: object, key?: string): Ajv;
+ addMetaSchema(schema: Object, key?: string): void;
/**
* Validate schema
- * @param {object|Boolean} schema schema to validate
+ * @param {Object} schema schema to validate
* @return {Boolean} true if schema is valid
*/
- validateSchema(schema: object | boolean): boolean;
+ 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).
+ * @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;
@@ -64,44 +57,40 @@ declare namespace ajv {
* 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|Boolean} schemaKeyRef key, ref, pattern to match key/ref or schema object
- * @return {Ajv} this for method chaining
+ * @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object
*/
- removeSchema(schemaKeyRef?: object | string | RegExp | boolean): Ajv;
+ 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)
- * @return {Ajv} this for method chaining
+ * @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): Ajv;
+ 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`.
- * @return {Ajv} this for method chaining
+ * @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): Ajv;
+ addKeyword(keyword: string, definition: KeywordDefinition): void;
/**
* Get keyword definition
* @this Ajv
- * @param {string} keyword pre-defined or custom keyword.
- * @return {object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise.
+ * @param {String} keyword pre-defined or custom keyword.
+ * @return {Object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise.
*/
- getKeyword(keyword: string): object | boolean;
+ getKeyword(keyword: string): Object | boolean;
/**
* Remove keyword
* @this Ajv
- * @param {string} keyword pre-defined or custom keyword.
- * @return {Ajv} this for method chaining
+ * @param {String} keyword pre-defined or custom keyword.
*/
- removeKeyword(keyword: string): Ajv;
+ removeKeyword(keyword: string): 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
+ * @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>;
@@ -115,55 +104,49 @@ declare namespace ajv {
(
data: any,
dataPath?: string,
- parentData?: object | Array<any>,
+ parentData?: Object | Array<any>,
parentDataProperty?: string | number,
- rootData?: object | Array<any>
- ): boolean | Thenable<any>;
- schema?: object | boolean;
- errors?: null | Array<ErrorObject>;
- refs?: object;
- refVal?: Array<any>;
- root?: ValidateFunction | object;
- $async?: true;
- source?: object;
+ rootData?: Object | Array<any>
+ ): boolean | Thenable<boolean>;
+ errors?: Array<ErrorObject>;
+ schema?: Object;
}
interface Options {
- $data?: boolean;
+ v5?: boolean;
allErrors?: boolean;
verbose?: boolean;
jsonPointers?: boolean;
uniqueItems?: boolean;
unicode?: boolean;
format?: string;
- formats?: object;
- unknownFormats?: true | string[] | 'ignore';
- schemas?: Array<object> | object;
- schemaId?: '$id' | 'id';
- missingRefs?: true | 'ignore' | 'fail';
- extendRefs?: true | 'ignore' | 'fail';
- loadSchema?: (uri: string, cb?: (err: Error, schema: object) => void) => Thenable<object | boolean>;
- removeAdditional?: boolean | 'all' | 'failing';
- useDefaults?: boolean | 'shared';
- coerceTypes?: boolean | 'array';
+ formats?: Object;
+ unknownFormats?: boolean | string | Array<string>;
+ schemas?: Array<Object> | Object;
+ ownProperties?: boolean;
+ missingRefs?: boolean | string;
+ extendRefs?: 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 | 'log';
+ meta?: boolean | Object;
+ validateSchema?: boolean | string;
addUsedSchema?: boolean;
inlineRefs?: boolean | number;
passContext?: boolean;
loopRequired?: number;
- ownProperties?: boolean;
- multipleOfPrecision?: boolean | number;
- errorDataPath?: string,
+ multipleOfPrecision?: number;
+ errorDataPath?: string;
messages?: boolean;
sourceCode?: boolean;
- processCode?: (code: string) => string;
- cache?: object;
+ beautify?: boolean | Object;
+ cache?: Object;
}
- type FormatValidator = string | RegExp | ((data: string) => boolean | Thenable<any>);
+ type FormatValidator = string | RegExp | ((data: string) => boolean);
interface FormatDefinition {
validate: FormatValidator;
@@ -174,60 +157,27 @@ declare namespace ajv {
interface KeywordDefinition {
type?: string | Array<string>;
async?: boolean;
- $data?: boolean;
errors?: boolean | string;
- metaSchema?: object;
// schema: false makes validate not to expect schema (ValidateFunction)
schema?: boolean;
modifying?: boolean;
valid?: boolean;
// one and only one of the following properties should be present
- validate?: SchemaValidateFunction | ValidateFunction;
- compile?: (schema: any, parentSchema: object, it: CompilationContext) => ValidateFunction;
- macro?: (schema: any, parentSchema: object, it: CompilationContext) => object | boolean;
- inline?: (it: CompilationContext, keyword: string, schema: any, parentSchema: object) => string;
- }
-
- interface CompilationContext {
- level: number;
- dataLevel: number;
- schema: any;
- schemaPath: string;
- baseId: string;
- async: boolean;
- opts: Options;
- formats: {
- [index: string]: FormatDefinition | undefined;
- };
- compositeRule: boolean;
- validate: (schema: object) => boolean;
- util: {
- copy(obj: any, target?: any): any;
- toHash(source: string[]): { [index: string]: true | undefined };
- equal(obj: any, target: any): boolean;
- getProperty(str: string): string;
- schemaHasRules(schema: object, rules: any): string;
- escapeQuotes(str: string): string;
- toQuotedString(str: string): string;
- getData(jsonPointer: string, dataLevel: number, paths: string[]): string;
- escapeJsonPointer(str: string): string;
- unescapeJsonPointer(str: string): string;
- escapeFragment(str: string): string;
- unescapeFragment(str: string): string;
- };
- self: Ajv;
+ 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: any,
+ schema: Object,
data: any,
- parentSchema?: object,
+ parentSchema?: Object,
dataPath?: string,
- parentData?: object | Array<any>,
- parentDataProperty?: string | number,
- rootData?: object | Array<any>
- ): boolean | Thenable<any>;
+ parentData?: Object | Array<any>,
+ parentDataProperty?: string | number
+ ): boolean | Thenable<boolean>;
errors?: Array<ErrorObject>;
}
@@ -241,13 +191,11 @@ declare namespace ajv {
dataPath: string;
schemaPath: string;
params: ErrorParameters;
- // Added to validation errors of propertyNames keyword schema
- propertyName?: string;
// Excluded if messages set to false.
message?: string;
// These are added with the `verbose` option.
- schema?: any;
- parentSchema?: object;
+ schema?: Object;
+ parentSchema?: Object;
data?: any;
}
@@ -256,7 +204,7 @@ declare namespace ajv {
MultipleOfParams | PatternParams | RequiredParams |
TypeParams | UniqueItemsParams | CustomParams |
PatternGroupsParams | PatternRequiredParams |
- PropertyNamesParams | SwitchParams | NoParams | EnumParams;
+ SwitchParams | NoParams | EnumParams;
interface RefParams {
ref: string;
@@ -322,10 +270,6 @@ declare namespace ajv {
missingPattern: string;
}
- interface PropertyNamesParams {
- propertyName: string;
- }
-
interface SwitchParams {
caseIndex: number;
}
@@ -337,22 +281,4 @@ declare namespace ajv {
}
}
-declare class ValidationError extends Error {
- constructor(errors: Array<ajv.ErrorObject>);
-
- message: string;
- errors: Array<ajv.ErrorObject>;
- ajv: true;
- validation: true;
-}
-
-declare class MissingRefError extends Error {
- constructor(baseId: string, ref: string, message?: string);
- static message: (baseId: string, ref: string) => string;
-
- message: string;
- missingRef: string;
- missingSchema: string;
-}
-
export = ajv;
diff --git a/deps/npm/node_modules/har-validator/node_modules/ajv/lib/ajv.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/ajv.js
new file mode 100644
index 0000000000..0502c1fd36
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/ajv.js
@@ -0,0 +1,420 @@
+'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;
+
+var customKeyword = require('./keyword');
+Ajv.prototype.addKeyword = customKeyword.add;
+Ajv.prototype.getKeyword = customKeyword.get;
+Ajv.prototype.removeKeyword = customKeyword.remove;
+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/deps/npm/node_modules/har-validator/node_modules/ajv/lib/async.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/async.js
new file mode 100644
index 0000000000..173c2c00ad
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/async.js
@@ -0,0 +1,218 @@
+'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) {
+ var name = 'regenerator';
+ regenerator = require(name);
+ 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) {
+ var name = 'nodent';
+ nodent = require(name)({ 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/deps/npm/node_modules/ajv/lib/cache.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/cache.js
index 7558874c73..7558874c73 100644
--- a/deps/npm/node_modules/ajv/lib/cache.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/cache.js
diff --git a/deps/npm/node_modules/ajv/lib/compile/_rules.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/_rules.js
index 3fe69973a0..c98610e41a 100644
--- a/deps/npm/node_modules/ajv/lib/compile/_rules.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/_rules.js
@@ -5,8 +5,6 @@ module.exports = {
'$ref': require('../dotjs/ref'),
allOf: require('../dotjs/allOf'),
anyOf: require('../dotjs/anyOf'),
- const: require('../dotjs/const'),
- contains: require('../dotjs/contains'),
dependencies: require('../dotjs/dependencies'),
'enum': require('../dotjs/enum'),
format: require('../dotjs/format'),
@@ -24,7 +22,6 @@ module.exports = {
oneOf: require('../dotjs/oneOf'),
pattern: require('../dotjs/pattern'),
properties: require('../dotjs/properties'),
- propertyNames: require('../dotjs/propertyNames'),
required: require('../dotjs/required'),
uniqueItems: require('../dotjs/uniqueItems'),
validate: require('../dotjs/validate')
diff --git a/deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/equal.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/equal.js
new file mode 100644
index 0000000000..2a918746c2
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/equal.js
@@ -0,0 +1,45 @@
+'use strict';
+
+/*eslint complexity: 0*/
+
+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;
+
+ var dateA = a instanceof Date
+ , dateB = b instanceof Date;
+ if (dateA && dateB) return a.getTime() == b.getTime();
+ if (dateA != dateB) return false;
+
+ var regexpA = a instanceof RegExp
+ , regexpB = b instanceof RegExp;
+ if (regexpA && regexpB) return a.toString() == b.toString();
+ if (regexpA != regexpB) return false;
+
+ for (i = 0; i < keys.length; i++)
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) 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/deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/formats.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/formats.js
new file mode 100644
index 0000000000..2130a31b0c
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/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 = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-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/deps/npm/node_modules/ajv/lib/compile/index.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/index.js
index cf4f5b86bb..c9c6730f8a 100644
--- a/deps/npm/node_modules/ajv/lib/compile/index.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/index.js
@@ -2,8 +2,18 @@
var resolve = require('./resolve')
, util = require('./util')
- , errorClasses = require('./error_classes')
- , stableStringify = require('fast-json-stable-stringify');
+ , stableStringify = require('json-stable-stringify')
+ , async = require('../async');
+
+var beautify;
+
+function loadBeautify(){
+ if (beautify === undefined) {
+ var name = 'js-beautify';
+ try { beautify = require(name).js_beautify; }
+ catch(e) { beautify = false; }
+ }
+}
var validateGenerator = require('../dotjs/validate');
@@ -13,10 +23,10 @@ var validateGenerator = require('../dotjs/validate');
var co = require('co');
var ucs2length = util.ucs2length;
-var equal = require('fast-deep-equal');
+var equal = require('./equal');
// this error is thrown by async schemas to return validation errors via exception
-var ValidationError = errorClasses.Validation;
+var ValidationError = require('./validation_error');
module.exports = compile;
@@ -41,7 +51,8 @@ function compile(schema, root, localRefs, baseId) {
, patternsHash = {}
, defaults = []
, defaultsHash = {}
- , customRules = [];
+ , customRules = []
+ , keepSourceCode = opts.sourceCode !== false;
root = root || { schema: schema, refVal: refVal, refs: refs };
@@ -63,7 +74,7 @@ function compile(schema, root, localRefs, baseId) {
cv.refVal = v.refVal;
cv.root = v.root;
cv.$async = v.$async;
- if (opts.sourceCode) cv.source = v.source;
+ if (keepSourceCode) cv.sourceCode = v.sourceCode;
}
return v;
} finally {
@@ -83,6 +94,7 @@ function compile(schema, root, localRefs, baseId) {
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,
@@ -93,7 +105,6 @@ function compile(schema, root, localRefs, baseId) {
schemaPath: '',
errSchemaPath: '#',
errorPath: '""',
- MissingRefError: errorClasses.MissingRef,
RULES: RULES,
validate: validateGenerator,
util: util,
@@ -104,7 +115,6 @@ function compile(schema, root, localRefs, baseId) {
useCustomRule: useCustomRule,
opts: opts,
formats: formats,
- logger: self.logger,
self: self
});
@@ -112,10 +122,20 @@ function compile(schema, root, localRefs, baseId) {
+ vars(defaults, defaultCode) + vars(customRules, customRuleCode)
+ sourceCode;
- if (opts.processCode) sourceCode = opts.processCode(sourceCode);
- // console.log('\n\n\n *** \n', JSON.stringify(sourceCode));
- var validate;
+ if (opts.beautify) {
+ loadBeautify();
+ /* 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',
@@ -128,7 +148,7 @@ function compile(schema, root, localRefs, baseId) {
'equal',
'ucs2length',
'ValidationError',
- sourceCode
+ validateCode
);
validate = makeValidate(
@@ -147,7 +167,7 @@ function compile(schema, root, localRefs, baseId) {
refVal[0] = validate;
} catch(e) {
- self.logger.error('Error compiling schema, function code:', sourceCode);
+ console.error('Error compiling schema, function code:', validateCode);
throw e;
}
@@ -157,9 +177,9 @@ function compile(schema, root, localRefs, baseId) {
validate.refVal = refVal;
validate.root = isRoot ? validate : _root;
if ($async) validate.$async = true;
+ if (keepSourceCode) validate.sourceCode = sourceCode;
if (opts.sourceCode === true) {
validate.source = {
- code: sourceCode,
patterns: patterns,
defaults: defaults
};
@@ -188,7 +208,7 @@ function compile(schema, root, localRefs, baseId) {
refCode = addLocalRef(ref);
var v = resolve.call(self, localCompile, root, ref);
- if (v === undefined) {
+ if (!v) {
var localSchema = localRefs && localRefs[ref];
if (localSchema) {
v = resolve.inlineRef(localSchema, opts.inlineRefs)
@@ -197,9 +217,7 @@ function compile(schema, root, localRefs, baseId) {
}
}
- if (v === undefined) {
- removeLocalRef(ref);
- } else {
+ if (v) {
replaceLocalRef(ref, v);
return resolvedRef(v, refCode);
}
@@ -212,17 +230,13 @@ function compile(schema, root, localRefs, baseId) {
return 'refVal' + refId;
}
- function removeLocalRef(ref) {
- delete refs[ref];
- }
-
function replaceLocalRef(ref, v) {
var refId = refs[ref];
refVal[refId] = v;
}
function resolvedRef(refVal, code) {
- return typeof refVal == 'object' || typeof refVal == 'boolean'
+ return typeof refVal == 'object'
? { code: code, schema: refVal, inline: true }
: { code: code, $async: refVal && refVal.$async };
}
@@ -261,7 +275,7 @@ function compile(schema, root, localRefs, baseId) {
var valid = validateSchema(schema);
if (!valid) {
var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors);
- if (self._opts.validateSchema == 'log') self.logger.error(message);
+ if (self._opts.validateSchema == 'log') console.error(message);
else throw new Error(message);
}
}
@@ -280,12 +294,8 @@ function compile(schema, root, localRefs, baseId) {
validate = inline.call(self, it, rule.keyword, schema, parentSchema);
} else {
validate = rule.definition.validate;
- if (!validate) return;
}
- if (validate === undefined)
- throw new Error('custom keyword "' + rule.keyword + '"failed to compile');
-
var index = customRules.length;
customRules[index] = validate;
@@ -362,7 +372,7 @@ function defaultCode(i) {
function refValCode(i, refVal) {
- return refVal[i] === undefined ? '' : 'var refVal' + i + ' = refVal[' + i + '];';
+ return refVal[i] ? 'var refVal' + i + ' = refVal[' + i + '];' : '';
}
diff --git a/deps/npm/node_modules/ajv/lib/compile/resolve.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/resolve.js
index 7d06afab8c..db2b91fbf1 100644
--- a/deps/npm/node_modules/ajv/lib/compile/resolve.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/resolve.js
@@ -1,10 +1,9 @@
'use strict';
var url = require('url')
- , equal = require('fast-deep-equal')
+ , equal = require('./equal')
, util = require('./util')
- , SchemaObject = require('./schema_obj')
- , traverse = require('json-schema-traverse');
+ , SchemaObject = require('./schema_obj');
module.exports = resolve;
@@ -48,7 +47,7 @@ function resolve(compile, root, ref) {
if (schema instanceof SchemaObject) {
v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId);
- } else if (schema !== undefined) {
+ } else if (schema) {
v = inlineRef(schema, this._opts.inlineRefs)
? schema
: compile.call(this, schema, root, undefined, baseId);
@@ -69,7 +68,7 @@ function resolveSchema(root, ref) {
/* jshint validthis: true */
var p = url.parse(ref, false, true)
, refPath = _getFullPath(p)
- , baseId = getFullPath(this._getId(root.schema));
+ , baseId = getFullPath(root.schema.id);
if (refPath !== baseId) {
var id = normalizeId(refPath);
var refVal = this._refs[id];
@@ -90,7 +89,7 @@ function resolveSchema(root, ref) {
}
}
if (!root.schema) return;
- baseId = getFullPath(this._getId(root.schema));
+ baseId = getFullPath(root.schema.id);
}
return getJsonPointer.call(this, p, baseId, root.schema, root);
}
@@ -104,8 +103,7 @@ function resolveRecursive(root, ref, parsedRef) {
var schema = res.schema;
var baseId = res.baseId;
root = res.root;
- var id = this._getId(schema);
- if (id) baseId = resolveUrl(baseId, id);
+ if (schema.id) baseId = resolveUrl(baseId, schema.id);
return getJsonPointer.call(this, parsedRef, baseId, schema, root);
}
}
@@ -124,24 +122,20 @@ function getJsonPointer(parsedRef, baseId, schema, root) {
if (part) {
part = util.unescapeFragment(part);
schema = schema[part];
- if (schema === undefined) break;
- var id;
- if (!PREVENT_SCOPE_CHANGE[part]) {
- id = this._getId(schema);
- if (id) baseId = resolveUrl(baseId, 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) 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 !== undefined && schema !== root.schema)
+ if (schema && schema != root.schema)
return { schema: schema, root: root, baseId: baseId };
}
@@ -231,41 +225,43 @@ function resolveUrl(baseId, id) {
/* @this Ajv */
function resolveIds(schema) {
- var schemaId = normalizeId(this._getId(schema));
- var baseIds = {'': schemaId};
- var fullPaths = {'': getFullPath(schemaId, false)};
+ /* eslint no-shadow: 0 */
+ /* jshint validthis: true */
+ var id = normalizeId(schema.id);
var localRefs = {};
- var self = this;
-
- traverse(schema, {allKeys: true}, function(sch, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
- if (jsonPtr === '') return;
- var id = self._getId(sch);
- var baseId = baseIds[parentJsonPtr];
- var fullPath = fullPaths[parentJsonPtr] + '/' + parentKeyword;
- if (keyIndex !== undefined)
- fullPath += '/' + (typeof keyIndex == 'number' ? keyIndex : util.escapeFragment(keyIndex));
-
- if (typeof id == 'string') {
- id = baseId = normalizeId(baseId ? url.resolve(baseId, id) : id);
-
- var refVal = self._refs[id];
- if (typeof refVal == 'string') refVal = self._refs[refVal];
- if (refVal && refVal.schema) {
- if (!equal(sch, 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(sch, localRefs[id]))
+ _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');
- localRefs[id] = sch;
- } else {
- self._refs[id] = fullPath;
+ } 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);
}
- baseIds[jsonPtr] = baseId;
- fullPaths[jsonPtr] = fullPath;
- });
-
- return localRefs;
+ }
}
diff --git a/deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/rules.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/rules.js
new file mode 100644
index 0000000000..39b1708d96
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/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/deps/npm/node_modules/ajv/lib/compile/schema_obj.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/schema_obj.js
index e7903b0f46..e7903b0f46 100644
--- a/deps/npm/node_modules/ajv/lib/compile/schema_obj.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/schema_obj.js
diff --git a/deps/npm/node_modules/ajv/lib/compile/ucs2length.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/ucs2length.js
index d193fb1700..d193fb1700 100644
--- a/deps/npm/node_modules/ajv/lib/compile/ucs2length.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/ucs2length.js
diff --git a/deps/npm/node_modules/ajv/lib/compile/util.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/util.js
index 263891c33d..8451f83ae2 100644
--- a/deps/npm/node_modules/ajv/lib/compile/util.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/util.js
@@ -9,20 +9,19 @@ module.exports = {
toHash: toHash,
getProperty: getProperty,
escapeQuotes: escapeQuotes,
- equal: require('fast-deep-equal'),
ucs2length: require('./ucs2length'),
varOccurences: varOccurences,
varReplace: varReplace,
cleanUpCode: cleanUpCode,
- finalCleanUpCode: finalCleanUpCode,
+ cleanUpVarErrors: cleanUpVarErrors,
schemaHasRules: schemaHasRules,
schemaHasRulesExcept: schemaHasRulesExcept,
+ stableStringify: require('json-stable-stringify'),
toQuotedString: toQuotedString,
getPathExpr: getPathExpr,
getPath: getPath,
getData: getData,
unescapeFragment: unescapeFragment,
- unescapeJsonPointer: unescapeJsonPointer,
escapeFragment: escapeFragment,
escapeJsonPointer: escapeJsonPointer
};
@@ -145,40 +144,31 @@ function cleanUpCode(out) {
}
-var ERRORS_REGEXP = /[^v.]errors/g
+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 data;\s*else throw new ValidationError\(vErrors\);/
- , RETURN_DATA_ASYNC = 'return data;'
- , ROOTDATA_REGEXP = /[^A-Za-z_$]rootData[^A-Za-z0-9_$]/g
- , REMOVE_ROOTDATA = /if \(rootData === undefined\) rootData = data;/;
+ , RETURN_ASYNC = /if \(errors === 0\) return true;\s*else throw new ValidationError\(vErrors\);/
+ , RETURN_TRUE_ASYNC = 'return true;';
-function finalCleanUpCode(out, async) {
+function cleanUpVarErrors(out, async) {
var matches = out.match(ERRORS_REGEXP);
- if (matches && matches.length == 2) {
- out = async
+ if (!matches || matches.length !== 2) return out;
+ return async
? out.replace(REMOVE_ERRORS_ASYNC, '')
- .replace(RETURN_ASYNC, RETURN_DATA_ASYNC)
+ .replace(RETURN_ASYNC, RETURN_TRUE_ASYNC)
: out.replace(REMOVE_ERRORS, '')
.replace(RETURN_VALID, RETURN_TRUE);
- }
-
- matches = out.match(ROOTDATA_REGEXP);
- if (!matches || matches.length !== 3) return out;
- return out.replace(REMOVE_ROOTDATA, '');
}
function schemaHasRules(schema, rules) {
- if (typeof schema == 'boolean') return !schema;
for (var key in schema) if (rules[key]) return true;
}
function schemaHasRulesExcept(schema, rules, exceptKeyword) {
- if (typeof schema == 'boolean') return !schema && exceptKeyword != 'not';
for (var key in schema) if (key != exceptKeyword && rules[key]) return true;
}
diff --git a/deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/validation_error.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/compile/validation_error.js
new file mode 100644
index 0000000000..3c5c59478c
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/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/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/_limit.jst b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/_limit.jst
new file mode 100644
index 0000000000..21793d874c
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/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/deps/npm/node_modules/ajv/lib/dot/_limitItems.jst b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/_limitItems.jst
index a3e078e513..a3e078e513 100644
--- a/deps/npm/node_modules/ajv/lib/dot/_limitItems.jst
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/_limitItems.jst
diff --git a/deps/npm/node_modules/ajv/lib/dot/_limitLength.jst b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/_limitLength.jst
index cfc8dbb016..cfc8dbb016 100644
--- a/deps/npm/node_modules/ajv/lib/dot/_limitLength.jst
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/_limitLength.jst
diff --git a/deps/npm/node_modules/ajv/lib/dot/_limitProperties.jst b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/_limitProperties.jst
index da7ea776f1..da7ea776f1 100644
--- a/deps/npm/node_modules/ajv/lib/dot/_limitProperties.jst
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/_limitProperties.jst
diff --git a/deps/npm/node_modules/ajv/lib/dot/allOf.jst b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/allOf.jst
index 4c2836311b..4c2836311b 100644
--- a/deps/npm/node_modules/ajv/lib/dot/allOf.jst
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/allOf.jst
diff --git a/deps/npm/node_modules/ajv/lib/dot/anyOf.jst b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/anyOf.jst
index 086cf2b33c..93c3cd828a 100644
--- a/deps/npm/node_modules/ajv/lib/dot/anyOf.jst
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/anyOf.jst
@@ -35,7 +35,7 @@
{{= $closingBraces }}
if (!{{=$valid}}) {
- {{# def.extraError:'anyOf' }}
+ {{# def.addError:'anyOf' }}
} else {
{{# def.resetErrors }}
{{? it.opts.allErrors }} } {{?}}
diff --git a/deps/npm/node_modules/ajv/lib/dot/coerce.def b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/coerce.def
index 86e0e18af9..86e0e18af9 100644
--- a/deps/npm/node_modules/ajv/lib/dot/coerce.def
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/coerce.def
diff --git a/deps/npm/node_modules/ajv/lib/dot/custom.jst b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/custom.jst
index 402028e6bb..e91c50e6fd 100644
--- a/deps/npm/node_modules/ajv/lib/dot/custom.jst
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/custom.jst
@@ -6,8 +6,7 @@
{{
var $rule = this
, $definition = 'definition' + $lvl
- , $rDef = $rule.definition
- , $closingBraces = '';
+ , $rDef = $rule.definition;
var $validate = $rDef.validate;
var $compile, $inline, $macro, $ruleValidate, $validateCode;
}}
@@ -22,7 +21,6 @@
{{??}}
{{
$ruleValidate = it.useCustomRule($rule, $schema, it.schema, it);
- if (!$ruleValidate) return;
$schemaValue = 'validate.schema' + $schemaPath;
$validateCode = $ruleValidate.code;
$compile = $rDef.compile;
@@ -78,16 +76,9 @@ var {{=$valid}};
#}}
-{{? $isData && $rDef.$data }}
- {{ $closingBraces += '}'; }}
- if ({{=$schemaValue}} === undefined) {
- {{=$valid}} = true;
- } else {
- {{? $validateSchema }}
- {{ $closingBraces += '}'; }}
- {{=$valid}} = {{=$definition}}.validateSchema({{=$schemaValue}});
- if ({{=$valid}}) {
- {{?}}
+{{? $validateSchema }}
+ {{=$valid}} = {{=$definition}}.validateSchema({{=$schemaValue}});
+ if ({{=$valid}}) {
{{?}}
{{? $inline }}
@@ -132,10 +123,12 @@ var {{=$valid}};
{{?}}
{{? $rDef.modifying }}
- if ({{=$parentData}}) {{=$data}} = {{=$parentData}}[{{=$parentDataProperty}}];
+ {{=$data}} = {{=$parentData}}[{{=$parentDataProperty}}];
{{?}}
-{{= $closingBraces }}
+{{? $validateSchema }}
+ }
+{{?}}
{{## def.notValidationResult:
{{? $rDef.valid === undefined }}
diff --git a/deps/npm/node_modules/ajv/lib/dot/defaults.def b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/defaults.def
index 5ad8d1d2d2..5ad8d1d2d2 100644
--- a/deps/npm/node_modules/ajv/lib/dot/defaults.def
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/defaults.def
diff --git a/deps/npm/node_modules/ajv/lib/dot/definitions.def b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/definitions.def
index cdbe140bb7..a442346f5b 100644
--- a/deps/npm/node_modules/ajv/lib/dot/definitions.def
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/definitions.def
@@ -113,12 +113,12 @@
{{## def.cleanUp: {{ out = it.util.cleanUpCode(out); }} #}}
-{{## def.finalCleanUp: {{ out = it.util.finalCleanUpCode(out, $async); }} #}}
+{{## def.cleanUpVarErrors: {{ out = it.util.cleanUpVarErrors(out, $async); }} #}}
{{## def.$data:
{{
- var $isData = it.opts.$data && $schema && $schema.$data
+ var $isData = it.opts.v5 && $schema && $schema.$data
, $schemaValue;
}}
{{? $isData }}
@@ -175,25 +175,8 @@
#}}
-{{## def.iterateProperties:
+{{## def.checkOwnProperty:
{{? $ownProperties }}
- {{=$dataProperties}} = {{=$dataProperties}} || Object.keys({{=$data}});
- for (var {{=$idx}}=0; {{=$idx}}<{{=$dataProperties}}.length; {{=$idx}}++) {
- var {{=$key}} = {{=$dataProperties}}[{{=$idx}}];
- {{??}}
- for (var {{=$key}} in {{=$data}}) {
+ if (!Object.prototype.hasOwnProperty.call({{=$data}}, {{=$key}})) continue;
{{?}}
#}}
-
-
-{{## def.noPropertyInData:
- {{=$useData}} === undefined
- {{? $ownProperties }}
- || !{{# def.isOwnProperty }}
- {{?}}
-#}}
-
-
-{{## def.isOwnProperty:
- Object.prototype.hasOwnProperty.call({{=$data}}, '{{=it.util.escapeQuotes($propertyKey)}}')
-#}}
diff --git a/deps/npm/node_modules/ajv/lib/dot/dependencies.jst b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/dependencies.jst
index 1e8c18ce96..cd6daf03d2 100644
--- a/deps/npm/node_modules/ajv/lib/dot/dependencies.jst
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/dependencies.jst
@@ -5,18 +5,9 @@
{{# def.setupNextLevel }}
-{{## def.propertyInData:
- {{=$data}}{{= it.util.getProperty($property) }} !== undefined
- {{? $ownProperties }}
- && Object.prototype.hasOwnProperty.call({{=$data}}, '{{=it.util.escapeQuotes($property)}}')
- {{?}}
-#}}
-
-
{{
var $schemaDeps = {}
- , $propertyDeps = {}
- , $ownProperties = it.opts.ownProperties;
+ , $propertyDeps = {};
for ($property in $schema) {
var $sch = $schema[$property];
@@ -32,19 +23,17 @@ var {{=$errs}} = errors;
var missing{{=$lvl}};
{{ for (var $property in $propertyDeps) { }}
{{ $deps = $propertyDeps[$property]; }}
- {{? $deps.length }}
- if ({{# def.propertyInData }}
- {{? $breakOnError }}
- && ({{# def.checkMissingProperty:$deps }})) {
- {{# def.errorMissingProperty:'dependencies' }}
- {{??}}
- ) {
- {{~ $deps:$propertyKey }}
- {{# def.allErrorsMissingProperty:'dependencies' }}
- {{~}}
- {{?}}
- } {{# def.elseIfValid }}
- {{?}}
+ if ({{=$data}}{{= it.util.getProperty($property) }} !== undefined
+ {{? $breakOnError }}
+ && ({{# def.checkMissingProperty:$deps }})) {
+ {{# def.errorMissingProperty:'dependencies' }}
+ {{??}}
+ ) {
+ {{~ $deps:$reqProperty }}
+ {{# def.allErrorsMissingProperty:'dependencies' }}
+ {{~}}
+ {{?}}
+ } {{# def.elseIfValid }}
{{ } }}
{{
@@ -58,7 +47,7 @@ var missing{{=$lvl}};
{{? {{# def.nonEmptySchema:$sch }} }}
{{=$nextValid}} = true;
- if ({{# def.propertyInData }}) {
+ if ({{=$data}}{{= it.util.getProperty($property) }} !== undefined) {
{{
$it.schema = $sch;
$it.schemaPath = $schemaPath + it.util.getProperty($property);
diff --git a/deps/npm/node_modules/ajv/lib/dot/enum.jst b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/enum.jst
index 357c2e8c08..357c2e8c08 100644
--- a/deps/npm/node_modules/ajv/lib/dot/enum.jst
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/enum.jst
diff --git a/deps/npm/node_modules/ajv/lib/dot/errors.def b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/errors.def
index b79646fc2c..3e0472120b 100644
--- a/deps/npm/node_modules/ajv/lib/dot/errors.def
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/errors.def
@@ -87,17 +87,14 @@
{{## def.concatSchema:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=$schema}}{{?}}#}}
-{{## def.appendSchema:{{?$isData}}' + {{=$schemaValue}}{{??}}{{=$schemaValue}}'{{?}}#}}
+{{## def.appendSchema:{{?$isData}}' + {{=$schemaValue}}{{??}}{{=$schema}}'{{?}}#}}
{{## def.concatSchemaEQ:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=it.util.escapeQuotes($schema)}}{{?}}#}}
{{## def._errorMessages = {
- 'false schema': "'boolean schema is false'",
$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'",
- const: "'should be equal to constant'",
- contains: "'should contain a valid item'",
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}}\"'",
@@ -110,14 +107,14 @@
not: "'should NOT be valid'",
oneOf: "'should match exactly one schema in oneOf'",
pattern: "'should match pattern \"{{#def.concatSchemaEQ}}\"'",
- patternGroups: "'should NOT have {{=$moreOrLess}} than {{=$limit}} properties matching pattern \"{{=it.util.escapeQuotes($pgProperty)}}\"'",
- propertyNames: "'property name \\'{{=$invalidName}}\\' is invalid'",
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'"
} #}}
@@ -127,13 +124,10 @@
{{## def.schemaRefOrQS: {{?$isData}}validate.schema{{=$schemaPath}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}}
{{## def._errorSchemas = {
- 'false schema': "false",
$ref: "{{=it.util.toQuotedString($schema)}}",
additionalItems: "false",
additionalProperties: "false",
anyOf: "validate.schema{{=$schemaPath}}",
- const: "validate.schema{{=$schemaPath}}",
- contains: "validate.schema{{=$schemaPath}}",
dependencies: "validate.schema{{=$schemaPath}}",
'enum': "validate.schema{{=$schemaPath}}",
format: "{{#def.schemaRefOrQS}}",
@@ -146,14 +140,14 @@
not: "validate.schema{{=$schemaPath}}",
oneOf: "validate.schema{{=$schemaPath}}",
pattern: "{{#def.schemaRefOrQS}}",
- patternGroups: "validate.schema{{=$schemaPath}}",
- propertyNames: "validate.schema{{=$schemaPath}}",
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}}"
} #}}
@@ -162,13 +156,10 @@
{{## def.schemaValueQS: {{?$isData}}{{=$schemaValue}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}}
{{## def._errorParams = {
- 'false schema': "{}",
$ref: "{ ref: '{{=it.util.escapeQuotes($schema)}}' }",
additionalItems: "{ limit: {{=$schema.length}} }",
additionalProperties: "{ additionalProperty: '{{=$additionalProperty}}' }",
anyOf: "{}",
- const: "{}",
- contains: "{}",
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}} }",
@@ -181,14 +172,14 @@
not: "{}",
oneOf: "{}",
pattern: "{ pattern: {{#def.schemaValueQS}} }",
- patternGroups: "{ reason: '{{=$reason}}', limit: {{=$limit}}, pattern: '{{=it.util.escapeQuotes($pgProperty)}}' }",
- propertyNames: "{ propertyName: '{{=$invalidName}}' }",
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/deps/npm/node_modules/ajv/lib/dot/format.jst b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/format.jst
index 484dddf794..961fe4fc9e 100644
--- a/deps/npm/node_modules/ajv/lib/dot/format.jst
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/format.jst
@@ -15,14 +15,13 @@
{{## def.$dataCheckFormat:
{{# def.$dataNotType:'string' }}
- ({{? $unknownFormats != 'ignore' }}
+ ({{? $unknownFormats === true || $allowUnknown }}
({{=$schemaValue}} && !{{=$format}}
{{? $allowUnknown }}
&& self._opts.unknownFormats.indexOf({{=$schemaValue}}) == -1
{{?}}) ||
{{?}}
- ({{=$format}} && {{=$formatType}} == '{{=$ruleType}}'
- && !(typeof {{=$format}} == 'function'
+ ({{=$format}} && !(typeof {{=$format}} == 'function'
? {{? it.async}}
(async{{=$lvl}} ? {{=it.yieldAwait}} {{=$format}}({{=$data}}) : {{=$format}}({{=$data}}))
{{??}}
@@ -50,17 +49,12 @@
}}
{{? $isData }}
- {{
- var $format = 'format' + $lvl
- , $isObject = 'isObject' + $lvl
- , $formatType = 'formatType' + $lvl;
- }}
+ {{ var $format = 'format' + $lvl; }}
var {{=$format}} = formats[{{=$schemaValue}}];
- var {{=$isObject}} = typeof {{=$format}} == 'object'
- && !({{=$format}} instanceof RegExp)
- && {{=$format}}.validate;
- var {{=$formatType}} = {{=$isObject}} && {{=$format}}.type || 'string';
- if ({{=$isObject}}) {
+ var isObject{{=$lvl}} = typeof {{=$format}} == 'object'
+ && !({{=$format}} instanceof RegExp)
+ && {{=$format}}.validate;
+ if (isObject{{=$lvl}}) {
{{? it.async}}
var async{{=$lvl}} = {{=$format}}.async;
{{?}}
@@ -70,28 +64,28 @@
{{??}}
{{ var $format = it.formats[$schema]; }}
{{? !$format }}
- {{? $unknownFormats == 'ignore' }}
- {{ it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); }}
- {{# def.skipFormat }}
- {{?? $allowUnknown && $unknownFormats.indexOf($schema) >= 0 }}
- {{# def.skipFormat }}
- {{??}}
+ {{? $unknownFormats === true || ($allowUnknown && $unknownFormats.indexOf($schema) == -1) }}
{{ throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); }}
+ {{??}}
+ {{
+ if (!$allowUnknown) {
+ console.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"');
+ if ($unknownFormats !== 'ignore')
+ console.warn('In the next major version it will throw exception. See option unknownFormats for more information');
+ }
+ }}
+ {{# def.skipFormat }}
{{?}}
{{?}}
{{
var $isObject = typeof $format == 'object'
&& !($format instanceof RegExp)
&& $format.validate;
- var $formatType = $isObject && $format.type || 'string';
if ($isObject) {
var $async = $format.async === true;
$format = $format.validate;
}
}}
- {{? $formatType != $ruleType }}
- {{# def.skipFormat }}
- {{?}}
{{? $async }}
{{
if (!it.async) throw new Error('async format in sync schema');
diff --git a/deps/npm/node_modules/ajv/lib/dot/items.jst b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/items.jst
index fe1be473d4..f0e8da93ac 100644
--- a/deps/npm/node_modules/ajv/lib/dot/items.jst
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/items.jst
@@ -90,6 +90,7 @@ var {{=$valid}};
$it.errSchemaPath = $errSchemaPath;
}}
{{# def.validateItems: 0 }}
+ {{# def.ifResultValid }}
{{?}}
{{? $breakOnError }}
diff --git a/deps/npm/node_modules/ajv/lib/dot/missing.def b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/missing.def
index a73b9f966e..23ad04cf43 100644
--- a/deps/npm/node_modules/ajv/lib/dot/missing.def
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/missing.def
@@ -1,11 +1,8 @@
{{## def.checkMissingProperty:_properties:
- {{~ _properties:$propertyKey:$i }}
+ {{~ _properties:_$property:$i }}
{{?$i}} || {{?}}
- {{
- var $prop = it.util.getProperty($propertyKey)
- , $useData = $data + $prop;
- }}
- ( ({{# def.noPropertyInData }}) && (missing{{=$lvl}} = {{= it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) }}) )
+ {{ var $prop = it.util.getProperty(_$property); }}
+ ( {{=$data}}{{=$prop}} === undefined && (missing{{=$lvl}} = {{= it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop) }}) )
{{~}}
#}}
@@ -23,17 +20,15 @@
{{# def.error:_error }}
#}}
-
{{## def.allErrorsMissingProperty:_error:
{{
- var $prop = it.util.getProperty($propertyKey)
- , $missingProperty = it.util.escapeQuotes($propertyKey)
- , $useData = $data + $prop;
+ var $prop = it.util.getProperty($reqProperty)
+ , $missingProperty = it.util.escapeQuotes($reqProperty);
if (it.opts._errorDataPathProperty) {
- it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+ it.errorPath = it.util.getPath($currentErrorPath, $reqProperty, it.opts.jsonPointers);
}
}}
- if ({{# def.noPropertyInData }}) {
+ if ({{=$data}}{{=$prop}} === undefined) {
{{# def.addError:_error }}
}
#}}
diff --git a/deps/npm/node_modules/ajv/lib/dot/multipleOf.jst b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/multipleOf.jst
index 5f8dd33b5d..5f8dd33b5d 100644
--- a/deps/npm/node_modules/ajv/lib/dot/multipleOf.jst
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/multipleOf.jst
diff --git a/deps/npm/node_modules/ajv/lib/dot/not.jst b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/not.jst
index e03185ae87..e03185ae87 100644
--- a/deps/npm/node_modules/ajv/lib/dot/not.jst
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/not.jst
diff --git a/deps/npm/node_modules/ajv/lib/dot/oneOf.jst b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/oneOf.jst
index 59a435549c..b7f7bff079 100644
--- a/deps/npm/node_modules/ajv/lib/dot/oneOf.jst
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/oneOf.jst
@@ -38,7 +38,7 @@ var {{=$valid}} = false;
{{= $closingBraces }}
if (!{{=$valid}}) {
- {{# def.extraError:'oneOf' }}
+ {{# def.error:'oneOf' }}
} else {
{{# def.resetErrors }}
{{? it.opts.allErrors }} } {{?}}
diff --git a/deps/npm/node_modules/ajv/lib/dot/pattern.jst b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/pattern.jst
index 3a37ef6cb8..3a37ef6cb8 100644
--- a/deps/npm/node_modules/ajv/lib/dot/pattern.jst
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/pattern.jst
diff --git a/deps/npm/node_modules/ajv/lib/dot/properties.jst b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/properties.jst
index 8d56324b77..3a4b966ffe 100644
--- a/deps/npm/node_modules/ajv/lib/dot/properties.jst
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/properties.jst
@@ -23,10 +23,8 @@
{{
var $key = 'key' + $lvl
- , $idx = 'idx' + $lvl
, $dataNxt = $it.dataLevel = it.dataLevel + 1
- , $nextData = 'data' + $dataNxt
- , $dataProperties = 'dataProperties' + $lvl;
+ , $nextData = 'data' + $dataNxt;
var $schemaKeys = Object.keys($schema || {})
, $pProperties = it.schema.patternProperties || {}
@@ -45,7 +43,7 @@
if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired)
var $requiredHash = it.util.toHash($required);
- if (it.opts.patternGroups) {
+ if (it.opts.v5) {
var $pgProperties = it.schema.patternGroups || {}
, $pgPropertyKeys = Object.keys($pgProperties);
}
@@ -54,12 +52,10 @@
var {{=$errs}} = errors;
var {{=$nextValid}} = true;
-{{? $ownProperties }}
- var {{=$dataProperties}} = undefined;
-{{?}}
{{? $checkAdditional }}
- {{# def.iterateProperties }}
+ for (var {{=$key}} in {{=$data}}) {
+ {{# def.checkOwnProperty }}
{{? $someProperties }}
var isAdditional{{=$lvl}} = !(false
{{? $schemaKeys.length }}
@@ -76,7 +72,7 @@ var {{=$nextValid}} = true;
|| {{= it.usePattern($pProperty) }}.test({{=$key}})
{{~}}
{{?}}
- {{? it.opts.patternGroups && $pgPropertyKeys.length }}
+ {{? it.opts.v5 && $pgPropertyKeys && $pgPropertyKeys.length }}
{{~ $pgPropertyKeys:$pgProperty:$i }}
|| {{= it.usePattern($pgProperty) }}.test({{=$key}})
{{~}}
@@ -174,7 +170,7 @@ var {{=$nextValid}} = true;
{{= $code }}
{{??}}
{{? $requiredHash && $requiredHash[$propertyKey] }}
- if ({{# def.noPropertyInData }}) {
+ if ({{=$useData}} === undefined) {
{{=$nextValid}} = false;
{{
var $currentErrorPath = it.errorPath
@@ -191,15 +187,11 @@ var {{=$nextValid}} = true;
} else {
{{??}}
{{? $breakOnError }}
- if ({{# def.noPropertyInData }}) {
+ if ({{=$useData}} === undefined) {
{{=$nextValid}} = true;
} else {
{{??}}
- if ({{=$useData}} !== undefined
- {{? $ownProperties }}
- && {{# def.isOwnProperty }}
- {{?}}
- ) {
+ if ({{=$useData}} !== undefined) {
{{?}}
{{?}}
@@ -212,41 +204,40 @@ var {{=$nextValid}} = true;
{{~}}
{{?}}
-{{? $pPropertyKeys.length }}
- {{~ $pPropertyKeys:$pProperty }}
- {{ var $sch = $pProperties[$pProperty]; }}
+{{~ $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);
- }}
+ {{? {{# def.nonEmptySchema:$sch}} }}
+ {{
+ $it.schema = $sch;
+ $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);
+ $it.errSchemaPath = it.errSchemaPath + '/patternProperties/'
+ + it.util.escapeFragment($pProperty);
+ }}
- {{# def.iterateProperties }}
- if ({{= it.usePattern($pProperty) }}.test({{=$key}})) {
- {{
- $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
- var $passData = $data + '[' + $key + ']';
- $it.dataPathArr[$dataNxt] = $key;
- }}
+ for (var {{=$key}} in {{=$data}}) {
+ {{# def.checkOwnProperty }}
+ if ({{= it.usePattern($pProperty) }}.test({{=$key}})) {
+ {{
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ var $passData = $data + '[' + $key + ']';
+ $it.dataPathArr[$dataNxt] = $key;
+ }}
- {{# def.generateSubschemaCode }}
- {{# def.optimizeValidate }}
+ {{# def.generateSubschemaCode }}
+ {{# def.optimizeValidate }}
- {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}}
- }
- {{? $breakOnError }} else {{=$nextValid}} = true; {{?}}
+ {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}}
}
+ {{? $breakOnError }} else {{=$nextValid}} = true; {{?}}
+ }
- {{# def.ifResultValid }}
- {{?}} {{ /* def.nonEmptySchema */ }}
- {{~}}
-{{?}}
+ {{# def.ifResultValid }}
+ {{?}} {{ /* def.nonEmptySchema */ }}
+{{~}}
-{{? it.opts.patternGroups && $pgPropertyKeys.length }}
+{{? it.opts.v5 }}
{{~ $pgPropertyKeys:$pgProperty }}
{{
var $pgSchema = $pgProperties[$pgProperty]
@@ -264,7 +255,8 @@ var {{=$nextValid}} = true;
var pgPropCount{{=$lvl}} = 0;
- {{# def.iterateProperties }}
+ for (var {{=$key}} in {{=$data}}) {
+ {{# def.checkOwnProperty }}
if ({{= it.usePattern($pgProperty) }}.test({{=$key}})) {
pgPropCount{{=$lvl}}++;
diff --git a/deps/npm/node_modules/ajv/lib/dot/ref.jst b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/ref.jst
index 036bc29057..e8cdc4435a 100644
--- a/deps/npm/node_modules/ajv/lib/dot/ref.jst
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/ref.jst
@@ -25,16 +25,21 @@
{{??}}
{{ var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot); }}
{{? $refVal === undefined }}
- {{ var $message = it.MissingRefError.message(it.baseId, $schema); }}
+ {{ var $message = 'can\'t resolve reference ' + $schema + ' from id ' + it.baseId; }}
{{? it.opts.missingRefs == 'fail' }}
- {{ it.logger.error($message); }}
+ {{ console.log($message); }}
{{# def.error:'$ref' }}
{{? $breakOnError }} if (false) { {{?}}
{{?? it.opts.missingRefs == 'ignore' }}
- {{ it.logger.warn($message); }}
+ {{ console.log($message); }}
{{? $breakOnError }} if (true) { {{?}}
{{??}}
- {{ throw new it.MissingRefError(it.baseId, $schema, $message); }}
+ {{
+ 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 }}
@@ -63,16 +68,12 @@
{{? $async }}
{{ if (!it.async) throw new Error('async schema referenced by sync schema'); }}
- {{? $breakOnError }} var {{=$valid}}; {{?}}
- try {
- {{=it.yieldAwait}} {{=__callValidate}};
- {{? $breakOnError }} {{=$valid}} = true; {{?}}
- } catch (e) {
+ 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 }} {{=$valid}} = false; {{?}}
}
{{? $breakOnError }} if ({{=$valid}}) { {{?}}
{{??}}
diff --git a/deps/npm/node_modules/ajv/lib/dot/required.jst b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/required.jst
index 80fde35e8c..e109568f3e 100644
--- a/deps/npm/node_modules/ajv/lib/dot/required.jst
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/required.jst
@@ -22,11 +22,6 @@
#}}
-{{## def.isRequiredOwnProperty:
- Object.prototype.hasOwnProperty.call({{=$data}}, {{=$vSchema}}[{{=$i}}])
-#}}
-
-
{{? !$isData }}
{{? $schema.length < it.opts.loopRequired &&
it.schema.properties && Object.keys(it.schema.properties).length }}
@@ -46,8 +41,7 @@
{{? $isData || $required.length }}
{{
var $currentErrorPath = it.errorPath
- , $loopRequired = $isData || $required.length >= it.opts.loopRequired
- , $ownProperties = it.opts.ownProperties;
+ , $loopRequired = $isData || $required.length >= it.opts.loopRequired;
}}
{{? $breakOnError }}
@@ -59,10 +53,7 @@
{{?$isData}}{{# def.check$dataIsArray }}{{?}}
for (var {{=$i}} = 0; {{=$i}} < {{=$vSchema}}.length; {{=$i}}++) {
- {{=$valid}} = {{=$data}}[{{=$vSchema}}[{{=$i}}]] !== undefined
- {{? $ownProperties }}
- && {{# def.isRequiredOwnProperty }}
- {{?}};
+ {{=$valid}} = {{=$data}}[{{=$vSchema}}[{{=$i}}]] !== undefined;
if (!{{=$valid}}) break;
}
@@ -85,17 +76,14 @@
{{?}}
for (var {{=$i}} = 0; {{=$i}} < {{=$vSchema}}.length; {{=$i}}++) {
- if ({{=$data}}[{{=$vSchema}}[{{=$i}}]] === undefined
- {{? $ownProperties }}
- || !{{# def.isRequiredOwnProperty }}
- {{?}}) {
+ if ({{=$data}}[{{=$vSchema}}[{{=$i}}]] === undefined) {
{{# def.addError:'required' }}
}
}
{{? $isData }} } {{?}}
{{??}}
- {{~ $required:$propertyKey }}
+ {{~ $required:$reqProperty }}
{{# def.allErrorsMissingProperty:'required' }}
{{~}}
{{?}}
diff --git a/deps/npm/node_modules/ajv/lib/dot/uniqueItems.jst b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/uniqueItems.jst
index dfc42b03b2..dfc42b03b2 100644
--- a/deps/npm/node_modules/ajv/lib/dot/uniqueItems.jst
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/uniqueItems.jst
diff --git a/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/v5/_formatLimit.jst b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/v5/_formatLimit.jst
new file mode 100644
index 0000000000..af16b88d84
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/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/deps/npm/node_modules/ajv/lib/dot/const.jst b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/v5/constant.jst
index 2aa22980d7..67969c1b9f 100644
--- a/deps/npm/node_modules/ajv/lib/dot/const.jst
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/v5/constant.jst
@@ -7,5 +7,4 @@
var schema{{=$lvl}} = validate.schema{{=$schemaPath}};
{{?}}
var {{=$valid}} = equal({{=$data}}, schema{{=$lvl}});
-{{# def.checkError:'const' }}
-{{? $breakOnError }} else { {{?}}
+{{# def.checkError:'constant' }}
diff --git a/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/v5/patternRequired.jst b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/v5/patternRequired.jst
new file mode 100644
index 0000000000..9af2cdc9d0
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/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/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/v5/switch.jst b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/v5/switch.jst
new file mode 100644
index 0000000000..ff64b0e740
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/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}} = {{=$nextValid}};
+#}}
+
+{{## def.validateThen:
+ {{? typeof $sch.then == 'boolean' }}
+ {{? $sch.then === false }}
+ {{# def.error:'switch' }}
+ {{?}}
+ var {{=$nextValid}} = {{= $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}} = {{=$nextValid}};
+
+{{# def.cleanUp }}
diff --git a/deps/npm/node_modules/ajv/lib/dot/validate.jst b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/validate.jst
index 273e4c37e0..896e0860a4 100644
--- a/deps/npm/node_modules/ajv/lib/dot/validate.jst
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dot/validate.jst
@@ -14,93 +14,48 @@
* validateRef etc. are defined in the parent scope in index.js
*/ }}
-{{
- var $async = it.schema.$async === true
- , $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref')
- , $id = it.self._getId(it.schema);
-}}
-
-{{? it.isTop }}
- {{? $async }}
- {{
- it.async = true;
- var $es7 = it.opts.async == 'es7';
- it.yieldAwait = $es7 ? 'await' : 'yield';
- }}
- {{?}}
-
- var validate =
- {{? $async }}
- {{? $es7 }}
- (async function
- {{??}}
- {{? it.opts.async != '*'}}co.wrap{{?}}(function*
- {{?}}
- {{??}}
- (function
- {{?}}
- (data, dataPath, parentData, parentDataProperty, rootData) {
- 'use strict';
- {{? $id && (it.opts.sourceCode || it.opts.processCode) }}
- {{= '/\*# sourceURL=' + $id + ' */' }}
- {{?}}
-{{?}}
+{{ var $async = it.schema.$async === true; }}
-{{? typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref) }}
- {{ var $keyword = 'false schema'; }}
- {{# def.setupKeyword }}
- {{? it.schema === false}}
- {{? it.isTop}}
- {{ $breakOnError = true; }}
- {{??}}
- var {{=$valid}} = false;
- {{?}}
- {{# def.error:'false schema' }}
- {{??}}
- {{? it.isTop}}
- {{? $async }}
- return data;
- {{??}}
- validate.errors = null;
- return true;
- {{?}}
- {{??}}
- var {{=$valid}} = true;
- {{?}}
- {{?}}
-
- {{? it.isTop}}
- });
- return validate;
- {{?}}
-
- {{ return out; }}
-{{?}}
-
-
-{{? it.isTop }}
+{{? it.isTop}}
{{
var $top = it.isTop
, $lvl = it.level = 0
, $dataLvl = it.dataLevel = 0
, $data = 'data';
- it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema));
+ 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 vErrors = null; {{ /* don't edit, used in replace */ }}
- var errors = 0; {{ /* don't edit, used in replace */ }}
- if (rootData === undefined) rootData = data; {{ /* don't edit, used in replace */ }}
+ 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 ($id) it.baseId = it.resolve.url(it.baseId, $id);
+ 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');
}}
@@ -117,11 +72,6 @@
var $errorKeyword;
var $typeSchema = it.schema.type
, $typeIsArray = Array.isArray($typeSchema);
-
- if ($typeIsArray && $typeSchema.length == 1) {
- $typeSchema = $typeSchema[0];
- $typeIsArray = false;
- }
}}
{{## def.checkType:
@@ -134,40 +84,29 @@
if ({{= it.util[$method]($typeSchema, $data, true) }}) {
#}}
-{{? it.schema.$ref && $refKeywords }}
- {{? it.opts.extendRefs == 'fail' }}
- {{ throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); }}
- {{?? it.opts.extendRefs !== true }}
- {{
- $refKeywords = false;
- it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
- }}
+{{? $typeSchema && it.opts.coerceTypes }}
+ {{ var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); }}
+ {{? $coerceToTypes }}
+ {{# def.checkType }}
+ {{# def.coerceType }}
+ }
{{?}}
{{?}}
-{{? $typeSchema }}
- {{? it.opts.coerceTypes }}
- {{ var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); }}
- {{?}}
-
- {{ var $rulesGroup = it.RULES.types[$typeSchema]; }}
- {{? $coerceToTypes || $typeIsArray || $rulesGroup === true ||
- ($rulesGroup && !$shouldUseGroup($rulesGroup)) }}
+{{ 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' }}
{{
- var $schemaPath = it.schemaPath + '.type'
- , $errSchemaPath = it.errSchemaPath + '/type';
+ $refKeywords = false;
+ console.log('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
}}
- {{# def.checkType }}
- {{? $coerceToTypes }}
- {{# def.coerceType }}
- {{??}}
- {{# def.error:'type' }}
- {{?}}
- }
+ {{?? 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 }}
@@ -176,9 +115,6 @@
{{ $closingBraces2 += '}'; }}
{{?}}
{{??}}
- {{? it.opts.v5 && it.schema.patternGroups }}
- {{ it.logger.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.'); }}
- {{?}}
{{~ it.RULES:$rulesGroup }}
{{? $shouldUseGroup($rulesGroup) }}
{{? $rulesGroup.type }}
@@ -193,12 +129,9 @@
{{?}}
{{~ $rulesGroup.rules:$rule }}
{{? $shouldUseRule($rule) }}
- {{ var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); }}
- {{? $code }}
- {{= $code }}
- {{? $breakOnError }}
- {{ $closingBraces1 += '}'; }}
- {{?}}
+ {{= $rule.code(it, $rule.keyword) }}
+ {{? $breakOnError }}
+ {{ $closingBraces1 += '}'; }}
{{?}}
{{?}}
{{~}}
@@ -209,6 +142,7 @@
{{? $rulesGroup.type }}
}
{{? $typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes }}
+ {{ var $typeChecked = true; }}
else {
{{
var $schemaPath = it.schemaPath + '.type'
@@ -227,11 +161,17 @@
{{~}}
{{?}}
+{{? $typeSchema && !$typeChecked && !$coerceToTypes }}
+ {{# def.checkType }}
+ {{# def.error:'type' }}
+ }
+{{?}}
+
{{? $breakOnError }} {{= $closingBraces2 }} {{?}}
{{? $top }}
{{? $async }}
- if (errors === 0) return data; {{ /* don't edit, used in replace */ }}
+ 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 */ }}
@@ -246,27 +186,25 @@
{{# def.cleanUp }}
-{{? $top }}
- {{# def.finalCleanUp }}
+{{? $top && $breakOnError }}
+ {{# def.cleanUpVarErrors }}
{{?}}
{{
function $shouldUseGroup($rulesGroup) {
- var rules = $rulesGroup.rules;
- for (var i=0; i < rules.length; i++)
- if ($shouldUseRule(rules[i]))
+ 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.implements && $ruleImplementsSomeKeyword($rule));
- }
-
- function $ruleImplementsSomeKeyword($rule) {
- var impl = $rule.implements;
- for (var i=0; i < impl.length; i++)
- if (it.schema[impl[i]] !== undefined)
- return true;
+ ( $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/deps/npm/node_modules/ajv/lib/dotjs/README.md b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/README.md
index 4d994846c8..4d994846c8 100644
--- a/deps/npm/node_modules/ajv/lib/dotjs/README.md
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/README.md
diff --git a/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/_formatLimit.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/_formatLimit.js
new file mode 100644
index 0000000000..996e1f2c20
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/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 + it.util.getProperty($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/deps/npm/node_modules/ajv/lib/dotjs/_limit.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/_limit.js
index 10a187fb78..4d92024afc 100644
--- a/deps/npm/node_modules/ajv/lib/dotjs/_limit.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/_limit.js
@@ -1,5 +1,5 @@
'use strict';
-module.exports = function generate__limit(it, $keyword, $ruleType) {
+module.exports = function generate__limit(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -9,7 +9,7 @@ module.exports = function generate__limit(it, $keyword, $ruleType) {
var $breakOnError = !it.opts.allErrors;
var $errorKeyword;
var $data = 'data' + ($dataLvl || '');
- var $isData = it.opts.$data && $schema && $schema.$data,
+ var $isData = it.opts.v5 && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
@@ -20,20 +20,17 @@ module.exports = function generate__limit(it, $keyword, $ruleType) {
var $isMax = $keyword == 'maximum',
$exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum',
$schemaExcl = it.schema[$exclusiveKeyword],
- $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data,
+ $isDataExcl = it.opts.v5 && $schemaExcl && $schemaExcl.$data,
$op = $isMax ? '<' : '>',
- $notOp = $isMax ? '>' : '<',
- $errorKeyword = undefined;
+ $notOp = $isMax ? '>' : '<';
if ($isDataExcl) {
var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),
$exclusive = 'exclusive' + $lvl,
- $exclType = 'exclType' + $lvl,
- $exclIsNumber = 'exclIsNumber' + $lvl,
$opExpr = 'op' + $lvl,
$opStr = '\' + ' + $opExpr + ' + \'';
out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';
$schemaValueExcl = 'schemaExcl' + $lvl;
- out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { ';
+ out += ' var exclusive' + ($lvl) + '; if (typeof ' + ($schemaValueExcl) + ' != \'boolean\' && typeof ' + ($schemaValueExcl) + ' != \'undefined\') { ';
var $errorKeyword = $exclusiveKeyword;
var $$outStack = $$outStack || [];
$$outStack.push(out);
@@ -61,49 +58,27 @@ module.exports = function generate__limit(it, $keyword, $ruleType) {
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
- out += ' } else if ( ';
+ out += ' } else if( ';
if ($isData) {
out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
}
- out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';';
+ out += ' ((exclusive' + ($lvl) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ') || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = exclusive' + ($lvl) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';';
} else {
- var $exclIsNumber = typeof $schemaExcl == 'number',
+ var $exclusive = $schemaExcl === true,
$opStr = $op;
- if ($exclIsNumber && $isData) {
- var $opExpr = '\'' + $opStr + '\'';
- out += ' if ( ';
- if ($isData) {
- out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
- }
- out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { ';
- } else {
- if ($exclIsNumber && $schema === undefined) {
- $exclusive = true;
- $errorKeyword = $exclusiveKeyword;
- $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
- $schemaValue = $schemaExcl;
- $notOp += '=';
- } else {
- if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema);
- if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) {
- $exclusive = true;
- $errorKeyword = $exclusiveKeyword;
- $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
- $notOp += '=';
- } else {
- $exclusive = false;
- $opStr += '=';
- }
- }
- var $opExpr = '\'' + $opStr + '\'';
- out += ' if ( ';
- if ($isData) {
- out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
- }
- out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { ';
+ 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) + ') {';
}
- $errorKeyword = $errorKeyword || $keyword;
+ var $errorKeyword = $keyword;
var $$outStack = $$outStack || [];
$$outStack.push(out);
out = ''; /* istanbul ignore else */
@@ -114,7 +89,7 @@ module.exports = function generate__limit(it, $keyword, $ruleType) {
if ($isData) {
out += '\' + ' + ($schemaValue);
} else {
- out += '' + ($schemaValue) + '\'';
+ out += '' + ($schema) + '\'';
}
}
if (it.opts.verbose) {
diff --git a/deps/npm/node_modules/ajv/lib/dotjs/_limitItems.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/_limitItems.js
index 16e37f214e..6a843627bc 100644
--- a/deps/npm/node_modules/ajv/lib/dotjs/_limitItems.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/_limitItems.js
@@ -1,5 +1,5 @@
'use strict';
-module.exports = function generate__limitItems(it, $keyword, $ruleType) {
+module.exports = function generate__limitItems(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -9,7 +9,7 @@ module.exports = function generate__limitItems(it, $keyword, $ruleType) {
var $breakOnError = !it.opts.allErrors;
var $errorKeyword;
var $data = 'data' + ($dataLvl || '');
- var $isData = it.opts.$data && $schema && $schema.$data,
+ var $isData = it.opts.v5 && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
diff --git a/deps/npm/node_modules/ajv/lib/dotjs/_limitLength.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/_limitLength.js
index e6927f39c6..e378104df9 100644
--- a/deps/npm/node_modules/ajv/lib/dotjs/_limitLength.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/_limitLength.js
@@ -1,5 +1,5 @@
'use strict';
-module.exports = function generate__limitLength(it, $keyword, $ruleType) {
+module.exports = function generate__limitLength(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -9,7 +9,7 @@ module.exports = function generate__limitLength(it, $keyword, $ruleType) {
var $breakOnError = !it.opts.allErrors;
var $errorKeyword;
var $data = 'data' + ($dataLvl || '');
- var $isData = it.opts.$data && $schema && $schema.$data,
+ var $isData = it.opts.v5 && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
diff --git a/deps/npm/node_modules/ajv/lib/dotjs/_limitProperties.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/_limitProperties.js
index a48308f8ac..74c0851842 100644
--- a/deps/npm/node_modules/ajv/lib/dotjs/_limitProperties.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/_limitProperties.js
@@ -1,5 +1,5 @@
'use strict';
-module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
+module.exports = function generate__limitProperties(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -9,7 +9,7 @@ module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
var $breakOnError = !it.opts.allErrors;
var $errorKeyword;
var $data = 'data' + ($dataLvl || '');
- var $isData = it.opts.$data && $schema && $schema.$data,
+ var $isData = it.opts.v5 && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
diff --git a/deps/npm/node_modules/ajv/lib/dotjs/allOf.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/allOf.js
index 5107b18cfc..0063ecf1a7 100644
--- a/deps/npm/node_modules/ajv/lib/dotjs/allOf.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/allOf.js
@@ -1,5 +1,5 @@
'use strict';
-module.exports = function generate_allOf(it, $keyword, $ruleType) {
+module.exports = function generate_allOf(it, $keyword) {
var out = ' ';
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
diff --git a/deps/npm/node_modules/ajv/lib/dotjs/anyOf.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/anyOf.js
index 994b091230..c95f8ff9ab 100644
--- a/deps/npm/node_modules/ajv/lib/dotjs/anyOf.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/anyOf.js
@@ -1,5 +1,5 @@
'use strict';
-module.exports = function generate_anyOf(it, $keyword, $ruleType) {
+module.exports = function generate_anyOf(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -38,7 +38,7 @@ module.exports = function generate_anyOf(it, $keyword, $ruleType) {
}
}
it.compositeRule = $it.compositeRule = $wasComposite;
- out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
+ out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
if (it.opts.messages !== false) {
@@ -51,15 +51,7 @@ module.exports = function generate_anyOf(it, $keyword, $ruleType) {
} 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; ';
- }
- }
- out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ 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 += ' } ';
}
diff --git a/deps/npm/node_modules/ajv/lib/dotjs/const.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/constant.js
index d19756e145..2a3e147ff4 100644
--- a/deps/npm/node_modules/ajv/lib/dotjs/const.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/constant.js
@@ -1,5 +1,5 @@
'use strict';
-module.exports = function generate_const(it, $keyword, $ruleType) {
+module.exports = function generate_constant(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -9,7 +9,7 @@ module.exports = function generate_const(it, $keyword, $ruleType) {
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
- var $isData = it.opts.$data && $schema && $schema.$data,
+ var $isData = it.opts.v5 && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
@@ -25,7 +25,7 @@ module.exports = function generate_const(it, $keyword, $ruleType) {
$$outStack.push(out);
out = ''; /* istanbul ignore else */
if (it.createErrors !== false) {
- out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ out += ' { keyword: \'' + ('constant') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
if (it.opts.messages !== false) {
out += ' , message: \'should be equal to constant\' ';
}
@@ -48,8 +48,5 @@ module.exports = function generate_const(it, $keyword, $ruleType) {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += ' }';
- if ($breakOnError) {
- out += ' else { ';
- }
return out;
}
diff --git a/deps/npm/node_modules/ajv/lib/dotjs/custom.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/custom.js
index bff06d111c..cbd481ccf5 100644
--- a/deps/npm/node_modules/ajv/lib/dotjs/custom.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/custom.js
@@ -1,5 +1,5 @@
'use strict';
-module.exports = function generate_custom(it, $keyword, $ruleType) {
+module.exports = function generate_custom(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -11,7 +11,7 @@ module.exports = function generate_custom(it, $keyword, $ruleType) {
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
var $errs = 'errs__' + $lvl;
- var $isData = it.opts.$data && $schema && $schema.$data,
+ var $isData = it.opts.v5 && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
@@ -21,8 +21,7 @@ module.exports = function generate_custom(it, $keyword, $ruleType) {
}
var $rule = this,
$definition = 'definition' + $lvl,
- $rDef = $rule.definition,
- $closingBraces = '';
+ $rDef = $rule.definition;
var $compile, $inline, $macro, $ruleValidate, $validateCode;
if ($isData && $rDef.$data) {
$validateCode = 'keywordValidate' + $lvl;
@@ -30,7 +29,6 @@ module.exports = function generate_custom(it, $keyword, $ruleType) {
out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;';
} else {
$ruleValidate = it.useCustomRule($rule, $schema, it.schema, it);
- if (!$ruleValidate) return;
$schemaValue = 'validate.schema' + $schemaPath;
$validateCode = $ruleValidate.code;
$compile = $rDef.compile;
@@ -46,13 +44,8 @@ module.exports = function generate_custom(it, $keyword, $ruleType) {
out += '' + ($ruleErrs) + ' = null;';
}
out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
- if ($isData && $rDef.$data) {
- $closingBraces += '}';
- out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { ';
- if ($validateSchema) {
- $closingBraces += '}';
- out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { ';
- }
+ if ($validateSchema) {
+ out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') {';
}
if ($inline) {
if ($rDef.statements) {
@@ -62,7 +55,6 @@ module.exports = function generate_custom(it, $keyword, $ruleType) {
}
} else if ($macro) {
var $it = it.util.copy(it);
- var $closingBraces = '';
$it.level++;
var $nextValid = 'valid' + $it.level;
$it.schema = $ruleValidate.validate;
@@ -112,9 +104,11 @@ module.exports = function generate_custom(it, $keyword, $ruleType) {
}
}
if ($rDef.modifying) {
- out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];';
+ out += ' ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];';
+ }
+ if ($validateSchema) {
+ out += ' }';
}
- out += '' + ($closingBraces);
if ($rDef.valid) {
if ($breakOnError) {
out += ' if (true) { ';
diff --git a/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/dependencies.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/dependencies.js
new file mode 100644
index 0000000000..9ba4c5437b
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/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 + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $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: \'' + ('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: \'' + ('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 += ' ' + ($nextValid) + ' = true; if (' + ($data) + (it.util.getProperty($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 (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ out = it.util.cleanUpCode(out);
+ return out;
+}
diff --git a/deps/npm/node_modules/ajv/lib/dotjs/enum.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/enum.js
index 03f3a8caae..ccbf0d8315 100644
--- a/deps/npm/node_modules/ajv/lib/dotjs/enum.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/enum.js
@@ -1,5 +1,5 @@
'use strict';
-module.exports = function generate_enum(it, $keyword, $ruleType) {
+module.exports = function generate_enum(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -9,7 +9,7 @@ module.exports = function generate_enum(it, $keyword, $ruleType) {
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
- var $isData = it.opts.$data && $schema && $schema.$data,
+ var $isData = it.opts.v5 && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
diff --git a/deps/npm/node_modules/ajv/lib/dotjs/format.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/format.js
index 68697f0deb..09872c2c46 100644
--- a/deps/npm/node_modules/ajv/lib/dotjs/format.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/format.js
@@ -1,5 +1,5 @@
'use strict';
-module.exports = function generate_format(it, $keyword, $ruleType) {
+module.exports = function generate_format(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -14,7 +14,7 @@ module.exports = function generate_format(it, $keyword, $ruleType) {
}
return out;
}
- var $isData = it.opts.$data && $schema && $schema.$data,
+ var $isData = it.opts.v5 && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
@@ -25,10 +25,8 @@ module.exports = function generate_format(it, $keyword, $ruleType) {
var $unknownFormats = it.opts.unknownFormats,
$allowUnknown = Array.isArray($unknownFormats);
if ($isData) {
- var $format = 'format' + $lvl,
- $isObject = 'isObject' + $lvl,
- $formatType = 'formatType' + $lvl;
- out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { ';
+ var $format = 'format' + $lvl;
+ out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var isObject' + ($lvl) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; if (isObject' + ($lvl) + ') { ';
if (it.async) {
out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; ';
}
@@ -37,14 +35,14 @@ module.exports = function generate_format(it, $keyword, $ruleType) {
out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
}
out += ' (';
- if ($unknownFormats != 'ignore') {
+ if ($unknownFormats === true || $allowUnknown) {
out += ' (' + ($schemaValue) + ' && !' + ($format) + ' ';
if ($allowUnknown) {
out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 ';
}
out += ') || ';
}
- out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? ';
+ out += ' (' + ($format) + ' && !(typeof ' + ($format) + ' == \'function\' ? ';
if (it.async) {
out += ' (async' + ($lvl) + ' ? ' + (it.yieldAwait) + ' ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) ';
} else {
@@ -54,33 +52,24 @@ module.exports = function generate_format(it, $keyword, $ruleType) {
} else {
var $format = it.formats[$schema];
if (!$format) {
- if ($unknownFormats == 'ignore') {
- it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"');
- if ($breakOnError) {
- out += ' if (true) { ';
+ if ($unknownFormats === true || ($allowUnknown && $unknownFormats.indexOf($schema) == -1)) {
+ throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"');
+ } else {
+ if (!$allowUnknown) {
+ console.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"');
+ if ($unknownFormats !== 'ignore') console.warn('In the next major version it will throw exception. See option unknownFormats for more information');
}
- return out;
- } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) {
if ($breakOnError) {
out += ' if (true) { ';
}
return out;
- } else {
- throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"');
}
}
var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate;
- var $formatType = $isObject && $format.type || 'string';
if ($isObject) {
var $async = $format.async === true;
$format = $format.validate;
}
- if ($formatType != $ruleType) {
- if ($breakOnError) {
- out += ' if (true) { ';
- }
- return out;
- }
if ($async) {
if (!it.async) throw new Error('async format in sync schema');
var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';
diff --git a/deps/npm/node_modules/ajv/lib/dotjs/items.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/items.js
index 77be5e214a..b7431b72d9 100644
--- a/deps/npm/node_modules/ajv/lib/dotjs/items.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/items.js
@@ -1,5 +1,5 @@
'use strict';
-module.exports = function generate_items(it, $keyword, $ruleType) {
+module.exports = function generate_items(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -130,7 +130,11 @@ module.exports = function generate_items(it, $keyword, $ruleType) {
if ($breakOnError) {
out += ' if (!' + ($nextValid) + ') break; ';
}
- out += ' }';
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
}
if ($breakOnError) {
out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
diff --git a/deps/npm/node_modules/ajv/lib/dotjs/multipleOf.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/multipleOf.js
index df5a315444..d0e43daa3b 100644
--- a/deps/npm/node_modules/ajv/lib/dotjs/multipleOf.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/multipleOf.js
@@ -1,5 +1,5 @@
'use strict';
-module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
+module.exports = function generate_multipleOf(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -8,7 +8,7 @@ module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
- var $isData = it.opts.$data && $schema && $schema.$data,
+ var $isData = it.opts.v5 && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
@@ -41,7 +41,7 @@ module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
if ($isData) {
out += '\' + ' + ($schemaValue);
} else {
- out += '' + ($schemaValue) + '\'';
+ out += '' + ($schema) + '\'';
}
}
if (it.opts.verbose) {
diff --git a/deps/npm/node_modules/ajv/lib/dotjs/not.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/not.js
index 67add9f672..2cb2a47653 100644
--- a/deps/npm/node_modules/ajv/lib/dotjs/not.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/not.js
@@ -1,5 +1,5 @@
'use strict';
-module.exports = function generate_not(it, $keyword, $ruleType) {
+module.exports = function generate_not(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
diff --git a/deps/npm/node_modules/ajv/lib/dotjs/oneOf.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/oneOf.js
index b4cd46065b..39f60e6205 100644
--- a/deps/npm/node_modules/ajv/lib/dotjs/oneOf.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/oneOf.js
@@ -1,5 +1,5 @@
'use strict';
-module.exports = function generate_oneOf(it, $keyword, $ruleType) {
+module.exports = function generate_oneOf(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -41,7 +41,10 @@ module.exports = function generate_oneOf(it, $keyword, $ruleType) {
}
}
it.compositeRule = $it.compositeRule = $wasComposite;
- out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
+ out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
if (it.opts.messages !== false) {
@@ -54,13 +57,16 @@ module.exports = function generate_oneOf(it, $keyword, $ruleType) {
} else {
out += ' {} ';
}
- out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ var __err = out;
+ out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
if (it.async) {
- out += ' throw new ValidationError(vErrors); ';
+ out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
- out += ' validate.errors = vErrors; return false; ';
+ 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) {
diff --git a/deps/npm/node_modules/ajv/lib/dotjs/pattern.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/pattern.js
index 76b7794e0e..5518152a8c 100644
--- a/deps/npm/node_modules/ajv/lib/dotjs/pattern.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/pattern.js
@@ -1,5 +1,5 @@
'use strict';
-module.exports = function generate_pattern(it, $keyword, $ruleType) {
+module.exports = function generate_pattern(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -8,7 +8,7 @@ module.exports = function generate_pattern(it, $keyword, $ruleType) {
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
- var $isData = it.opts.$data && $schema && $schema.$data,
+ var $isData = it.opts.v5 && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
diff --git a/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/patternRequired.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/patternRequired.js
new file mode 100644
index 0000000000..07bf31d297
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/patternRequired.js
@@ -0,0 +1,51 @@
+'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 + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ 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: \'' + ('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/deps/npm/node_modules/ajv/lib/dotjs/properties.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/properties.js
index 3c6cecf63f..32eafce6af 100644
--- a/deps/npm/node_modules/ajv/lib/dotjs/properties.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/properties.js
@@ -1,5 +1,5 @@
'use strict';
-module.exports = function generate_properties(it, $keyword, $ruleType) {
+module.exports = function generate_properties(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -15,10 +15,8 @@ module.exports = function generate_properties(it, $keyword, $ruleType) {
$it.level++;
var $nextValid = 'valid' + $it.level;
var $key = 'key' + $lvl,
- $idx = 'idx' + $lvl,
$dataNxt = $it.dataLevel = it.dataLevel + 1,
- $nextData = 'data' + $dataNxt,
- $dataProperties = 'dataProperties' + $lvl;
+ $nextData = 'data' + $dataNxt;
var $schemaKeys = Object.keys($schema || {}),
$pProperties = it.schema.patternProperties || {},
$pPropertyKeys = Object.keys($pProperties),
@@ -32,19 +30,15 @@ module.exports = function generate_properties(it, $keyword, $ruleType) {
$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.patternGroups) {
+ if (it.opts.v5) {
var $pgProperties = it.schema.patternGroups || {},
$pgPropertyKeys = Object.keys($pgProperties);
}
out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;';
- if ($ownProperties) {
- out += ' var ' + ($dataProperties) + ' = undefined;';
- }
if ($checkAdditional) {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
if ($ownProperties) {
- out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
- } else {
- out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; ';
}
if ($someProperties) {
out += ' var isAdditional' + ($lvl) + ' = !(false ';
@@ -74,7 +68,7 @@ module.exports = function generate_properties(it, $keyword, $ruleType) {
}
}
}
- if (it.opts.patternGroups && $pgPropertyKeys.length) {
+ if (it.opts.v5 && $pgPropertyKeys && $pgPropertyKeys.length) {
var arr3 = $pgPropertyKeys;
if (arr3) {
var $pgProperty, $i = -1,
@@ -214,11 +208,7 @@ module.exports = function generate_properties(it, $keyword, $ruleType) {
out += ' ' + ($code) + ' ';
} else {
if ($requiredHash && $requiredHash[$propertyKey]) {
- out += ' if ( ' + ($useData) + ' === undefined ';
- if ($ownProperties) {
- out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
- }
- out += ') { ' + ($nextValid) + ' = false; ';
+ out += ' if (' + ($useData) + ' === undefined) { ' + ($nextValid) + ' = false; ';
var $currentErrorPath = it.errorPath,
$currErrSchemaPath = $errSchemaPath,
$missingProperty = it.util.escapeQuotes($propertyKey);
@@ -263,17 +253,9 @@ module.exports = function generate_properties(it, $keyword, $ruleType) {
out += ' } else { ';
} else {
if ($breakOnError) {
- out += ' if ( ' + ($useData) + ' === undefined ';
- if ($ownProperties) {
- out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
- }
- out += ') { ' + ($nextValid) + ' = true; } else { ';
+ out += ' if (' + ($useData) + ' === undefined) { ' + ($nextValid) + ' = true; } else { ';
} else {
- out += ' if (' + ($useData) + ' !== undefined ';
- if ($ownProperties) {
- out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
- }
- out += ' ) { ';
+ out += ' if (' + ($useData) + ' !== undefined) { ';
}
}
out += ' ' + ($code) + ' } ';
@@ -286,51 +268,48 @@ module.exports = function generate_properties(it, $keyword, $ruleType) {
}
}
}
- if ($pPropertyKeys.length) {
- 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);
- if ($ownProperties) {
- out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
- } else {
- out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
- }
- out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { ';
- $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
- var $passData = $data + '[' + $key + ']';
- $it.dataPathArr[$dataNxt] = $key;
- 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 (!' + ($nextValid) + ') break; ';
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' else ' + ($nextValid) + ' = true; ';
- }
- out += ' } ';
- if ($breakOnError) {
- out += ' if (' + ($nextValid) + ') { ';
- $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, it.opts.jsonPointers);
+ var $passData = $data + '[' + $key + ']';
+ $it.dataPathArr[$dataNxt] = $key;
+ 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 (!' + ($nextValid) + ') break; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else ' + ($nextValid) + ' = true; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
}
}
}
}
- if (it.opts.patternGroups && $pgPropertyKeys.length) {
+ if (it.opts.v5) {
var arr6 = $pgPropertyKeys;
if (arr6) {
var $pgProperty, i6 = -1,
@@ -343,11 +322,9 @@ module.exports = function generate_properties(it, $keyword, $ruleType) {
$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; ';
+ out += ' var pgPropCount' + ($lvl) + ' = 0; for (var ' + ($key) + ' in ' + ($data) + ') { ';
if ($ownProperties) {
- out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
- } else {
- out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ 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, it.opts.jsonPointers);
diff --git a/deps/npm/node_modules/ajv/lib/dotjs/ref.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/ref.js
index a9d7bb909b..e07c70c3b3 100644
--- a/deps/npm/node_modules/ajv/lib/dotjs/ref.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/ref.js
@@ -1,5 +1,5 @@
'use strict';
-module.exports = function generate_ref(it, $keyword, $ruleType) {
+module.exports = function generate_ref(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -20,9 +20,9 @@ module.exports = function generate_ref(it, $keyword, $ruleType) {
} else {
var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot);
if ($refVal === undefined) {
- var $message = it.MissingRefError.message(it.baseId, $schema);
+ var $message = 'can\'t resolve reference ' + $schema + ' from id ' + it.baseId;
if (it.opts.missingRefs == 'fail') {
- it.logger.error($message);
+ console.log($message);
var $$outStack = $$outStack || [];
$$outStack.push(out);
out = ''; /* istanbul ignore else */
@@ -53,12 +53,15 @@ module.exports = function generate_ref(it, $keyword, $ruleType) {
out += ' if (false) { ';
}
} else if (it.opts.missingRefs == 'ignore') {
- it.logger.warn($message);
+ console.log($message);
if ($breakOnError) {
out += ' if (true) { ';
}
} else {
- throw new it.MissingRefError(it.baseId, $schema, $message);
+ 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);
@@ -97,18 +100,11 @@ module.exports = function generate_ref(it, $keyword, $ruleType) {
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 += 'var ' + ($valid) + ' =';
}
- out += ' try { ' + (it.yieldAwait) + ' ' + (__callValidate) + '; ';
- if ($breakOnError) {
- out += ' ' + ($valid) + ' = true; ';
- }
- out += ' } 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 += ' ' + ($valid) + ' = false; ';
- }
- out += ' } ';
+ 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) + ') { ';
}
diff --git a/deps/npm/node_modules/ajv/lib/dotjs/required.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/required.js
index 15b36bb7a7..eb32aeae53 100644
--- a/deps/npm/node_modules/ajv/lib/dotjs/required.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/required.js
@@ -1,5 +1,5 @@
'use strict';
-module.exports = function generate_required(it, $keyword, $ruleType) {
+module.exports = function generate_required(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -9,7 +9,7 @@ module.exports = function generate_required(it, $keyword, $ruleType) {
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
- var $isData = it.opts.$data && $schema && $schema.$data,
+ var $isData = it.opts.v5 && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
@@ -39,8 +39,7 @@ module.exports = function generate_required(it, $keyword, $ruleType) {
}
if ($isData || $required.length) {
var $currentErrorPath = it.errorPath,
- $loopRequired = $isData || $required.length >= it.opts.loopRequired,
- $ownProperties = it.opts.ownProperties;
+ $loopRequired = $isData || $required.length >= it.opts.loopRequired;
if ($breakOnError) {
out += ' var missing' + ($lvl) + '; ';
if ($loopRequired) {
@@ -57,11 +56,7 @@ module.exports = function generate_required(it, $keyword, $ruleType) {
if ($isData) {
out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';
}
- out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined ';
- if ($ownProperties) {
- out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) ';
- }
- out += '; if (!' + ($valid) + ') break; } ';
+ out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined; if (!' + ($valid) + ') break; } ';
if ($isData) {
out += ' } ';
}
@@ -103,20 +98,15 @@ module.exports = function generate_required(it, $keyword, $ruleType) {
out += ' if ( ';
var arr2 = $required;
if (arr2) {
- var $propertyKey, $i = -1,
+ var _$property, $i = -1,
l2 = arr2.length - 1;
while ($i < l2) {
- $propertyKey = arr2[$i += 1];
+ _$property = arr2[$i += 1];
if ($i) {
out += ' || ';
}
- var $prop = it.util.getProperty($propertyKey),
- $useData = $data + $prop;
- out += ' ( ( ' + ($useData) + ' === undefined ';
- if ($ownProperties) {
- out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
- }
- out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) ';
+ var $prop = it.util.getProperty(_$property);
+ out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop)) + ') ) ';
}
}
out += ') { ';
@@ -192,11 +182,7 @@ module.exports = function generate_required(it, $keyword, $ruleType) {
}
out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { ';
}
- out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined ';
- if ($ownProperties) {
- out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) ';
- }
- out += ') { var err = '; /* istanbul ignore else */
+ out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined) { var err = '; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
if (it.opts.messages !== false) {
@@ -222,21 +208,16 @@ module.exports = function generate_required(it, $keyword, $ruleType) {
} else {
var arr3 = $required;
if (arr3) {
- var $propertyKey, i3 = -1,
+ var $reqProperty, i3 = -1,
l3 = arr3.length - 1;
while (i3 < l3) {
- $propertyKey = arr3[i3 += 1];
- var $prop = it.util.getProperty($propertyKey),
- $missingProperty = it.util.escapeQuotes($propertyKey),
- $useData = $data + $prop;
+ $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, $propertyKey, it.opts.jsonPointers);
- }
- out += ' if ( ' + ($useData) + ' === undefined ';
- if ($ownProperties) {
- out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ it.errorPath = it.util.getPath($currentErrorPath, $reqProperty, it.opts.jsonPointers);
}
- out += ') { var err = '; /* istanbul ignore else */
+ out += ' if (' + ($data) + ($prop) + ' === undefined) { var err = '; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
if (it.opts.messages !== false) {
diff --git a/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/switch.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/switch.js
new file mode 100644
index 0000000000..18f17e487b
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/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 + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $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) + ' = ' + ($nextValid) + '; 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: \'' + ('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 ' + ($nextValid) + ' = ' + ($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: \'' + ('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 ' + ($nextValid) + ' = ' + ($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) + ' = ' + ($nextValid) + '; ';
+ out = it.util.cleanUpCode(out);
+ return out;
+}
diff --git a/deps/npm/node_modules/ajv/lib/dotjs/uniqueItems.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/uniqueItems.js
index d9b3185fce..2f27b0eeab 100644
--- a/deps/npm/node_modules/ajv/lib/dotjs/uniqueItems.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/uniqueItems.js
@@ -1,5 +1,5 @@
'use strict';
-module.exports = function generate_uniqueItems(it, $keyword, $ruleType) {
+module.exports = function generate_uniqueItems(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
@@ -9,7 +9,7 @@ module.exports = function generate_uniqueItems(it, $keyword, $ruleType) {
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
- var $isData = it.opts.$data && $schema && $schema.$data,
+ var $isData = it.opts.v5 && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
diff --git a/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/validate.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/validate.js
new file mode 100644
index 0000000000..0c4112e1d4
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/dotjs/validate.js
@@ -0,0 +1,375 @@
+'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 = '';
+ 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: \'' + ('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 { ';
+ var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
+ $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
+ out += ' ' + ($data) + ' = ' + ($coerced) + '; ';
+ if (!$dataLvl) {
+ out += 'if (' + ($parentData) + ' !== undefined)';
+ }
+ out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } } ';
+ }
+ }
+ 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 && !$coerceToTypes) {
+ 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: \'' + ('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 && !$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: \'' + ('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/deps/npm/node_modules/ajv/lib/keyword.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/keyword.js
index 5fcfb75fca..1c9cccfe63 100644
--- a/deps/npm/node_modules/ajv/lib/keyword.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/keyword.js
@@ -1,6 +1,6 @@
'use strict';
-var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;
+var IDENTIFIER = /^[a-z_$][a-z0-9_$\-]*$/i;
var customRuleCode = require('./dotjs/custom');
module.exports = {
@@ -14,7 +14,6 @@ module.exports = {
* @this Ajv
* @param {String} keyword custom keyword, should be unique (including 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`.
- * @return {Ajv} this for method chaining
*/
function addKeyword(keyword, definition) {
/* jshint validthis: true */
@@ -41,7 +40,7 @@ function addKeyword(keyword, definition) {
_addRule(keyword, dataType, definition);
}
- var $data = definition.$data === true && this._opts.$data;
+ var $data = definition.$data === true && this._opts.v5;
if ($data && !definition.validate)
throw new Error('$data support: "validate" function is not defined');
@@ -51,7 +50,7 @@ function addKeyword(keyword, definition) {
metaSchema = {
anyOf: [
metaSchema,
- { '$ref': 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#' }
+ { '$ref': 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#/definitions/$data' }
]
};
}
@@ -81,8 +80,7 @@ function addKeyword(keyword, definition) {
keyword: keyword,
definition: definition,
custom: true,
- code: customRuleCode,
- implements: definition.implements
+ code: customRuleCode
};
ruleGroup.rules.push(rule);
RULES.custom[keyword] = rule;
@@ -92,8 +90,6 @@ function addKeyword(keyword, definition) {
function checkDataType(dataType) {
if (!RULES.types[dataType]) throw new Error('Unknown type ' + dataType);
}
-
- return this;
}
@@ -114,7 +110,6 @@ function getKeyword(keyword) {
* Remove keyword
* @this Ajv
* @param {String} keyword pre-defined or custom keyword.
- * @return {Ajv} this for method chaining
*/
function removeKeyword(keyword) {
/* jshint validthis: true */
@@ -131,5 +126,4 @@ function removeKeyword(keyword) {
}
}
}
- return this;
}
diff --git a/deps/npm/node_modules/ajv/lib/refs/json-schema-draft-04.json b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/refs/json-schema-draft-04.json
index 85eb502a68..85eb502a68 100644
--- a/deps/npm/node_modules/ajv/lib/refs/json-schema-draft-04.json
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/refs/json-schema-draft-04.json
diff --git a/deps/npm/node_modules/ajv/lib/refs/json-schema-v5.json b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/refs/json-schema-v5.json
index 21aee97ed2..9895c97845 100644
--- a/deps/npm/node_modules/ajv/lib/refs/json-schema-v5.json
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/refs/json-schema-v5.json
@@ -1,7 +1,7 @@
{
"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 - deprecated)",
+ "description": "Core schema meta-schema (v5 proposals)",
"definitions": {
"schemaArray": {
"type": "array",
@@ -234,17 +234,95 @@
{ "$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": "#" }
+ "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" ]
+ "exclusiveMinimum": [ "minimum" ],
+ "formatMaximum": [ "format" ],
+ "formatMinimum": [ "format" ],
+ "formatExclusiveMaximum": [ "formatMaximum" ],
+ "formatExclusiveMinimum": [ "formatMinimum" ]
},
"default": {}
}
diff --git a/deps/npm/node_modules/har-validator/node_modules/ajv/lib/v5.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/v5.js
new file mode 100644
index 0000000000..8f6e53f0f1
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/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/deps/npm/node_modules/ajv/package.json b/deps/npm/node_modules/har-validator/node_modules/ajv/package.json
index 813e377f81..d22ae25c8c 100644
--- a/deps/npm/node_modules/ajv/package.json
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/package.json
@@ -1,29 +1,27 @@
{
- "_from": "ajv@^5.1.0",
- "_id": "ajv@5.5.2",
+ "_from": "ajv@^4.9.1",
+ "_id": "ajv@4.11.8",
"_inBundle": false,
- "_integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
- "_location": "/ajv",
+ "_integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=",
+ "_location": "/har-validator/ajv",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "ajv@^5.1.0",
+ "raw": "ajv@^4.9.1",
"name": "ajv",
"escapedName": "ajv",
- "rawSpec": "^5.1.0",
+ "rawSpec": "^4.9.1",
"saveSpec": null,
- "fetchSpec": "^5.1.0"
+ "fetchSpec": "^4.9.1"
},
"_requiredBy": [
- "/eslint",
- "/har-validator",
- "/table"
+ "/har-validator"
],
- "_resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
- "_shasum": "73b5eeca3fab653e3d3f9422b341ad42205dc965",
- "_spec": "ajv@^5.1.0",
- "_where": "/Users/rebecca/code/npm/node_modules/har-validator",
+ "_resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz",
+ "_shasum": "82ffb02b29e662ae53bdc20af15947706739c536",
+ "_spec": "ajv@^4.9.1",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/har-validator",
"author": {
"name": "Evgeny Poberezkin"
},
@@ -33,42 +31,39 @@
"bundleDependencies": false,
"dependencies": {
"co": "^4.6.0",
- "fast-deep-equal": "^1.0.0",
- "fast-json-stable-stringify": "^2.0.0",
- "json-schema-traverse": "^0.3.0"
+ "json-stable-stringify": "^1.0.1"
},
"deprecated": false,
"description": "Another JSON Schema Validator",
"devDependencies": {
- "ajv-async": "^0.1.0",
"bluebird": "^3.1.5",
"brfs": "^1.4.3",
"browserify": "^14.1.0",
- "chai": "^4.0.1",
- "coveralls": "^3.0.0",
- "del-cli": "^1.1.0",
+ "chai": "^3.5.0",
+ "coveralls": "^2.11.4",
+ "del-cli": "^0.2.1",
"dot": "^1.0.3",
- "eslint": "^4.1.0",
+ "eslint": "^3.2.2",
"gh-pages-generator": "^0.2.0",
"glob": "^7.0.0",
"if-node-version": "^1.0.0",
- "js-beautify": "^1.7.3",
- "jshint": "^2.9.4",
- "json-schema-test": "^2.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": "^1.1.0",
- "mocha": "^4.0.0",
+ "mocha": "^3.0.0",
"nodent": "^3.0.17",
- "nyc": "^11.0.2",
+ "nyc": "^10.0.0",
"phantomjs-prebuilt": "^2.1.4",
"pre-commit": "^1.1.1",
- "regenerator": "^0.12.2",
+ "regenerator": "0.9.7",
"require-globify": "^1.3.0",
- "typescript": "^2.6.2",
- "uglify-js": "^3.1.5",
+ "typescript": "^2.0.3",
+ "uglify-js": "^2.6.1",
"watch": "^1.0.0"
},
"files": [
@@ -102,6 +97,9 @@
"text-summary"
]
},
+ "publishConfig": {
+ "tag": "4.x"
+ },
"repository": {
"type": "git",
"url": "git+https://github.com/epoberezkin/ajv.git"
@@ -113,7 +111,7 @@
"bundle-beautify": "node ./scripts/bundle.js js-beautify",
"bundle-nodent": "node ./scripts/bundle.js nodent",
"bundle-regenerator": "node ./scripts/bundle.js regenerator",
- "eslint": "if-node-version \">=4\" eslint lib/*.js lib/compile/*.js spec/*.js scripts",
+ "eslint": "if-node-version \">=4\" eslint lib/*.js lib/compile/*.js spec scripts",
"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 && if-node-version 4 npm run test-browser",
@@ -122,11 +120,12 @@
"test-debug": "mocha spec/*.spec.js --debug-brk -R spec",
"test-fast": "AJV_FAST_TEST=true npm run test-spec",
"test-karma": "karma start --single-run --browsers PhantomJS",
- "test-spec": "mocha spec/*.spec.js -R spec $(if-node-version 7 echo --harmony-async-await)",
+ "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": "5.5.2"
+ "version": "4.11.8",
+ "webpack": "dist/ajv.bundle.js"
}
diff --git a/deps/npm/node_modules/ajv/scripts/.eslintrc.yml b/deps/npm/node_modules/har-validator/node_modules/ajv/scripts/.eslintrc.yml
index 493d7d312d..493d7d312d 100644
--- a/deps/npm/node_modules/ajv/scripts/.eslintrc.yml
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/scripts/.eslintrc.yml
diff --git a/deps/npm/node_modules/ajv/scripts/bundle.js b/deps/npm/node_modules/har-validator/node_modules/ajv/scripts/bundle.js
index e381a762d2..b3a9890c59 100644
--- a/deps/npm/node_modules/ajv/scripts/bundle.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/scripts/bundle.js
@@ -29,6 +29,8 @@ browserify(bOpts)
}
var outputFile = path.join(distDir, json.name);
+ var outputBundle = outputFile + '.bundle.js';
+ fs.writeFileSync(outputBundle, buf);
var uglifyOpts = {
warnings: true,
compress: {},
@@ -38,24 +40,15 @@ browserify(bOpts)
};
if (compress) {
var compressOpts = compress.split(',');
- for (var i=0, il = compressOpts.length; i<il; ++i) {
+ for (var i=0; i<compressOpts.length; ++i) {
var pair = compressOpts[i].split('=');
uglifyOpts.compress[pair[0]] = pair.length < 1 || pair[1] != 'false';
}
}
- if (standalone) {
- uglifyOpts.sourceMap = {
- filename: json.name + '.min.js',
- url: json.name + '.min.js.map'
- };
- }
+ if (standalone) uglifyOpts.outSourceMap = json.name + '.min.js.map';
- var result = uglify.minify(buf.toString(), uglifyOpts);
+ var result = uglify.minify(outputBundle, uglifyOpts);
fs.writeFileSync(outputFile + '.min.js', result.code);
if (result.map) fs.writeFileSync(outputFile + '.min.js.map', result.map);
- if (standalone) fs.writeFileSync(outputFile + '.bundle.js', buf);
- if (result.warnings) {
- for (var j=0, jl = result.warnings.length; j<jl; ++j)
- console.warn('UglifyJS warning:', result.warnings[j]);
- }
+ if (!standalone) fs.unlinkSync(outputBundle);
});
diff --git a/deps/npm/node_modules/ajv/scripts/compile-dots.js b/deps/npm/node_modules/har-validator/node_modules/ajv/scripts/compile-dots.js
index 5a21a7dddf..e6a27dc397 100644
--- a/deps/npm/node_modules/ajv/scripts/compile-dots.js
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/scripts/compile-dots.js
@@ -26,7 +26,7 @@ console.log('\n\nCompiling:');
var FUNCTION_NAME = /function\s+anonymous\s*\(it[^)]*\)\s*{/;
var OUT_EMPTY_STRING = /out\s*\+=\s*'\s*';/g;
-var ISTANBUL = /'(istanbul[^']+)';/g;
+var ISTANBUL = /\'(istanbul[^']+)\';/g;
var ERROR_KEYWORD = /\$errorKeyword/g;
var ERROR_KEYWORD_OR = /\$errorKeyword\s+\|\|/g;
var VARS = [
@@ -42,7 +42,7 @@ files.forEach(function (f) {
var code = doT.compile(template, defs);
code = code.toString()
.replace(OUT_EMPTY_STRING, '')
- .replace(FUNCTION_NAME, 'function generate_' + keyword + '(it, $keyword, $ruleType) {')
+ .replace(FUNCTION_NAME, 'function generate_' + keyword + '(it, $keyword) {')
.replace(ISTANBUL, '/* $1 */');
removeAlwaysFalsyInOr();
VARS.forEach(removeUnusedVar);
diff --git a/deps/npm/node_modules/ajv/scripts/info b/deps/npm/node_modules/har-validator/node_modules/ajv/scripts/info
index 77269ab5fa..77269ab5fa 100755
--- a/deps/npm/node_modules/ajv/scripts/info
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/scripts/info
diff --git a/deps/npm/node_modules/ajv/scripts/prepare-tests b/deps/npm/node_modules/har-validator/node_modules/ajv/scripts/prepare-tests
index 6f62634e23..6f62634e23 100755
--- a/deps/npm/node_modules/ajv/scripts/prepare-tests
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/scripts/prepare-tests
diff --git a/deps/npm/node_modules/ajv/scripts/travis-gh-pages b/deps/npm/node_modules/har-validator/node_modules/ajv/scripts/travis-gh-pages
index 46ded1611a..46ded1611a 100755
--- a/deps/npm/node_modules/ajv/scripts/travis-gh-pages
+++ b/deps/npm/node_modules/har-validator/node_modules/ajv/scripts/travis-gh-pages
diff --git a/deps/npm/node_modules/har-validator/package.json b/deps/npm/node_modules/har-validator/package.json
index 544692d733..7e5b14f652 100644
--- a/deps/npm/node_modules/har-validator/package.json
+++ b/deps/npm/node_modules/har-validator/package.json
@@ -1,27 +1,30 @@
{
- "_from": "har-validator@~5.0.3",
- "_id": "har-validator@5.0.3",
+ "_from": "har-validator@~4.2.1",
+ "_id": "har-validator@4.2.1",
"_inBundle": false,
- "_integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=",
+ "_integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=",
"_location": "/har-validator",
- "_phantomChildren": {},
+ "_phantomChildren": {
+ "co": "4.6.0",
+ "json-stable-stringify": "1.0.1"
+ },
"_requested": {
"type": "range",
"registry": true,
- "raw": "har-validator@~5.0.3",
+ "raw": "har-validator@~4.2.1",
"name": "har-validator",
"escapedName": "har-validator",
- "rawSpec": "~5.0.3",
+ "rawSpec": "~4.2.1",
"saveSpec": null,
- "fetchSpec": "~5.0.3"
+ "fetchSpec": "~4.2.1"
},
"_requiredBy": [
"/request"
],
- "_resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz",
- "_shasum": "ba402c266194f15956ef15e0fcf242993f6a7dfd",
- "_spec": "har-validator@~5.0.3",
- "_where": "/Users/rebecca/code/npm/node_modules/request",
+ "_resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz",
+ "_shasum": "33481d0f1bbff600dd203d75812a6a5fba002e2a",
+ "_spec": "har-validator@~4.2.1",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/request",
"author": {
"name": "Ahmad Nassri",
"email": "ahmad@ahmadnassri.com",
@@ -31,22 +34,40 @@
"url": "https://github.com/ahmadnassri/har-validator/issues"
},
"bundleDependencies": false,
+ "config": {
+ "commitizen": {
+ "path": "./node_modules/cz-conventional-changelog"
+ }
+ },
"dependencies": {
- "ajv": "^5.1.0",
- "har-schema": "^2.0.0"
+ "ajv": "^4.9.1",
+ "har-schema": "^1.0.5"
},
"deprecated": false,
"description": "Extremely fast HTTP Archive (HAR) validator using JSON Schema",
"devDependencies": {
+ "babel-cli": "^6.18.0",
+ "babel-plugin-add-module-exports": "^0.2.1",
+ "babel-preset-env": "1.1.10",
+ "babel-register": "^6.18.0",
+ "codeclimate-test-reporter": "^0.4.0",
+ "cz-conventional-changelog": "^1.2.0",
"echint": "^4.0.1",
- "standard": "^10.0.2",
- "tap": "^10.3.2"
+ "semantic-release": "^6.3.2",
+ "snazzy": "^6.0.0",
+ "tap": "^10.0.0"
+ },
+ "echint": {
+ "ignore": [
+ "lib/**"
+ ]
},
"engines": {
"node": ">=4"
},
"files": [
- "lib"
+ "lib",
+ "src"
],
"homepage": "https://github.com/ahmadnassri/har-validator",
"keywords": [
@@ -59,17 +80,25 @@
"validator"
],
"license": "ISC",
- "main": "lib/promise.js",
+ "main": "lib/node4/promise.js",
"name": "har-validator",
"repository": {
"type": "git",
"url": "git+https://github.com/ahmadnassri/har-validator.git"
},
"scripts": {
- "coverage": "tap test --reporter silent --coverage",
- "lint": "standard && echint",
- "pretest": "npm run lint",
- "test": "tap test"
+ "codeclimate": "BABEL_ENV=test tap --coverage-report=text-lcov | codeclimate-test-reporter",
+ "compile": "babel -q src",
+ "coverage": "BABEL_ENV=test tap test --reporter silent --coverage --nyc-arg=--require --nyc-arg=babel-register",
+ "pretest": "snazzy && echint",
+ "semantic-release": "semantic-release pre && npm publish && semantic-release post",
+ "test": "BABEL_ENV=test tap test --reporter spec --node-arg=--require --node-arg=babel-register",
+ "test-one": "BABEL_ENV=test tap --reporter spec --node-arg=--require --node-arg=babel-register"
+ },
+ "standard": {
+ "ignore": [
+ "lib/**"
+ ]
},
- "version": "5.0.3"
+ "version": "4.2.1"
}
diff --git a/deps/npm/node_modules/har-validator/lib/async.js b/deps/npm/node_modules/har-validator/src/async.js
index fc41667e81..5b98741115 100644
--- a/deps/npm/node_modules/har-validator/lib/async.js
+++ b/deps/npm/node_modules/har-validator/src/async.js
@@ -1,21 +1,19 @@
-var Ajv = require('ajv')
-var HARError = require('./error')
-var schemas = require('har-schema')
+import * as schemas from 'har-schema'
+import Ajv from 'ajv'
+import HARError from './error'
-var ajv
-
-function validate (name, data, next) {
- data = data || {}
+let ajv
+export function validate (name, data = {}, next) {
// validator config
ajv = ajv || new Ajv({
allErrors: true,
schemas: schemas
})
- var validate = ajv.getSchema(name + '.json')
+ let validate = ajv.getSchema(name + '.json')
- var valid = validate(data)
+ let valid = validate(data)
// callback?
if (typeof next === 'function') {
@@ -25,74 +23,74 @@ function validate (name, data, next) {
return valid
}
-exports.afterRequest = function (data, next) {
+export function afterRequest (data, next) {
return validate('afterRequest', data, next)
}
-exports.beforeRequest = function (data, next) {
+export function beforeRequest (data, next) {
return validate('beforeRequest', data, next)
}
-exports.browser = function (data, next) {
+export function browser (data, next) {
return validate('browser', data, next)
}
-exports.cache = function (data, next) {
+export function cache (data, next) {
return validate('cache', data, next)
}
-exports.content = function (data, next) {
+export function content (data, next) {
return validate('content', data, next)
}
-exports.cookie = function (data, next) {
+export function cookie (data, next) {
return validate('cookie', data, next)
}
-exports.creator = function (data, next) {
+export function creator (data, next) {
return validate('creator', data, next)
}
-exports.entry = function (data, next) {
+export function entry (data, next) {
return validate('entry', data, next)
}
-exports.har = function (data, next) {
+export function har (data, next) {
return validate('har', data, next)
}
-exports.header = function (data, next) {
+export function header (data, next) {
return validate('header', data, next)
}
-exports.log = function (data, next) {
+export function log (data, next) {
return validate('log', data, next)
}
-exports.page = function (data, next) {
+export function page (data, next) {
return validate('page', data, next)
}
-exports.pageTimings = function (data, next) {
+export function pageTimings (data, next) {
return validate('pageTimings', data, next)
}
-exports.postData = function (data, next) {
+export function postData (data, next) {
return validate('postData', data, next)
}
-exports.query = function (data, next) {
+export function query (data, next) {
return validate('query', data, next)
}
-exports.request = function (data, next) {
+export function request (data, next) {
return validate('request', data, next)
}
-exports.response = function (data, next) {
+export function response (data, next) {
return validate('response', data, next)
}
-exports.timings = function (data, next) {
+export function timings (data, next) {
return validate('timings', data, next)
}
diff --git a/deps/npm/node_modules/har-validator/lib/error.js b/deps/npm/node_modules/har-validator/src/error.js
index f2618dc4f3..f0707eb35b 100644
--- a/deps/npm/node_modules/har-validator/lib/error.js
+++ b/deps/npm/node_modules/har-validator/src/error.js
@@ -1,5 +1,5 @@
-function HARError (errors) {
- var message = 'validation failed'
+export default function HARError (errors) {
+ let message = 'validation failed'
this.name = 'HARError'
this.message = message
@@ -13,5 +13,3 @@ function HARError (errors) {
}
HARError.prototype = Error.prototype
-
-module.exports = HARError
diff --git a/deps/npm/node_modules/har-validator/src/promise.js b/deps/npm/node_modules/har-validator/src/promise.js
new file mode 100644
index 0000000000..57b067997f
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/src/promise.js
@@ -0,0 +1,93 @@
+import * as schemas from 'har-schema'
+import Ajv from 'ajv'
+import HARError from './error'
+
+let ajv
+
+export function validate (name, data = {}) {
+ // validator config
+ ajv = ajv || new Ajv({
+ allErrors: true,
+ schemas: schemas
+ })
+
+ let validate = ajv.getSchema(name + '.json')
+
+ return new Promise((resolve, reject) => {
+ let valid = validate(data)
+
+ !valid ? reject(new HARError(validate.errors)) : resolve(data)
+ })
+}
+
+export function afterRequest (data) {
+ return validate('afterRequest', data)
+}
+
+export function beforeRequest (data) {
+ return validate('beforeRequest', data)
+}
+
+export function browser (data) {
+ return validate('browser', data)
+}
+
+export function cache (data) {
+ return validate('cache', data)
+}
+
+export function content (data) {
+ return validate('content', data)
+}
+
+export function cookie (data) {
+ return validate('cookie', data)
+}
+
+export function creator (data) {
+ return validate('creator', data)
+}
+
+export function entry (data) {
+ return validate('entry', data)
+}
+
+export function har (data) {
+ return validate('har', data)
+}
+
+export function header (data) {
+ return validate('header', data)
+}
+
+export function log (data) {
+ return validate('log', data)
+}
+
+export function page (data) {
+ return validate('page', data)
+}
+
+export function pageTimings (data) {
+ return validate('pageTimings', data)
+}
+
+export function postData (data) {
+ return validate('postData', data)
+}
+
+export function query (data) {
+ return validate('query', data)
+}
+
+export function request (data) {
+ return validate('request', data)
+}
+
+export function response (data) {
+ return validate('response', data)
+}
+
+export function timings (data) {
+ return validate('timings', data)
+}
diff --git a/deps/npm/node_modules/hawk/.npmignore b/deps/npm/node_modules/hawk/.npmignore
index 20f7f7b790..ab108bf92f 100755..100644
--- a/deps/npm/node_modules/hawk/.npmignore
+++ b/deps/npm/node_modules/hawk/.npmignore
@@ -1,5 +1,19 @@
-*
-!lib/**
-!dist/**
-!client.js
-!.npmignore
+.idea
+*.iml
+npm-debug.log
+dump.rdb
+node_modules
+components
+build
+results.tap
+results.xml
+npm-shrinkwrap.json
+config.json
+.DS_Store
+*/.DS_Store
+*/*/.DS_Store
+._*
+*/._*
+*/*/._*
+coverage.*
+lib-cov
diff --git a/deps/npm/node_modules/hawk/.travis.yml b/deps/npm/node_modules/hawk/.travis.yml
new file mode 100755
index 0000000000..77795c6a9b
--- /dev/null
+++ b/deps/npm/node_modules/hawk/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+
+node_js:
+ - 0.10
diff --git a/deps/npm/node_modules/hawk/LICENSE b/deps/npm/node_modules/hawk/LICENSE
index b43dce1106..7880936847 100755
--- a/deps/npm/node_modules/hawk/LICENSE
+++ b/deps/npm/node_modules/hawk/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2012-2017, Eran Hammer and Project contributors
+Copyright (c) 2012-2014, Eran Hammer and other contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/deps/npm/node_modules/hawk/README.md b/deps/npm/node_modules/hawk/README.md
index fc5dd6deb1..63725034fc 100755
--- a/deps/npm/node_modules/hawk/README.md
+++ b/deps/npm/node_modules/hawk/README.md
@@ -3,11 +3,11 @@
<img align="right" src="https://raw.github.com/hueniverse/hawk/master/images/logo.png" /> **Hawk** is an HTTP authentication scheme using a message authentication code (MAC) algorithm to provide partial
HTTP request cryptographic verification. For more complex use cases such as access delegation, see [Oz](https://github.com/hueniverse/oz).
-Current version: **6.x**
+Current version: **3.x**
-Note: 6.x, 5.x, 4.x, 3.x, and 2.x are the same exact protocol as 1.1. The version increments reflect changes in the node API.
+Note: 3.x and 2.x are the same exact protocol as 1.1. The version increments reflect changes in the node API.
-[![Build Status](https://travis-ci.org/hueniverse/hawk.svg?branch=master)](https://travis-ci.org/hueniverse/hawk)
+[![Build Status](https://secure.travis-ci.org/hueniverse/hawk.png)](http://travis-ci.org/hueniverse/hawk)
# Table of Content
@@ -18,8 +18,10 @@ Note: 6.x, 5.x, 4.x, 3.x, and 2.x are the same exact protocol as 1.1. The versio
- [Payload Validation](#payload-validation)
- [Response Payload Validation](#response-payload-validation)
- [Browser Support and Considerations](#browser-support-and-considerations)
+<p></p>
- [**Single URI Authorization**](#single-uri-authorization)
- [Usage Example](#bewit-usage-example)
+<p></p>
- [**Security Considerations**](#security-considerations)
- [MAC Keys Transmission](#mac-keys-transmission)
- [Confidentiality of Requests](#confidentiality-of-requests)
@@ -31,7 +33,9 @@ Note: 6.x, 5.x, 4.x, 3.x, and 2.x are the same exact protocol as 1.1. The versio
- [Client Clock Poisoning](#client-clock-poisoning)
- [Bewit Limitations](#bewit-limitations)
- [Host Header Forgery](#host-header-forgery)
+<p></p>
- [**Frequently Asked Questions**](#frequently-asked-questions)
+<p></p>
- [**Implementations**](#implementations)
- [**Acknowledgements**](#acknowledgements)
@@ -78,7 +82,7 @@ making requests. This gives the server enough information to prevent replay atta
The nonce is generated by the client, and is a string unique across all requests with the same timestamp and
key identifier combination.
-The timestamp enables the server to restrict the validity period of the credentials where requests occurring afterwards
+The timestamp enables the server to restrict the validity period of the credentials where requests occuring afterwards
are rejected. It also removes the need for the server to retain an unbounded number of nonce values for future checks.
By default, **Hawk** uses a time window of 1 minute to allow for time skew between the client and server (which in
practice translates to a maximum of 2 minutes as the skew can be positive or negative).
@@ -99,15 +103,15 @@ the number of round trips required to authenticate the first request.
Server code:
```javascript
-const Http = require('http');
-const Hawk = require('hawk');
+var Http = require('http');
+var Hawk = require('hawk');
// Credentials lookup function
-const credentialsFunc = function (id, callback) {
+var credentialsFunc = function (id, callback) {
- const credentials = {
+ var credentials = {
key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
algorithm: 'sha256',
user: 'Steve'
@@ -118,20 +122,20 @@ const credentialsFunc = function (id, callback) {
// Create HTTP server
-const handler = function (req, res) {
+var handler = function (req, res) {
// Authenticate incoming request
- Hawk.server.authenticate(req, credentialsFunc, {}, (err, credentials, artifacts) => {
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
// Prepare response
- const payload = (!err ? `Hello ${credentials.user} ${artifacts.ext}` : 'Shoosh!');
- const headers = { 'Content-Type': 'text/plain' };
+ var payload = (!err ? 'Hello ' + credentials.user + ' ' + artifacts.ext : 'Shoosh!');
+ var headers = { 'Content-Type': 'text/plain' };
// Generate Server-Authorization response header
- const header = Hawk.server.header(credentials, artifacts, { payload, contentType: headers['Content-Type'] });
+ var header = Hawk.server.header(credentials, artifacts, { payload: payload, contentType: headers['Content-Type'] });
headers['Server-Authorization'] = header;
// Send the response back
@@ -149,13 +153,13 @@ Http.createServer(handler).listen(8000, 'example.com');
Client code:
```javascript
-const Request = require('request');
-const Hawk = require('hawk');
+var Request = require('request');
+var Hawk = require('hawk');
// Client credentials
-const credentials = {
+var credentials = {
id: 'dh37fgj492je',
key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
algorithm: 'sha256'
@@ -163,7 +167,7 @@ const credentials = {
// Request options
-const requestOptions = {
+var requestOptions = {
uri: 'http://example.com:8000/resource/1?b=1&a=2',
method: 'GET',
headers: {}
@@ -171,7 +175,7 @@ const requestOptions = {
// Generate Authorization request header
-const header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'GET', { credentials: credentials, ext: 'some-app-data' });
+var header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'GET', { credentials: credentials, ext: 'some-app-data' });
requestOptions.headers.Authorization = header.field;
// Send authenticated request
@@ -180,16 +184,16 @@ Request(requestOptions, function (error, response, body) {
// Authenticate the server's response
- const isValid = Hawk.client.authenticate(response, credentials, header.artifacts, { payload: body });
+ var isValid = Hawk.client.authenticate(response, credentials, header.artifacts, { payload: body });
// Output results
- console.log(`${response.statusCode}: ${body}` + (isValid ? ' (valid)' : ' (invalid)'));
+ console.log(response.statusCode + ': ' + body + (isValid ? ' (valid)' : ' (invalid)'));
});
```
**Hawk** utilized the [**SNTP**](https://github.com/hueniverse/sntp) module for time sync management. By default, the local
-machine time is used. To automatically retrieve and synchronize the clock within the application, use the SNTP 'start()' method.
+machine time is used. To automatically retrieve and synchronice the clock within the application, use the SNTP 'start()' method.
```javascript
Hawk.sntp.start();
@@ -213,13 +217,12 @@ HTTP/1.1 401 Unauthorized
WWW-Authenticate: Hawk
```
-The client has previously obtained a set of **Hawk** credentials for accessing resources on the "`http://example.com/`"
+The client has previously obtained a set of **Hawk** credentials for accessing resources on the "http://example.com/"
server. The **Hawk** credentials issued to the client include the following attributes:
-* Key identifier: `dh37fgj492je`
-* Key: `werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn`
-* Algorithm: `hmac sha256`
-* Hash: `6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE=`
+* Key identifier: dh37fgj492je
+* Key: werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn
+* Algorithm: sha256
The client generates the authentication header by calculating a timestamp (e.g. the number of seconds since January 1,
1970 00:00:00 GMT), generating a nonce, and constructing the normalized request string (each value followed by a newline
@@ -238,7 +241,7 @@ some-app-ext-data
```
-The request MAC is calculated using HMAC with the specified hash algorithm "`sha256`" and the key over the normalized request string.
+The request MAC is calculated using HMAC with the specified hash algorithm "sha256" and the key over the normalized request string.
The result is base64-encoded to produce the request MAC:
```
@@ -270,8 +273,7 @@ For example:
* Payload: `Thank you for flying Hawk`
* Content Type: `text/plain`
-* Algorithm: `sha256`
-* Hash: `Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=`
+* Hash (sha256): `Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=`
Results in the following input to the payload hash function (newline terminated values):
@@ -312,7 +314,7 @@ Host: example.com:8000
Authorization: Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", hash="Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=", ext="some-app-ext-data", mac="aSe1DERmZuRl3pI36/9BdZmnErTw3sNzOOAUlfeKjVw="
```
-It is up to the server if and when it validates the payload for any given request, based solely on its security policy
+It is up to the server if and when it validates the payload for any given request, based solely on it's security policy
and the nature of the data included.
If the payload is available at the time of authentication, the server uses the hash value provided by the client to construct
@@ -334,7 +336,7 @@ by the client, the payload may be modified by an attacker.
client to authenticate the response and ensure it is talking to the right server. **Hawk** defines the HTTP `Server-Authorization` header
as a response header using the exact same syntax as the `Authorization` request header field.
-The header is constructed using the same process as the client's request header. The server uses the same credentials and other
+The header is contructed using the same process as the client's request header. The server uses the same credentials and other
artifacts provided by the client to constructs the normalized request string. The `ext` and `hash` values are replaced with
new values based on the server response. The rest as identical to those used by the client.
@@ -379,15 +381,15 @@ the granted access timeframe.
Server code:
```javascript
-const Http = require('http');
-const Hawk = require('hawk');
+var Http = require('http');
+var Hawk = require('hawk');
// Credentials lookup function
-const credentialsFunc = function (id, callback) {
+var credentialsFunc = function (id, callback) {
- const credentials = {
+ var credentials = {
key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
algorithm: 'sha256'
};
@@ -397,9 +399,9 @@ const credentialsFunc = function (id, callback) {
// Create HTTP server
-const handler = function (req, res) {
+var handler = function (req, res) {
- Hawk.uri.authenticate(req, credentialsFunc, {}, (err, credentials, attributes) => {
+ Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
res.writeHead(!err ? 200 : 401, { 'Content-Type': 'text/plain' });
res.end(!err ? 'Access granted' : 'Shoosh!');
@@ -412,13 +414,13 @@ Http.createServer(handler).listen(8000, 'example.com');
Bewit code generation:
```javascript
-const Request = require('request');
-const Hawk = require('hawk');
+var Request = require('request');
+var Hawk = require('hawk');
// Client credentials
-const credentials = {
+var credentials = {
id: 'dh37fgj492je',
key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
algorithm: 'sha256'
@@ -426,13 +428,9 @@ const credentials = {
// Generate bewit
-const duration = 60 * 5; // 5 Minutes
-const bewit = Hawk.uri.getBewit('http://example.com:8000/resource/1?b=1&a=2', { credentials: credentials, ttlSec: duration, ext: 'some-app-data' });
-const uri = 'http://example.com:8000/resource/1?b=1&a=2' + '&bewit=' + bewit;
-
-// Output URI
-
-console.log('URI: ' + uri);
+var duration = 60 * 5; // 5 Minutes
+var bewit = Hawk.uri.getBewit('http://example.com:8080/resource/1?b=1&a=2', { credentials: credentials, ttlSec: duration, ext: 'some-app-data' });
+var uri = 'http://example.com:8000/resource/1?b=1&a=2' + '&bewit=' + bewit;
```
@@ -499,8 +497,8 @@ or value of such headers, an attacker can manipulate the request headers without
`ext` feature to pass application-specific information via the `Authorization` header which is protected by the request MAC.
The response authentication, when performed, only covers the response payload, content-type, and the request information
-provided by the client in its request (method, resource, timestamp, nonce, etc.). It does not cover the HTTP status code or
-any other response header field (e.g. `Location`) which can affect the client's behaviour.
+provided by the client in it's request (method, resource, timestamp, nonce, etc.). It does not cover the HTTP status code or
+any other response header field (e.g. Location) which can affect the client's behaviour.
### Future Time Manipulation
@@ -533,7 +531,7 @@ and sensitive information.
### Host Header Forgery
Hawk validates the incoming request MAC against the incoming HTTP Host header. However, unless the optional `host` and `port`
-options are used with `server.authenticate()`, a malicious client can mint new host names pointing to the server's IP address and
+options are used with `server.authenticate()`, a malicous client can mint new host names pointing to the server's IP address and
use that to craft an attack by sending a valid request that's meant for another hostname than the one used by the server. Server
implementors must manually verify that the host header received matches their expectation (or use the options mentioned above).
@@ -625,7 +623,6 @@ of delegating access to a third party. If you are looking for an OAuth alternati
- [Tent Hawk in Ruby](https://github.com/tent/hawk-ruby)
- [Wealdtech in Java](https://github.com/wealdtech/hawk)
- [Kumar's Mohawk in Python](https://github.com/kumar303/mohawk/)
-- [Hiyosi in Go](https://github.com/hiyosi/hawk)
# Acknowledgements
diff --git a/deps/npm/node_modules/hawk/bower.json b/deps/npm/node_modules/hawk/bower.json
new file mode 100644
index 0000000000..7d2d120e0d
--- /dev/null
+++ b/deps/npm/node_modules/hawk/bower.json
@@ -0,0 +1,24 @@
+{
+ "name": "hawk",
+ "main": "lib/browser.js",
+ "license": "./LICENSE",
+ "ignore": [
+ "!lib",
+ "lib/*",
+ "!lib/browser.js",
+ "index.js"
+ ],
+ "keywords": [
+ "http",
+ "authentication",
+ "scheme",
+ "hawk"
+ ],
+ "authors": [
+ "Eran Hammer <eran@hammer.io>"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/hueniverse/hawk.git"
+ }
+}
diff --git a/deps/npm/node_modules/hawk/client.js b/deps/npm/node_modules/hawk/client.js
deleted file mode 100755
index c7ff470ddd..0000000000
--- a/deps/npm/node_modules/hawk/client.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./dist/browser');
diff --git a/deps/npm/node_modules/hawk/component.json b/deps/npm/node_modules/hawk/component.json
new file mode 100644
index 0000000000..63e76a2e31
--- /dev/null
+++ b/deps/npm/node_modules/hawk/component.json
@@ -0,0 +1,19 @@
+{
+ "name": "hawk",
+ "repo": "hueniverse/hawk",
+ "description": "HTTP Hawk Authentication Scheme",
+ "version": "1.0.0",
+ "keywords": [
+ "http",
+ "authentication",
+ "scheme",
+ "hawk"
+ ],
+ "dependencies": {},
+ "development": {},
+ "license": "BSD",
+ "main": "lib/browser.js",
+ "scripts": [
+ "lib/browser.js"
+ ]
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/hawk/dist/browser.js b/deps/npm/node_modules/hawk/dist/browser.js
deleted file mode 100644
index 4bb9b95640..0000000000
--- a/deps/npm/node_modules/hawk/dist/browser.js
+++ /dev/null
@@ -1,793 +0,0 @@
-'use strict';
-
-/*
- HTTP Hawk Authentication Scheme
- Copyright (c) 2012-2016, Eran Hammer <eran@hammer.io>
- BSD Licensed
-*/
-
-// Declare namespace
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-var hawk = {
- internals: {}
-};
-
-hawk.client = {
-
- // Generate an Authorization header for a given request
-
- /*
- uri: 'http://example.com/resource?a=b' or object generated by hawk.utils.parseUri()
- method: HTTP verb (e.g. 'GET', 'POST')
- options: {
- // Required
- credentials: {
- id: 'dh37fgj492je',
- key: 'aoijedoaijsdlaksjdl',
- algorithm: 'sha256' // 'sha1', 'sha256'
- },
- // Optional
- ext: 'application-specific', // Application specific data sent via the ext attribute
- timestamp: Date.now() / 1000, // A pre-calculated timestamp in seconds
- nonce: '2334f34f', // A pre-generated nonce
- localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided)
- payload: '{"some":"payload"}', // UTF-8 encoded string for body hash generation (ignored if hash provided)
- contentType: 'application/json', // Payload content-type (ignored if hash provided)
- hash: 'U4MKKSmiVxk37JCCrAVIjV=', // Pre-calculated payload hash
- app: '24s23423f34dx', // Oz application id
- dlg: '234sz34tww3sd' // Oz delegated-by application id
- }
- */
-
- header: function header(uri, method, options) {
-
- var result = {
- field: '',
- artifacts: {}
- };
-
- // Validate inputs
-
- if (!uri || typeof uri !== 'string' && (typeof uri === 'undefined' ? 'undefined' : _typeof(uri)) !== 'object' || !method || typeof method !== 'string' || !options || (typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object') {
-
- result.err = 'Invalid argument type';
- return result;
- }
-
- // Application time
-
- var timestamp = options.timestamp || hawk.utils.nowSec(options.localtimeOffsetMsec);
-
- // Validate credentials
-
- var credentials = options.credentials;
- if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) {
-
- result.err = 'Invalid credentials object';
- return result;
- }
-
- if (hawk.crypto.algorithms.indexOf(credentials.algorithm) === -1) {
- result.err = 'Unknown algorithm';
- return result;
- }
-
- // Parse URI
-
- if (typeof uri === 'string') {
- uri = hawk.utils.parseUri(uri);
- }
-
- // Calculate signature
-
- var artifacts = {
- ts: timestamp,
- nonce: options.nonce || hawk.utils.randomString(6),
- method: method,
- resource: uri.resource,
- host: uri.host,
- port: uri.port,
- hash: options.hash,
- ext: options.ext,
- app: options.app,
- dlg: options.dlg
- };
-
- result.artifacts = artifacts;
-
- // Calculate payload hash
-
- if (!artifacts.hash && (options.payload || options.payload === '')) {
-
- artifacts.hash = hawk.crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
- }
-
- var mac = hawk.crypto.calculateMac('header', credentials, artifacts);
-
- // Construct header
-
- var hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== ''; // Other falsey values allowed
- var header = 'Hawk id="' + credentials.id + '", ts="' + artifacts.ts + '", nonce="' + artifacts.nonce + (artifacts.hash ? '", hash="' + artifacts.hash : '') + (hasExt ? '", ext="' + hawk.utils.escapeHeaderAttribute(artifacts.ext) : '') + '", mac="' + mac + '"';
-
- if (artifacts.app) {
- header += ', app="' + artifacts.app + (artifacts.dlg ? '", dlg="' + artifacts.dlg : '') + '"';
- }
-
- result.field = header;
-
- return result;
- },
-
- // Generate a bewit value for a given URI
-
- /*
- uri: 'http://example.com/resource?a=b'
- options: {
- // Required
- credentials: {
- id: 'dh37fgj492je',
- key: 'aoijedoaijsdlaksjdl',
- algorithm: 'sha256' // 'sha1', 'sha256'
- },
- ttlSec: 60 * 60, // TTL in seconds
- // Optional
- ext: 'application-specific', // Application specific data sent via the ext attribute
- localtimeOffsetMsec: 400 // Time offset to sync with server time
- };
- */
-
- bewit: function bewit(uri, options) {
-
- // Validate inputs
-
- if (!uri || typeof uri !== 'string' || !options || (typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object' || !options.ttlSec) {
-
- return '';
- }
-
- options.ext = options.ext === null || options.ext === undefined ? '' : options.ext; // Zero is valid value
-
- // Application time
-
- var now = hawk.utils.nowSec(options.localtimeOffsetMsec);
-
- // Validate credentials
-
- var credentials = options.credentials;
- if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) {
-
- return '';
- }
-
- if (hawk.crypto.algorithms.indexOf(credentials.algorithm) === -1) {
- return '';
- }
-
- // Parse URI
-
- uri = hawk.utils.parseUri(uri);
-
- // Calculate signature
-
- var exp = now + options.ttlSec;
- var mac = hawk.crypto.calculateMac('bewit', credentials, {
- ts: exp,
- nonce: '',
- method: 'GET',
- resource: uri.resource, // Maintain trailing '?' and query params
- host: uri.host,
- port: uri.port,
- ext: options.ext
- });
-
- // Construct bewit: id\exp\mac\ext
-
- var bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + options.ext;
- return hawk.utils.base64urlEncode(bewit);
- },
-
- // Validate server response
-
- /*
- request: object created via 'new XMLHttpRequest()' after response received or fetch API 'Response'
- artifacts: object received from header().artifacts
- options: {
- payload: optional payload received
- required: specifies if a Server-Authorization header is required. Defaults to 'false'
- }
- */
-
- authenticate: function authenticate(request, credentials, artifacts, options) {
-
- options = options || {};
-
- var getHeader = function getHeader(name) {
-
- // Fetch API or plain headers
-
- if (request.headers) {
- return typeof request.headers.get === 'function' ? request.headers.get(name) : request.headers[name];
- }
-
- // XMLHttpRequest
-
- return request.getResponseHeader ? request.getResponseHeader(name) : request.getHeader(name);
- };
-
- var wwwAuthenticate = getHeader('www-authenticate');
- if (wwwAuthenticate) {
-
- // Parse HTTP WWW-Authenticate header
-
- var wwwAttributes = hawk.utils.parseAuthorizationHeader(wwwAuthenticate, ['ts', 'tsm', 'error']);
- if (!wwwAttributes) {
- return false;
- }
-
- if (wwwAttributes.ts) {
- var tsm = hawk.crypto.calculateTsMac(wwwAttributes.ts, credentials);
- if (tsm !== wwwAttributes.tsm) {
- return false;
- }
-
- hawk.utils.setNtpSecOffset(wwwAttributes.ts - Math.floor(Date.now() / 1000)); // Keep offset at 1 second precision
- }
- }
-
- // Parse HTTP Server-Authorization header
-
- var serverAuthorization = getHeader('server-authorization');
- if (!serverAuthorization && !options.required) {
-
- return true;
- }
-
- var attributes = hawk.utils.parseAuthorizationHeader(serverAuthorization, ['mac', 'ext', 'hash']);
- if (!attributes) {
- return false;
- }
-
- var modArtifacts = {
- ts: artifacts.ts,
- nonce: artifacts.nonce,
- method: artifacts.method,
- resource: artifacts.resource,
- host: artifacts.host,
- port: artifacts.port,
- hash: attributes.hash,
- ext: attributes.ext,
- app: artifacts.app,
- dlg: artifacts.dlg
- };
-
- var mac = hawk.crypto.calculateMac('response', credentials, modArtifacts);
- if (mac !== attributes.mac) {
- return false;
- }
-
- if (!options.payload && options.payload !== '') {
-
- return true;
- }
-
- if (!attributes.hash) {
- return false;
- }
-
- var calculatedHash = hawk.crypto.calculatePayloadHash(options.payload, credentials.algorithm, getHeader('content-type'));
- return calculatedHash === attributes.hash;
- },
-
- message: function message(host, port, _message, options) {
-
- // Validate inputs
-
- if (!host || typeof host !== 'string' || !port || typeof port !== 'number' || _message === null || _message === undefined || typeof _message !== 'string' || !options || (typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object') {
-
- return null;
- }
-
- // Application time
-
- var timestamp = options.timestamp || hawk.utils.nowSec(options.localtimeOffsetMsec);
-
- // Validate credentials
-
- var credentials = options.credentials;
- if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) {
-
- // Invalid credential object
- return null;
- }
-
- if (hawk.crypto.algorithms.indexOf(credentials.algorithm) === -1) {
- return null;
- }
-
- // Calculate signature
-
- var artifacts = {
- ts: timestamp,
- nonce: options.nonce || hawk.utils.randomString(6),
- host: host,
- port: port,
- hash: hawk.crypto.calculatePayloadHash(_message, credentials.algorithm)
- };
-
- // Construct authorization
-
- var result = {
- id: credentials.id,
- ts: artifacts.ts,
- nonce: artifacts.nonce,
- hash: artifacts.hash,
- mac: hawk.crypto.calculateMac('message', credentials, artifacts)
- };
-
- return result;
- },
-
- authenticateTimestamp: function authenticateTimestamp(message, credentials, updateClock) {
- // updateClock defaults to true
-
- var tsm = hawk.crypto.calculateTsMac(message.ts, credentials);
- if (tsm !== message.tsm) {
- return false;
- }
-
- if (updateClock !== false) {
- hawk.utils.setNtpSecOffset(message.ts - Math.floor(Date.now() / 1000)); // Keep offset at 1 second precision
- }
-
- return true;
- }
-};
-
-hawk.crypto = {
-
- headerVersion: '1',
-
- algorithms: ['sha1', 'sha256'],
-
- calculateMac: function calculateMac(type, credentials, options) {
-
- var normalized = hawk.crypto.generateNormalizedString(type, options);
-
- var hmac = CryptoJS['Hmac' + credentials.algorithm.toUpperCase()](normalized, credentials.key);
- return hmac.toString(CryptoJS.enc.Base64);
- },
-
- generateNormalizedString: function generateNormalizedString(type, options) {
-
- var normalized = 'hawk.' + hawk.crypto.headerVersion + '.' + type + '\n' + options.ts + '\n' + options.nonce + '\n' + (options.method || '').toUpperCase() + '\n' + (options.resource || '') + '\n' + options.host.toLowerCase() + '\n' + options.port + '\n' + (options.hash || '') + '\n';
-
- if (options.ext) {
- normalized += options.ext.replace('\\', '\\\\').replace('\n', '\\n');
- }
-
- normalized += '\n';
-
- if (options.app) {
- normalized += options.app + '\n' + (options.dlg || '') + '\n';
- }
-
- return normalized;
- },
-
- calculatePayloadHash: function calculatePayloadHash(payload, algorithm, contentType) {
-
- var hash = CryptoJS.algo[algorithm.toUpperCase()].create();
- hash.update('hawk.' + hawk.crypto.headerVersion + '.payload\n');
- hash.update(hawk.utils.parseContentType(contentType) + '\n');
- hash.update(payload);
- hash.update('\n');
- return hash.finalize().toString(CryptoJS.enc.Base64);
- },
-
- calculateTsMac: function calculateTsMac(ts, credentials) {
-
- var hash = CryptoJS['Hmac' + credentials.algorithm.toUpperCase()]('hawk.' + hawk.crypto.headerVersion + '.ts\n' + ts + '\n', credentials.key);
- return hash.toString(CryptoJS.enc.Base64);
- }
-};
-
-// localStorage compatible interface
-
-hawk.internals.LocalStorage = function () {
-
- this._cache = {};
- this.length = 0;
-
- this.getItem = function (key) {
-
- return this._cache.hasOwnProperty(key) ? String(this._cache[key]) : null;
- };
-
- this.setItem = function (key, value) {
-
- this._cache[key] = String(value);
- this.length = Object.keys(this._cache).length;
- };
-
- this.removeItem = function (key) {
-
- delete this._cache[key];
- this.length = Object.keys(this._cache).length;
- };
-
- this.clear = function () {
-
- this._cache = {};
- this.length = 0;
- };
-
- this.key = function (i) {
-
- return Object.keys(this._cache)[i || 0];
- };
-};
-
-hawk.utils = {
-
- storage: new hawk.internals.LocalStorage(),
-
- setStorage: function setStorage(storage) {
-
- var ntpOffset = hawk.utils.storage.getItem('hawk_ntp_offset');
- hawk.utils.storage = storage;
- if (ntpOffset) {
- hawk.utils.setNtpSecOffset(ntpOffset);
- }
- },
-
- setNtpSecOffset: function setNtpSecOffset(offset) {
-
- try {
- hawk.utils.storage.setItem('hawk_ntp_offset', offset);
- } catch (err) {
- console.error('[hawk] could not write to storage.');
- console.error(err);
- }
- },
-
- getNtpSecOffset: function getNtpSecOffset() {
-
- var offset = hawk.utils.storage.getItem('hawk_ntp_offset');
- if (!offset) {
- return 0;
- }
-
- return parseInt(offset, 10);
- },
-
- now: function now(localtimeOffsetMsec) {
-
- return Date.now() + (localtimeOffsetMsec || 0) + hawk.utils.getNtpSecOffset() * 1000;
- },
-
- nowSec: function nowSec(localtimeOffsetMsec) {
-
- return Math.floor(hawk.utils.now(localtimeOffsetMsec) / 1000);
- },
-
- escapeHeaderAttribute: function escapeHeaderAttribute(attribute) {
-
- return attribute.replace(/\\/g, '\\\\').replace(/\"/g, '\\"');
- },
-
- parseContentType: function parseContentType(header) {
-
- if (!header) {
- return '';
- }
-
- return header.split(';')[0].replace(/^\s+|\s+$/g, '').toLowerCase();
- },
-
- parseAuthorizationHeader: function parseAuthorizationHeader(header, keys) {
-
- if (!header) {
- return null;
- }
-
- var headerParts = header.match(/^(\w+)(?:\s+(.*))?$/); // Header: scheme[ something]
- if (!headerParts) {
- return null;
- }
-
- var scheme = headerParts[1];
- if (scheme.toLowerCase() !== 'hawk') {
- return null;
- }
-
- var attributesString = headerParts[2];
- if (!attributesString) {
- return null;
- }
-
- var attributes = {};
- var verify = attributesString.replace(/(\w+)="([^"\\]*)"\s*(?:,\s*|$)/g, function ($0, $1, $2) {
-
- // Check valid attribute names
-
- if (keys.indexOf($1) === -1) {
- return;
- }
-
- // Allowed attribute value characters: !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9
-
- if ($2.match(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~]+$/) === null) {
- return;
- }
-
- // Check for duplicates
-
- if (attributes.hasOwnProperty($1)) {
- return;
- }
-
- attributes[$1] = $2;
- return '';
- });
-
- if (verify !== '') {
- return null;
- }
-
- return attributes;
- },
-
- randomString: function randomString(size) {
-
- var randomSource = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
- var len = randomSource.length;
-
- var result = [];
- for (var i = 0; i < size; ++i) {
- result[i] = randomSource[Math.floor(Math.random() * len)];
- }
-
- return result.join('');
- },
-
- // 1 2 3 4
- uriRegex: /^([^:]+)\:\/\/(?:[^@/]*@)?([^\/:]+)(?:\:(\d+))?([^#]*)(?:#.*)?$/, // scheme://credentials@host:port/resource#fragment
- parseUri: function parseUri(input) {
-
- var parts = input.match(hawk.utils.uriRegex);
- if (!parts) {
- return { host: '', port: '', resource: '' };
- }
-
- var scheme = parts[1].toLowerCase();
- var uri = {
- host: parts[2],
- port: parts[3] || (scheme === 'http' ? '80' : scheme === 'https' ? '443' : ''),
- resource: parts[4]
- };
-
- return uri;
- },
-
- base64urlEncode: function base64urlEncode(value) {
-
- var wordArray = CryptoJS.enc.Utf8.parse(value);
- var encoded = CryptoJS.enc.Base64.stringify(wordArray);
- return encoded.replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, '');
- }
-};
-
-// $lab:coverage:off$
-/* eslint-disable */
-
-// Based on: Crypto-JS v3.1.2
-// Copyright (c) 2009-2013, Jeff Mott. All rights reserved.
-// http://code.google.com/p/crypto-js/
-// http://code.google.com/p/crypto-js/wiki/License
-
-var CryptoJS = CryptoJS || function (h, r) {
- var k = {},
- l = k.lib = {},
- n = function n() {},
- f = l.Base = { extend: function extend(a) {
- n.prototype = this;var b = new n();a && b.mixIn(a);b.hasOwnProperty("init") || (b.init = function () {
- b.$super.init.apply(this, arguments);
- });b.init.prototype = b;b.$super = this;return b;
- }, create: function create() {
- var a = this.extend();a.init.apply(a, arguments);return a;
- }, init: function init() {}, mixIn: function mixIn(a) {
- for (var _b in a) {
- a.hasOwnProperty(_b) && (this[_b] = a[_b]);
- }a.hasOwnProperty("toString") && (this.toString = a.toString);
- }, clone: function clone() {
- return this.init.prototype.extend(this);
- } },
- j = l.WordArray = f.extend({ init: function init(a, b) {
- a = this.words = a || [];this.sigBytes = b != r ? b : 4 * a.length;
- }, toString: function toString(a) {
- return (a || s).stringify(this);
- }, concat: function concat(a) {
- var b = this.words,
- d = a.words,
- c = this.sigBytes;a = a.sigBytes;this.clamp();if (c % 4) for (var e = 0; e < a; e++) {
- b[c + e >>> 2] |= (d[e >>> 2] >>> 24 - 8 * (e % 4) & 255) << 24 - 8 * ((c + e) % 4);
- } else if (65535 < d.length) for (var _e = 0; _e < a; _e += 4) {
- b[c + _e >>> 2] = d[_e >>> 2];
- } else b.push.apply(b, d);this.sigBytes += a;return this;
- }, clamp: function clamp() {
- var a = this.words,
- b = this.sigBytes;a[b >>> 2] &= 4294967295 << 32 - 8 * (b % 4);a.length = h.ceil(b / 4);
- }, clone: function clone() {
- var a = f.clone.call(this);a.words = this.words.slice(0);return a;
- }, random: function random(a) {
- for (var _b2 = [], d = 0; d < a; d += 4) {
- _b2.push(4294967296 * h.random() | 0);
- }return new j.init(b, a);
- } }),
- m = k.enc = {},
- s = m.Hex = { stringify: function stringify(a) {
- var b = a.words;a = a.sigBytes;for (var d = [], c = 0; c < a; c++) {
- var e = b[c >>> 2] >>> 24 - 8 * (c % 4) & 255;d.push((e >>> 4).toString(16));d.push((e & 15).toString(16));
- }return d.join("");
- }, parse: function parse(a) {
- for (var b = a.length, d = [], c = 0; c < b; c += 2) {
- d[c >>> 3] |= parseInt(a.substr(c, 2), 16) << 24 - 4 * (c % 8);
- }return new j.init(d, b / 2);
- } },
- p = m.Latin1 = { stringify: function stringify(a) {
- var b = a.words;a = a.sigBytes;for (var d = [], c = 0; c < a; c++) {
- d.push(String.fromCharCode(b[c >>> 2] >>> 24 - 8 * (c % 4) & 255));
- }return d.join("");
- }, parse: function parse(a) {
- for (var b = a.length, d = [], c = 0; c < b; c++) {
- d[c >>> 2] |= (a.charCodeAt(c) & 255) << 24 - 8 * (c % 4);
- }return new j.init(d, b);
- } },
- t = m.Utf8 = { stringify: function stringify(a) {
- try {
- return decodeURIComponent(escape(p.stringify(a)));
- } catch (b) {
- throw Error("Malformed UTF-8 data");
- }
- }, parse: function parse(a) {
- return p.parse(unescape(encodeURIComponent(a)));
- } },
- q = l.BufferedBlockAlgorithm = f.extend({ reset: function reset() {
- this._data = new j.init();this._nDataBytes = 0;
- }, _append: function _append(a) {
- "string" == typeof a && (a = t.parse(a));this._data.concat(a);this._nDataBytes += a.sigBytes;
- }, _process: function _process(a) {
- var b = this._data,
- d = b.words,
- c = b.sigBytes,
- e = this.blockSize,
- f = c / (4 * e),
- f = a ? h.ceil(f) : h.max((f | 0) - this._minBufferSize, 0);a = f * e;c = h.min(4 * a, c);if (a) {
- for (var g = 0; g < a; g += e) {
- this._doProcessBlock(d, g);
- }g = d.splice(0, a);b.sigBytes -= c;
- }return new j.init(g, c);
- }, clone: function clone() {
- var a = f.clone.call(this);a._data = this._data.clone();return a;
- }, _minBufferSize: 0 });l.Hasher = q.extend({ cfg: f.extend(), init: function init(a) {
- this.cfg = this.cfg.extend(a);this.reset();
- }, reset: function reset() {
- q.reset.call(this);this._doReset();
- }, update: function update(a) {
- this._append(a);this._process();return this;
- }, finalize: function finalize(a) {
- a && this._append(a);return this._doFinalize();
- }, blockSize: 16, _createHelper: function _createHelper(a) {
- return function (b, d) {
- return new a.init(d).finalize(b);
- };
- }, _createHmacHelper: function _createHmacHelper(a) {
- return function (b, d) {
- return new u.HMAC.init(a, d).finalize(b);
- };
- } });var u = k.algo = {};return k;
-}(Math);
-(function () {
- var k = CryptoJS,
- b = k.lib,
- m = b.WordArray,
- l = b.Hasher,
- d = [],
- b = k.algo.SHA1 = l.extend({ _doReset: function _doReset() {
- this._hash = new m.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
- }, _doProcessBlock: function _doProcessBlock(n, p) {
- for (var a = this._hash.words, e = a[0], f = a[1], h = a[2], j = a[3], b = a[4], c = 0; 80 > c; c++) {
- if (16 > c) d[c] = n[p + c] | 0;else {
- var g = d[c - 3] ^ d[c - 8] ^ d[c - 14] ^ d[c - 16];d[c] = g << 1 | g >>> 31;
- }g = (e << 5 | e >>> 27) + b + d[c];g = 20 > c ? g + ((f & h | ~f & j) + 1518500249) : 40 > c ? g + ((f ^ h ^ j) + 1859775393) : 60 > c ? g + ((f & h | f & j | h & j) - 1894007588) : g + ((f ^ h ^ j) - 899497514);b = j;j = h;h = f << 30 | f >>> 2;f = e;e = g;
- }a[0] = a[0] + e | 0;a[1] = a[1] + f | 0;a[2] = a[2] + h | 0;a[3] = a[3] + j | 0;a[4] = a[4] + b | 0;
- }, _doFinalize: function _doFinalize() {
- var b = this._data,
- d = b.words,
- a = 8 * this._nDataBytes,
- e = 8 * b.sigBytes;d[e >>> 5] |= 128 << 24 - e % 32;d[(e + 64 >>> 9 << 4) + 14] = Math.floor(a / 4294967296);d[(e + 64 >>> 9 << 4) + 15] = a;b.sigBytes = 4 * d.length;this._process();return this._hash;
- }, clone: function clone() {
- var b = l.clone.call(this);b._hash = this._hash.clone();return b;
- } });k.SHA1 = l._createHelper(b);k.HmacSHA1 = l._createHmacHelper(b);
-})();
-(function (k) {
- for (var g = CryptoJS, h = g.lib, v = h.WordArray, j = h.Hasher, h = g.algo, s = [], t = [], u = function u(q) {
- return 4294967296 * (q - (q | 0)) | 0;
- }, l = 2, b = 0; 64 > b;) {
- var d;a: {
- d = l;for (var w = k.sqrt(d), r = 2; r <= w; r++) {
- if (!(d % r)) {
- d = !1;break a;
- }
- }d = !0;
- }d && (8 > b && (s[b] = u(k.pow(l, 0.5))), t[b] = u(k.pow(l, 1 / 3)), b++);l++;
- }var n = [],
- h = h.SHA256 = j.extend({ _doReset: function _doReset() {
- this._hash = new v.init(s.slice(0));
- }, _doProcessBlock: function _doProcessBlock(q, h) {
- for (var a = this._hash.words, c = a[0], d = a[1], b = a[2], k = a[3], f = a[4], g = a[5], j = a[6], l = a[7], e = 0; 64 > e; e++) {
- if (16 > e) n[e] = q[h + e] | 0;else {
- var m = n[e - 15],
- p = n[e - 2];n[e] = ((m << 25 | m >>> 7) ^ (m << 14 | m >>> 18) ^ m >>> 3) + n[e - 7] + ((p << 15 | p >>> 17) ^ (p << 13 | p >>> 19) ^ p >>> 10) + n[e - 16];
- }m = l + ((f << 26 | f >>> 6) ^ (f << 21 | f >>> 11) ^ (f << 7 | f >>> 25)) + (f & g ^ ~f & j) + t[e] + n[e];p = ((c << 30 | c >>> 2) ^ (c << 19 | c >>> 13) ^ (c << 10 | c >>> 22)) + (c & d ^ c & b ^ d & b);l = j;j = g;g = f;f = k + m | 0;k = b;b = d;d = c;c = m + p | 0;
- }a[0] = a[0] + c | 0;a[1] = a[1] + d | 0;a[2] = a[2] + b | 0;a[3] = a[3] + k | 0;a[4] = a[4] + f | 0;a[5] = a[5] + g | 0;a[6] = a[6] + j | 0;a[7] = a[7] + l | 0;
- }, _doFinalize: function _doFinalize() {
- var d = this._data,
- b = d.words,
- a = 8 * this._nDataBytes,
- c = 8 * d.sigBytes;b[c >>> 5] |= 128 << 24 - c % 32;b[(c + 64 >>> 9 << 4) + 14] = k.floor(a / 4294967296);b[(c + 64 >>> 9 << 4) + 15] = a;d.sigBytes = 4 * b.length;this._process();return this._hash;
- }, clone: function clone() {
- var b = j.clone.call(this);b._hash = this._hash.clone();return b;
- } });g.SHA256 = j._createHelper(h);g.HmacSHA256 = j._createHmacHelper(h);
-})(Math);
-(function () {
- var c = CryptoJS,
- k = c.enc.Utf8;c.algo.HMAC = c.lib.Base.extend({ init: function init(a, b) {
- a = this._hasher = new a.init();"string" == typeof b && (b = k.parse(b));var c = a.blockSize,
- e = 4 * c;b.sigBytes > e && (b = a.finalize(b));b.clamp();for (var f = this._oKey = b.clone(), g = this._iKey = b.clone(), h = f.words, j = g.words, d = 0; d < c; d++) {
- h[d] ^= 1549556828, j[d] ^= 909522486;
- }f.sigBytes = g.sigBytes = e;this.reset();
- }, reset: function reset() {
- var a = this._hasher;a.reset();a.update(this._iKey);
- }, update: function update(a) {
- this._hasher.update(a);return this;
- }, finalize: function finalize(a) {
- var b = this._hasher;a = b.finalize(a);b.reset();return b.finalize(this._oKey.clone().concat(a));
- } });
-})();
-(function () {
- var h = CryptoJS,
- j = h.lib.WordArray;h.enc.Base64 = { stringify: function stringify(b) {
- var e = b.words,
- f = b.sigBytes,
- c = this._map;b.clamp();b = [];for (var a = 0; a < f; a += 3) {
- for (var d = (e[a >>> 2] >>> 24 - 8 * (a % 4) & 255) << 16 | (e[a + 1 >>> 2] >>> 24 - 8 * ((a + 1) % 4) & 255) << 8 | e[a + 2 >>> 2] >>> 24 - 8 * ((a + 2) % 4) & 255, g = 0; 4 > g && a + 0.75 * g < f; g++) {
- b.push(c.charAt(d >>> 6 * (3 - g) & 63));
- }
- }if (e = c.charAt(64)) for (; b.length % 4;) {
- b.push(e);
- }return b.join("");
- }, parse: function parse(b) {
- var e = b.length,
- f = this._map,
- c = f.charAt(64);c && (c = b.indexOf(c), -1 != c && (e = c));for (var c = [], a = 0, d = 0; d < e; d++) {
- if (d % 4) {
- var g = f.indexOf(b.charAt(d - 1)) << 2 * (d % 4),
- h = f.indexOf(b.charAt(d)) >>> 6 - 2 * (d % 4);c[a >>> 2] |= (g | h) << 24 - 8 * (a % 4);a++;
- }
- }return j.create(c, a);
- }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" };
-})();
-
-hawk.crypto.utils = CryptoJS;
-
-// Export if used as a module
-
-if (typeof module !== 'undefined' && module.exports) {
- module.exports = hawk;
-}
-
-/* eslint-enable */
-// $lab:coverage:on$
diff --git a/deps/npm/node_modules/hawk/dist/client.js b/deps/npm/node_modules/hawk/dist/client.js
new file mode 100644
index 0000000000..ac28ef7667
--- /dev/null
+++ b/deps/npm/node_modules/hawk/dist/client.js
@@ -0,0 +1,343 @@
+'use strict'
+
+// Load modules
+
+;
+
+var _typeof = function (obj) {
+
+ return obj && typeof Symbol !== 'undefined' && obj.constructor === Symbol ? 'symbol' : typeof obj;
+};
+
+var Url = require('url');
+var Hoek = require('hoek');
+var Cryptiles = require('cryptiles');
+var Crypto = require('./crypto');
+var Utils = require('./utils');
+
+// Declare internals
+
+var internals = {};
+
+// Generate an Authorization header for a given request
+
+/*
+ uri: 'http://example.com/resource?a=b' or object from Url.parse()
+ method: HTTP verb (e.g. 'GET', 'POST')
+ options: {
+
+ // Required
+
+ credentials: {
+ id: 'dh37fgj492je',
+ key: 'aoijedoaijsdlaksjdl',
+ algorithm: 'sha256' // 'sha1', 'sha256'
+ },
+
+ // Optional
+
+ ext: 'application-specific', // Application specific data sent via the ext attribute
+ timestamp: Date.now(), // A pre-calculated timestamp
+ nonce: '2334f34f', // A pre-generated nonce
+ localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided)
+ payload: '{"some":"payload"}', // UTF-8 encoded string for body hash generation (ignored if hash provided)
+ contentType: 'application/json', // Payload content-type (ignored if hash provided)
+ hash: 'U4MKKSmiVxk37JCCrAVIjV=', // Pre-calculated payload hash
+ app: '24s23423f34dx', // Oz application id
+ dlg: '234sz34tww3sd' // Oz delegated-by application id
+ }
+*/
+
+exports.header = function (uri, method, options) {
+
+ var result = {
+ field: '',
+ artifacts: {}
+ };
+
+ // Validate inputs
+
+ if (!uri || typeof uri !== 'string' && (typeof uri === 'undefined' ? 'undefined' : _typeof(uri)) !== 'object' || !method || typeof method !== 'string' || !options || (typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object') {
+
+ result.err = 'Invalid argument type';
+ return result;
+ }
+
+ // Application time
+
+ var timestamp = options.timestamp || Utils.nowSecs(options.localtimeOffsetMsec);
+
+ // Validate credentials
+
+ var credentials = options.credentials;
+ if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) {
+
+ result.err = 'Invalid credential object';
+ return result;
+ }
+
+ if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
+ result.err = 'Unknown algorithm';
+ return result;
+ }
+
+ // Parse URI
+
+ if (typeof uri === 'string') {
+ uri = Url.parse(uri);
+ }
+
+ // Calculate signature
+
+ var artifacts = {
+ ts: timestamp,
+ nonce: options.nonce || Cryptiles.randomString(6),
+ method: method,
+ resource: uri.pathname + (uri.search || ''), // Maintain trailing '?'
+ host: uri.hostname,
+ port: uri.port || (uri.protocol === 'http:' ? 80 : 443),
+ hash: options.hash,
+ ext: options.ext,
+ app: options.app,
+ dlg: options.dlg
+ };
+
+ result.artifacts = artifacts;
+
+ // Calculate payload hash
+
+ if (!artifacts.hash && (options.payload || options.payload === '')) {
+
+ artifacts.hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
+ }
+
+ var mac = Crypto.calculateMac('header', credentials, artifacts);
+
+ // Construct header
+
+ var hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== ''; // Other falsey values allowed
+ var header = 'Hawk id="' + credentials.id + '", ts="' + artifacts.ts + '", nonce="' + artifacts.nonce + (artifacts.hash ? '", hash="' + artifacts.hash : '') + (hasExt ? '", ext="' + Hoek.escapeHeaderAttribute(artifacts.ext) : '') + '", mac="' + mac + '"';
+
+ if (artifacts.app) {
+ header = header + ', app="' + artifacts.app + (artifacts.dlg ? '", dlg="' + artifacts.dlg : '') + '"';
+ }
+
+ result.field = header;
+
+ return result;
+};
+
+// Validate server response
+
+/*
+ res: node's response object
+ artifacts: object received from header().artifacts
+ options: {
+ payload: optional payload received
+ required: specifies if a Server-Authorization header is required. Defaults to 'false'
+ }
+*/
+
+exports.authenticate = function (res, credentials, artifacts, options) {
+
+ artifacts = Hoek.clone(artifacts);
+ options = options || {};
+
+ if (res.headers['www-authenticate']) {
+
+ // Parse HTTP WWW-Authenticate header
+
+ var wwwAttributes = Utils.parseAuthorizationHeader(res.headers['www-authenticate'], ['ts', 'tsm', 'error']);
+ if (wwwAttributes instanceof Error) {
+ return false;
+ }
+
+ // Validate server timestamp (not used to update clock since it is done via the SNPT client)
+
+ if (wwwAttributes.ts) {
+ var tsm = Crypto.calculateTsMac(wwwAttributes.ts, credentials);
+ if (tsm !== wwwAttributes.tsm) {
+ return false;
+ }
+ }
+ }
+
+ // Parse HTTP Server-Authorization header
+
+ if (!res.headers['server-authorization'] && !options.required) {
+
+ return true;
+ }
+
+ var attributes = Utils.parseAuthorizationHeader(res.headers['server-authorization'], ['mac', 'ext', 'hash']);
+ if (attributes instanceof Error) {
+ return false;
+ }
+
+ artifacts.ext = attributes.ext;
+ artifacts.hash = attributes.hash;
+
+ var mac = Crypto.calculateMac('response', credentials, artifacts);
+ if (mac !== attributes.mac) {
+ return false;
+ }
+
+ if (!options.payload && options.payload !== '') {
+
+ return true;
+ }
+
+ if (!attributes.hash) {
+ return false;
+ }
+
+ var calculatedHash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, res.headers['content-type']);
+ return calculatedHash === attributes.hash;
+};
+
+// Generate a bewit value for a given URI
+
+/*
+ uri: 'http://example.com/resource?a=b' or object from Url.parse()
+ options: {
+
+ // Required
+
+ credentials: {
+ id: 'dh37fgj492je',
+ key: 'aoijedoaijsdlaksjdl',
+ algorithm: 'sha256' // 'sha1', 'sha256'
+ },
+ ttlSec: 60 * 60, // TTL in seconds
+
+ // Optional
+
+ ext: 'application-specific', // Application specific data sent via the ext attribute
+ localtimeOffsetMsec: 400 // Time offset to sync with server time
+ };
+*/
+
+exports.getBewit = function (uri, options) {
+
+ // Validate inputs
+
+ if (!uri || typeof uri !== 'string' && (typeof uri === 'undefined' ? 'undefined' : _typeof(uri)) !== 'object' || !options || (typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object' || !options.ttlSec) {
+
+ return '';
+ }
+
+ options.ext = options.ext === null || options.ext === undefined ? '' : options.ext; // Zero is valid value
+
+ // Application time
+
+ var now = Utils.now(options.localtimeOffsetMsec);
+
+ // Validate credentials
+
+ var credentials = options.credentials;
+ if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) {
+
+ return '';
+ }
+
+ if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
+ return '';
+ }
+
+ // Parse URI
+
+ if (typeof uri === 'string') {
+ uri = Url.parse(uri);
+ }
+
+ // Calculate signature
+
+ var exp = Math.floor(now / 1000) + options.ttlSec;
+ var mac = Crypto.calculateMac('bewit', credentials, {
+ ts: exp,
+ nonce: '',
+ method: 'GET',
+ resource: uri.pathname + (uri.search || ''), // Maintain trailing '?'
+ host: uri.hostname,
+ port: uri.port || (uri.protocol === 'http:' ? 80 : 443),
+ ext: options.ext
+ });
+
+ // Construct bewit: id\exp\mac\ext
+
+ var bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + options.ext;
+ return Hoek.base64urlEncode(bewit);
+};
+
+// Generate an authorization string for a message
+
+/*
+ host: 'example.com',
+ port: 8000,
+ message: '{"some":"payload"}', // UTF-8 encoded string for body hash generation
+ options: {
+
+ // Required
+
+ credentials: {
+ id: 'dh37fgj492je',
+ key: 'aoijedoaijsdlaksjdl',
+ algorithm: 'sha256' // 'sha1', 'sha256'
+ },
+
+ // Optional
+
+ timestamp: Date.now(), // A pre-calculated timestamp
+ nonce: '2334f34f', // A pre-generated nonce
+ localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided)
+ }
+*/
+
+exports.message = function (host, port, message, options) {
+
+ // Validate inputs
+
+ if (!host || typeof host !== 'string' || !port || typeof port !== 'number' || message === null || message === undefined || typeof message !== 'string' || !options || (typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object') {
+
+ return null;
+ }
+
+ // Application time
+
+ var timestamp = options.timestamp || Utils.nowSecs(options.localtimeOffsetMsec);
+
+ // Validate credentials
+
+ var credentials = options.credentials;
+ if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) {
+
+ // Invalid credential object
+ return null;
+ }
+
+ if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
+ return null;
+ }
+
+ // Calculate signature
+
+ var artifacts = {
+ ts: timestamp,
+ nonce: options.nonce || Cryptiles.randomString(6),
+ host: host,
+ port: port,
+ hash: Crypto.calculatePayloadHash(message, credentials.algorithm)
+ };
+
+ // Construct authorization
+
+ var result = {
+ id: credentials.id,
+ ts: artifacts.ts,
+ nonce: artifacts.nonce,
+ hash: artifacts.hash,
+ mac: Crypto.calculateMac('message', credentials, artifacts)
+ };
+
+ return result;
+};
diff --git a/deps/npm/node_modules/hawk/example/usage.js b/deps/npm/node_modules/hawk/example/usage.js
new file mode 100755
index 0000000000..64fe17674a
--- /dev/null
+++ b/deps/npm/node_modules/hawk/example/usage.js
@@ -0,0 +1,77 @@
+// Load modules
+
+var Http = require('http');
+var Request = require('request');
+var Hawk = require('../lib');
+
+
+// Declare internals
+
+var internals = {
+ credentials: {
+ dh37fgj492je: {
+ id: 'dh37fgj492je', // Required by Hawk.client.header
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256',
+ user: 'Steve'
+ }
+ }
+};
+
+
+// Credentials lookup function
+
+var credentialsFunc = function (id, callback) {
+
+ return callback(null, internals.credentials[id]);
+};
+
+
+// Create HTTP server
+
+var handler = function (req, res) {
+
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
+
+ var payload = (!err ? 'Hello ' + credentials.user + ' ' + artifacts.ext : 'Shoosh!');
+ var headers = {
+ 'Content-Type': 'text/plain',
+ 'Server-Authorization': Hawk.server.header(credentials, artifacts, { payload: payload, contentType: 'text/plain' })
+ };
+
+ res.writeHead(!err ? 200 : 401, headers);
+ res.end(payload);
+ });
+};
+
+Http.createServer(handler).listen(8000, '127.0.0.1');
+
+
+// Send unauthenticated request
+
+Request('http://127.0.0.1:8000/resource/1?b=1&a=2', function (error, response, body) {
+
+ console.log(response.statusCode + ': ' + body);
+});
+
+
+// Send authenticated request
+
+credentialsFunc('dh37fgj492je', function (err, credentials) {
+
+ var header = Hawk.client.header('http://127.0.0.1:8000/resource/1?b=1&a=2', 'GET', { credentials: credentials, ext: 'and welcome!' });
+ var options = {
+ uri: 'http://127.0.0.1:8000/resource/1?b=1&a=2',
+ method: 'GET',
+ headers: {
+ authorization: header.field
+ }
+ };
+
+ Request(options, function (error, response, body) {
+
+ var isValid = Hawk.client.authenticate(response, credentials, header.artifacts, { payload: body });
+ console.log(response.statusCode + ': ' + body + (isValid ? ' (valid)' : ' (invalid)'));
+ process.exit(0);
+ });
+});
diff --git a/deps/npm/node_modules/hawk/images/hawk.png b/deps/npm/node_modules/hawk/images/hawk.png
new file mode 100755
index 0000000000..a0e15cda01
--- /dev/null
+++ b/deps/npm/node_modules/hawk/images/hawk.png
Binary files differ
diff --git a/deps/npm/node_modules/hawk/images/logo.png b/deps/npm/node_modules/hawk/images/logo.png
new file mode 100755
index 0000000000..b8ff590171
--- /dev/null
+++ b/deps/npm/node_modules/hawk/images/logo.png
Binary files differ
diff --git a/deps/npm/node_modules/hawk/lib/browser.js b/deps/npm/node_modules/hawk/lib/browser.js
index 6635ce52ba..a7945d0dd9 100755
--- a/deps/npm/node_modules/hawk/lib/browser.js
+++ b/deps/npm/node_modules/hawk/lib/browser.js
@@ -1,15 +1,13 @@
-'use strict';
-
/*
HTTP Hawk Authentication Scheme
- Copyright (c) 2012-2016, Eran Hammer <eran@hammer.io>
+ Copyright (c) 2012-2014, Eran Hammer <eran@hammer.io>
BSD Licensed
*/
// Declare namespace
-const hawk = {
+var hawk = {
internals: {}
};
@@ -47,7 +45,7 @@ hawk.client = {
header: function (uri, method, options) {
- const result = {
+ var result = {
field: '',
artifacts: {}
};
@@ -64,11 +62,11 @@ hawk.client = {
// Application time
- const timestamp = options.timestamp || hawk.utils.nowSec(options.localtimeOffsetMsec);
+ var timestamp = options.timestamp || hawk.utils.now(options.localtimeOffsetMsec);
// Validate credentials
- const credentials = options.credentials;
+ var credentials = options.credentials;
if (!credentials ||
!credentials.id ||
!credentials.key ||
@@ -91,10 +89,10 @@ hawk.client = {
// Calculate signature
- const artifacts = {
+ var artifacts = {
ts: timestamp,
nonce: options.nonce || hawk.utils.randomString(6),
- method,
+ method: method,
resource: uri.resource,
host: uri.host,
port: uri.port,
@@ -114,12 +112,12 @@ hawk.client = {
artifacts.hash = hawk.crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
}
- const mac = hawk.crypto.calculateMac('header', credentials, artifacts);
+ var mac = hawk.crypto.calculateMac('header', credentials, artifacts);
// Construct header
- const hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== ''; // Other falsey values allowed
- let header = 'Hawk id="' + credentials.id +
+ var hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== ''; // Other falsey values allowed
+ var header = 'Hawk id="' + credentials.id +
'", ts="' + artifacts.ts +
'", nonce="' + artifacts.nonce +
(artifacts.hash ? '", hash="' + artifacts.hash : '') +
@@ -175,11 +173,11 @@ hawk.client = {
// Application time
- const now = hawk.utils.nowSec(options.localtimeOffsetMsec);
+ var now = hawk.utils.now(options.localtimeOffsetMsec);
// Validate credentials
- const credentials = options.credentials;
+ var credentials = options.credentials;
if (!credentials ||
!credentials.id ||
!credentials.key ||
@@ -198,8 +196,8 @@ hawk.client = {
// Calculate signature
- const exp = now + options.ttlSec;
- const mac = hawk.crypto.calculateMac('bewit', credentials, {
+ var exp = now + options.ttlSec;
+ var mac = hawk.crypto.calculateMac('bewit', credentials, {
ts: exp,
nonce: '',
method: 'GET',
@@ -211,14 +209,14 @@ hawk.client = {
// Construct bewit: id\exp\mac\ext
- const bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + options.ext;
+ var bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + options.ext;
return hawk.utils.base64urlEncode(bewit);
},
// Validate server response
/*
- request: object created via 'new XMLHttpRequest()' after response received or fetch API 'Response'
+ request: object created via 'new XMLHttpRequest()' after response received
artifacts: object received from header().artifacts
options: {
payload: optional payload received
@@ -230,54 +228,46 @@ hawk.client = {
options = options || {};
- const getHeader = function (name) {
-
- // Fetch API or plain headers
-
- if (request.headers) {
- return (typeof request.headers.get === 'function' ? request.headers.get(name) : request.headers[name]);
- }
-
- // XMLHttpRequest
+ var getHeader = function (name) {
- return (request.getResponseHeader ? request.getResponseHeader(name) : request.getHeader(name));
+ return request.getResponseHeader ? request.getResponseHeader(name) : request.getHeader(name);
};
- const wwwAuthenticate = getHeader('www-authenticate');
+ var wwwAuthenticate = getHeader('www-authenticate');
if (wwwAuthenticate) {
// Parse HTTP WWW-Authenticate header
- const wwwAttributes = hawk.utils.parseAuthorizationHeader(wwwAuthenticate, ['ts', 'tsm', 'error']);
+ var wwwAttributes = hawk.utils.parseAuthorizationHeader(wwwAuthenticate, ['ts', 'tsm', 'error']);
if (!wwwAttributes) {
return false;
}
if (wwwAttributes.ts) {
- const tsm = hawk.crypto.calculateTsMac(wwwAttributes.ts, credentials);
+ var tsm = hawk.crypto.calculateTsMac(wwwAttributes.ts, credentials);
if (tsm !== wwwAttributes.tsm) {
return false;
}
- hawk.utils.setNtpSecOffset(wwwAttributes.ts - Math.floor(Date.now() / 1000)); // Keep offset at 1 second precision
+ hawk.utils.setNtpOffset(wwwAttributes.ts - Math.floor((new Date()).getTime() / 1000)); // Keep offset at 1 second precision
}
}
// Parse HTTP Server-Authorization header
- const serverAuthorization = getHeader('server-authorization');
+ var serverAuthorization = getHeader('server-authorization');
if (!serverAuthorization &&
!options.required) {
return true;
}
- const attributes = hawk.utils.parseAuthorizationHeader(serverAuthorization, ['mac', 'ext', 'hash']);
+ var attributes = hawk.utils.parseAuthorizationHeader(serverAuthorization, ['mac', 'ext', 'hash']);
if (!attributes) {
return false;
}
- const modArtifacts = {
+ var modArtifacts = {
ts: artifacts.ts,
nonce: artifacts.nonce,
method: artifacts.method,
@@ -290,7 +280,7 @@ hawk.client = {
dlg: artifacts.dlg
};
- const mac = hawk.crypto.calculateMac('response', credentials, modArtifacts);
+ var mac = hawk.crypto.calculateMac('response', credentials, modArtifacts);
if (mac !== attributes.mac) {
return false;
}
@@ -305,7 +295,7 @@ hawk.client = {
return false;
}
- const calculatedHash = hawk.crypto.calculatePayloadHash(options.payload, credentials.algorithm, getHeader('content-type'));
+ var calculatedHash = hawk.crypto.calculatePayloadHash(options.payload, credentials.algorithm, getHeader('content-type'));
return (calculatedHash === attributes.hash);
},
@@ -323,11 +313,11 @@ hawk.client = {
// Application time
- const timestamp = options.timestamp || hawk.utils.nowSec(options.localtimeOffsetMsec);
+ var timestamp = options.timestamp || hawk.utils.now(options.localtimeOffsetMsec);
// Validate credentials
- const credentials = options.credentials;
+ var credentials = options.credentials;
if (!credentials ||
!credentials.id ||
!credentials.key ||
@@ -343,17 +333,17 @@ hawk.client = {
// Calculate signature
- const artifacts = {
+ var artifacts = {
ts: timestamp,
nonce: options.nonce || hawk.utils.randomString(6),
- host,
- port,
+ host: host,
+ port: port,
hash: hawk.crypto.calculatePayloadHash(message, credentials.algorithm)
};
// Construct authorization
- const result = {
+ var result = {
id: credentials.id,
ts: artifacts.ts,
nonce: artifacts.nonce,
@@ -364,15 +354,15 @@ hawk.client = {
return result;
},
- authenticateTimestamp: function (message, credentials, updateClock) { // updateClock defaults to true
+ authenticateTimestamp: function (message, credentials, updateClock) { // updateClock defaults to true
- const tsm = hawk.crypto.calculateTsMac(message.ts, credentials);
+ var tsm = hawk.crypto.calculateTsMac(message.ts, credentials);
if (tsm !== message.tsm) {
return false;
}
if (updateClock !== false) {
- hawk.utils.setNtpSecOffset(message.ts - Math.floor(Date.now() / 1000)); // Keep offset at 1 second precision
+ hawk.utils.setNtpOffset(message.ts - Math.floor((new Date()).getTime() / 1000)); // Keep offset at 1 second precision
}
return true;
@@ -388,15 +378,15 @@ hawk.crypto = {
calculateMac: function (type, credentials, options) {
- const normalized = hawk.crypto.generateNormalizedString(type, options);
+ var normalized = hawk.crypto.generateNormalizedString(type, options);
- const hmac = CryptoJS['Hmac' + credentials.algorithm.toUpperCase()](normalized, credentials.key);
+ var hmac = CryptoJS['Hmac' + credentials.algorithm.toUpperCase()](normalized, credentials.key);
return hmac.toString(CryptoJS.enc.Base64);
},
generateNormalizedString: function (type, options) {
- let normalized = 'hawk.' + hawk.crypto.headerVersion + '.' + type + '\n' +
+ var normalized = 'hawk.' + hawk.crypto.headerVersion + '.' + type + '\n' +
options.ts + '\n' +
options.nonce + '\n' +
(options.method || '').toUpperCase() + '\n' +
@@ -421,7 +411,7 @@ hawk.crypto = {
calculatePayloadHash: function (payload, algorithm, contentType) {
- const hash = CryptoJS.algo[algorithm.toUpperCase()].create();
+ var hash = CryptoJS.algo[algorithm.toUpperCase()].create();
hash.update('hawk.' + hawk.crypto.headerVersion + '.payload\n');
hash.update(hawk.utils.parseContentType(contentType) + '\n');
hash.update(payload);
@@ -431,7 +421,7 @@ hawk.crypto = {
calculateTsMac: function (ts, credentials) {
- const hash = CryptoJS['Hmac' + credentials.algorithm.toUpperCase()]('hawk.' + hawk.crypto.headerVersion + '.ts\n' + ts + '\n', credentials.key);
+ var hash = CryptoJS['Hmac' + credentials.algorithm.toUpperCase()]('hawk.' + hawk.crypto.headerVersion + '.ts\n' + ts + '\n', credentials.key);
return hash.toString(CryptoJS.enc.Base64);
}
};
@@ -480,14 +470,14 @@ hawk.utils = {
setStorage: function (storage) {
- const ntpOffset = hawk.utils.storage.getItem('hawk_ntp_offset');
+ var ntpOffset = hawk.utils.storage.getItem('hawk_ntp_offset');
hawk.utils.storage = storage;
if (ntpOffset) {
- hawk.utils.setNtpSecOffset(ntpOffset);
+ hawk.utils.setNtpOffset(ntpOffset);
}
},
- setNtpSecOffset: function (offset) {
+ setNtpOffset: function (offset) {
try {
hawk.utils.storage.setItem('hawk_ntp_offset', offset);
@@ -498,9 +488,9 @@ hawk.utils = {
}
},
- getNtpSecOffset: function () {
+ getNtpOffset: function () {
- const offset = hawk.utils.storage.getItem('hawk_ntp_offset');
+ var offset = hawk.utils.storage.getItem('hawk_ntp_offset');
if (!offset) {
return 0;
}
@@ -510,12 +500,7 @@ hawk.utils = {
now: function (localtimeOffsetMsec) {
- return Date.now() + (localtimeOffsetMsec || 0) + (hawk.utils.getNtpSecOffset() * 1000);
- },
-
- nowSec: function (localtimeOffsetMsec) {
-
- return Math.floor(hawk.utils.now(localtimeOffsetMsec) / 1000);
+ return Math.floor(((new Date()).getTime() + (localtimeOffsetMsec || 0)) / 1000) + hawk.utils.getNtpOffset();
},
escapeHeaderAttribute: function (attribute) {
@@ -538,23 +523,23 @@ hawk.utils = {
return null;
}
- const headerParts = header.match(/^(\w+)(?:\s+(.*))?$/); // Header: scheme[ something]
+ var headerParts = header.match(/^(\w+)(?:\s+(.*))?$/); // Header: scheme[ something]
if (!headerParts) {
return null;
}
- const scheme = headerParts[1];
+ var scheme = headerParts[1];
if (scheme.toLowerCase() !== 'hawk') {
return null;
}
- const attributesString = headerParts[2];
+ var attributesString = headerParts[2];
if (!attributesString) {
return null;
}
- const attributes = {};
- const verify = attributesString.replace(/(\w+)="([^"\\]*)"\s*(?:,\s*|$)/g, ($0, $1, $2) => {
+ var attributes = {};
+ var verify = attributesString.replace(/(\w+)="([^"\\]*)"\s*(?:,\s*|$)/g, function ($0, $1, $2) {
// Check valid attribute names
@@ -587,28 +572,27 @@ hawk.utils = {
randomString: function (size) {
- const randomSource = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
- const len = randomSource.length;
+ var randomSource = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
+ var len = randomSource.length;
- const result = [];
- for (let i = 0; i < size; ++i) {
+ var result = [];
+ for (var i = 0; i < size; ++i) {
result[i] = randomSource[Math.floor(Math.random() * len)];
}
return result.join('');
},
- // 1 2 3 4
- uriRegex: /^([^:]+)\:\/\/(?:[^@/]*@)?([^\/:]+)(?:\:(\d+))?([^#]*)(?:#.*)?$/, // scheme://credentials@host:port/resource#fragment
+ uriRegex: /^([^:]+)\:\/\/(?:[^@]*@)?([^\/:]+)(?:\:(\d+))?([^#]*)(?:#.*)?$/, // scheme://credentials@host:port/resource#fragment
parseUri: function (input) {
- const parts = input.match(hawk.utils.uriRegex);
+ var parts = input.match(hawk.utils.uriRegex);
if (!parts) {
return { host: '', port: '', resource: '' };
}
- const scheme = parts[1].toLowerCase();
- const uri = {
+ var scheme = parts[1].toLowerCase();
+ var uri = {
host: parts[2],
port: parts[3] || (scheme === 'http' ? '80' : (scheme === 'https' ? '443' : '')),
resource: parts[4]
@@ -619,8 +603,8 @@ hawk.utils = {
base64urlEncode: function (value) {
- const wordArray = CryptoJS.enc.Utf8.parse(value);
- const encoded = CryptoJS.enc.Base64.stringify(wordArray);
+ var wordArray = CryptoJS.enc.Utf8.parse(value);
+ var encoded = CryptoJS.enc.Base64.stringify(wordArray);
return encoded.replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, '');
}
};
@@ -634,14 +618,14 @@ hawk.utils = {
// http://code.google.com/p/crypto-js/
// http://code.google.com/p/crypto-js/wiki/License
-var CryptoJS = CryptoJS || function (h, r) { var k = {}, l = k.lib = {}, n = function () { }, f = l.Base = { extend: function (a) { n.prototype = this; var b = new n; a && b.mixIn(a); b.hasOwnProperty("init") || (b.init = function () { b.$super.init.apply(this, arguments) }); b.init.prototype = b; b.$super = this; return b }, create: function () { var a = this.extend(); a.init.apply(a, arguments); return a }, init: function () { }, mixIn: function (a) { for (let b in a) a.hasOwnProperty(b) && (this[b] = a[b]); a.hasOwnProperty("toString") && (this.toString = a.toString) }, clone: function () { return this.init.prototype.extend(this) } }, j = l.WordArray = f.extend({ init: function (a, b) { a = this.words = a || []; this.sigBytes = b != r ? b : 4 * a.length }, toString: function (a) { return (a || s).stringify(this) }, concat: function (a) { var b = this.words, d = a.words, c = this.sigBytes; a = a.sigBytes; this.clamp(); if (c % 4) for (let e = 0; e < a; e++) b[c + e >>> 2] |= (d[e >>> 2] >>> 24 - 8 * (e % 4) & 255) << 24 - 8 * ((c + e) % 4); else if (65535 < d.length) for (let e = 0; e < a; e += 4) b[c + e >>> 2] = d[e >>> 2]; else b.push.apply(b, d); this.sigBytes += a; return this }, clamp: function () { var a = this.words, b = this.sigBytes; a[b >>> 2] &= 4294967295 << 32 - 8 * (b % 4); a.length = h.ceil(b / 4) }, clone: function () { var a = f.clone.call(this); a.words = this.words.slice(0); return a }, random: function (a) { for (let b = [], d = 0; d < a; d += 4) b.push(4294967296 * h.random() | 0); return new j.init(b, a) } }), m = k.enc = {}, s = m.Hex = { stringify: function (a) { var b = a.words; a = a.sigBytes; for (var d = [], c = 0; c < a; c++) { var e = b[c >>> 2] >>> 24 - 8 * (c % 4) & 255; d.push((e >>> 4).toString(16)); d.push((e & 15).toString(16)) } return d.join("") }, parse: function (a) { for (var b = a.length, d = [], c = 0; c < b; c += 2) d[c >>> 3] |= parseInt(a.substr(c, 2), 16) << 24 - 4 * (c % 8); return new j.init(d, b / 2) } }, p = m.Latin1 = { stringify: function (a) { var b = a.words; a = a.sigBytes; for (var d = [], c = 0; c < a; c++) d.push(String.fromCharCode(b[c >>> 2] >>> 24 - 8 * (c % 4) & 255)); return d.join("") }, parse: function (a) { for (var b = a.length, d = [], c = 0; c < b; c++) d[c >>> 2] |= (a.charCodeAt(c) & 255) << 24 - 8 * (c % 4); return new j.init(d, b) } }, t = m.Utf8 = { stringify: function (a) { try { return decodeURIComponent(escape(p.stringify(a))) } catch (b) { throw Error("Malformed UTF-8 data"); } }, parse: function (a) { return p.parse(unescape(encodeURIComponent(a))) } }, q = l.BufferedBlockAlgorithm = f.extend({ reset: function () { this._data = new j.init; this._nDataBytes = 0 }, _append: function (a) { "string" == typeof a && (a = t.parse(a)); this._data.concat(a); this._nDataBytes += a.sigBytes }, _process: function (a) { var b = this._data, d = b.words, c = b.sigBytes, e = this.blockSize, f = c / (4 * e), f = a ? h.ceil(f) : h.max((f | 0) - this._minBufferSize, 0); a = f * e; c = h.min(4 * a, c); if (a) { for (var g = 0; g < a; g += e) this._doProcessBlock(d, g); g = d.splice(0, a); b.sigBytes -= c } return new j.init(g, c) }, clone: function () { var a = f.clone.call(this); a._data = this._data.clone(); return a }, _minBufferSize: 0 }); l.Hasher = q.extend({ cfg: f.extend(), init: function (a) { this.cfg = this.cfg.extend(a); this.reset() }, reset: function () { q.reset.call(this); this._doReset() }, update: function (a) { this._append(a); this._process(); return this }, finalize: function (a) { a && this._append(a); return this._doFinalize() }, blockSize: 16, _createHelper: function (a) { return function (b, d) { return (new a.init(d)).finalize(b) } }, _createHmacHelper: function (a) { return function (b, d) { return (new u.HMAC.init(a, d)).finalize(b) } } }); var u = k.algo = {}; return k }(Math);
-(() => { var k = CryptoJS, b = k.lib, m = b.WordArray, l = b.Hasher, d = [], b = k.algo.SHA1 = l.extend({ _doReset: function () { this._hash = new m.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (n, p) { for (var a = this._hash.words, e = a[0], f = a[1], h = a[2], j = a[3], b = a[4], c = 0; 80 > c; c++) { if (16 > c) d[c] = n[p + c] | 0; else { var g = d[c - 3] ^ d[c - 8] ^ d[c - 14] ^ d[c - 16]; d[c] = g << 1 | g >>> 31 } g = (e << 5 | e >>> 27) + b + d[c]; g = 20 > c ? g + ((f & h | ~f & j) + 1518500249) : 40 > c ? g + ((f ^ h ^ j) + 1859775393) : 60 > c ? g + ((f & h | f & j | h & j) - 1894007588) : g + ((f ^ h ^ j) - 899497514); b = j; j = h; h = f << 30 | f >>> 2; f = e; e = g } a[0] = a[0] + e | 0; a[1] = a[1] + f | 0; a[2] = a[2] + h | 0; a[3] = a[3] + j | 0; a[4] = a[4] + b | 0 }, _doFinalize: function () { var b = this._data, d = b.words, a = 8 * this._nDataBytes, e = 8 * b.sigBytes; d[e >>> 5] |= 128 << 24 - e % 32; d[(e + 64 >>> 9 << 4) + 14] = Math.floor(a / 4294967296); d[(e + 64 >>> 9 << 4) + 15] = a; b.sigBytes = 4 * d.length; this._process(); return this._hash }, clone: function () { var b = l.clone.call(this); b._hash = this._hash.clone(); return b } }); k.SHA1 = l._createHelper(b); k.HmacSHA1 = l._createHmacHelper(b) })();
+var CryptoJS = CryptoJS || function (h, r) { var k = {}, l = k.lib = {}, n = function () { }, f = l.Base = { extend: function (a) { n.prototype = this; var b = new n; a && b.mixIn(a); b.hasOwnProperty("init") || (b.init = function () { b.$super.init.apply(this, arguments) }); b.init.prototype = b; b.$super = this; return b }, create: function () { var a = this.extend(); a.init.apply(a, arguments); return a }, init: function () { }, mixIn: function (a) { for (var b in a) a.hasOwnProperty(b) && (this[b] = a[b]); a.hasOwnProperty("toString") && (this.toString = a.toString) }, clone: function () { return this.init.prototype.extend(this) } }, j = l.WordArray = f.extend({ init: function (a, b) { a = this.words = a || []; this.sigBytes = b != r ? b : 4 * a.length }, toString: function (a) { return (a || s).stringify(this) }, concat: function (a) { var b = this.words, d = a.words, c = this.sigBytes; a = a.sigBytes; this.clamp(); if (c % 4) for (var e = 0; e < a; e++) b[c + e >>> 2] |= (d[e >>> 2] >>> 24 - 8 * (e % 4) & 255) << 24 - 8 * ((c + e) % 4); else if (65535 < d.length) for (e = 0; e < a; e += 4) b[c + e >>> 2] = d[e >>> 2]; else b.push.apply(b, d); this.sigBytes += a; return this }, clamp: function () { var a = this.words, b = this.sigBytes; a[b >>> 2] &= 4294967295 << 32 - 8 * (b % 4); a.length = h.ceil(b / 4) }, clone: function () { var a = f.clone.call(this); a.words = this.words.slice(0); return a }, random: function (a) { for (var b = [], d = 0; d < a; d += 4) b.push(4294967296 * h.random() | 0); return new j.init(b, a) } }), m = k.enc = {}, s = m.Hex = { stringify: function (a) { var b = a.words; a = a.sigBytes; for (var d = [], c = 0; c < a; c++) { var e = b[c >>> 2] >>> 24 - 8 * (c % 4) & 255; d.push((e >>> 4).toString(16)); d.push((e & 15).toString(16)) } return d.join("") }, parse: function (a) { for (var b = a.length, d = [], c = 0; c < b; c += 2) d[c >>> 3] |= parseInt(a.substr(c, 2), 16) << 24 - 4 * (c % 8); return new j.init(d, b / 2) } }, p = m.Latin1 = { stringify: function (a) { var b = a.words; a = a.sigBytes; for (var d = [], c = 0; c < a; c++) d.push(String.fromCharCode(b[c >>> 2] >>> 24 - 8 * (c % 4) & 255)); return d.join("") }, parse: function (a) { for (var b = a.length, d = [], c = 0; c < b; c++) d[c >>> 2] |= (a.charCodeAt(c) & 255) << 24 - 8 * (c % 4); return new j.init(d, b) } }, t = m.Utf8 = { stringify: function (a) { try { return decodeURIComponent(escape(p.stringify(a))) } catch (b) { throw Error("Malformed UTF-8 data"); } }, parse: function (a) { return p.parse(unescape(encodeURIComponent(a))) } }, q = l.BufferedBlockAlgorithm = f.extend({ reset: function () { this._data = new j.init; this._nDataBytes = 0 }, _append: function (a) { "string" == typeof a && (a = t.parse(a)); this._data.concat(a); this._nDataBytes += a.sigBytes }, _process: function (a) { var b = this._data, d = b.words, c = b.sigBytes, e = this.blockSize, f = c / (4 * e), f = a ? h.ceil(f) : h.max((f | 0) - this._minBufferSize, 0); a = f * e; c = h.min(4 * a, c); if (a) { for (var g = 0; g < a; g += e) this._doProcessBlock(d, g); g = d.splice(0, a); b.sigBytes -= c } return new j.init(g, c) }, clone: function () { var a = f.clone.call(this); a._data = this._data.clone(); return a }, _minBufferSize: 0 }); l.Hasher = q.extend({ cfg: f.extend(), init: function (a) { this.cfg = this.cfg.extend(a); this.reset() }, reset: function () { q.reset.call(this); this._doReset() }, update: function (a) { this._append(a); this._process(); return this }, finalize: function (a) { a && this._append(a); return this._doFinalize() }, blockSize: 16, _createHelper: function (a) { return function (b, d) { return (new a.init(d)).finalize(b) } }, _createHmacHelper: function (a) { return function (b, d) { return (new u.HMAC.init(a, d)).finalize(b) } } }); var u = k.algo = {}; return k }(Math);
+(function () { var k = CryptoJS, b = k.lib, m = b.WordArray, l = b.Hasher, d = [], b = k.algo.SHA1 = l.extend({ _doReset: function () { this._hash = new m.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (n, p) { for (var a = this._hash.words, e = a[0], f = a[1], h = a[2], j = a[3], b = a[4], c = 0; 80 > c; c++) { if (16 > c) d[c] = n[p + c] | 0; else { var g = d[c - 3] ^ d[c - 8] ^ d[c - 14] ^ d[c - 16]; d[c] = g << 1 | g >>> 31 } g = (e << 5 | e >>> 27) + b + d[c]; g = 20 > c ? g + ((f & h | ~f & j) + 1518500249) : 40 > c ? g + ((f ^ h ^ j) + 1859775393) : 60 > c ? g + ((f & h | f & j | h & j) - 1894007588) : g + ((f ^ h ^ j) - 899497514); b = j; j = h; h = f << 30 | f >>> 2; f = e; e = g } a[0] = a[0] + e | 0; a[1] = a[1] + f | 0; a[2] = a[2] + h | 0; a[3] = a[3] + j | 0; a[4] = a[4] + b | 0 }, _doFinalize: function () { var b = this._data, d = b.words, a = 8 * this._nDataBytes, e = 8 * b.sigBytes; d[e >>> 5] |= 128 << 24 - e % 32; d[(e + 64 >>> 9 << 4) + 14] = Math.floor(a / 4294967296); d[(e + 64 >>> 9 << 4) + 15] = a; b.sigBytes = 4 * d.length; this._process(); return this._hash }, clone: function () { var b = l.clone.call(this); b._hash = this._hash.clone(); return b } }); k.SHA1 = l._createHelper(b); k.HmacSHA1 = l._createHmacHelper(b) })();
(function (k) { for (var g = CryptoJS, h = g.lib, v = h.WordArray, j = h.Hasher, h = g.algo, s = [], t = [], u = function (q) { return 4294967296 * (q - (q | 0)) | 0 }, l = 2, b = 0; 64 > b;) { var d; a: { d = l; for (var w = k.sqrt(d), r = 2; r <= w; r++) if (!(d % r)) { d = !1; break a } d = !0 } d && (8 > b && (s[b] = u(k.pow(l, 0.5))), t[b] = u(k.pow(l, 1 / 3)), b++); l++ } var n = [], h = h.SHA256 = j.extend({ _doReset: function () { this._hash = new v.init(s.slice(0)) }, _doProcessBlock: function (q, h) { for (var a = this._hash.words, c = a[0], d = a[1], b = a[2], k = a[3], f = a[4], g = a[5], j = a[6], l = a[7], e = 0; 64 > e; e++) { if (16 > e) n[e] = q[h + e] | 0; else { var m = n[e - 15], p = n[e - 2]; n[e] = ((m << 25 | m >>> 7) ^ (m << 14 | m >>> 18) ^ m >>> 3) + n[e - 7] + ((p << 15 | p >>> 17) ^ (p << 13 | p >>> 19) ^ p >>> 10) + n[e - 16] } m = l + ((f << 26 | f >>> 6) ^ (f << 21 | f >>> 11) ^ (f << 7 | f >>> 25)) + (f & g ^ ~f & j) + t[e] + n[e]; p = ((c << 30 | c >>> 2) ^ (c << 19 | c >>> 13) ^ (c << 10 | c >>> 22)) + (c & d ^ c & b ^ d & b); l = j; j = g; g = f; f = k + m | 0; k = b; b = d; d = c; c = m + p | 0 } a[0] = a[0] + c | 0; a[1] = a[1] + d | 0; a[2] = a[2] + b | 0; a[3] = a[3] + k | 0; a[4] = a[4] + f | 0; a[5] = a[5] + g | 0; a[6] = a[6] + j | 0; a[7] = a[7] + l | 0 }, _doFinalize: function () { var d = this._data, b = d.words, a = 8 * this._nDataBytes, c = 8 * d.sigBytes; b[c >>> 5] |= 128 << 24 - c % 32; b[(c + 64 >>> 9 << 4) + 14] = k.floor(a / 4294967296); b[(c + 64 >>> 9 << 4) + 15] = a; d.sigBytes = 4 * b.length; this._process(); return this._hash }, clone: function () { var b = j.clone.call(this); b._hash = this._hash.clone(); return b } }); g.SHA256 = j._createHelper(h); g.HmacSHA256 = j._createHmacHelper(h) })(Math);
-(() => { var c = CryptoJS, k = c.enc.Utf8; c.algo.HMAC = c.lib.Base.extend({ init: function (a, b) { a = this._hasher = new a.init; "string" == typeof b && (b = k.parse(b)); var c = a.blockSize, e = 4 * c; b.sigBytes > e && (b = a.finalize(b)); b.clamp(); for (var f = this._oKey = b.clone(), g = this._iKey = b.clone(), h = f.words, j = g.words, d = 0; d < c; d++) h[d] ^= 1549556828, j[d] ^= 909522486; f.sigBytes = g.sigBytes = e; this.reset() }, reset: function () { var a = this._hasher; a.reset(); a.update(this._iKey) }, update: function (a) { this._hasher.update(a); return this }, finalize: function (a) { var b = this._hasher; a = b.finalize(a); b.reset(); return b.finalize(this._oKey.clone().concat(a)) } }) })();
-(() => { var h = CryptoJS, j = h.lib.WordArray; h.enc.Base64 = { stringify: function (b) { var e = b.words, f = b.sigBytes, c = this._map; b.clamp(); b = []; for (var a = 0; a < f; a += 3) for (var d = (e[a >>> 2] >>> 24 - 8 * (a % 4) & 255) << 16 | (e[a + 1 >>> 2] >>> 24 - 8 * ((a + 1) % 4) & 255) << 8 | e[a + 2 >>> 2] >>> 24 - 8 * ((a + 2) % 4) & 255, g = 0; 4 > g && a + 0.75 * g < f; g++) b.push(c.charAt(d >>> 6 * (3 - g) & 63)); if (e = c.charAt(64)) for (; b.length % 4;) b.push(e); return b.join("") }, parse: function (b) { var e = b.length, f = this._map, c = f.charAt(64); c && (c = b.indexOf(c), -1 != c && (e = c)); for (var c = [], a = 0, d = 0; d < e; d++) if (d % 4) { var g = f.indexOf(b.charAt(d - 1)) << 2 * (d % 4), h = f.indexOf(b.charAt(d)) >>> 6 - 2 * (d % 4); c[a >>> 2] |= (g | h) << 24 - 8 * (a % 4); a++ } return j.create(c, a) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } })();
+(function () { var c = CryptoJS, k = c.enc.Utf8; c.algo.HMAC = c.lib.Base.extend({ init: function (a, b) { a = this._hasher = new a.init; "string" == typeof b && (b = k.parse(b)); var c = a.blockSize, e = 4 * c; b.sigBytes > e && (b = a.finalize(b)); b.clamp(); for (var f = this._oKey = b.clone(), g = this._iKey = b.clone(), h = f.words, j = g.words, d = 0; d < c; d++) h[d] ^= 1549556828, j[d] ^= 909522486; f.sigBytes = g.sigBytes = e; this.reset() }, reset: function () { var a = this._hasher; a.reset(); a.update(this._iKey) }, update: function (a) { this._hasher.update(a); return this }, finalize: function (a) { var b = this._hasher; a = b.finalize(a); b.reset(); return b.finalize(this._oKey.clone().concat(a)) } }) })();
+(function () { var h = CryptoJS, j = h.lib.WordArray; h.enc.Base64 = { stringify: function (b) { var e = b.words, f = b.sigBytes, c = this._map; b.clamp(); b = []; for (var a = 0; a < f; a += 3) for (var d = (e[a >>> 2] >>> 24 - 8 * (a % 4) & 255) << 16 | (e[a + 1 >>> 2] >>> 24 - 8 * ((a + 1) % 4) & 255) << 8 | e[a + 2 >>> 2] >>> 24 - 8 * ((a + 2) % 4) & 255, g = 0; 4 > g && a + 0.75 * g < f; g++) b.push(c.charAt(d >>> 6 * (3 - g) & 63)); if (e = c.charAt(64)) for (; b.length % 4;) b.push(e); return b.join("") }, parse: function (b) { var e = b.length, f = this._map, c = f.charAt(64); c && (c = b.indexOf(c), -1 != c && (e = c)); for (var c = [], a = 0, d = 0; d < e; d++) if (d % 4) { var g = f.indexOf(b.charAt(d - 1)) << 2 * (d % 4), h = f.indexOf(b.charAt(d)) >>> 6 - 2 * (d % 4); c[a >>> 2] |= (g | h) << 24 - 8 * (a % 4); a++ } return j.create(c, a) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } })();
+hawk.crypto.internals = CryptoJS;
-hawk.crypto.utils = CryptoJS;
// Export if used as a module
diff --git a/deps/npm/node_modules/hawk/lib/client.js b/deps/npm/node_modules/hawk/lib/client.js
index 13bd77b359..f9ae691713 100755
--- a/deps/npm/node_modules/hawk/lib/client.js
+++ b/deps/npm/node_modules/hawk/lib/client.js
@@ -1,17 +1,15 @@
-'use strict';
-
// Load modules
-const Url = require('url');
-const Hoek = require('hoek');
-const Cryptiles = require('cryptiles');
-const Crypto = require('./crypto');
-const Utils = require('./utils');
+var Url = require('url');
+var Hoek = require('hoek');
+var Cryptiles = require('cryptiles');
+var Crypto = require('./crypto');
+var Utils = require('./utils');
// Declare internals
-const internals = {};
+var internals = {};
// Generate an Authorization header for a given request
@@ -32,7 +30,7 @@ const internals = {};
// Optional
ext: 'application-specific', // Application specific data sent via the ext attribute
- timestamp: Date.now() / 1000, // A pre-calculated timestamp in seconds
+ timestamp: Date.now(), // A pre-calculated timestamp
nonce: '2334f34f', // A pre-generated nonce
localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided)
payload: '{"some":"payload"}', // UTF-8 encoded string for body hash generation (ignored if hash provided)
@@ -45,7 +43,7 @@ const internals = {};
exports.header = function (uri, method, options) {
- const result = {
+ var result = {
field: '',
artifacts: {}
};
@@ -62,11 +60,11 @@ exports.header = function (uri, method, options) {
// Application time
- const timestamp = options.timestamp || Utils.nowSecs(options.localtimeOffsetMsec);
+ var timestamp = options.timestamp || Utils.nowSecs(options.localtimeOffsetMsec);
// Validate credentials
- const credentials = options.credentials;
+ var credentials = options.credentials;
if (!credentials ||
!credentials.id ||
!credentials.key ||
@@ -89,10 +87,10 @@ exports.header = function (uri, method, options) {
// Calculate signature
- const artifacts = {
+ var artifacts = {
ts: timestamp,
nonce: options.nonce || Cryptiles.randomString(6),
- method,
+ method: method,
resource: uri.pathname + (uri.search || ''), // Maintain trailing '?'
host: uri.hostname,
port: uri.port || (uri.protocol === 'http:' ? 80 : 443),
@@ -112,12 +110,12 @@ exports.header = function (uri, method, options) {
artifacts.hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
}
- const mac = Crypto.calculateMac('header', credentials, artifacts);
+ var mac = Crypto.calculateMac('header', credentials, artifacts);
// Construct header
- const hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== ''; // Other falsey values allowed
- let header = 'Hawk id="' + credentials.id +
+ var hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== ''; // Other falsey values allowed
+ var header = 'Hawk id="' + credentials.id +
'", ts="' + artifacts.ts +
'", nonce="' + artifacts.nonce +
(artifacts.hash ? '", hash="' + artifacts.hash : '') +
@@ -125,7 +123,7 @@ exports.header = function (uri, method, options) {
'", mac="' + mac + '"';
if (artifacts.app) {
- header = header + ', app="' + artifacts.app +
+ header += ', app="' + artifacts.app +
(artifacts.dlg ? '", dlg="' + artifacts.dlg : '') + '"';
}
@@ -146,44 +144,26 @@ exports.header = function (uri, method, options) {
}
*/
-exports.authenticate = function (res, credentials, artifacts, options, callback) {
+exports.authenticate = function (res, credentials, artifacts, options) {
artifacts = Hoek.clone(artifacts);
options = options || {};
- let wwwAttributes = null;
- let serverAuthAttributes = null;
-
- const finalize = function (err) {
-
- if (callback) {
- const headers = {
- 'www-authenticate': wwwAttributes,
- 'server-authorization': serverAuthAttributes
- };
-
- return callback(err, headers);
- }
-
- return !err;
- };
-
if (res.headers['www-authenticate']) {
// Parse HTTP WWW-Authenticate header
- wwwAttributes = Utils.parseAuthorizationHeader(res.headers['www-authenticate'], ['ts', 'tsm', 'error']);
+ var wwwAttributes = Utils.parseAuthorizationHeader(res.headers['www-authenticate'], ['ts', 'tsm', 'error']);
if (wwwAttributes instanceof Error) {
- wwwAttributes = null;
- return finalize(new Error('Invalid WWW-Authenticate header'));
+ return false;
}
// Validate server timestamp (not used to update clock since it is done via the SNPT client)
if (wwwAttributes.ts) {
- const tsm = Crypto.calculateTsMac(wwwAttributes.ts, credentials);
+ var tsm = Crypto.calculateTsMac(wwwAttributes.ts, credentials);
if (tsm !== wwwAttributes.tsm) {
- return finalize(new Error('Invalid server timestamp hash'));
+ return false;
}
}
}
@@ -193,39 +173,34 @@ exports.authenticate = function (res, credentials, artifacts, options, callback)
if (!res.headers['server-authorization'] &&
!options.required) {
- return finalize();
+ return true;
}
- serverAuthAttributes = Utils.parseAuthorizationHeader(res.headers['server-authorization'], ['mac', 'ext', 'hash']);
- if (serverAuthAttributes instanceof Error) {
- serverAuthAttributes = null;
- return finalize(new Error('Invalid Server-Authorization header'));
+ var attributes = Utils.parseAuthorizationHeader(res.headers['server-authorization'], ['mac', 'ext', 'hash']);
+ if (attributes instanceof Error) {
+ return false;
}
- artifacts.ext = serverAuthAttributes.ext;
- artifacts.hash = serverAuthAttributes.hash;
+ artifacts.ext = attributes.ext;
+ artifacts.hash = attributes.hash;
- const mac = Crypto.calculateMac('response', credentials, artifacts);
- if (mac !== serverAuthAttributes.mac) {
- return finalize(new Error('Bad response mac'));
+ var mac = Crypto.calculateMac('response', credentials, artifacts);
+ if (mac !== attributes.mac) {
+ return false;
}
if (!options.payload &&
options.payload !== '') {
- return finalize();
- }
-
- if (!serverAuthAttributes.hash) {
- return finalize(new Error('Missing response hash attribute'));
+ return true;
}
- const calculatedHash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, res.headers['content-type']);
- if (calculatedHash !== serverAuthAttributes.hash) {
- return finalize(new Error('Bad response payload mac'));
+ if (!attributes.hash) {
+ return false;
}
- return finalize();
+ var calculatedHash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, res.headers['content-type']);
+ return (calculatedHash === attributes.hash);
};
@@ -268,11 +243,11 @@ exports.getBewit = function (uri, options) {
// Application time
- const now = Utils.now(options.localtimeOffsetMsec);
+ var now = Utils.now(options.localtimeOffsetMsec);
// Validate credentials
- const credentials = options.credentials;
+ var credentials = options.credentials;
if (!credentials ||
!credentials.id ||
!credentials.key ||
@@ -293,8 +268,8 @@ exports.getBewit = function (uri, options) {
// Calculate signature
- const exp = Math.floor(now / 1000) + options.ttlSec;
- const mac = Crypto.calculateMac('bewit', credentials, {
+ var exp = Math.floor(now / 1000) + options.ttlSec;
+ var mac = Crypto.calculateMac('bewit', credentials, {
ts: exp,
nonce: '',
method: 'GET',
@@ -306,7 +281,7 @@ exports.getBewit = function (uri, options) {
// Construct bewit: id\exp\mac\ext
- const bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + options.ext;
+ var bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + options.ext;
return Hoek.base64urlEncode(bewit);
};
@@ -329,7 +304,7 @@ exports.getBewit = function (uri, options) {
// Optional
- timestamp: Date.now() / 1000, // A pre-calculated timestamp in seconds
+ timestamp: Date.now(), // A pre-calculated timestamp
nonce: '2334f34f', // A pre-generated nonce
localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided)
}
@@ -349,11 +324,11 @@ exports.message = function (host, port, message, options) {
// Application time
- const timestamp = options.timestamp || Utils.nowSecs(options.localtimeOffsetMsec);
+ var timestamp = options.timestamp || Utils.nowSecs(options.localtimeOffsetMsec);
// Validate credentials
- const credentials = options.credentials;
+ var credentials = options.credentials;
if (!credentials ||
!credentials.id ||
!credentials.key ||
@@ -369,17 +344,17 @@ exports.message = function (host, port, message, options) {
// Calculate signature
- const artifacts = {
+ var artifacts = {
ts: timestamp,
nonce: options.nonce || Cryptiles.randomString(6),
- host,
- port,
+ host: host,
+ port: port,
hash: Crypto.calculatePayloadHash(message, credentials.algorithm)
};
// Construct authorization
- const result = {
+ var result = {
id: credentials.id,
ts: artifacts.ts,
nonce: artifacts.nonce,
diff --git a/deps/npm/node_modules/hawk/lib/crypto.js b/deps/npm/node_modules/hawk/lib/crypto.js
index bfa4586c8b..d3c8244a92 100755
--- a/deps/npm/node_modules/hawk/lib/crypto.js
+++ b/deps/npm/node_modules/hawk/lib/crypto.js
@@ -1,15 +1,13 @@
-'use strict';
-
// Load modules
-const Crypto = require('crypto');
-const Url = require('url');
-const Utils = require('./utils');
+var Crypto = require('crypto');
+var Url = require('url');
+var Utils = require('./utils');
// Declare internals
-const internals = {};
+var internals = {};
// MAC normalization format version
@@ -46,25 +44,25 @@ exports.algorithms = ['sha1', 'sha256'];
exports.calculateMac = function (type, credentials, options) {
- const normalized = exports.generateNormalizedString(type, options);
+ var normalized = exports.generateNormalizedString(type, options);
- const hmac = Crypto.createHmac(credentials.algorithm, credentials.key).update(normalized);
- const digest = hmac.digest('base64');
+ var hmac = Crypto.createHmac(credentials.algorithm, credentials.key).update(normalized);
+ var digest = hmac.digest('base64');
return digest;
};
exports.generateNormalizedString = function (type, options) {
- let resource = options.resource || '';
+ var resource = options.resource || '';
if (resource &&
resource[0] !== '/') {
- const url = Url.parse(resource, false);
+ var url = Url.parse(resource, false);
resource = url.path; // Includes query
}
- let normalized = 'hawk.' + exports.headerVersion + '.' + type + '\n' +
+ var normalized = 'hawk.' + exports.headerVersion + '.' + type + '\n' +
options.ts + '\n' +
options.nonce + '\n' +
(options.method || '').toUpperCase() + '\n' +
@@ -74,14 +72,14 @@ exports.generateNormalizedString = function (type, options) {
(options.hash || '') + '\n';
if (options.ext) {
- normalized = normalized + options.ext.replace('\\', '\\\\').replace('\n', '\\n');
+ normalized += options.ext.replace('\\', '\\\\').replace('\n', '\\n');
}
- normalized = normalized + '\n';
+ normalized += '\n';
if (options.app) {
- normalized = normalized + options.app + '\n' +
- (options.dlg || '') + '\n';
+ normalized += options.app + '\n' +
+ (options.dlg || '') + '\n';
}
return normalized;
@@ -90,7 +88,7 @@ exports.generateNormalizedString = function (type, options) {
exports.calculatePayloadHash = function (payload, algorithm, contentType) {
- const hash = exports.initializePayloadHash(algorithm, contentType);
+ var hash = exports.initializePayloadHash(algorithm, contentType);
hash.update(payload || '');
return exports.finalizePayloadHash(hash);
};
@@ -98,7 +96,7 @@ exports.calculatePayloadHash = function (payload, algorithm, contentType) {
exports.initializePayloadHash = function (algorithm, contentType) {
- const hash = Crypto.createHash(algorithm);
+ var hash = Crypto.createHash(algorithm);
hash.update('hawk.' + exports.headerVersion + '.payload\n');
hash.update(Utils.parseContentType(contentType) + '\n');
return hash;
@@ -114,7 +112,7 @@ exports.finalizePayloadHash = function (hash) {
exports.calculateTsMac = function (ts, credentials) {
- const hmac = Crypto.createHmac(credentials.algorithm, credentials.key);
+ var hmac = Crypto.createHmac(credentials.algorithm, credentials.key);
hmac.update('hawk.' + exports.headerVersion + '.ts\n' + ts + '\n');
return hmac.digest('base64');
};
@@ -122,7 +120,7 @@ exports.calculateTsMac = function (ts, credentials) {
exports.timestampMessage = function (credentials, localtimeOffsetMsec) {
- const now = Utils.nowSecs(localtimeOffsetMsec);
- const tsm = exports.calculateTsMac(now, credentials);
- return { ts: now, tsm };
+ var now = Utils.nowSecs(localtimeOffsetMsec);
+ var tsm = exports.calculateTsMac(now, credentials);
+ return { ts: now, tsm: tsm };
};
diff --git a/deps/npm/node_modules/hawk/lib/index.js b/deps/npm/node_modules/hawk/lib/index.js
index d491eaec25..911b906aab 100755
--- a/deps/npm/node_modules/hawk/lib/index.js
+++ b/deps/npm/node_modules/hawk/lib/index.js
@@ -1,5 +1,3 @@
-'use strict';
-
// Export sub-modules
exports.error = exports.Error = require('boom');
diff --git a/deps/npm/node_modules/hawk/lib/server.js b/deps/npm/node_modules/hawk/lib/server.js
index c5b02ae0c5..2f76372355 100755
--- a/deps/npm/node_modules/hawk/lib/server.js
+++ b/deps/npm/node_modules/hawk/lib/server.js
@@ -1,17 +1,15 @@
-'use strict';
-
// Load modules
-const Boom = require('boom');
-const Hoek = require('hoek');
-const Cryptiles = require('cryptiles');
-const Crypto = require('./crypto');
-const Utils = require('./utils');
+var Boom = require('boom');
+var Hoek = require('hoek');
+var Cryptiles = require('cryptiles');
+var Crypto = require('./crypto');
+var Utils = require('./utils');
// Declare internals
-const internals = {};
+var internals = {};
// Hawk authentication
@@ -19,7 +17,7 @@ const internals = {};
/*
req: node's HTTP request object or an object as follows:
- const request = {
+ var request = {
method: 'GET',
url: '/resource/4?a=1&b=2',
host: 'example.com',
@@ -32,7 +30,7 @@ const internals = {};
needed by the application. This function is the equivalent of verifying the username and
password in Basic authentication.
- const credentialsFunc = function (id, callback) {
+ var credentialsFunc = function (id, callback) {
// Lookup credentials in database
db.lookup(id, function (err, item) {
@@ -41,7 +39,7 @@ const internals = {};
return callback(err);
}
- const credentials = {
+ var credentials = {
// Required
key: item.key,
algorithm: item.algorithm,
@@ -95,25 +93,25 @@ exports.authenticate = function (req, credentialsFunc, options, callback) {
// Application time
- const now = Utils.now(options.localtimeOffsetMsec); // Measure now before any other processing
+ var now = Utils.now(options.localtimeOffsetMsec); // Measure now before any other processing
// Convert node Http request object to a request configuration object
- const request = Utils.parseRequest(req, options);
+ var request = Utils.parseRequest(req, options);
if (request instanceof Error) {
return callback(Boom.badRequest(request.message));
}
// Parse HTTP Authorization header
- const attributes = Utils.parseAuthorizationHeader(request.authorization);
+ var attributes = Utils.parseAuthorizationHeader(request.authorization);
if (attributes instanceof Error) {
return callback(attributes);
}
// Construct artifacts container
- const artifacts = {
+ var artifacts = {
method: request.method,
host: request.host,
port: request.port,
@@ -140,14 +138,14 @@ exports.authenticate = function (req, credentialsFunc, options, callback) {
// Fetch Hawk credentials
- credentialsFunc(attributes.id, (err, credentials) => {
+ credentialsFunc(attributes.id, function (err, credentials) {
if (err) {
return callback(err, credentials || null, artifacts);
}
if (!credentials) {
- return callback(Utils.unauthorized('Unknown credentials'), null, artifacts);
+ return callback(Boom.unauthorized('Unknown credentials', 'Hawk'), null, artifacts);
}
if (!credentials.key ||
@@ -162,9 +160,9 @@ exports.authenticate = function (req, credentialsFunc, options, callback) {
// Calculate MAC
- const mac = Crypto.calculateMac('header', credentials, artifacts);
+ var mac = Crypto.calculateMac('header', credentials, artifacts);
if (!Cryptiles.fixedTimeComparison(mac, attributes.mac)) {
- return callback(Utils.unauthorized('Bad mac'), credentials, artifacts);
+ return callback(Boom.unauthorized('Bad mac', 'Hawk'), credentials, artifacts);
}
// Check payload hash
@@ -173,28 +171,28 @@ exports.authenticate = function (req, credentialsFunc, options, callback) {
options.payload === '') {
if (!attributes.hash) {
- return callback(Utils.unauthorized('Missing required payload hash'), credentials, artifacts);
+ return callback(Boom.unauthorized('Missing required payload hash', 'Hawk'), credentials, artifacts);
}
- const hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, request.contentType);
+ var hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, request.contentType);
if (!Cryptiles.fixedTimeComparison(hash, attributes.hash)) {
- return callback(Utils.unauthorized('Bad payload hash'), credentials, artifacts);
+ return callback(Boom.unauthorized('Bad payload hash', 'Hawk'), credentials, artifacts);
}
}
// Check nonce
- options.nonceFunc(credentials.key, attributes.nonce, attributes.ts, (err) => {
+ options.nonceFunc(credentials.key, attributes.nonce, attributes.ts, function (err) {
if (err) {
- return callback(Utils.unauthorized('Invalid nonce'), credentials, artifacts);
+ return callback(Boom.unauthorized('Invalid nonce', 'Hawk'), credentials, artifacts);
}
// Check timestamp staleness
if (Math.abs((attributes.ts * 1000) - now) > (options.timestampSkewSec * 1000)) {
- const tsm = Crypto.timestampMessage(credentials, options.localtimeOffsetMsec);
- return callback(Utils.unauthorized('Stale timestamp', tsm), credentials, artifacts);
+ var tsm = Crypto.timestampMessage(credentials, options.localtimeOffsetMsec);
+ return callback(Boom.unauthorized('Stale timestamp', 'Hawk', tsm), credentials, artifacts);
}
// Successful authentication
@@ -216,7 +214,7 @@ exports.authenticate = function (req, credentialsFunc, options, callback) {
exports.authenticatePayload = function (payload, credentials, artifacts, contentType) {
- const calculatedHash = Crypto.calculatePayloadHash(payload, credentials.algorithm, contentType);
+ var calculatedHash = Crypto.calculatePayloadHash(payload, credentials.algorithm, contentType);
return Cryptiles.fixedTimeComparison(calculatedHash, artifacts.hash);
};
@@ -287,18 +285,18 @@ exports.header = function (credentials, artifacts, options) {
artifacts.hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
}
- const mac = Crypto.calculateMac('response', credentials, artifacts);
+ var mac = Crypto.calculateMac('response', credentials, artifacts);
// Construct header
- let header = 'Hawk mac="' + mac + '"' +
+ var header = 'Hawk mac="' + mac + '"' +
(artifacts.hash ? ', hash="' + artifacts.hash + '"' : '');
if (artifacts.ext !== null &&
artifacts.ext !== undefined &&
artifacts.ext !== '') { // Other falsey values allowed
- header = header + ', ext="' + Hoek.escapeHeaderAttribute(artifacts.ext) + '"';
+ header += ', ext="' + Hoek.escapeHeaderAttribute(artifacts.ext) + '"';
}
return header;
@@ -321,11 +319,11 @@ exports.authenticateBewit = function (req, credentialsFunc, options, callback) {
// Application time
- const now = Utils.now(options.localtimeOffsetMsec);
+ var now = Utils.now(options.localtimeOffsetMsec);
// Convert node Http request object to a request configuration object
- const request = Utils.parseRequest(req, options);
+ var request = Utils.parseRequest(req, options);
if (request instanceof Error) {
return callback(Boom.badRequest(request.message));
}
@@ -336,15 +334,15 @@ exports.authenticateBewit = function (req, credentialsFunc, options, callback) {
return callback(Boom.badRequest('Resource path exceeds max length'));
}
- const resource = request.url.match(internals.bewitRegex);
+ var resource = request.url.match(internals.bewitRegex);
if (!resource) {
- return callback(Utils.unauthorized());
+ return callback(Boom.unauthorized(null, 'Hawk'));
}
// Bewit not empty
if (!resource[3]) {
- return callback(Utils.unauthorized('Empty bewit'));
+ return callback(Boom.unauthorized('Empty bewit', 'Hawk'));
}
// Verify method is GET
@@ -352,7 +350,7 @@ exports.authenticateBewit = function (req, credentialsFunc, options, callback) {
if (request.method !== 'GET' &&
request.method !== 'HEAD') {
- return callback(Utils.unauthorized('Invalid method'));
+ return callback(Boom.unauthorized('Invalid method', 'Hawk'));
}
// No other authentication
@@ -363,19 +361,19 @@ exports.authenticateBewit = function (req, credentialsFunc, options, callback) {
// Parse bewit
- const bewitString = Hoek.base64urlDecode(resource[3]);
+ var bewitString = Hoek.base64urlDecode(resource[3]);
if (bewitString instanceof Error) {
return callback(Boom.badRequest('Invalid bewit encoding'));
}
// Bewit format: id\exp\mac\ext ('\' is used because it is a reserved header attribute character)
- const bewitParts = bewitString.split('\\');
+ var bewitParts = bewitString.split('\\');
if (bewitParts.length !== 4) {
return callback(Boom.badRequest('Invalid bewit structure'));
}
- const bewit = {
+ var bewit = {
id: bewitParts[0],
exp: parseInt(bewitParts[1], 10),
mac: bewitParts[2],
@@ -391,27 +389,27 @@ exports.authenticateBewit = function (req, credentialsFunc, options, callback) {
// Construct URL without bewit
- let url = resource[1];
+ var url = resource[1];
if (resource[4]) {
- url = url + resource[2] + resource[4];
+ url += resource[2] + resource[4];
}
// Check expiration
if (bewit.exp * 1000 <= now) {
- return callback(Utils.unauthorized('Access expired'), null, bewit);
+ return callback(Boom.unauthorized('Access expired', 'Hawk'), null, bewit);
}
// Fetch Hawk credentials
- credentialsFunc(bewit.id, (err, credentials) => {
+ credentialsFunc(bewit.id, function (err, credentials) {
if (err) {
return callback(err, credentials || null, bewit.ext);
}
if (!credentials) {
- return callback(Utils.unauthorized('Unknown credentials'), null, bewit);
+ return callback(Boom.unauthorized('Unknown credentials', 'Hawk'), null, bewit);
}
if (!credentials.key ||
@@ -426,7 +424,7 @@ exports.authenticateBewit = function (req, credentialsFunc, options, callback) {
// Calculate MAC
- const mac = Crypto.calculateMac('bewit', credentials, {
+ var mac = Crypto.calculateMac('bewit', credentials, {
ts: bewit.exp,
nonce: '',
method: 'GET',
@@ -437,7 +435,7 @@ exports.authenticateBewit = function (req, credentialsFunc, options, callback) {
});
if (!Cryptiles.fixedTimeComparison(mac, bewit.mac)) {
- return callback(Utils.unauthorized('Bad mac'), credentials, bewit);
+ return callback(Boom.unauthorized('Bad mac', 'Hawk'), credentials, bewit);
}
// Successful authentication
@@ -463,7 +461,7 @@ exports.authenticateMessage = function (host, port, message, authorization, cred
// Application time
- const now = Utils.now(options.localtimeOffsetMsec); // Measure now before any other processing
+ var now = Utils.now(options.localtimeOffsetMsec); // Measure now before any other processing
// Validate authorization
@@ -478,14 +476,14 @@ exports.authenticateMessage = function (host, port, message, authorization, cred
// Fetch Hawk credentials
- credentialsFunc(authorization.id, (err, credentials) => {
+ credentialsFunc(authorization.id, function (err, credentials) {
if (err) {
return callback(err, credentials || null);
}
if (!credentials) {
- return callback(Utils.unauthorized('Unknown credentials'));
+ return callback(Boom.unauthorized('Unknown credentials', 'Hawk'));
}
if (!credentials.key ||
@@ -500,40 +498,40 @@ exports.authenticateMessage = function (host, port, message, authorization, cred
// Construct artifacts container
- const artifacts = {
+ var artifacts = {
ts: authorization.ts,
nonce: authorization.nonce,
- host,
- port,
+ host: host,
+ port: port,
hash: authorization.hash
};
// Calculate MAC
- const mac = Crypto.calculateMac('message', credentials, artifacts);
+ var mac = Crypto.calculateMac('message', credentials, artifacts);
if (!Cryptiles.fixedTimeComparison(mac, authorization.mac)) {
- return callback(Utils.unauthorized('Bad mac'), credentials);
+ return callback(Boom.unauthorized('Bad mac', 'Hawk'), credentials);
}
// Check payload hash
- const hash = Crypto.calculatePayloadHash(message, credentials.algorithm);
+ var hash = Crypto.calculatePayloadHash(message, credentials.algorithm);
if (!Cryptiles.fixedTimeComparison(hash, authorization.hash)) {
- return callback(Utils.unauthorized('Bad message hash'), credentials);
+ return callback(Boom.unauthorized('Bad message hash', 'Hawk'), credentials);
}
// Check nonce
- options.nonceFunc(credentials.key, authorization.nonce, authorization.ts, (err) => {
+ options.nonceFunc(credentials.key, authorization.nonce, authorization.ts, function (err) {
if (err) {
- return callback(Utils.unauthorized('Invalid nonce'), credentials);
+ return callback(Boom.unauthorized('Invalid nonce', 'Hawk'), credentials);
}
// Check timestamp staleness
if (Math.abs((authorization.ts * 1000) - now) > (options.timestampSkewSec * 1000)) {
- return callback(Utils.unauthorized('Stale timestamp'), credentials);
+ return callback(Boom.unauthorized('Stale timestamp'), credentials);
}
// Successful authentication
diff --git a/deps/npm/node_modules/hawk/lib/utils.js b/deps/npm/node_modules/hawk/lib/utils.js
index 565b1c7a7b..2da3343904 100755
--- a/deps/npm/node_modules/hawk/lib/utils.js
+++ b/deps/npm/node_modules/hawk/lib/utils.js
@@ -1,14 +1,12 @@
-'use strict';
-
// Load modules
-const Sntp = require('sntp');
-const Boom = require('boom');
+var Sntp = require('sntp');
+var Boom = require('boom');
// Declare internals
-const internals = {};
+var internals = {};
exports.version = function () {
@@ -31,7 +29,7 @@ internals.hostHeaderRegex = /^(?:(?:\r\n)?\s)*((?:[^:]+)|(?:\[[^\]]+\]))(?::(\d+
exports.parseHost = function (req, hostHeaderName) {
hostHeaderName = (hostHeaderName ? hostHeaderName.toLowerCase() : 'host');
- const hostHeader = req.headers[hostHeaderName];
+ var hostHeader = req.headers[hostHeaderName];
if (!hostHeader) {
return null;
}
@@ -40,7 +38,7 @@ exports.parseHost = function (req, hostHeaderName) {
return null;
}
- const hostParts = hostHeader.match(internals.hostHeaderRegex);
+ var hostParts = hostHeader.match(internals.hostHeaderRegex);
if (!hostParts) {
return null;
}
@@ -74,7 +72,7 @@ exports.parseRequest = function (req, options) {
// Obtain host and port information
- let host;
+ var host;
if (!options.host ||
!options.port) {
@@ -84,7 +82,7 @@ exports.parseRequest = function (req, options) {
}
}
- const request = {
+ var request = {
method: req.method,
url: req.url,
host: options.host || host.name,
@@ -127,24 +125,24 @@ exports.parseAuthorizationHeader = function (header, keys) {
return Boom.badRequest('Header length too long');
}
- const headerParts = header.match(internals.authHeaderRegex);
+ var headerParts = header.match(internals.authHeaderRegex);
if (!headerParts) {
return Boom.badRequest('Invalid header syntax');
}
- const scheme = headerParts[1];
+ var scheme = headerParts[1];
if (scheme.toLowerCase() !== 'hawk') {
return Boom.unauthorized(null, 'Hawk');
}
- const attributesString = headerParts[2];
+ var attributesString = headerParts[2];
if (!attributesString) {
return Boom.badRequest('Invalid header syntax');
}
- const attributes = {};
- let errorMessage = '';
- const verify = attributesString.replace(/(\w+)="([^"\\]*)"\s*(?:,\s*|$)/g, ($0, $1, $2) => {
+ var attributes = {};
+ var errorMessage = '';
+ var verify = attributesString.replace(/(\w+)="([^"\\]*)"\s*(?:,\s*|$)/g, function ($0, $1, $2) {
// Check valid attribute names
@@ -181,5 +179,5 @@ exports.parseAuthorizationHeader = function (header, keys) {
exports.unauthorized = function (message, attributes) {
- return Boom.unauthorized(message || null, 'Hawk', attributes);
+ return Boom.unauthorized(message, 'Hawk', attributes);
};
diff --git a/deps/npm/node_modules/hawk/package.json b/deps/npm/node_modules/hawk/package.json
index f9c37bb7d8..b4f3718d04 100755
--- a/deps/npm/node_modules/hawk/package.json
+++ b/deps/npm/node_modules/hawk/package.json
@@ -1,58 +1,52 @@
{
- "_from": "hawk@~6.0.2",
- "_id": "hawk@6.0.2",
+ "_from": "hawk@~3.1.3",
+ "_id": "hawk@3.1.3",
"_inBundle": false,
- "_integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==",
+ "_integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=",
"_location": "/hawk",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "hawk@~6.0.2",
+ "raw": "hawk@~3.1.3",
"name": "hawk",
"escapedName": "hawk",
- "rawSpec": "~6.0.2",
+ "rawSpec": "~3.1.3",
"saveSpec": null,
- "fetchSpec": "~6.0.2"
+ "fetchSpec": "~3.1.3"
},
"_requiredBy": [
"/request"
],
- "_resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz",
- "_shasum": "af4d914eb065f9b5ce4d9d11c1cb2126eecc3038",
- "_spec": "hawk@~6.0.2",
- "_where": "/Users/rebecca/code/npm/node_modules/request",
+ "_resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz",
+ "_shasum": "078444bd7c1640b0fe540d2c9b73d59678e8e1c4",
+ "_spec": "hawk@~3.1.3",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/request",
"author": {
"name": "Eran Hammer",
"email": "eran@hammer.io",
"url": "http://hueniverse.com"
},
- "babel": {
- "presets": [
- "es2015"
- ]
- },
- "browser": "dist/browser.js",
+ "browser": "./lib/browser.js",
"bugs": {
"url": "https://github.com/hueniverse/hawk/issues"
},
"bundleDependencies": false,
+ "contributors": [],
"dependencies": {
- "boom": "4.x.x",
- "cryptiles": "3.x.x",
- "hoek": "4.x.x",
- "sntp": "2.x.x"
+ "boom": "2.x.x",
+ "cryptiles": "2.x.x",
+ "hoek": "2.x.x",
+ "sntp": "1.x.x"
},
"deprecated": false,
"description": "HTTP Hawk Authentication Scheme",
"devDependencies": {
- "babel-cli": "^6.1.2",
- "babel-preset-es2015": "^6.1.2",
- "code": "4.x.x",
- "lab": "14.x.x"
+ "code": "1.x.x",
+ "lab": "5.x.x"
},
"engines": {
- "node": ">=4.5.0"
+ "node": ">=0.10.32"
},
"homepage": "https://github.com/hueniverse/hawk#readme",
"keywords": [
@@ -69,10 +63,8 @@
"url": "git://github.com/hueniverse/hawk.git"
},
"scripts": {
- "build-client": "mkdir -p dist; babel lib/browser.js --out-file dist/browser.js",
- "prepublish": "npm run-script build-client",
"test": "lab -a code -t 100 -L",
"test-cov-html": "lab -a code -r html -o coverage.html"
},
- "version": "6.0.2"
+ "version": "3.1.3"
}
diff --git a/deps/npm/node_modules/hawk/test/browser.js b/deps/npm/node_modules/hawk/test/browser.js
new file mode 100755
index 0000000000..9bec675fe6
--- /dev/null
+++ b/deps/npm/node_modules/hawk/test/browser.js
@@ -0,0 +1,1492 @@
+// Load modules
+
+var Url = require('url');
+var Code = require('code');
+var Hawk = require('../lib');
+var Hoek = require('hoek');
+var Lab = require('lab');
+var Browser = require('../lib/browser');
+
+
+// Declare internals
+
+var internals = {};
+
+
+// Test shortcuts
+
+var lab = exports.lab = Lab.script();
+var describe = lab.experiment;
+var it = lab.test;
+var expect = Code.expect;
+
+
+describe('Browser', function () {
+
+ var credentialsFunc = function (id, callback) {
+
+ var credentials = {
+ id: id,
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: (id === '1' ? 'sha1' : 'sha256'),
+ user: 'steve'
+ };
+
+ return callback(null, credentials);
+ };
+
+ it('should generate a bewit then successfully authenticate it', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?a=1&b=2',
+ host: 'example.com',
+ port: 80
+ };
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var bewit = Browser.client.bewit('http://example.com/resource/4?a=1&b=2', { credentials: credentials1, ttlSec: 60 * 60 * 24 * 365 * 100, ext: 'some-app-data' });
+ req.url += '&bewit=' + bewit;
+
+ Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials2, attributes) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ expect(attributes.ext).to.equal('some-app-data');
+ done();
+ });
+ });
+ });
+
+ it('should generate a bewit then successfully authenticate it (no ext)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?a=1&b=2',
+ host: 'example.com',
+ port: 80
+ };
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var bewit = Browser.client.bewit('http://example.com/resource/4?a=1&b=2', { credentials: credentials1, ttlSec: 60 * 60 * 24 * 365 * 100 });
+ req.url += '&bewit=' + bewit;
+
+ Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials2, attributes) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ done();
+ });
+ });
+ });
+
+ describe('bewit()', function () {
+
+ it('returns a valid bewit value', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
+ expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdca3NjeHdOUjJ0SnBQMVQxekRMTlBiQjVVaUtJVTl0T1NKWFRVZEc3WDloOD1ceGFuZHlhbmR6');
+ done();
+ });
+
+ it('returns a valid bewit value (explicit HTTP port)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Browser.client.bewit('http://example.com:8080/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
+ expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdcaFpiSjNQMmNLRW80a3kwQzhqa1pBa1J5Q1p1ZWc0V1NOYnhWN3ZxM3hIVT1ceGFuZHlhbmR6');
+ done();
+ });
+
+ it('returns a valid bewit value (explicit HTTPS port)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Browser.client.bewit('https://example.com:8043/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
+ expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdcL2t4UjhwK0xSaTdvQTRnUXc3cWlxa3BiVHRKYkR4OEtRMC9HRUwvVytTUT1ceGFuZHlhbmR6');
+ done();
+ });
+
+ it('returns a valid bewit value (null ext)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: null });
+ expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdcSUdZbUxnSXFMckNlOEN4dktQczRKbFdJQStValdKSm91d2dBUmlWaENBZz1c');
+ done();
+ });
+
+ it('errors on invalid options', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', 4);
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on missing uri', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Browser.client.bewit('', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on invalid uri', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Browser.client.bewit(5, { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on invalid credentials (id)', function (done) {
+
+ var credentials = {
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 3000, ext: 'xandyandz' });
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on missing credentials', function (done) {
+
+ var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', { ttlSec: 3000, ext: 'xandyandz' });
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on invalid credentials (key)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 3000, ext: 'xandyandz' });
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on invalid algorithm', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'hmac-sha-0'
+ };
+
+ var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, ext: 'xandyandz' });
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on missing options', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'hmac-sha-0'
+ };
+
+ var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow');
+ expect(bewit).to.equal('');
+ done();
+ });
+ });
+
+ it('generates a header then successfully parse it (configuration)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080
+ };
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data' }).field;
+ expect(req.authorization).to.exist();
+
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ done();
+ });
+ });
+ });
+
+ it('generates a header then successfully parse it (node request)', function (done) {
+
+ var req = {
+ method: 'POST',
+ url: '/resource/4?filter=a',
+ headers: {
+ host: 'example.com:8080',
+ 'content-type': 'text/plain;x=y'
+ }
+ };
+
+ var payload = 'some not so random text';
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
+ req.headers.authorization = reqHeader.field;
+
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
+
+ var res = {
+ headers: {
+ 'content-type': 'text/plain'
+ },
+ getResponseHeader: function (header) {
+
+ return res.headers[header.toLowerCase()];
+ }
+ };
+
+ res.headers['server-authorization'] = Hawk.server.header(credentials2, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
+ expect(res.headers['server-authorization']).to.exist();
+
+ expect(Browser.client.authenticate(res, credentials2, artifacts, { payload: 'some reply' })).to.equal(true);
+ done();
+ });
+ });
+ });
+
+ it('generates a header then successfully parse it (browserify)', function (done) {
+
+ var req = {
+ method: 'POST',
+ url: '/resource/4?filter=a',
+ headers: {
+ host: 'example.com:8080',
+ 'content-type': 'text/plain;x=y'
+ }
+ };
+
+ var payload = 'some not so random text';
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
+ req.headers.authorization = reqHeader.field;
+
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
+
+ var res = {
+ headers: {
+ 'content-type': 'text/plain'
+ },
+ getHeader: function (header) {
+
+ return res.headers[header.toLowerCase()];
+ }
+ };
+
+ res.headers['server-authorization'] = Hawk.server.header(credentials2, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
+ expect(res.headers['server-authorization']).to.exist();
+
+ expect(Browser.client.authenticate(res, credentials2, artifacts, { payload: 'some reply' })).to.equal(true);
+ done();
+ });
+ });
+ });
+
+ it('generates a header then successfully parse it (time offset)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080
+ };
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', localtimeOffsetMsec: 100000 }).field;
+ expect(req.authorization).to.exist();
+
+ Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 100000 }, function (err, credentials2, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ done();
+ });
+ });
+ });
+
+ it('generates a header then successfully parse it (no server header options)', function (done) {
+
+ var req = {
+ method: 'POST',
+ url: '/resource/4?filter=a',
+ headers: {
+ host: 'example.com:8080',
+ 'content-type': 'text/plain;x=y'
+ }
+ };
+
+ var payload = 'some not so random text';
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
+ req.headers.authorization = reqHeader.field;
+
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
+
+ var res = {
+ headers: {
+ 'content-type': 'text/plain'
+ },
+ getResponseHeader: function (header) {
+
+ return res.headers[header.toLowerCase()];
+ }
+ };
+
+ res.headers['server-authorization'] = Hawk.server.header(credentials2, artifacts);
+ expect(res.headers['server-authorization']).to.exist();
+
+ expect(Browser.client.authenticate(res, credentials2, artifacts)).to.equal(true);
+ done();
+ });
+ });
+ });
+
+ it('generates a header then successfully parse it (no server header)', function (done) {
+
+ var req = {
+ method: 'POST',
+ url: '/resource/4?filter=a',
+ headers: {
+ host: 'example.com:8080',
+ 'content-type': 'text/plain;x=y'
+ }
+ };
+
+ var payload = 'some not so random text';
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
+ req.headers.authorization = reqHeader.field;
+
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
+
+ var res = {
+ headers: {
+ 'content-type': 'text/plain'
+ },
+ getResponseHeader: function (header) {
+
+ return res.headers[header.toLowerCase()];
+ }
+ };
+
+ expect(Browser.client.authenticate(res, credentials2, artifacts)).to.equal(true);
+ done();
+ });
+ });
+ });
+
+ it('generates a header with stale ts and successfully authenticate on second call', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080
+ };
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ Browser.utils.setNtpOffset(60 * 60 * 1000);
+ var header = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data' });
+ req.authorization = header.field;
+ expect(req.authorization).to.exist();
+
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Stale timestamp');
+
+ var res = {
+ headers: {
+ 'www-authenticate': err.output.headers['WWW-Authenticate']
+ },
+ getResponseHeader: function (lookup) {
+
+ return res.headers[lookup.toLowerCase()];
+ }
+ };
+
+ expect(Browser.utils.getNtpOffset()).to.equal(60 * 60 * 1000);
+ expect(Browser.client.authenticate(res, credentials2, header.artifacts)).to.equal(true);
+ expect(Browser.utils.getNtpOffset()).to.equal(0);
+
+ req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials2, ext: 'some-app-data' }).field;
+ expect(req.authorization).to.exist();
+
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials3, artifacts3) {
+
+ expect(err).to.not.exist();
+ expect(credentials3.user).to.equal('steve');
+ expect(artifacts3.ext).to.equal('some-app-data');
+ done();
+ });
+ });
+ });
+ });
+
+ it('generates a header with stale ts and successfully authenticate on second call (manual localStorage)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080
+ };
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var localStorage = new Browser.internals.LocalStorage();
+
+ Browser.utils.setStorage(localStorage);
+
+ Browser.utils.setNtpOffset(60 * 60 * 1000);
+ var header = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data' });
+ req.authorization = header.field;
+ expect(req.authorization).to.exist();
+
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Stale timestamp');
+
+ var res = {
+ headers: {
+ 'www-authenticate': err.output.headers['WWW-Authenticate']
+ },
+ getResponseHeader: function (lookup) {
+
+ return res.headers[lookup.toLowerCase()];
+ }
+ };
+
+ expect(parseInt(localStorage.getItem('hawk_ntp_offset'))).to.equal(60 * 60 * 1000);
+ expect(Browser.utils.getNtpOffset()).to.equal(60 * 60 * 1000);
+ expect(Browser.client.authenticate(res, credentials2, header.artifacts)).to.equal(true);
+ expect(Browser.utils.getNtpOffset()).to.equal(0);
+ expect(parseInt(localStorage.getItem('hawk_ntp_offset'))).to.equal(0);
+
+ req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials2, ext: 'some-app-data' }).field;
+ expect(req.authorization).to.exist();
+
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials3, artifacts3) {
+
+ expect(err).to.not.exist();
+ expect(credentials3.user).to.equal('steve');
+ expect(artifacts3.ext).to.equal('some-app-data');
+ done();
+ });
+ });
+ });
+ });
+
+ it('generates a header then fails to parse it (missing server header hash)', function (done) {
+
+ var req = {
+ method: 'POST',
+ url: '/resource/4?filter=a',
+ headers: {
+ host: 'example.com:8080',
+ 'content-type': 'text/plain;x=y'
+ }
+ };
+
+ var payload = 'some not so random text';
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
+ req.headers.authorization = reqHeader.field;
+
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
+
+ var res = {
+ headers: {
+ 'content-type': 'text/plain'
+ },
+ getResponseHeader: function (header) {
+
+ return res.headers[header.toLowerCase()];
+ }
+ };
+
+ res.headers['server-authorization'] = Hawk.server.header(credentials2, artifacts);
+ expect(res.headers['server-authorization']).to.exist();
+
+ expect(Browser.client.authenticate(res, credentials2, artifacts, { payload: 'some reply' })).to.equal(false);
+ done();
+ });
+ });
+ });
+
+ it('generates a header then successfully parse it (with hash)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080
+ };
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, payload: 'hola!', ext: 'some-app-data' }).field;
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ done();
+ });
+ });
+ });
+
+ it('generates a header then successfully parse it then validate payload', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080
+ };
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, payload: 'hola!', ext: 'some-app-data' }).field;
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ expect(Hawk.server.authenticatePayload('hola!', credentials2, artifacts)).to.be.true();
+ expect(Hawk.server.authenticatePayload('hello!', credentials2, artifacts)).to.be.false();
+ done();
+ });
+ });
+ });
+
+ it('generates a header then successfully parse it (app)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080
+ };
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', app: 'asd23ased' }).field;
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ expect(artifacts.app).to.equal('asd23ased');
+ done();
+ });
+ });
+ });
+
+ it('generates a header then successfully parse it (app, dlg)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080
+ };
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', app: 'asd23ased', dlg: '23434szr3q4d' }).field;
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ expect(artifacts.app).to.equal('asd23ased');
+ expect(artifacts.dlg).to.equal('23434szr3q4d');
+ done();
+ });
+ });
+ });
+
+ it('generates a header then fail authentication due to bad hash', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080
+ };
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, payload: 'hola!', ext: 'some-app-data' }).field;
+ Hawk.server.authenticate(req, credentialsFunc, { payload: 'byebye!' }, function (err, credentials2, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Bad payload hash');
+ done();
+ });
+ });
+ });
+
+ it('generates a header for one resource then fail to authenticate another', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080
+ };
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data' }).field;
+ req.url = '/something/else';
+
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
+
+ expect(err).to.exist();
+ expect(credentials2).to.exist();
+ done();
+ });
+ });
+ });
+
+ describe('client', function () {
+
+ describe('header()', function () {
+
+ it('returns a valid authorization header (sha1)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha1'
+ };
+
+ var header = Browser.client.header('http://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about' }).field;
+ expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="bsvY3IfUllw6V5rvk4tStEvpBhE=", ext="Bazinga!", mac="qbf1ZPG/r/e06F4ht+T77LXi5vw="');
+ done();
+ });
+
+ it('returns a valid authorization header (sha256)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field;
+ expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", ext="Bazinga!", mac="q1CwFoSHzPZSkbIvl0oYlD+91rBUEvFk763nMjMndj8="');
+ done();
+ });
+
+ it('returns a valid authorization header (empty payload)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha1'
+ };
+
+ var header = Browser.client.header('http://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: '' }).field;
+ expect(header).to.equal('Hawk id=\"123456\", ts=\"1353809207\", nonce=\"Ygvqdz\", hash=\"404ghL7K+hfyhByKKejFBRGgTjU=\", ext=\"Bazinga!\", mac=\"Bh1sj1DOfFRWOdi3ww52nLCJdBE=\"');
+ done();
+ });
+
+ it('returns a valid authorization header (no ext)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field;
+ expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="');
+ done();
+ });
+
+ it('returns a valid authorization header (null ext)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain', ext: null }).field;
+ expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="');
+ done();
+ });
+
+ it('returns a valid authorization header (uri object)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var uri = Browser.utils.parseUri('https://example.net/somewhere/over/the/rainbow');
+ var header = Browser.client.header(uri, 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field;
+ expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="');
+ done();
+ });
+
+ it('errors on missing options', function (done) {
+
+ var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST');
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid argument type');
+ done();
+ });
+
+ it('errors on empty uri', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var header = Browser.client.header('', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' });
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid argument type');
+ done();
+ });
+
+ it('errors on invalid uri', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var header = Browser.client.header(4, 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' });
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid argument type');
+ done();
+ });
+
+ it('errors on missing method', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', '', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' });
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid argument type');
+ done();
+ });
+
+ it('errors on invalid method', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 5, { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' });
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid argument type');
+ done();
+ });
+
+ it('errors on missing credentials', function (done) {
+
+ var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { ext: 'Bazinga!', timestamp: 1353809207 });
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid credentials object');
+ done();
+ });
+
+ it('errors on invalid credentials (id)', function (done) {
+
+ var credentials = {
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207 });
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid credentials object');
+ done();
+ });
+
+ it('errors on invalid credentials (key)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ algorithm: 'sha256'
+ };
+
+ var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207 });
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid credentials object');
+ done();
+ });
+
+ it('errors on invalid algorithm', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'hmac-sha-0'
+ };
+
+ var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, payload: 'something, anything!', ext: 'Bazinga!', timestamp: 1353809207 });
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Unknown algorithm');
+ done();
+ });
+
+ it('uses a pre-calculated payload hash', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var options = { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' };
+ options.hash = Browser.crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
+ var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', options).field;
+ expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", ext="Bazinga!", mac="q1CwFoSHzPZSkbIvl0oYlD+91rBUEvFk763nMjMndj8="');
+ done();
+ });
+ });
+
+ describe('authenticate()', function () {
+
+ it('skips tsm validation when missing ts', function (done) {
+
+ var res = {
+ headers: {
+ 'www-authenticate': 'Hawk error="Stale timestamp"'
+ },
+ getResponseHeader: function (header) {
+
+ return res.headers[header.toLowerCase()];
+ }
+ };
+
+ var credentials = {
+ id: '123456',
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256',
+ user: 'steve'
+ };
+
+ var artifacts = {
+ ts: 1402135580,
+ nonce: 'iBRB6t',
+ method: 'GET',
+ resource: '/resource/4?filter=a',
+ host: 'example.com',
+ port: '8080',
+ ext: 'some-app-data'
+ };
+
+ expect(Browser.client.authenticate(res, credentials, artifacts)).to.equal(true);
+ done();
+ });
+
+ it('returns false on invalid header', function (done) {
+
+ var res = {
+ headers: {
+ 'server-authorization': 'Hawk mac="abc", bad="xyz"'
+ },
+ getResponseHeader: function (header) {
+
+ return res.headers[header.toLowerCase()];
+ }
+ };
+
+ expect(Browser.client.authenticate(res, {})).to.equal(false);
+ done();
+ });
+
+ it('returns false on invalid mac', function (done) {
+
+ var res = {
+ headers: {
+ 'content-type': 'text/plain',
+ 'server-authorization': 'Hawk mac="_IJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"'
+ },
+ getResponseHeader: function (header) {
+
+ return res.headers[header.toLowerCase()];
+ }
+ };
+
+ var artifacts = {
+ method: 'POST',
+ host: 'example.com',
+ port: '8080',
+ resource: '/resource/4?filter=a',
+ ts: '1362336900',
+ nonce: 'eb5S_L',
+ hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
+ ext: 'some-app-data',
+ app: undefined,
+ dlg: undefined,
+ mac: 'BlmSe8K+pbKIb6YsZCnt4E1GrYvY1AaYayNR82dGpIk=',
+ id: '123456'
+ };
+
+ var credentials = {
+ id: '123456',
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256',
+ user: 'steve'
+ };
+
+ expect(Browser.client.authenticate(res, credentials, artifacts)).to.equal(false);
+ done();
+ });
+
+ it('returns true on ignoring hash', function (done) {
+
+ var res = {
+ headers: {
+ 'content-type': 'text/plain',
+ 'server-authorization': 'Hawk mac="XIJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"'
+ },
+ getResponseHeader: function (header) {
+
+ return res.headers[header.toLowerCase()];
+ }
+ };
+
+ var artifacts = {
+ method: 'POST',
+ host: 'example.com',
+ port: '8080',
+ resource: '/resource/4?filter=a',
+ ts: '1362336900',
+ nonce: 'eb5S_L',
+ hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
+ ext: 'some-app-data',
+ app: undefined,
+ dlg: undefined,
+ mac: 'BlmSe8K+pbKIb6YsZCnt4E1GrYvY1AaYayNR82dGpIk=',
+ id: '123456'
+ };
+
+ var credentials = {
+ id: '123456',
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256',
+ user: 'steve'
+ };
+
+ expect(Browser.client.authenticate(res, credentials, artifacts)).to.equal(true);
+ done();
+ });
+
+ it('errors on invalid WWW-Authenticate header format', function (done) {
+
+ var res = {
+ headers: {
+ 'www-authenticate': 'Hawk ts="1362346425875", tsm="PhwayS28vtnn3qbv0mqRBYSXebN/zggEtucfeZ620Zo=", x="Stale timestamp"'
+ },
+ getResponseHeader: function (header) {
+
+ return res.headers[header.toLowerCase()];
+ }
+ };
+
+ expect(Browser.client.authenticate(res, {})).to.equal(false);
+ done();
+ });
+
+ it('errors on invalid WWW-Authenticate header format', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256',
+ user: 'steve'
+ };
+
+ var res = {
+ headers: {
+ 'www-authenticate': 'Hawk ts="1362346425875", tsm="hwayS28vtnn3qbv0mqRBYSXebN/zggEtucfeZ620Zo=", error="Stale timestamp"'
+ },
+ getResponseHeader: function (header) {
+
+ return res.headers[header.toLowerCase()];
+ }
+ };
+
+ expect(Browser.client.authenticate(res, credentials)).to.equal(false);
+ done();
+ });
+ });
+
+ describe('message()', function () {
+
+ it('generates an authorization then successfully parse it', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ expect(auth).to.exist();
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials2) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ done();
+ });
+ });
+ });
+
+ it('generates an authorization using custom nonce/timestamp', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: credentials, nonce: 'abc123', timestamp: 1398536270957 });
+ expect(auth).to.exist();
+ expect(auth.nonce).to.equal('abc123');
+ expect(auth.ts).to.equal(1398536270957);
+ done();
+ });
+ });
+
+ it('errors on missing host', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var auth = Browser.client.message(null, 8080, 'some message', { credentials: credentials });
+ expect(auth).to.not.exist();
+ done();
+ });
+ });
+
+ it('errors on invalid host', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var auth = Browser.client.message(5, 8080, 'some message', { credentials: credentials });
+ expect(auth).to.not.exist();
+ done();
+ });
+ });
+
+ it('errors on missing port', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var auth = Browser.client.message('example.com', 0, 'some message', { credentials: credentials });
+ expect(auth).to.not.exist();
+ done();
+ });
+ });
+
+ it('errors on invalid port', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var auth = Browser.client.message('example.com', 'a', 'some message', { credentials: credentials });
+ expect(auth).to.not.exist();
+ done();
+ });
+ });
+
+ it('errors on missing message', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var auth = Browser.client.message('example.com', 8080, undefined, { credentials: credentials });
+ expect(auth).to.not.exist();
+ done();
+ });
+ });
+
+ it('errors on null message', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var auth = Browser.client.message('example.com', 8080, null, { credentials: credentials });
+ expect(auth).to.not.exist();
+ done();
+ });
+ });
+
+ it('errors on invalid message', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var auth = Browser.client.message('example.com', 8080, 5, { credentials: credentials });
+ expect(auth).to.not.exist();
+ done();
+ });
+ });
+
+ it('errors on missing credentials', function (done) {
+
+ var auth = Browser.client.message('example.com', 8080, 'some message', {});
+ expect(auth).to.not.exist();
+ done();
+ });
+
+ it('errors on missing options', function (done) {
+
+ var auth = Browser.client.message('example.com', 8080, 'some message');
+ expect(auth).to.not.exist();
+ done();
+ });
+
+ it('errors on invalid credentials (id)', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var creds = Hoek.clone(credentials);
+ delete creds.id;
+ var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: creds });
+ expect(auth).to.not.exist();
+ done();
+ });
+ });
+
+ it('errors on invalid credentials (key)', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var creds = Hoek.clone(credentials);
+ delete creds.key;
+ var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: creds });
+ expect(auth).to.not.exist();
+ done();
+ });
+ });
+
+ it('errors on invalid algorithm', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var creds = Hoek.clone(credentials);
+ creds.algorithm = 'blah';
+ var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: creds });
+ expect(auth).to.not.exist();
+ done();
+ });
+ });
+ });
+
+ describe('authenticateTimestamp()', function (done) {
+
+ it('validates a timestamp', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var tsm = Hawk.crypto.timestampMessage(credentials);
+ expect(Browser.client.authenticateTimestamp(tsm, credentials)).to.equal(true);
+ done();
+ });
+ });
+
+ it('validates a timestamp without updating local time', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var offset = Browser.utils.getNtpOffset();
+ var tsm = Hawk.crypto.timestampMessage(credentials, 10000);
+ expect(Browser.client.authenticateTimestamp(tsm, credentials, false)).to.equal(true);
+ expect(offset).to.equal(Browser.utils.getNtpOffset());
+ done();
+ });
+ });
+
+ it('detects a bad timestamp', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var tsm = Hawk.crypto.timestampMessage(credentials);
+ tsm.ts = 4;
+ expect(Browser.client.authenticateTimestamp(tsm, credentials)).to.equal(false);
+ done();
+ });
+ });
+ });
+ });
+
+ describe('internals', function () {
+
+ describe('LocalStorage', function () {
+
+ it('goes through the full lifecycle', function (done) {
+
+ var storage = new Browser.internals.LocalStorage();
+ expect(storage.length).to.equal(0);
+ expect(storage.getItem('a')).to.equal(null);
+ storage.setItem('a', 5);
+ expect(storage.length).to.equal(1);
+ expect(storage.key()).to.equal('a');
+ expect(storage.key(0)).to.equal('a');
+ expect(storage.getItem('a')).to.equal('5');
+ storage.setItem('b', 'test');
+ expect(storage.key()).to.equal('a');
+ expect(storage.key(0)).to.equal('a');
+ expect(storage.key(1)).to.equal('b');
+ expect(storage.length).to.equal(2);
+ expect(storage.getItem('b')).to.equal('test');
+ storage.removeItem('a');
+ expect(storage.length).to.equal(1);
+ expect(storage.getItem('a')).to.equal(null);
+ expect(storage.getItem('b')).to.equal('test');
+ storage.clear();
+ expect(storage.length).to.equal(0);
+ expect(storage.getItem('a')).to.equal(null);
+ expect(storage.getItem('b')).to.equal(null);
+ done();
+ });
+ });
+ });
+
+ describe('utils', function () {
+
+ describe('setStorage()', function () {
+
+ it('sets storage for the first time', function (done) {
+
+ Browser.utils.storage = new Browser.internals.LocalStorage(); // Reset state
+
+ expect(Browser.utils.storage.getItem('hawk_ntp_offset')).to.not.exist();
+ Browser.utils.storage.setItem('test', '1');
+ Browser.utils.setStorage(new Browser.internals.LocalStorage());
+ expect(Browser.utils.storage.getItem('test')).to.not.exist();
+ Browser.utils.storage.setItem('test', '2');
+ expect(Browser.utils.storage.getItem('test')).to.equal('2');
+ done();
+ });
+ });
+
+ describe('setNtpOffset()', function (done) {
+
+ it('catches localStorage errors', { parallel: false }, function (done) {
+
+ var orig = Browser.utils.storage.setItem;
+ var consoleOrig = console.error;
+ var count = 0;
+ console.error = function () {
+
+ if (count++ === 2) {
+
+ console.error = consoleOrig;
+ }
+ };
+
+ Browser.utils.storage.setItem = function () {
+
+ Browser.utils.storage.setItem = orig;
+ throw new Error();
+ };
+
+ expect(function () {
+
+ Browser.utils.setNtpOffset(100);
+ }).not.to.throw();
+
+ done();
+ });
+ });
+
+ describe('parseAuthorizationHeader()', function (done) {
+
+ it('returns null on missing header', function (done) {
+
+ expect(Browser.utils.parseAuthorizationHeader()).to.equal(null);
+ done();
+ });
+
+ it('returns null on bad header syntax (structure)', function (done) {
+
+ expect(Browser.utils.parseAuthorizationHeader('Hawk')).to.equal(null);
+ done();
+ });
+
+ it('returns null on bad header syntax (parts)', function (done) {
+
+ expect(Browser.utils.parseAuthorizationHeader(' ')).to.equal(null);
+ done();
+ });
+
+ it('returns null on bad scheme name', function (done) {
+
+ expect(Browser.utils.parseAuthorizationHeader('Basic asdasd')).to.equal(null);
+ done();
+ });
+
+ it('returns null on bad attribute value', function (done) {
+
+ expect(Browser.utils.parseAuthorizationHeader('Hawk test="\t"', ['test'])).to.equal(null);
+ done();
+ });
+
+ it('returns null on duplicated attribute', function (done) {
+
+ expect(Browser.utils.parseAuthorizationHeader('Hawk test="a", test="b"', ['test'])).to.equal(null);
+ done();
+ });
+ });
+
+ describe('parseUri()', function () {
+
+ it('returns empty object on invalid', function (done) {
+
+ var uri = Browser.utils.parseUri('ftp');
+ expect(uri).to.deep.equal({ host: '', port: '', resource: '' });
+ done();
+ });
+
+ it('returns empty port when unknown scheme', function (done) {
+
+ var uri = Browser.utils.parseUri('ftp://example.com');
+ expect(uri.port).to.equal('');
+ done();
+ });
+
+ it('returns default port when missing', function (done) {
+
+ var uri = Browser.utils.parseUri('http://example.com');
+ expect(uri.port).to.equal('80');
+ done();
+ });
+
+ it('handles unusual characters correctly', function (done) {
+
+ var parts = {
+ protocol: 'http+vnd.my-extension',
+ user: 'user!$&\'()*+,;=%40my-domain.com',
+ password: 'pass!$&\'()*+,;=%40:word',
+ hostname: 'foo-bar.com',
+ port: '99',
+ pathname: '/path/%40/!$&\'()*+,;=:@/',
+ query: 'query%40/!$&\'()*+,;=:@/?',
+ fragment: 'fragm%40/!$&\'()*+,;=:@/?'
+ };
+
+ parts.userInfo = parts.user + ':' + parts.password;
+ parts.authority = parts.userInfo + '@' + parts.hostname + ':' + parts.port;
+ parts.relative = parts.pathname + '?' + parts.query;
+ parts.resource = parts.relative + '#' + parts.fragment;
+ parts.source = parts.protocol + '://' + parts.authority + parts.resource;
+
+ var uri = Browser.utils.parseUri(parts.source);
+ expect(uri.host).to.equal('foo-bar.com');
+ expect(uri.port).to.equal('99');
+ expect(uri.resource).to.equal(parts.pathname + '?' + parts.query);
+ done();
+ });
+ });
+
+ var str = 'https://www.google.ca/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=url';
+ var base64str = 'aHR0cHM6Ly93d3cuZ29vZ2xlLmNhL3dlYmhwP3NvdXJjZWlkPWNocm9tZS1pbnN0YW50Jmlvbj0xJmVzcHY9MiZpZT1VVEYtOCNxPXVybA';
+
+ describe('base64urlEncode()', function () {
+
+ it('should base64 URL-safe decode a string', function (done) {
+
+ expect(Browser.utils.base64urlEncode(str)).to.equal(base64str);
+ done();
+ });
+ });
+ });
+});
diff --git a/deps/npm/node_modules/hawk/test/client.js b/deps/npm/node_modules/hawk/test/client.js
new file mode 100755
index 0000000000..d6be231ae8
--- /dev/null
+++ b/deps/npm/node_modules/hawk/test/client.js
@@ -0,0 +1,440 @@
+// Load modules
+
+var Url = require('url');
+var Code = require('code');
+var Hawk = require('../lib');
+var Lab = require('lab');
+
+
+// Declare internals
+
+var internals = {};
+
+
+// Test shortcuts
+
+var lab = exports.lab = Lab.script();
+var describe = lab.experiment;
+var it = lab.test;
+var expect = Code.expect;
+
+
+describe('Client', function () {
+
+ describe('header()', function () {
+
+ it('returns a valid authorization header (sha1)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha1'
+ };
+
+ var header = Hawk.client.header('http://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about' }).field;
+ expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="bsvY3IfUllw6V5rvk4tStEvpBhE=", ext="Bazinga!", mac="qbf1ZPG/r/e06F4ht+T77LXi5vw="');
+ done();
+ });
+
+ it('returns a valid authorization header (sha256)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field;
+ expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", ext="Bazinga!", mac="q1CwFoSHzPZSkbIvl0oYlD+91rBUEvFk763nMjMndj8="');
+ done();
+ });
+
+ it('returns a valid authorization header (no ext)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field;
+ expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="');
+ done();
+ });
+
+ it('returns a valid authorization header (null ext)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain', ext: null }).field;
+ expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="');
+ done();
+ });
+
+ it('returns a valid authorization header (empty payload)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: '', contentType: 'text/plain' }).field;
+ expect(header).to.equal('Hawk id=\"123456\", ts=\"1353809207\", nonce=\"Ygvqdz\", hash=\"q/t+NNAkQZNlq/aAD6PlexImwQTxwgT2MahfTa9XRLA=\", mac=\"U5k16YEzn3UnBHKeBzsDXn067Gu3R4YaY6xOt9PYRZM=\"');
+ done();
+ });
+
+ it('returns a valid authorization header (pre hashed payload)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var options = { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' };
+ options.hash = Hawk.crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
+ var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', options).field;
+ expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="');
+ done();
+ });
+
+ it('errors on missing uri', function (done) {
+
+ var header = Hawk.client.header('', 'POST');
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid argument type');
+ done();
+ });
+
+ it('errors on invalid uri', function (done) {
+
+ var header = Hawk.client.header(4, 'POST');
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid argument type');
+ done();
+ });
+
+ it('errors on missing method', function (done) {
+
+ var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', '');
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid argument type');
+ done();
+ });
+
+ it('errors on invalid method', function (done) {
+
+ var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 5);
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid argument type');
+ done();
+ });
+
+ it('errors on missing options', function (done) {
+
+ var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST');
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid argument type');
+ done();
+ });
+
+ it('errors on invalid credentials (id)', function (done) {
+
+ var credentials = {
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207 });
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid credential object');
+ done();
+ });
+
+ it('errors on missing credentials', function (done) {
+
+ var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { ext: 'Bazinga!', timestamp: 1353809207 });
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid credential object');
+ done();
+ });
+
+ it('errors on invalid credentials', function (done) {
+
+ var credentials = {
+ id: '123456',
+ algorithm: 'sha256'
+ };
+
+ var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207 });
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid credential object');
+ done();
+ });
+
+ it('errors on invalid algorithm', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'hmac-sha-0'
+ };
+
+ var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, payload: 'something, anything!', ext: 'Bazinga!', timestamp: 1353809207 });
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Unknown algorithm');
+ done();
+ });
+ });
+
+ describe('authenticate()', function () {
+
+ it('returns false on invalid header', function (done) {
+
+ var res = {
+ headers: {
+ 'server-authorization': 'Hawk mac="abc", bad="xyz"'
+ }
+ };
+
+ expect(Hawk.client.authenticate(res, {})).to.equal(false);
+ done();
+ });
+
+ it('returns false on invalid mac', function (done) {
+
+ var res = {
+ headers: {
+ 'content-type': 'text/plain',
+ 'server-authorization': 'Hawk mac="_IJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"'
+ }
+ };
+
+ var artifacts = {
+ method: 'POST',
+ host: 'example.com',
+ port: '8080',
+ resource: '/resource/4?filter=a',
+ ts: '1362336900',
+ nonce: 'eb5S_L',
+ hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
+ ext: 'some-app-data',
+ app: undefined,
+ dlg: undefined,
+ mac: 'BlmSe8K+pbKIb6YsZCnt4E1GrYvY1AaYayNR82dGpIk=',
+ id: '123456'
+ };
+
+ var credentials = {
+ id: '123456',
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256',
+ user: 'steve'
+ };
+
+ expect(Hawk.client.authenticate(res, credentials, artifacts)).to.equal(false);
+ done();
+ });
+
+ it('returns true on ignoring hash', function (done) {
+
+ var res = {
+ headers: {
+ 'content-type': 'text/plain',
+ 'server-authorization': 'Hawk mac="XIJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"'
+ }
+ };
+
+ var artifacts = {
+ method: 'POST',
+ host: 'example.com',
+ port: '8080',
+ resource: '/resource/4?filter=a',
+ ts: '1362336900',
+ nonce: 'eb5S_L',
+ hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
+ ext: 'some-app-data',
+ app: undefined,
+ dlg: undefined,
+ mac: 'BlmSe8K+pbKIb6YsZCnt4E1GrYvY1AaYayNR82dGpIk=',
+ id: '123456'
+ };
+
+ var credentials = {
+ id: '123456',
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256',
+ user: 'steve'
+ };
+
+ expect(Hawk.client.authenticate(res, credentials, artifacts)).to.equal(true);
+ done();
+ });
+
+ it('fails on invalid WWW-Authenticate header format', function (done) {
+
+ var header = 'Hawk ts="1362346425875", tsm="PhwayS28vtnn3qbv0mqRBYSXebN/zggEtucfeZ620Zo=", x="Stale timestamp"';
+ expect(Hawk.client.authenticate({ headers: { 'www-authenticate': header } }, {})).to.equal(false);
+ done();
+ });
+
+ it('fails on invalid WWW-Authenticate header format', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256',
+ user: 'steve'
+ };
+
+ var header = 'Hawk ts="1362346425875", tsm="hwayS28vtnn3qbv0mqRBYSXebN/zggEtucfeZ620Zo=", error="Stale timestamp"';
+ expect(Hawk.client.authenticate({ headers: { 'www-authenticate': header } }, credentials)).to.equal(false);
+ done();
+ });
+
+ it('skips tsm validation when missing ts', function (done) {
+
+ var header = 'Hawk error="Stale timestamp"';
+ expect(Hawk.client.authenticate({ headers: { 'www-authenticate': header } }, {})).to.equal(true);
+ done();
+ });
+ });
+
+ describe('message()', function () {
+
+ it('generates authorization', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha1'
+ };
+
+ var auth = Hawk.client.message('example.com', 80, 'I am the boodyman', { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
+ expect(auth).to.exist();
+ expect(auth.ts).to.equal(1353809207);
+ expect(auth.nonce).to.equal('abc123');
+ done();
+ });
+
+ it('errors on invalid host', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha1'
+ };
+
+ var auth = Hawk.client.message(5, 80, 'I am the boodyman', { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
+ expect(auth).to.not.exist();
+ done();
+ });
+
+ it('errors on invalid port', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha1'
+ };
+
+ var auth = Hawk.client.message('example.com', '80', 'I am the boodyman', { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
+ expect(auth).to.not.exist();
+ done();
+ });
+
+ it('errors on missing host', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha1'
+ };
+
+ var auth = Hawk.client.message('example.com', 0, 'I am the boodyman', { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
+ expect(auth).to.not.exist();
+ done();
+ });
+
+ it('errors on null message', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha1'
+ };
+
+ var auth = Hawk.client.message('example.com', 80, null, { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
+ expect(auth).to.not.exist();
+ done();
+ });
+
+ it('errors on missing message', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha1'
+ };
+
+ var auth = Hawk.client.message('example.com', 80, undefined, { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
+ expect(auth).to.not.exist();
+ done();
+ });
+
+ it('errors on invalid message', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha1'
+ };
+
+ var auth = Hawk.client.message('example.com', 80, 5, { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
+ expect(auth).to.not.exist();
+ done();
+ });
+
+ it('errors on missing options', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha1'
+ };
+
+ var auth = Hawk.client.message('example.com', 80, 'I am the boodyman');
+ expect(auth).to.not.exist();
+ done();
+ });
+
+ it('errors on invalid credentials (id)', function (done) {
+
+ var credentials = {
+ key: '2983d45yun89q',
+ algorithm: 'sha1'
+ };
+
+ var auth = Hawk.client.message('example.com', 80, 'I am the boodyman', { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
+ expect(auth).to.not.exist();
+ done();
+ });
+
+ it('errors on invalid credentials (key)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ algorithm: 'sha1'
+ };
+
+ var auth = Hawk.client.message('example.com', 80, 'I am the boodyman', { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
+ expect(auth).to.not.exist();
+ done();
+ });
+ });
+});
diff --git a/deps/npm/node_modules/hawk/test/crypto.js b/deps/npm/node_modules/hawk/test/crypto.js
new file mode 100755
index 0000000000..1131628bfb
--- /dev/null
+++ b/deps/npm/node_modules/hawk/test/crypto.js
@@ -0,0 +1,70 @@
+// Load modules
+
+var Code = require('code');
+var Hawk = require('../lib');
+var Lab = require('lab');
+
+
+// Declare internals
+
+var internals = {};
+
+
+// Test shortcuts
+
+var lab = exports.lab = Lab.script();
+var describe = lab.experiment;
+var it = lab.test;
+var expect = Code.expect;
+
+
+describe('Crypto', function () {
+
+ describe('generateNormalizedString()', function () {
+
+ it('should return a valid normalized string', function (done) {
+
+ expect(Hawk.crypto.generateNormalizedString('header', {
+ ts: 1357747017,
+ nonce: 'k3k4j5',
+ method: 'GET',
+ resource: '/resource/something',
+ host: 'example.com',
+ port: 8080
+ })).to.equal('hawk.1.header\n1357747017\nk3k4j5\nGET\n/resource/something\nexample.com\n8080\n\n\n');
+
+ done();
+ });
+
+ it('should return a valid normalized string (ext)', function (done) {
+
+ expect(Hawk.crypto.generateNormalizedString('header', {
+ ts: 1357747017,
+ nonce: 'k3k4j5',
+ method: 'GET',
+ resource: '/resource/something',
+ host: 'example.com',
+ port: 8080,
+ ext: 'this is some app data'
+ })).to.equal('hawk.1.header\n1357747017\nk3k4j5\nGET\n/resource/something\nexample.com\n8080\n\nthis is some app data\n');
+
+ done();
+ });
+
+ it('should return a valid normalized string (payload + ext)', function (done) {
+
+ expect(Hawk.crypto.generateNormalizedString('header', {
+ ts: 1357747017,
+ nonce: 'k3k4j5',
+ method: 'GET',
+ resource: '/resource/something',
+ host: 'example.com',
+ port: 8080,
+ hash: 'U4MKKSmiVxk37JCCrAVIjV/OhB3y+NdwoCr6RShbVkE=',
+ ext: 'this is some app data'
+ })).to.equal('hawk.1.header\n1357747017\nk3k4j5\nGET\n/resource/something\nexample.com\n8080\nU4MKKSmiVxk37JCCrAVIjV/OhB3y+NdwoCr6RShbVkE=\nthis is some app data\n');
+
+ done();
+ });
+ });
+});
diff --git a/deps/npm/node_modules/hawk/test/index.js b/deps/npm/node_modules/hawk/test/index.js
new file mode 100755
index 0000000000..e67afab573
--- /dev/null
+++ b/deps/npm/node_modules/hawk/test/index.js
@@ -0,0 +1,378 @@
+// Load modules
+
+var Url = require('url');
+var Code = require('code');
+var Hawk = require('../lib');
+var Lab = require('lab');
+
+
+// Declare internals
+
+var internals = {};
+
+
+// Test shortcuts
+
+var lab = exports.lab = Lab.script();
+var describe = lab.experiment;
+var it = lab.test;
+var expect = Code.expect;
+
+
+describe('Hawk', function () {
+
+ var credentialsFunc = function (id, callback) {
+
+ var credentials = {
+ id: id,
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: (id === '1' ? 'sha1' : 'sha256'),
+ user: 'steve'
+ };
+
+ return callback(null, credentials);
+ };
+
+ it('generates a header then successfully parse it (configuration)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080
+ };
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ req.authorization = Hawk.client.header(Url.parse('http://example.com:8080/resource/4?filter=a'), req.method, { credentials: credentials1, ext: 'some-app-data' }).field;
+ expect(req.authorization).to.exist();
+
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ done();
+ });
+ });
+ });
+
+ it('generates a header then successfully parse it (node request)', function (done) {
+
+ var req = {
+ method: 'POST',
+ url: '/resource/4?filter=a',
+ headers: {
+ host: 'example.com:8080',
+ 'content-type': 'text/plain;x=y'
+ }
+ };
+
+ var payload = 'some not so random text';
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var reqHeader = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
+ req.headers.authorization = reqHeader.field;
+
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
+
+ var res = {
+ headers: {
+ 'content-type': 'text/plain'
+ }
+ };
+
+ res.headers['server-authorization'] = Hawk.server.header(credentials2, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
+ expect(res.headers['server-authorization']).to.exist();
+
+ expect(Hawk.client.authenticate(res, credentials2, artifacts, { payload: 'some reply' })).to.equal(true);
+ done();
+ });
+ });
+ });
+
+ it('generates a header then successfully parse it (absolute request uri)', function (done) {
+
+ var req = {
+ method: 'POST',
+ url: 'http://example.com:8080/resource/4?filter=a',
+ headers: {
+ host: 'example.com:8080',
+ 'content-type': 'text/plain;x=y'
+ }
+ };
+
+ var payload = 'some not so random text';
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var reqHeader = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
+ req.headers.authorization = reqHeader.field;
+
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
+
+ var res = {
+ headers: {
+ 'content-type': 'text/plain'
+ }
+ };
+
+ res.headers['server-authorization'] = Hawk.server.header(credentials2, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
+ expect(res.headers['server-authorization']).to.exist();
+
+ expect(Hawk.client.authenticate(res, credentials2, artifacts, { payload: 'some reply' })).to.equal(true);
+ done();
+ });
+ });
+ });
+
+ it('generates a header then successfully parse it (no server header options)', function (done) {
+
+ var req = {
+ method: 'POST',
+ url: '/resource/4?filter=a',
+ headers: {
+ host: 'example.com:8080',
+ 'content-type': 'text/plain;x=y'
+ }
+ };
+
+ var payload = 'some not so random text';
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var reqHeader = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
+ req.headers.authorization = reqHeader.field;
+
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
+
+ var res = {
+ headers: {
+ 'content-type': 'text/plain'
+ }
+ };
+
+ res.headers['server-authorization'] = Hawk.server.header(credentials2, artifacts);
+ expect(res.headers['server-authorization']).to.exist();
+
+ expect(Hawk.client.authenticate(res, credentials2, artifacts)).to.equal(true);
+ done();
+ });
+ });
+ });
+
+ it('generates a header then fails to parse it (missing server header hash)', function (done) {
+
+ var req = {
+ method: 'POST',
+ url: '/resource/4?filter=a',
+ headers: {
+ host: 'example.com:8080',
+ 'content-type': 'text/plain;x=y'
+ }
+ };
+
+ var payload = 'some not so random text';
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var reqHeader = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
+ req.headers.authorization = reqHeader.field;
+
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
+
+ var res = {
+ headers: {
+ 'content-type': 'text/plain'
+ }
+ };
+
+ res.headers['server-authorization'] = Hawk.server.header(credentials2, artifacts);
+ expect(res.headers['server-authorization']).to.exist();
+
+ expect(Hawk.client.authenticate(res, credentials2, artifacts, { payload: 'some reply' })).to.equal(false);
+ done();
+ });
+ });
+ });
+
+ it('generates a header then successfully parse it (with hash)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080
+ };
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, payload: 'hola!', ext: 'some-app-data' }).field;
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ done();
+ });
+ });
+ });
+
+ it('generates a header then successfully parse it then validate payload', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080
+ };
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, payload: 'hola!', ext: 'some-app-data' }).field;
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ expect(Hawk.server.authenticatePayload('hola!', credentials2, artifacts)).to.be.true();
+ expect(Hawk.server.authenticatePayload('hello!', credentials2, artifacts)).to.be.false();
+ done();
+ });
+ });
+ });
+
+ it('generates a header then successfully parses and validates payload', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080
+ };
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, payload: 'hola!', ext: 'some-app-data' }).field;
+ Hawk.server.authenticate(req, credentialsFunc, { payload: 'hola!' }, function (err, credentials2, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ done();
+ });
+ });
+ });
+
+ it('generates a header then successfully parse it (app)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080
+ };
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', app: 'asd23ased' }).field;
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ expect(artifacts.app).to.equal('asd23ased');
+ done();
+ });
+ });
+ });
+
+ it('generates a header then successfully parse it (app, dlg)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080
+ };
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', app: 'asd23ased', dlg: '23434szr3q4d' }).field;
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ expect(artifacts.app).to.equal('asd23ased');
+ expect(artifacts.dlg).to.equal('23434szr3q4d');
+ done();
+ });
+ });
+ });
+
+ it('generates a header then fail authentication due to bad hash', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080
+ };
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, payload: 'hola!', ext: 'some-app-data' }).field;
+ Hawk.server.authenticate(req, credentialsFunc, { payload: 'byebye!' }, function (err, credentials2, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Bad payload hash');
+ done();
+ });
+ });
+ });
+
+ it('generates a header for one resource then fail to authenticate another', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080
+ };
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data' }).field;
+ req.url = '/something/else';
+
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
+
+ expect(err).to.exist();
+ expect(credentials2).to.exist();
+ done();
+ });
+ });
+ });
+});
diff --git a/deps/npm/node_modules/hawk/test/readme.js b/deps/npm/node_modules/hawk/test/readme.js
new file mode 100755
index 0000000000..7a343f5e21
--- /dev/null
+++ b/deps/npm/node_modules/hawk/test/readme.js
@@ -0,0 +1,94 @@
+// Load modules
+
+var Code = require('code');
+var Hawk = require('../lib');
+var Hoek = require('hoek');
+var Lab = require('lab');
+
+
+// Declare internals
+
+var internals = {};
+
+
+// Test shortcuts
+
+var lab = exports.lab = Lab.script();
+var describe = lab.experiment;
+var it = lab.test;
+var expect = Code.expect;
+
+
+describe('README', function () {
+
+ describe('core', function () {
+
+ var credentials = {
+ id: 'dh37fgj492je',
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256'
+ };
+
+ var options = {
+ credentials: credentials,
+ timestamp: 1353832234,
+ nonce: 'j4h3g2',
+ ext: 'some-app-ext-data'
+ };
+
+ it('should generate a header protocol example', function (done) {
+
+ var header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'GET', options).field;
+
+ expect(header).to.equal('Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", ext="some-app-ext-data", mac="6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE="');
+ done();
+ });
+
+ it('should generate a normalized string protocol example', function (done) {
+
+ var normalized = Hawk.crypto.generateNormalizedString('header', {
+ credentials: credentials,
+ ts: options.timestamp,
+ nonce: options.nonce,
+ method: 'GET',
+ resource: '/resource?a=1&b=2',
+ host: 'example.com',
+ port: 8000,
+ ext: options.ext
+ });
+
+ expect(normalized).to.equal('hawk.1.header\n1353832234\nj4h3g2\nGET\n/resource?a=1&b=2\nexample.com\n8000\n\nsome-app-ext-data\n');
+ done();
+ });
+
+ var payloadOptions = Hoek.clone(options);
+ payloadOptions.payload = 'Thank you for flying Hawk';
+ payloadOptions.contentType = 'text/plain';
+
+ it('should generate a header protocol example (with payload)', function (done) {
+
+ var header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'POST', payloadOptions).field;
+
+ expect(header).to.equal('Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", hash="Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=", ext="some-app-ext-data", mac="aSe1DERmZuRl3pI36/9BdZmnErTw3sNzOOAUlfeKjVw="');
+ done();
+ });
+
+ it('should generate a normalized string protocol example (with payload)', function (done) {
+
+ var normalized = Hawk.crypto.generateNormalizedString('header', {
+ credentials: credentials,
+ ts: options.timestamp,
+ nonce: options.nonce,
+ method: 'POST',
+ resource: '/resource?a=1&b=2',
+ host: 'example.com',
+ port: 8000,
+ hash: Hawk.crypto.calculatePayloadHash(payloadOptions.payload, credentials.algorithm, payloadOptions.contentType),
+ ext: options.ext
+ });
+
+ expect(normalized).to.equal('hawk.1.header\n1353832234\nj4h3g2\nPOST\n/resource?a=1&b=2\nexample.com\n8000\nYi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=\nsome-app-ext-data\n');
+ done();
+ });
+ });
+});
diff --git a/deps/npm/node_modules/hawk/test/server.js b/deps/npm/node_modules/hawk/test/server.js
new file mode 100755
index 0000000000..0fdf13d435
--- /dev/null
+++ b/deps/npm/node_modules/hawk/test/server.js
@@ -0,0 +1,1328 @@
+// Load modules
+
+var Url = require('url');
+var Code = require('code');
+var Hawk = require('../lib');
+var Hoek = require('hoek');
+var Lab = require('lab');
+
+
+// Declare internals
+
+var internals = {};
+
+
+// Test shortcuts
+
+var lab = exports.lab = Lab.script();
+var describe = lab.experiment;
+var it = lab.test;
+var expect = Code.expect;
+
+
+describe('Server', function () {
+
+ var credentialsFunc = function (id, callback) {
+
+ var credentials = {
+ id: id,
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: (id === '1' ? 'sha1' : 'sha256'),
+ user: 'steve'
+ };
+
+ return callback(null, credentials);
+ };
+
+ describe('authenticate()', function () {
+
+ it('parses a valid authentication header (sha1)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk id="1", ts="1353788437", nonce="k3j4h2", mac="zy79QQ5/EYFmQqutVnYb73gAc/U=", ext="hello"'
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials.user).to.equal('steve');
+ done();
+ });
+ });
+
+ it('parses a valid authentication header (sha256)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/1?b=1&a=2',
+ host: 'example.com',
+ port: 8000,
+ authorization: 'Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", mac="m8r1rHbXN6NgO+KIIhjO7sFRyd78RNGVUwehe8Cp2dU=", ext="some-app-data"'
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353832234000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials.user).to.equal('steve');
+ done();
+ });
+ });
+
+ it('parses a valid authentication header (host override)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ headers: {
+ host: 'example1.com:8080',
+ authorization: 'Hawk id="1", ts="1353788437", nonce="k3j4h2", mac="zy79QQ5/EYFmQqutVnYb73gAc/U=", ext="hello"'
+ }
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, { host: 'example.com', localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials.user).to.equal('steve');
+ done();
+ });
+ });
+
+ it('parses a valid authentication header (host port override)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ headers: {
+ host: 'example1.com:80',
+ authorization: 'Hawk id="1", ts="1353788437", nonce="k3j4h2", mac="zy79QQ5/EYFmQqutVnYb73gAc/U=", ext="hello"'
+ }
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, { host: 'example.com', port: 8080, localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials.user).to.equal('steve');
+ done();
+ });
+ });
+
+ it('parses a valid authentication header (POST with payload)', function (done) {
+
+ var req = {
+ method: 'POST',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk id="123456", ts="1357926341", nonce="1AwuJD", hash="qAiXIVv+yjDATneWxZP2YCTa9aHRgQdnH9b3Wc+o3dg=", ext="some-app-data", mac="UeYcj5UoTVaAWXNvJfLVia7kU3VabxCqrccXP8sUGC4="'
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1357926341000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials.user).to.equal('steve');
+ done();
+ });
+ });
+
+ it('errors on missing hash', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/1?b=1&a=2',
+ host: 'example.com',
+ port: 8000,
+ authorization: 'Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", mac="m8r1rHbXN6NgO+KIIhjO7sFRyd78RNGVUwehe8Cp2dU=", ext="some-app-data"'
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, { payload: 'body', localtimeOffsetMsec: 1353832234000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Missing required payload hash');
+ done();
+ });
+ });
+
+ it('errors on a stale timestamp', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk id="123456", ts="1362337299", nonce="UzmxSs", ext="some-app-data", mac="wnNUxchvvryMH2RxckTdZ/gY3ijzvccx4keVvELC61w="'
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Stale timestamp');
+ var header = err.output.headers['WWW-Authenticate'];
+ var ts = header.match(/^Hawk ts\=\"(\d+)\"\, tsm\=\"([^\"]+)\"\, error=\"Stale timestamp\"$/);
+ var now = Hawk.utils.now();
+ expect(parseInt(ts[1], 10) * 1000).to.be.within(now - 1000, now + 1000);
+
+ var res = {
+ headers: {
+ 'www-authenticate': header
+ }
+ };
+
+ expect(Hawk.client.authenticate(res, credentials, artifacts)).to.equal(true);
+ done();
+ });
+ });
+
+ it('errors on a replay', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="bXx7a7p1h9QYQNZ8x7QhvDQym8ACgab4m3lVSFn4DBw=", ext="hello"'
+ };
+
+ var memoryCache = {};
+ var options = {
+ localtimeOffsetMsec: 1353788437000 - Hawk.utils.now(),
+ nonceFunc: function (key, nonce, ts, callback) {
+
+ if (memoryCache[key + nonce]) {
+ return callback(new Error());
+ }
+
+ memoryCache[key + nonce] = true;
+ return callback();
+ }
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, options, function (err, credentials1, artifacts1) {
+
+ expect(err).to.not.exist();
+ expect(credentials1.user).to.equal('steve');
+
+ Hawk.server.authenticate(req, credentialsFunc, options, function (err, credentials2, artifacts2) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Invalid nonce');
+ done();
+ });
+ });
+ });
+
+ it('does not error on nonce collision if keys differ', function (done) {
+
+ var reqSteve = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="bXx7a7p1h9QYQNZ8x7QhvDQym8ACgab4m3lVSFn4DBw=", ext="hello"'
+ };
+
+ var reqBob = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk id="456", ts="1353788437", nonce="k3j4h2", mac="LXfmTnRzrLd9TD7yfH+4se46Bx6AHyhpM94hLCiNia4=", ext="hello"'
+ };
+
+ var credentialsFuncion = function (id, callback) {
+
+ var credentials = {
+ '123': {
+ id: id,
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: (id === '1' ? 'sha1' : 'sha256'),
+ user: 'steve'
+ },
+ '456': {
+ id: id,
+ key: 'xrunpaw3489ruxnpa98w4rxnwerxhqb98rpaxn39848',
+ algorithm: (id === '1' ? 'sha1' : 'sha256'),
+ user: 'bob'
+ }
+ };
+
+ return callback(null, credentials[id]);
+ };
+
+ var memoryCache = {};
+ var options = {
+ localtimeOffsetMsec: 1353788437000 - Hawk.utils.now(),
+ nonceFunc: function (key, nonce, ts, callback) {
+
+ if (memoryCache[key + nonce]) {
+ return callback(new Error());
+ }
+
+ memoryCache[key + nonce] = true;
+ return callback();
+ }
+ };
+
+ Hawk.server.authenticate(reqSteve, credentialsFuncion, options, function (err, credentials1, artifacts1) {
+
+ expect(err).to.not.exist();
+ expect(credentials1.user).to.equal('steve');
+
+ Hawk.server.authenticate(reqBob, credentialsFuncion, options, function (err, credentials2, artifacts2) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('bob');
+ done();
+ });
+ });
+ });
+
+ it('errors on an invalid authentication header: wrong scheme', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Basic asdasdasdasd'
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.not.exist();
+ done();
+ });
+ });
+
+ it('errors on an invalid authentication header: no scheme', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: '!@#'
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Invalid header syntax');
+ done();
+ });
+ });
+
+ it('errors on an missing authorization header', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.isMissing).to.equal(true);
+ done();
+ });
+ });
+
+ it('errors on an missing host header', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ headers: {
+ authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
+ }
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Invalid Host header');
+ done();
+ });
+ });
+
+ it('errors on an missing authorization attribute (id)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Missing attributes');
+ done();
+ });
+ });
+
+ it('errors on an missing authorization attribute (ts)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk id="123", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Missing attributes');
+ done();
+ });
+ });
+
+ it('errors on an missing authorization attribute (nonce)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk id="123", ts="1353788437", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Missing attributes');
+ done();
+ });
+ });
+
+ it('errors on an missing authorization attribute (mac)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", ext="hello"'
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Missing attributes');
+ done();
+ });
+ });
+
+ it('errors on an unknown authorization attribute', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", x="3", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Unknown attribute: x');
+ done();
+ });
+ });
+
+ it('errors on an bad authorization header format', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk id="123\\", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Bad header format');
+ done();
+ });
+ });
+
+ it('errors on an bad authorization attribute value', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk id="\t", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Bad attribute value: id');
+ done();
+ });
+ });
+
+ it('errors on an empty authorization attribute value', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk id="", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Bad attribute value: id');
+ done();
+ });
+ });
+
+ it('errors on duplicated authorization attribute key', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk id="123", id="456", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Duplicate attribute: id');
+ done();
+ });
+ });
+
+ it('errors on an invalid authorization header format', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk'
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Invalid header syntax');
+ done();
+ });
+ });
+
+ it('errors on an bad host header (missing host)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ headers: {
+ host: ':8080',
+ authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
+ }
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Invalid Host header');
+ done();
+ });
+ });
+
+ it('errors on an bad host header (pad port)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ headers: {
+ host: 'example.com:something',
+ authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
+ }
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Invalid Host header');
+ done();
+ });
+ });
+
+ it('errors on credentialsFunc error', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
+ };
+
+ var credentialsFuncion = function (id, callback) {
+
+ return callback(new Error('Unknown user'));
+ };
+
+ Hawk.server.authenticate(req, credentialsFuncion, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Unknown user');
+ done();
+ });
+ });
+
+ it('errors on credentialsFunc error (with credentials)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
+ };
+
+ var credentialsFuncion = function (id, callback) {
+
+ return callback(new Error('Unknown user'), { some: 'value' });
+ };
+
+ Hawk.server.authenticate(req, credentialsFuncion, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Unknown user');
+ expect(credentials.some).to.equal('value');
+ done();
+ });
+ });
+
+ it('errors on missing credentials', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
+ };
+
+ var credentialsFuncion = function (id, callback) {
+
+ return callback(null, null);
+ };
+
+ Hawk.server.authenticate(req, credentialsFuncion, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Unknown credentials');
+ done();
+ });
+ });
+
+ it('errors on invalid credentials (id)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
+ };
+
+ var credentialsFuncion = function (id, callback) {
+
+ var credentials = {
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ user: 'steve'
+ };
+
+ return callback(null, credentials);
+ };
+
+ Hawk.server.authenticate(req, credentialsFuncion, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Invalid credentials');
+ expect(err.output.payload.message).to.equal('An internal server error occurred');
+ done();
+ });
+ });
+
+ it('errors on invalid credentials (key)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
+ };
+
+ var credentialsFuncion = function (id, callback) {
+
+ var credentials = {
+ id: '23434d3q4d5345d',
+ user: 'steve'
+ };
+
+ return callback(null, credentials);
+ };
+
+ Hawk.server.authenticate(req, credentialsFuncion, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Invalid credentials');
+ expect(err.output.payload.message).to.equal('An internal server error occurred');
+ done();
+ });
+ });
+
+ it('errors on unknown credentials algorithm', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
+ };
+
+ var credentialsFuncion = function (id, callback) {
+
+ var credentials = {
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'hmac-sha-0',
+ user: 'steve'
+ };
+
+ return callback(null, credentials);
+ };
+
+ Hawk.server.authenticate(req, credentialsFuncion, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Unknown algorithm');
+ expect(err.output.payload.message).to.equal('An internal server error occurred');
+ done();
+ });
+ });
+
+ it('errors on unknown bad mac', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcU4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
+ };
+
+ var credentialsFuncion = function (id, callback) {
+
+ var credentials = {
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256',
+ user: 'steve'
+ };
+
+ return callback(null, credentials);
+ };
+
+ Hawk.server.authenticate(req, credentialsFuncion, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Bad mac');
+ done();
+ });
+ });
+ });
+
+ describe('header()', function () {
+
+ it('generates header', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256',
+ user: 'steve'
+ };
+
+ var artifacts = {
+ method: 'POST',
+ host: 'example.com',
+ port: '8080',
+ resource: '/resource/4?filter=a',
+ ts: '1398546787',
+ nonce: 'xUwusx',
+ hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
+ ext: 'some-app-data',
+ mac: 'dvIvMThwi28J61Jc3P0ryAhuKpanU63GXdx6hkmQkJA=',
+ id: '123456'
+ };
+
+ var header = Hawk.server.header(credentials, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
+ expect(header).to.equal('Hawk mac=\"n14wVJK4cOxAytPUMc5bPezQzuJGl5n7MYXhFQgEKsE=\", hash=\"f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=\", ext=\"response-specific\"');
+ done();
+ });
+
+ it('generates header (empty payload)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256',
+ user: 'steve'
+ };
+
+ var artifacts = {
+ method: 'POST',
+ host: 'example.com',
+ port: '8080',
+ resource: '/resource/4?filter=a',
+ ts: '1398546787',
+ nonce: 'xUwusx',
+ hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
+ ext: 'some-app-data',
+ mac: 'dvIvMThwi28J61Jc3P0ryAhuKpanU63GXdx6hkmQkJA=',
+ id: '123456'
+ };
+
+ var header = Hawk.server.header(credentials, artifacts, { payload: '', contentType: 'text/plain', ext: 'response-specific' });
+ expect(header).to.equal('Hawk mac=\"i8/kUBDx0QF+PpCtW860kkV/fa9dbwEoe/FpGUXowf0=\", hash=\"q/t+NNAkQZNlq/aAD6PlexImwQTxwgT2MahfTa9XRLA=\", ext=\"response-specific\"');
+ done();
+ });
+
+ it('generates header (pre calculated hash)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256',
+ user: 'steve'
+ };
+
+ var artifacts = {
+ method: 'POST',
+ host: 'example.com',
+ port: '8080',
+ resource: '/resource/4?filter=a',
+ ts: '1398546787',
+ nonce: 'xUwusx',
+ hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
+ ext: 'some-app-data',
+ mac: 'dvIvMThwi28J61Jc3P0ryAhuKpanU63GXdx6hkmQkJA=',
+ id: '123456'
+ };
+
+ var options = { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' };
+ options.hash = Hawk.crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
+ var header = Hawk.server.header(credentials, artifacts, options);
+ expect(header).to.equal('Hawk mac=\"n14wVJK4cOxAytPUMc5bPezQzuJGl5n7MYXhFQgEKsE=\", hash=\"f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=\", ext=\"response-specific\"');
+ done();
+ });
+
+ it('generates header (null ext)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256',
+ user: 'steve'
+ };
+
+ var artifacts = {
+ method: 'POST',
+ host: 'example.com',
+ port: '8080',
+ resource: '/resource/4?filter=a',
+ ts: '1398546787',
+ nonce: 'xUwusx',
+ hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
+ mac: 'dvIvMThwi28J61Jc3P0ryAhuKpanU63GXdx6hkmQkJA=',
+ id: '123456'
+ };
+
+ var header = Hawk.server.header(credentials, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: null });
+ expect(header).to.equal('Hawk mac=\"6PrybJTJs20jsgBw5eilXpcytD8kUbaIKNYXL+6g0ns=\", hash=\"f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=\"');
+ done();
+ });
+
+ it('errors on missing artifacts', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256',
+ user: 'steve'
+ };
+
+ var header = Hawk.server.header(credentials, null, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
+ expect(header).to.equal('');
+ done();
+ });
+
+ it('errors on invalid artifacts', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256',
+ user: 'steve'
+ };
+
+ var header = Hawk.server.header(credentials, 5, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
+ expect(header).to.equal('');
+ done();
+ });
+
+ it('errors on missing credentials', function (done) {
+
+ var artifacts = {
+ method: 'POST',
+ host: 'example.com',
+ port: '8080',
+ resource: '/resource/4?filter=a',
+ ts: '1398546787',
+ nonce: 'xUwusx',
+ hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
+ ext: 'some-app-data',
+ mac: 'dvIvMThwi28J61Jc3P0ryAhuKpanU63GXdx6hkmQkJA=',
+ id: '123456'
+ };
+
+ var header = Hawk.server.header(null, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
+ expect(header).to.equal('');
+ done();
+ });
+
+ it('errors on invalid credentials (key)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ algorithm: 'sha256',
+ user: 'steve'
+ };
+
+ var artifacts = {
+ method: 'POST',
+ host: 'example.com',
+ port: '8080',
+ resource: '/resource/4?filter=a',
+ ts: '1398546787',
+ nonce: 'xUwusx',
+ hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
+ ext: 'some-app-data',
+ mac: 'dvIvMThwi28J61Jc3P0ryAhuKpanU63GXdx6hkmQkJA=',
+ id: '123456'
+ };
+
+ var header = Hawk.server.header(credentials, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
+ expect(header).to.equal('');
+ done();
+ });
+
+ it('errors on invalid algorithm', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'x',
+ user: 'steve'
+ };
+
+ var artifacts = {
+ method: 'POST',
+ host: 'example.com',
+ port: '8080',
+ resource: '/resource/4?filter=a',
+ ts: '1398546787',
+ nonce: 'xUwusx',
+ hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
+ ext: 'some-app-data',
+ mac: 'dvIvMThwi28J61Jc3P0ryAhuKpanU63GXdx6hkmQkJA=',
+ id: '123456'
+ };
+
+ var header = Hawk.server.header(credentials, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
+ expect(header).to.equal('');
+ done();
+ });
+ });
+
+ describe('authenticateBewit()', function () {
+
+ it('errors on uri too long', function (done) {
+
+ var long = '/';
+ for (var i = 0; i < 5000; ++i) {
+ long += 'x';
+ }
+
+ var req = {
+ method: 'GET',
+ url: long,
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk id="1", ts="1353788437", nonce="k3j4h2", mac="zy79QQ5/EYFmQqutVnYb73gAc/U=", ext="hello"'
+ };
+
+ Hawk.server.authenticateBewit(req, credentialsFunc, {}, function (err, credentials, bewit) {
+
+ expect(err).to.exist();
+ expect(err.output.statusCode).to.equal(400);
+ expect(err.message).to.equal('Resource path exceeds max length');
+ done();
+ });
+ });
+ });
+
+ describe('authenticateMessage()', function () {
+
+ it('errors on invalid authorization (ts)', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ delete auth.ts;
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Invalid authorization');
+ done();
+ });
+ });
+ });
+
+ it('errors on invalid authorization (nonce)', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ delete auth.nonce;
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Invalid authorization');
+ done();
+ });
+ });
+ });
+
+ it('errors on invalid authorization (hash)', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ delete auth.hash;
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Invalid authorization');
+ done();
+ });
+ });
+ });
+
+ it('errors with credentials', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, function (id, callback) {
+
+ callback(new Error('something'), { some: 'value' });
+ }, {}, function (err, credentials2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('something');
+ expect(credentials2.some).to.equal('value');
+ done();
+ });
+ });
+ });
+
+ it('errors on nonce collision', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {
+ nonceFunc: function (key, nonce, ts, nonceCallback) {
+
+ nonceCallback(true);
+ }
+ }, function (err, credentials2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Invalid nonce');
+ done();
+ });
+ });
+ });
+
+ it('should generate an authorization then successfully parse it', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ expect(auth).to.exist();
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials2) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ done();
+ });
+ });
+ });
+
+ it('should fail authorization on mismatching host', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ expect(auth).to.exist();
+
+ Hawk.server.authenticateMessage('example1.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Bad mac');
+ done();
+ });
+ });
+ });
+
+ it('should fail authorization on stale timestamp', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ expect(auth).to.exist();
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, { localtimeOffsetMsec: 100000 }, function (err, credentials2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Stale timestamp');
+ done();
+ });
+ });
+ });
+
+ it('overrides timestampSkewSec', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1, localtimeOffsetMsec: 100000 });
+ expect(auth).to.exist();
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, { timestampSkewSec: 500 }, function (err, credentials2) {
+
+ expect(err).to.not.exist();
+ done();
+ });
+ });
+ });
+
+ it('should fail authorization on invalid authorization', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ expect(auth).to.exist();
+ delete auth.id;
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Invalid authorization');
+ done();
+ });
+ });
+ });
+
+ it('should fail authorization on bad hash', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ expect(auth).to.exist();
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message1', auth, credentialsFunc, {}, function (err, credentials2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Bad message hash');
+ done();
+ });
+ });
+ });
+
+ it('should fail authorization on nonce error', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ expect(auth).to.exist();
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {
+ nonceFunc: function (key, nonce, ts, callback) {
+
+ callback(new Error('kaboom'));
+ }
+ }, function (err, credentials2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Invalid nonce');
+ done();
+ });
+ });
+ });
+
+ it('should fail authorization on credentials error', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ expect(auth).to.exist();
+
+ var errFunc = function (id, callback) {
+
+ callback(new Error('kablooey'));
+ };
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('kablooey');
+ done();
+ });
+ });
+ });
+
+ it('should fail authorization on missing credentials', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ expect(auth).to.exist();
+
+ var errFunc = function (id, callback) {
+
+ callback();
+ };
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Unknown credentials');
+ done();
+ });
+ });
+ });
+
+ it('should fail authorization on invalid credentials', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ expect(auth).to.exist();
+
+ var errFunc = function (id, callback) {
+
+ callback(null, {});
+ };
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Invalid credentials');
+ done();
+ });
+ });
+ });
+
+ it('should fail authorization on invalid credentials algorithm', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ expect(auth).to.exist();
+
+ var errFunc = function (id, callback) {
+
+ callback(null, { key: '123', algorithm: '456' });
+ };
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Unknown algorithm');
+ done();
+ });
+ });
+ });
+
+ it('should fail on missing host', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var auth = Hawk.client.message(null, 8080, 'some message', { credentials: credentials });
+ expect(auth).to.not.exist();
+ done();
+ });
+ });
+
+ it('should fail on missing credentials', function (done) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', {});
+ expect(auth).to.not.exist();
+ done();
+ });
+
+ it('should fail on invalid algorithm', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var creds = Hoek.clone(credentials);
+ creds.algorithm = 'blah';
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: creds });
+ expect(auth).to.not.exist();
+ done();
+ });
+ });
+ });
+
+ describe('authenticatePayloadHash()', function () {
+
+ it('checks payload hash', function (done) {
+
+ expect(Hawk.server.authenticatePayloadHash('abcdefg', { hash: 'abcdefg' })).to.equal(true);
+ expect(Hawk.server.authenticatePayloadHash('1234567', { hash: 'abcdefg' })).to.equal(false);
+ done();
+ });
+ });
+});
diff --git a/deps/npm/node_modules/hawk/test/uri.js b/deps/npm/node_modules/hawk/test/uri.js
new file mode 100755
index 0000000000..3dc8e6a1c5
--- /dev/null
+++ b/deps/npm/node_modules/hawk/test/uri.js
@@ -0,0 +1,837 @@
+// Load modules
+
+var Http = require('http');
+var Url = require('url');
+var Code = require('code');
+var Hawk = require('../lib');
+var Hoek = require('hoek');
+var Lab = require('lab');
+
+
+// Declare internals
+
+var internals = {};
+
+
+// Test shortcuts
+
+var lab = exports.lab = Lab.script();
+var describe = lab.experiment;
+var it = lab.test;
+var expect = Code.expect;
+
+
+describe('Uri', function () {
+
+ var credentialsFunc = function (id, callback) {
+
+ var credentials = {
+ id: id,
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: (id === '1' ? 'sha1' : 'sha256'),
+ user: 'steve'
+ };
+
+ return callback(null, credentials);
+ };
+
+ it('should generate a bewit then successfully authenticate it', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?a=1&b=2',
+ host: 'example.com',
+ port: 80
+ };
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var bewit = Hawk.uri.getBewit('http://example.com/resource/4?a=1&b=2', { credentials: credentials1, ttlSec: 60 * 60 * 24 * 365 * 100, ext: 'some-app-data' });
+ req.url += '&bewit=' + bewit;
+
+ Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials2, attributes) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ expect(attributes.ext).to.equal('some-app-data');
+ done();
+ });
+ });
+ });
+
+ it('should generate a bewit then successfully authenticate it (no ext)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?a=1&b=2',
+ host: 'example.com',
+ port: 80
+ };
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var bewit = Hawk.uri.getBewit('http://example.com/resource/4?a=1&b=2', { credentials: credentials1, ttlSec: 60 * 60 * 24 * 365 * 100 });
+ req.url += '&bewit=' + bewit;
+
+ Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials2, attributes) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ done();
+ });
+ });
+ });
+
+ it('should successfully authenticate a request (last param)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?a=1&b=2&bewit=MTIzNDU2XDQ1MTE0ODQ2MjFcMzFjMmNkbUJFd1NJRVZDOVkva1NFb2c3d3YrdEVNWjZ3RXNmOGNHU2FXQT1cc29tZS1hcHAtZGF0YQ',
+ host: 'example.com',
+ port: 8080
+ };
+
+ Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
+
+ expect(err).to.not.exist();
+ expect(credentials.user).to.equal('steve');
+ expect(attributes.ext).to.equal('some-app-data');
+ done();
+ });
+ });
+
+ it('should successfully authenticate a request (first param)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?bewit=MTIzNDU2XDQ1MTE0ODQ2MjFcMzFjMmNkbUJFd1NJRVZDOVkva1NFb2c3d3YrdEVNWjZ3RXNmOGNHU2FXQT1cc29tZS1hcHAtZGF0YQ&a=1&b=2',
+ host: 'example.com',
+ port: 8080
+ };
+
+ Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
+
+ expect(err).to.not.exist();
+ expect(credentials.user).to.equal('steve');
+ expect(attributes.ext).to.equal('some-app-data');
+ done();
+ });
+ });
+
+ it('should successfully authenticate a request (only param)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?bewit=MTIzNDU2XDQ1MTE0ODQ2NDFcZm1CdkNWT3MvcElOTUUxSTIwbWhrejQ3UnBwTmo4Y1VrSHpQd3Q5OXJ1cz1cc29tZS1hcHAtZGF0YQ',
+ host: 'example.com',
+ port: 8080
+ };
+
+ Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
+
+ expect(err).to.not.exist();
+ expect(credentials.user).to.equal('steve');
+ expect(attributes.ext).to.equal('some-app-data');
+ done();
+ });
+ });
+
+ it('should fail on multiple authentication', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?bewit=MTIzNDU2XDQ1MTE0ODQ2NDFcZm1CdkNWT3MvcElOTUUxSTIwbWhrejQ3UnBwTmo4Y1VrSHpQd3Q5OXJ1cz1cc29tZS1hcHAtZGF0YQ',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Basic asdasdasdasd'
+ };
+
+ Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Multiple authentications');
+ done();
+ });
+ });
+
+ it('should fail on method other than GET', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var req = {
+ method: 'POST',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080
+ };
+
+ var exp = Math.floor(Hawk.utils.now() / 1000) + 60;
+ var ext = 'some-app-data';
+ var mac = Hawk.crypto.calculateMac('bewit', credentials1, {
+ timestamp: exp,
+ nonce: '',
+ method: req.method,
+ resource: req.url,
+ host: req.host,
+ port: req.port,
+ ext: ext
+ });
+
+ var bewit = credentials1.id + '\\' + exp + '\\' + mac + '\\' + ext;
+
+ req.url += '&bewit=' + Hoek.base64urlEncode(bewit);
+
+ Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials2, attributes) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Invalid method');
+ done();
+ });
+ });
+ });
+
+ it('should fail on invalid host header', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ',
+ headers: {
+ host: 'example.com:something'
+ }
+ };
+
+ Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Invalid Host header');
+ done();
+ });
+ });
+
+ it('should fail on empty bewit', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?bewit=',
+ host: 'example.com',
+ port: 8080
+ };
+
+ Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Empty bewit');
+ expect(err.isMissing).to.not.exist();
+ done();
+ });
+ });
+
+ it('should fail on invalid bewit', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?bewit=*',
+ host: 'example.com',
+ port: 8080
+ };
+
+ Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Invalid bewit encoding');
+ expect(err.isMissing).to.not.exist();
+ done();
+ });
+ });
+
+ it('should fail on missing bewit', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4',
+ host: 'example.com',
+ port: 8080
+ };
+
+ Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.not.exist();
+ expect(err.isMissing).to.equal(true);
+ done();
+ });
+ });
+
+ it('should fail on invalid bewit structure', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?bewit=abc',
+ host: 'example.com',
+ port: 8080
+ };
+
+ Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Invalid bewit structure');
+ done();
+ });
+ });
+
+ it('should fail on empty bewit attribute', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?bewit=YVxcY1xk',
+ host: 'example.com',
+ port: 8080
+ };
+
+ Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Missing bewit attributes');
+ done();
+ });
+ });
+
+ it('should fail on missing bewit id attribute', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?bewit=XDQ1NTIxNDc2MjJcK0JFbFhQMXhuWjcvd1Nrbm1ldGhlZm5vUTNHVjZNSlFVRHk4NWpTZVJ4VT1cc29tZS1hcHAtZGF0YQ',
+ host: 'example.com',
+ port: 8080
+ };
+
+ Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Missing bewit attributes');
+ done();
+ });
+ });
+
+ it('should fail on expired access', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?a=1&b=2&bewit=MTIzNDU2XDEzNTY0MTg1ODNcWk1wZlMwWU5KNHV0WHpOMmRucTRydEk3NXNXTjFjeWVITTcrL0tNZFdVQT1cc29tZS1hcHAtZGF0YQ',
+ host: 'example.com',
+ port: 8080
+ };
+
+ Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Access expired');
+ done();
+ });
+ });
+
+ it('should fail on credentials function error', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ',
+ host: 'example.com',
+ port: 8080
+ };
+
+ Hawk.uri.authenticate(req, function (id, callback) {
+
+ callback(Hawk.error.badRequest('Boom'));
+ }, {}, function (err, credentials, attributes) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Boom');
+ done();
+ });
+ });
+
+ it('should fail on credentials function error with credentials', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ',
+ host: 'example.com',
+ port: 8080
+ };
+
+ Hawk.uri.authenticate(req, function (id, callback) {
+
+ callback(Hawk.error.badRequest('Boom'), { some: 'value' });
+ }, {}, function (err, credentials, attributes) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Boom');
+ expect(credentials.some).to.equal('value');
+ done();
+ });
+ });
+
+ it('should fail on null credentials function response', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ',
+ host: 'example.com',
+ port: 8080
+ };
+
+ Hawk.uri.authenticate(req, function (id, callback) {
+
+ callback(null, null);
+ }, {}, function (err, credentials, attributes) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Unknown credentials');
+ done();
+ });
+ });
+
+ it('should fail on invalid credentials function response', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ',
+ host: 'example.com',
+ port: 8080
+ };
+
+ Hawk.uri.authenticate(req, function (id, callback) {
+
+ callback(null, {});
+ }, {}, function (err, credentials, attributes) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Invalid credentials');
+ done();
+ });
+ });
+
+ it('should fail on invalid credentials function response (unknown algorithm)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ',
+ host: 'example.com',
+ port: 8080
+ };
+
+ Hawk.uri.authenticate(req, function (id, callback) {
+
+ callback(null, { key: 'xxx', algorithm: 'xxx' });
+ }, {}, function (err, credentials, attributes) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Unknown algorithm');
+ done();
+ });
+ });
+
+ it('should fail on expired access', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ',
+ host: 'example.com',
+ port: 8080
+ };
+
+ Hawk.uri.authenticate(req, function (id, callback) {
+
+ callback(null, { key: 'xxx', algorithm: 'sha256' });
+ }, {}, function (err, credentials, attributes) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Bad mac');
+ done();
+ });
+ });
+
+ describe('getBewit()', function () {
+
+ it('returns a valid bewit value', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
+ expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdca3NjeHdOUjJ0SnBQMVQxekRMTlBiQjVVaUtJVTl0T1NKWFRVZEc3WDloOD1ceGFuZHlhbmR6');
+ done();
+ });
+
+ it('returns a valid bewit value (explicit port)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Hawk.uri.getBewit('https://example.com:8080/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
+ expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdcaFpiSjNQMmNLRW80a3kwQzhqa1pBa1J5Q1p1ZWc0V1NOYnhWN3ZxM3hIVT1ceGFuZHlhbmR6');
+ done();
+ });
+
+ it('returns a valid bewit value (null ext)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: null });
+ expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdcSUdZbUxnSXFMckNlOEN4dktQczRKbFdJQStValdKSm91d2dBUmlWaENBZz1c');
+ done();
+ });
+
+ it('returns a valid bewit value (parsed uri)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Hawk.uri.getBewit(Url.parse('https://example.com/somewhere/over/the/rainbow'), { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
+ expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdca3NjeHdOUjJ0SnBQMVQxekRMTlBiQjVVaUtJVTl0T1NKWFRVZEc3WDloOD1ceGFuZHlhbmR6');
+ done();
+ });
+
+ it('errors on invalid options', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', 4);
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on missing uri', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Hawk.uri.getBewit('', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on invalid uri', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Hawk.uri.getBewit(5, { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on invalid credentials (id)', function (done) {
+
+ var credentials = {
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 3000, ext: 'xandyandz' });
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on missing credentials', function (done) {
+
+ var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { ttlSec: 3000, ext: 'xandyandz' });
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on invalid credentials (key)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 3000, ext: 'xandyandz' });
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on invalid algorithm', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'hmac-sha-0'
+ };
+
+ var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, ext: 'xandyandz' });
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on missing options', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'hmac-sha-0'
+ };
+
+ var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow');
+ expect(bewit).to.equal('');
+ done();
+ });
+ });
+
+ describe('authenticateMessage()', function () {
+
+ it('should generate an authorization then successfully parse it', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ expect(auth).to.exist();
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials2) {
+
+ expect(err).to.not.exist();
+ expect(credentials2.user).to.equal('steve');
+ done();
+ });
+ });
+ });
+
+ it('should fail authorization on mismatching host', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ expect(auth).to.exist();
+
+ Hawk.server.authenticateMessage('example1.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Bad mac');
+ done();
+ });
+ });
+ });
+
+ it('should fail authorization on stale timestamp', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ expect(auth).to.exist();
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, { localtimeOffsetMsec: 100000 }, function (err, credentials2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Stale timestamp');
+ done();
+ });
+ });
+ });
+
+ it('overrides timestampSkewSec', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1, localtimeOffsetMsec: 100000 });
+ expect(auth).to.exist();
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, { timestampSkewSec: 500 }, function (err, credentials2) {
+
+ expect(err).to.not.exist();
+ done();
+ });
+ });
+ });
+
+ it('should fail authorization on invalid authorization', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ expect(auth).to.exist();
+ delete auth.id;
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Invalid authorization');
+ done();
+ });
+ });
+ });
+
+ it('should fail authorization on bad hash', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ expect(auth).to.exist();
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message1', auth, credentialsFunc, {}, function (err, credentials2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Bad message hash');
+ done();
+ });
+ });
+ });
+
+ it('should fail authorization on nonce error', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ expect(auth).to.exist();
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {
+ nonceFunc: function (key, nonce, ts, callback) {
+
+ callback(new Error('kaboom'));
+ }
+ }, function (err, credentials2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Invalid nonce');
+ done();
+ });
+ });
+ });
+
+ it('should fail authorization on credentials error', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ expect(auth).to.exist();
+
+ var errFunc = function (id, callback) {
+
+ callback(new Error('kablooey'));
+ };
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('kablooey');
+ done();
+ });
+ });
+ });
+
+ it('should fail authorization on missing credentials', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ expect(auth).to.exist();
+
+ var errFunc = function (id, callback) {
+
+ callback();
+ };
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Unknown credentials');
+ done();
+ });
+ });
+ });
+
+ it('should fail authorization on invalid credentials', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ expect(auth).to.exist();
+
+ var errFunc = function (id, callback) {
+
+ callback(null, {});
+ };
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Invalid credentials');
+ done();
+ });
+ });
+ });
+
+ it('should fail authorization on invalid credentials algorithm', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
+ expect(auth).to.exist();
+
+ var errFunc = function (id, callback) {
+
+ callback(null, { key: '123', algorithm: '456' });
+ };
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials2) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Unknown algorithm');
+ done();
+ });
+ });
+ });
+
+ it('should fail on missing host', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var auth = Hawk.client.message(null, 8080, 'some message', { credentials: credentials1 });
+ expect(auth).to.not.exist();
+ done();
+ });
+ });
+
+ it('should fail on missing credentials', function (done) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', {});
+ expect(auth).to.not.exist();
+ done();
+ });
+
+ it('should fail on invalid algorithm', function (done) {
+
+ credentialsFunc('123456', function (err, credentials1) {
+
+ var creds = Hoek.clone(credentials1);
+ creds.algorithm = 'blah';
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: creds });
+ expect(auth).to.not.exist();
+ done();
+ });
+ });
+ });
+});
diff --git a/deps/npm/node_modules/hawk/test/utils.js b/deps/npm/node_modules/hawk/test/utils.js
new file mode 100755
index 0000000000..a2f17e590d
--- /dev/null
+++ b/deps/npm/node_modules/hawk/test/utils.js
@@ -0,0 +1,149 @@
+// Load modules
+
+var Code = require('code');
+var Hawk = require('../lib');
+var Lab = require('lab');
+var Package = require('../package.json');
+
+
+// Declare internals
+
+var internals = {};
+
+
+// Test shortcuts
+
+var lab = exports.lab = Lab.script();
+var describe = lab.experiment;
+var it = lab.test;
+var expect = Code.expect;
+
+
+describe('Utils', function () {
+
+ describe('parseHost()', function () {
+
+ it('returns port 80 for non tls node request', function (done) {
+
+ var req = {
+ method: 'POST',
+ url: '/resource/4?filter=a',
+ headers: {
+ host: 'example.com',
+ 'content-type': 'text/plain;x=y'
+ }
+ };
+
+ expect(Hawk.utils.parseHost(req, 'Host').port).to.equal(80);
+ done();
+ });
+
+ it('returns port 443 for non tls node request', function (done) {
+
+ var req = {
+ method: 'POST',
+ url: '/resource/4?filter=a',
+ headers: {
+ host: 'example.com',
+ 'content-type': 'text/plain;x=y'
+ },
+ connection: {
+ encrypted: true
+ }
+ };
+
+ expect(Hawk.utils.parseHost(req, 'Host').port).to.equal(443);
+ done();
+ });
+
+ it('returns port 443 for non tls node request (IPv6)', function (done) {
+
+ var req = {
+ method: 'POST',
+ url: '/resource/4?filter=a',
+ headers: {
+ host: '[123:123:123]',
+ 'content-type': 'text/plain;x=y'
+ },
+ connection: {
+ encrypted: true
+ }
+ };
+
+ expect(Hawk.utils.parseHost(req, 'Host').port).to.equal(443);
+ done();
+ });
+
+ it('parses IPv6 headers', function (done) {
+
+ var req = {
+ method: 'POST',
+ url: '/resource/4?filter=a',
+ headers: {
+ host: '[123:123:123]:8000',
+ 'content-type': 'text/plain;x=y'
+ },
+ connection: {
+ encrypted: true
+ }
+ };
+
+ var host = Hawk.utils.parseHost(req, 'Host');
+ expect(host.port).to.equal('8000');
+ expect(host.name).to.equal('[123:123:123]');
+ done();
+ });
+
+ it('errors on header too long', function (done) {
+
+ var long = '';
+ for (var i = 0; i < 5000; ++i) {
+ long += 'x';
+ }
+
+ expect(Hawk.utils.parseHost({ headers: { host: long } })).to.be.null();
+ done();
+ });
+ });
+
+ describe('parseAuthorizationHeader()', function () {
+
+ it('errors on header too long', function (done) {
+
+ var long = 'Scheme a="';
+ for (var i = 0; i < 5000; ++i) {
+ long += 'x';
+ }
+ long += '"';
+
+ var err = Hawk.utils.parseAuthorizationHeader(long, ['a']);
+ expect(err).to.be.instanceof(Error);
+ expect(err.message).to.equal('Header length too long');
+ done();
+ });
+ });
+
+ describe('version()', function () {
+
+ it('returns the correct package version number', function (done) {
+
+ expect(Hawk.utils.version()).to.equal(Package.version);
+ done();
+ });
+ });
+
+ describe('unauthorized()', function () {
+
+ it('returns a hawk 401', function (done) {
+
+ expect(Hawk.utils.unauthorized('kaboom').output.headers['WWW-Authenticate']).to.equal('Hawk error="kaboom"');
+ done();
+ });
+
+ it('supports attributes', function (done) {
+
+ expect(Hawk.utils.unauthorized('kaboom', { a: 'b' }).output.headers['WWW-Authenticate']).to.equal('Hawk a="b", error="kaboom"');
+ done();
+ });
+ });
+});
diff --git a/deps/npm/node_modules/hoek/.npmignore b/deps/npm/node_modules/hoek/.npmignore
index adac8ad9c6..7e1574dc5c 100644
--- a/deps/npm/node_modules/hoek/.npmignore
+++ b/deps/npm/node_modules/hoek/.npmignore
@@ -1,3 +1,18 @@
-*
-!lib/**
-!.npmignore
+.idea
+*.iml
+npm-debug.log
+dump.rdb
+node_modules
+results.tap
+results.xml
+npm-shrinkwrap.json
+config.json
+.DS_Store
+*/.DS_Store
+*/*/.DS_Store
+._*
+*/._*
+*/*/._*
+coverage.*
+lib-cov
+complexity.md
diff --git a/deps/npm/node_modules/hoek/.travis.yml b/deps/npm/node_modules/hoek/.travis.yml
new file mode 100644
index 0000000000..7a64dd2210
--- /dev/null
+++ b/deps/npm/node_modules/hoek/.travis.yml
@@ -0,0 +1,7 @@
+language: node_js
+
+node_js:
+ - 0.10
+ - 4.0
+
+sudo: false
diff --git a/deps/npm/node_modules/hoek/CONTRIBUTING.md b/deps/npm/node_modules/hoek/CONTRIBUTING.md
new file mode 100644
index 0000000000..892836159b
--- /dev/null
+++ b/deps/npm/node_modules/hoek/CONTRIBUTING.md
@@ -0,0 +1 @@
+Please view our [hapijs contributing guide](https://github.com/hapijs/hapi/blob/master/CONTRIBUTING.md).
diff --git a/deps/npm/node_modules/hoek/LICENSE b/deps/npm/node_modules/hoek/LICENSE
index 133cbdd9ef..5530904255 100644
--- a/deps/npm/node_modules/hoek/LICENSE
+++ b/deps/npm/node_modules/hoek/LICENSE
@@ -1,5 +1,4 @@
-Copyright (c) 2011-2016, Project contributors
-Copyright (c) 2011-2014, Walmart
+Copyright (c) 2011-2014, Walmart and other contributors.
Copyright (c) 2011, Yahoo Inc.
All rights reserved.
diff --git a/deps/npm/node_modules/hoek/README.md b/deps/npm/node_modules/hoek/README.md
index ec7bc2538d..92c4912c7e 100644
--- a/deps/npm/node_modules/hoek/README.md
+++ b/deps/npm/node_modules/hoek/README.md
@@ -4,27 +4,581 @@ Utility methods for the hapi ecosystem. This module is not intended to solve eve
[![Build Status](https://secure.travis-ci.org/hapijs/hoek.svg)](http://travis-ci.org/hapijs/hoek)
-<a href="https://andyet.com"><img src="https://s3.amazonaws.com/static.andyet.com/images/%26yet-logo.svg" align="right" /></a>
-
Lead Maintainer: [Nathan LaFreniere](https://github.com/nlf)
-**hoek** is sponsored by [&yet](https://andyet.com)
+# Table of Contents
+
+* [Introduction](#introduction "Introduction")
+* [Object](#object "Object")
+ * [clone](#cloneobj "clone")
+ * [cloneWithShallow](#clonewithshallowobj-keys "cloneWithShallow")
+ * [merge](#mergetarget-source-isnulloverride-ismergearrays "merge")
+ * [applyToDefaults](#applytodefaultsdefaults-options-isnulloverride "applyToDefaults")
+ * [applyToDefaultsWithShallow](#applytodefaultswithshallowdefaults-options-keys "applyToDefaultsWithShallow")
+ * [deepEqual](#deepequala-b "deepEqual")
+ * [unique](#uniquearray-key "unique")
+ * [mapToObject](#maptoobjectarray-key "mapToObject")
+ * [intersect](#intersectarray1-array2 "intersect")
+ * [contain](#containref-values-options "contain")
+ * [flatten](#flattenarray-target "flatten")
+ * [reach](#reachobj-chain-options "reach")
+ * [reachTemplate](#reachtemplateobj-template-options "reachTemplate")
+ * [transform](#transformobj-transform-options "transform")
+ * [shallow](#shallowobj "shallow")
+ * [stringify](#stringifyobj "stringify")
+* [Timer](#timer "Timer")
+* [Bench](#bench "Bench")
+* [Binary Encoding/Decoding](#binary-encodingdecoding "Binary Encoding/Decoding")
+ * [base64urlEncode](#base64urlencodevalue "binary64urlEncode")
+ * [base64urlDecode](#base64urldecodevalue "binary64urlDecode")
+* [Escaping Characters](#escaping-characters "Escaping Characters")
+ * [escapeHtml](#escapehtmlstring "escapeHtml")
+ * [escapeHeaderAttribute](#escapeheaderattributeattribute "escapeHeaderAttribute")
+ * [escapeRegex](#escaperegexstring "escapeRegex")
+* [Errors](#errors "Errors")
+ * [assert](#assertcondition-message "assert")
+ * [abort](#abortmessage "abort")
+ * [displayStack](#displaystackslice "displayStack")
+ * [callStack](#callstackslice "callStack")
+* [Function](#function "Function")
+ * [nextTick](#nexttickfn "nextTick")
+ * [once](#oncefn "once")
+ * [ignore](#ignore "ignore")
+* [Miscellaneous](#miscellaneous "Miscellaneous")
+ * [uniqueFilename](#uniquefilenamepath-extension "uniqueFilename")
+ * [isAbsolutePath](#isabsolutepathpath-platform "isAbsolutePath")
+ * [isInteger](#isintegervalue "isInteger")
+
+
-## Usage
+# Introduction
The *Hoek* library contains some common functions used within the hapi ecosystem. It comes with useful methods for Arrays (clone, merge, applyToDefaults), Objects (removeKeys, copy), Asserting and more.
For example, to use Hoek to set configuration with default options:
```javascript
-const Hoek = require('hoek');
+var Hoek = require('hoek');
-const default = {url : "www.github.com", port : "8000", debug : true};
+var default = {url : "www.github.com", port : "8000", debug : true};
-const config = Hoek.applyToDefaults(default, {port : "3000", admin : true});
+var config = Hoek.applyToDefaults(default, {port : "3000", admin : true});
// In this case, config would be { url: 'www.github.com', port: '3000', debug: true, admin: true }
```
-## Documentation
+Under each of the sections (such as Array), there are subsections which correspond to Hoek methods. Each subsection will explain how to use the corresponding method. In each js excerpt below, the `var Hoek = require('hoek');` is omitted for brevity.
+
+## Object
+
+Hoek provides several helpful methods for objects and arrays.
+
+### clone(obj)
+
+This method is used to clone an object or an array. A *deep copy* is made (duplicates everything, including values that are objects, as well as non-enumerable properties).
+
+```javascript
+
+var nestedObj = {
+ w: /^something$/ig,
+ x: {
+ a: [1, 2, 3],
+ b: 123456,
+ c: new Date()
+ },
+ y: 'y',
+ z: new Date()
+ };
+
+var copy = Hoek.clone(nestedObj);
+
+copy.x.b = 100;
+
+console.log(copy.y); // results in 'y'
+console.log(nestedObj.x.b); // results in 123456
+console.log(copy.x.b); // results in 100
+```
+
+### cloneWithShallow(obj, keys)
+keys is an array of key names to shallow copy
+
+This method is also used to clone an object or array, however any keys listed in the `keys` array are shallow copied while those not listed are deep copied.
+
+```javascript
+
+var nestedObj = {
+ w: /^something$/ig,
+ x: {
+ a: [1, 2, 3],
+ b: 123456,
+ c: new Date()
+ },
+ y: 'y',
+ z: new Date()
+ };
+
+var copy = Hoek.cloneWithShallow(nestedObj, ['x']);
+
+copy.x.b = 100;
+
+console.log(copy.y); // results in 'y'
+console.log(nestedObj.x.b); // results in 100
+console.log(copy.x.b); // results in 100
+```
+
+### merge(target, source, isNullOverride, isMergeArrays)
+isNullOverride, isMergeArrays default to true
+
+Merge all the properties of source into target, source wins in conflict, and by default null and undefined from source are applied.
+Merge is destructive where the target is modified. For non destructive merge, use `applyToDefaults`.
+
+
+```javascript
+
+var target = {a: 1, b : 2};
+var source = {a: 0, c: 5};
+var source2 = {a: null, c: 5};
+
+Hoek.merge(target, source); // results in {a: 0, b: 2, c: 5}
+Hoek.merge(target, source2); // results in {a: null, b: 2, c: 5}
+Hoek.merge(target, source2, false); // results in {a: 1, b: 2, c: 5}
+
+var targetArray = [1, 2, 3];
+var sourceArray = [4, 5];
+
+Hoek.merge(targetArray, sourceArray); // results in [1, 2, 3, 4, 5]
+Hoek.merge(targetArray, sourceArray, true, false); // results in [4, 5]
+```
+
+### applyToDefaults(defaults, options, isNullOverride)
+isNullOverride defaults to false
+
+Apply options to a copy of the defaults
+
+```javascript
+
+var defaults = { host: "localhost", port: 8000 };
+var options = { port: 8080 };
+
+var config = Hoek.applyToDefaults(defaults, options); // results in { host: "localhost", port: 8080 }
+```
+
+Apply options with a null value to a copy of the defaults
+
+```javascript
+
+var defaults = { host: "localhost", port: 8000 };
+var options = { host: null, port: 8080 };
+
+var config = Hoek.applyToDefaults(defaults, options, true); // results in { host: null, port: 8080 }
+```
+
+### applyToDefaultsWithShallow(defaults, options, keys)
+keys is an array of key names to shallow copy
+
+Apply options to a copy of the defaults. Keys specified in the last parameter are shallow copied from options instead of merged.
+
+```javascript
+
+var defaults = {
+ server: {
+ host: "localhost",
+ port: 8000
+ },
+ name: 'example'
+ };
+
+var options = { server: { port: 8080 } };
+
+var config = Hoek.applyToDefaultsWithShallow(defaults, options, ['server']); // results in { server: { port: 8080 }, name: 'example' }
+```
+
+### deepEqual(b, a, [options])
+
+Performs a deep comparison of the two values including support for circular dependencies, prototype, and properties. To skip prototype comparisons, use `options.prototype = false`
+
+```javascript
+Hoek.deepEqual({ a: [1, 2], b: 'string', c: { d: true } }, { a: [1, 2], b: 'string', c: { d: true } }); //results in true
+Hoek.deepEqual(Object.create(null), {}, { prototype: false }); //results in true
+Hoek.deepEqual(Object.create(null), {}); //results in false
+```
+
+### unique(array, key)
+
+Remove duplicate items from Array
+
+```javascript
+
+var array = [1, 2, 2, 3, 3, 4, 5, 6];
+
+var newArray = Hoek.unique(array); // results in [1,2,3,4,5,6]
+
+array = [{id: 1}, {id: 1}, {id: 2}];
+
+newArray = Hoek.unique(array, "id"); // results in [{id: 1}, {id: 2}]
+```
+
+### mapToObject(array, key)
+
+Convert an Array into an Object
+
+```javascript
+
+var array = [1,2,3];
+var newObject = Hoek.mapToObject(array); // results in [{"1": true}, {"2": true}, {"3": true}]
+
+array = [{id: 1}, {id: 2}];
+newObject = Hoek.mapToObject(array, "id"); // results in [{"id": 1}, {"id": 2}]
+```
+
+### intersect(array1, array2)
+
+Find the common unique items in two arrays
+
+```javascript
+
+var array1 = [1, 2, 3];
+var array2 = [1, 4, 5];
+
+var newArray = Hoek.intersect(array1, array2); // results in [1]
+```
+
+### contain(ref, values, [options])
+
+Tests if the reference value contains the provided values where:
+- `ref` - the reference string, array, or object.
+- `values` - a single or array of values to find within the `ref` value. If `ref` is an object, `values` can be a key name,
+ an array of key names, or an object with key-value pairs to compare.
+- `options` - an optional object with the following optional settings:
+ - `deep` - if `true`, performed a deep comparison of the values.
+ - `once` - if `true`, allows only one occurrence of each value.
+ - `only` - if `true`, does not allow values not explicitly listed.
+ - `part` - if `true`, allows partial match of the values (at least one must always match).
+
+Note: comparing a string to overlapping values will result in failed comparison (e.g. `contain('abc', ['ab', 'bc'])`).
+Also, if an object key's value does not match the provided value, `false` is returned even when `part` is specified.
+
+```javascript
+Hoek.contain('aaa', 'a', { only: true }); // true
+Hoek.contain([{ a: 1 }], [{ a: 1 }], { deep: true }); // true
+Hoek.contain([1, 2, 2], [1, 2], { once: true }); // false
+Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1, d: 4 }, { part: true }); // true
+```
+
+### flatten(array, [target])
+
+Flatten an array
+
+```javascript
+
+var array = [1, [2, 3]];
+
+var flattenedArray = Hoek.flatten(array); // results in [1, 2, 3]
+
+array = [1, [2, 3]];
+target = [4, [5]];
+
+flattenedArray = Hoek.flatten(array, target); // results in [4, [5], 1, 2, 3]
+```
+
+### reach(obj, chain, [options])
+
+Converts an object key chain string to reference
+
+- `options` - optional settings
+ - `separator` - string to split chain path on, defaults to '.'
+ - `default` - value to return if the path or value is not present, default is `undefined`
+ - `strict` - if `true`, will throw an error on missing member, default is `false`
+ - `functions` - if `true` allow traversing functions for properties. `false` will throw an error if a function is part of the chain.
+
+A chain including negative numbers will work like negative indices on an
+array.
+
+If chain is `null`, `undefined` or `false`, the object itself will be returned.
+
+```javascript
+
+var chain = 'a.b.c';
+var obj = {a : {b : { c : 1}}};
+
+Hoek.reach(obj, chain); // returns 1
+
+var chain = 'a.b.-1';
+var obj = {a : {b : [2,3,6]}};
+
+Hoek.reach(obj, chain); // returns 6
+```
+
+### reachTemplate(obj, template, [options])
+
+Replaces string parameters (`{name}`) with their corresponding object key values by applying the
+(`reach()`)[#reachobj-chain-options] method where:
+
+- `obj` - the context object used for key lookup.
+- `template` - a string containing `{}` parameters.
+- `options` - optional (`reach()`)[#reachobj-chain-options] options.
+
+```javascript
+
+var chain = 'a.b.c';
+var obj = {a : {b : { c : 1}}};
+
+Hoek.reachTemplate(obj, '1+{a.b.c}=2'); // returns '1+1=2'
+```
+
+### transform(obj, transform, [options])
+
+Transforms an existing object into a new one based on the supplied `obj` and `transform` map. `options` are the same as the `reach` options. The first argument can also be an array of objects. In that case the method will return an array of transformed objects.
+
+```javascript
+var source = {
+ address: {
+ one: '123 main street',
+ two: 'PO Box 1234'
+ },
+ title: 'Warehouse',
+ state: 'CA'
+};
+
+var result = Hoek.transform(source, {
+ 'person.address.lineOne': 'address.one',
+ 'person.address.lineTwo': 'address.two',
+ 'title': 'title',
+ 'person.address.region': 'state'
+});
+// Results in
+// {
+// person: {
+// address: {
+// lineOne: '123 main street',
+// lineTwo: 'PO Box 1234',
+// region: 'CA'
+// }
+// },
+// title: 'Warehouse'
+// }
+```
+
+### shallow(obj)
+
+Performs a shallow copy by copying the references of all the top level children where:
+- `obj` - the object to be copied.
+
+```javascript
+var shallow = Hoek.shallow({ a: { b: 1 } });
+```
+
+### stringify(obj)
+
+Converts an object to string using the built-in `JSON.stringify()` method with the difference that any errors are caught
+and reported back in the form of the returned string. Used as a shortcut for displaying information to the console (e.g. in
+error message) without the need to worry about invalid conversion.
+
+```javascript
+var a = {};
+a.b = a;
+Hoek.stringify(a); // Returns '[Cannot display object: Converting circular structure to JSON]'
+```
+
+# Timer
+
+A Timer object. Initializing a new timer object sets the ts to the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.
+
+```javascript
+
+var timerObj = new Hoek.Timer();
+console.log("Time is now: " + timerObj.ts);
+console.log("Elapsed time from initialization: " + timerObj.elapsed() + 'milliseconds');
+```
+
+
+# Bench
+
+Same as Timer with the exception that `ts` stores the internal node clock which is not related to `Date.now()` and cannot be used to display
+human-readable timestamps. More accurate for benchmarking or internal timers.
+
+# Binary Encoding/Decoding
+
+### base64urlEncode(value)
+
+Encodes value in Base64 or URL encoding
+
+### base64urlDecode(value)
+
+Decodes data in Base64 or URL encoding.
+# Escaping Characters
+
+Hoek provides convenient methods for escaping html characters. The escaped characters are as followed:
+
+```javascript
+
+internals.htmlEscaped = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;',
+ "'": '&#x27;',
+ '`': '&#x60;'
+};
+```
+
+### escapeHtml(string)
+
+```javascript
+
+var string = '<html> hey </html>';
+var escapedString = Hoek.escapeHtml(string); // returns &lt;html&gt; hey &lt;/html&gt;
+```
+
+### escapeHeaderAttribute(attribute)
+
+Escape attribute value for use in HTTP header
+
+```javascript
+
+var a = Hoek.escapeHeaderAttribute('I said "go w\\o me"'); //returns I said \"go w\\o me\"
+```
+
+
+### escapeRegex(string)
+
+Escape string for Regex construction
+
+```javascript
+
+var a = Hoek.escapeRegex('4^f$s.4*5+-_?%=#!:@|~\\/`"(>)[<]d{}s,'); // returns 4\^f\$s\.4\*5\+\-_\?%\=#\!\:@\|~\\\/`"\(>\)\[<\]d\{\}s\,
+```
+
+# Errors
+
+### assert(condition, message)
+
+```javascript
+
+var a = 1, b = 2;
-[**API Reference**](API.md)
+Hoek.assert(a === b, 'a should equal b'); // Throws 'a should equal b'
+```
+
+Note that you may also pass an already created Error object as the second parameter, and `assert` will throw that object.
+
+```javascript
+
+var a = 1, b = 2;
+
+Hoek.assert(a === b, new Error('a should equal b')); // Throws the given error object
+```
+
+### abort(message)
+
+First checks if `process.env.NODE_ENV === 'test'`, and if so, throws error message. Otherwise,
+displays most recent stack and then exits process.
+
+
+
+### displayStack(slice)
+
+Displays the trace stack
+
+```javascript
+
+var stack = Hoek.displayStack();
+console.log(stack); // returns something like:
+
+[ 'null (/Users/user/Desktop/hoek/test.js:4:18)',
+ 'Module._compile (module.js:449:26)',
+ 'Module._extensions..js (module.js:467:10)',
+ 'Module.load (module.js:356:32)',
+ 'Module._load (module.js:312:12)',
+ 'Module.runMain (module.js:492:10)',
+ 'startup.processNextTick.process._tickCallback (node.js:244:9)' ]
+```
+
+### callStack(slice)
+
+Returns a trace stack array.
+
+```javascript
+
+var stack = Hoek.callStack();
+console.log(stack); // returns something like:
+
+[ [ '/Users/user/Desktop/hoek/test.js', 4, 18, null, false ],
+ [ 'module.js', 449, 26, 'Module._compile', false ],
+ [ 'module.js', 467, 10, 'Module._extensions..js', false ],
+ [ 'module.js', 356, 32, 'Module.load', false ],
+ [ 'module.js', 312, 12, 'Module._load', false ],
+ [ 'module.js', 492, 10, 'Module.runMain', false ],
+ [ 'node.js',
+ 244,
+ 9,
+ 'startup.processNextTick.process._tickCallback',
+ false ] ]
+```
+
+## Function
+
+### nextTick(fn)
+
+Returns a new function that wraps `fn` in `process.nextTick`.
+
+```javascript
+
+var myFn = function () {
+ console.log('Do this later');
+};
+
+var nextFn = Hoek.nextTick(myFn);
+
+nextFn();
+console.log('Do this first');
+
+// Results in:
+//
+// Do this first
+// Do this later
+```
+
+### once(fn)
+
+Returns a new function that can be run multiple times, but makes sure `fn` is only run once.
+
+```javascript
+
+var myFn = function () {
+ console.log('Ran myFn');
+};
+
+var onceFn = Hoek.once(myFn);
+onceFn(); // results in "Ran myFn"
+onceFn(); // results in undefined
+```
+
+### ignore
+
+A simple no-op function. It does nothing at all.
+
+## Miscellaneous
+
+### uniqueFilename(path, extension)
+`path` to prepend with the randomly generated file name. `extension` is the optional file extension, defaults to `''`.
+
+Returns a randomly generated file name at the specified `path`. The result is a fully resolved path to a file.
+
+```javascript
+var result = Hoek.uniqueFilename('./test/modules', 'txt'); // results in "full/path/test/modules/{random}.txt"
+```
+
+### isAbsolutePath(path, [platform])
+
+Determines whether `path` is an absolute path. Returns `true` or `false`.
+
+- `path` - A file path to test for whether it is absolute or not.
+- `platform` - An optional parameter used for specifying the platform. Defaults to `process.platform`.
+
+### isInteger(value)
+
+Check `value` to see if it is an integer. Returns true/false.
+
+```javascript
+var result = Hoek.isInteger('23')
+```
diff --git a/deps/npm/node_modules/hoek/images/hoek.png b/deps/npm/node_modules/hoek/images/hoek.png
new file mode 100644
index 0000000000..6ccfcb12be
--- /dev/null
+++ b/deps/npm/node_modules/hoek/images/hoek.png
Binary files differ
diff --git a/deps/npm/node_modules/hoek/lib/escape.js b/deps/npm/node_modules/hoek/lib/escape.js
index 28d90ba479..9ecde6666b 100755..100644
--- a/deps/npm/node_modules/hoek/lib/escape.js
+++ b/deps/npm/node_modules/hoek/lib/escape.js
@@ -1,8 +1,6 @@
-'use strict';
-
// Declare internals
-const internals = {};
+var internals = {};
exports.escapeJavaScript = function (input) {
@@ -11,11 +9,11 @@ exports.escapeJavaScript = function (input) {
return '';
}
- let escaped = '';
+ var escaped = '';
- for (let i = 0; i < input.length; ++i) {
+ for (var i = 0, il = input.length; i < il; ++i) {
- const charCode = input.charCodeAt(i);
+ var charCode = input.charCodeAt(i);
if (internals.isSafe(charCode)) {
escaped += input[i];
@@ -35,11 +33,11 @@ exports.escapeHtml = function (input) {
return '';
}
- let escaped = '';
+ var escaped = '';
- for (let i = 0; i < input.length; ++i) {
+ for (var i = 0, il = input.length; i < il; ++i) {
- const charCode = input.charCodeAt(i);
+ var charCode = input.charCodeAt(i);
if (internals.isSafe(charCode)) {
escaped += input[i];
@@ -53,54 +51,20 @@ exports.escapeHtml = function (input) {
};
-exports.escapeJson = function (input) {
-
- if (!input) {
- return '';
- }
-
- const lessThan = 0x3C;
- const greaterThan = 0x3E;
- const andSymbol = 0x26;
- const lineSeperator = 0x2028;
-
- // replace method
- let charCode;
- return input.replace(/[<>&\u2028\u2029]/g, (match) => {
-
- charCode = match.charCodeAt(0);
-
- if (charCode === lessThan) {
- return '\\u003c';
- }
- else if (charCode === greaterThan) {
- return '\\u003e';
- }
- else if (charCode === andSymbol) {
- return '\\u0026';
- }
- else if (charCode === lineSeperator) {
- return '\\u2028';
- }
- return '\\u2029';
- });
-};
-
-
internals.escapeJavaScriptChar = function (charCode) {
if (charCode >= 256) {
return '\\u' + internals.padLeft('' + charCode, 4);
}
- const hexValue = new Buffer(String.fromCharCode(charCode), 'ascii').toString('hex');
+ var hexValue = new Buffer(String.fromCharCode(charCode), 'ascii').toString('hex');
return '\\x' + internals.padLeft(hexValue, 2);
};
internals.escapeHtmlChar = function (charCode) {
- const namedEscape = internals.namedHtml[charCode];
+ var namedEscape = internals.namedHtml[charCode];
if (typeof namedEscape !== 'undefined') {
return namedEscape;
}
@@ -109,7 +73,7 @@ internals.escapeHtmlChar = function (charCode) {
return '&#' + charCode + ';';
}
- const hexValue = new Buffer(String.fromCharCode(charCode), 'ascii').toString('hex');
+ var hexValue = new Buffer(String.fromCharCode(charCode), 'ascii').toString('hex');
return '&#x' + internals.padLeft(hexValue, 2) + ';';
};
@@ -146,9 +110,9 @@ internals.namedHtml = {
internals.safeCharCodes = (function () {
- const safe = {};
+ var safe = {};
- for (let i = 32; i < 123; ++i) {
+ for (var i = 32; i < 123; ++i) {
if ((i >= 97) || // a-z
(i >= 65 && i <= 90) || // A-Z
diff --git a/deps/npm/node_modules/hoek/lib/index.js b/deps/npm/node_modules/hoek/lib/index.js
index 75bbeb7c57..9a5ffe18f4 100755..100644
--- a/deps/npm/node_modules/hoek/lib/index.js
+++ b/deps/npm/node_modules/hoek/lib/index.js
@@ -1,16 +1,14 @@
-'use strict';
-
// Load modules
-const Crypto = require('crypto');
-const Path = require('path');
-const Util = require('util');
-const Escape = require('./escape');
+var Crypto = require('crypto');
+var Path = require('path');
+var Util = require('util');
+var Escape = require('./escape');
// Declare internals
-const internals = {};
+var internals = {};
// Clone object or array
@@ -23,15 +21,15 @@ exports.clone = function (obj, seen) {
return obj;
}
- seen = seen || new Map();
+ seen = seen || { orig: [], copy: [] };
- const lookup = seen.get(obj);
- if (lookup) {
- return lookup;
+ var lookup = seen.orig.indexOf(obj);
+ if (lookup !== -1) {
+ return seen.copy[lookup];
}
- let newObj;
- let cloneDeep = false;
+ var newObj;
+ var cloneDeep = false;
if (!Array.isArray(obj)) {
if (Buffer.isBuffer(obj)) {
@@ -44,7 +42,7 @@ exports.clone = function (obj, seen) {
newObj = new RegExp(obj);
}
else {
- const proto = Object.getPrototypeOf(obj);
+ var proto = Object.getPrototypeOf(obj);
if (proto &&
proto.isImmutable) {
@@ -61,13 +59,14 @@ exports.clone = function (obj, seen) {
cloneDeep = true;
}
- seen.set(obj, newObj);
+ seen.orig.push(obj);
+ seen.copy.push(newObj);
if (cloneDeep) {
- const keys = Object.getOwnPropertyNames(obj);
- for (let i = 0; i < keys.length; ++i) {
- const key = keys[i];
- const descriptor = Object.getOwnPropertyDescriptor(obj, key);
+ var keys = Object.getOwnPropertyNames(obj);
+ for (var i = 0, il = keys.length; i < il; ++i) {
+ var key = keys[i];
+ var descriptor = Object.getOwnPropertyDescriptor(obj, key);
if (descriptor &&
(descriptor.get ||
descriptor.set)) {
@@ -85,11 +84,9 @@ exports.clone = function (obj, seen) {
// Merge all the properties of source into target, source wins in conflict, and by default null and undefined from source are applied
-
/*eslint-disable */
exports.merge = function (target, source, isNullOverride /* = true */, isMergeArrays /* = true */) {
/*eslint-enable */
-
exports.assert(target && typeof target === 'object', 'Invalid target value: must be an object');
exports.assert(source === null || source === undefined || typeof source === 'object', 'Invalid source value: must be null, undefined, or an object');
@@ -103,27 +100,23 @@ exports.merge = function (target, source, isNullOverride /* = true */, isMergeAr
target.length = 0; // Must not change target assignment
}
- for (let i = 0; i < source.length; ++i) {
+ for (var i = 0, il = source.length; i < il; ++i) {
target.push(exports.clone(source[i]));
}
return target;
}
- const keys = Object.keys(source);
- for (let i = 0; i < keys.length; ++i) {
- const key = keys[i];
- if (key === '__proto__') {
- continue;
- }
-
- const value = source[key];
+ var keys = Object.keys(source);
+ for (var k = 0, kl = keys.length; k < kl; ++k) {
+ var key = keys[k];
+ var value = source[key];
if (value &&
typeof value === 'object') {
if (!target[key] ||
typeof target[key] !== 'object' ||
- (Array.isArray(target[key]) !== Array.isArray(value)) ||
+ (Array.isArray(target[key]) ^ Array.isArray(value)) ||
value instanceof Date ||
Buffer.isBuffer(value) ||
value instanceof RegExp) {
@@ -161,7 +154,7 @@ exports.applyToDefaults = function (defaults, options, isNullOverride) {
return null;
}
- const copy = exports.clone(defaults);
+ var copy = exports.clone(defaults);
if (options === true) { // If options is set to true, use defaults
return copy;
@@ -181,8 +174,8 @@ exports.cloneWithShallow = function (source, keys) {
return source;
}
- const storage = internals.store(source, keys); // Move shallow copy items to storage
- const copy = exports.clone(source); // Deep copy the rest
+ var storage = internals.store(source, keys); // Move shallow copy items to storage
+ var copy = exports.clone(source); // Deep copy the rest
internals.restore(copy, source, storage); // Shallow copy the stored items and restore
return copy;
};
@@ -190,10 +183,10 @@ exports.cloneWithShallow = function (source, keys) {
internals.store = function (source, keys) {
- const storage = {};
- for (let i = 0; i < keys.length; ++i) {
- const key = keys[i];
- const value = exports.reach(source, key);
+ var storage = {};
+ for (var i = 0, il = keys.length; i < il; ++i) {
+ var key = keys[i];
+ var value = exports.reach(source, key);
if (value !== undefined) {
storage[key] = value;
internals.reachSet(source, key, undefined);
@@ -206,9 +199,9 @@ internals.store = function (source, keys) {
internals.restore = function (copy, source, storage) {
- const keys = Object.keys(storage);
- for (let i = 0; i < keys.length; ++i) {
- const key = keys[i];
+ var keys = Object.keys(storage);
+ for (var i = 0, il = keys.length; i < il; ++i) {
+ var key = keys[i];
internals.reachSet(copy, key, storage[key]);
internals.reachSet(source, key, storage[key]);
}
@@ -217,11 +210,11 @@ internals.restore = function (copy, source, storage) {
internals.reachSet = function (obj, key, value) {
- const path = key.split('.');
- let ref = obj;
- for (let i = 0; i < path.length; ++i) {
- const segment = path[i];
- if (i + 1 === path.length) {
+ var path = key.split('.');
+ var ref = obj;
+ for (var i = 0, il = path.length; i < il; ++i) {
+ var segment = path[i];
+ if (i + 1 === il) {
ref[segment] = value;
}
@@ -242,13 +235,13 @@ exports.applyToDefaultsWithShallow = function (defaults, options, keys) {
return null;
}
- const copy = exports.cloneWithShallow(defaults, keys);
+ var copy = exports.cloneWithShallow(defaults, keys);
if (options === true) { // If options is set to true, use defaults
return copy;
}
- const storage = internals.store(options, keys); // Move shallow copy items to storage
+ var storage = internals.store(options, keys); // Move shallow copy items to storage
exports.merge(copy, options, false, false); // Deep copy the rest
internals.restore(copy, options, storage); // Shallow copy the stored items and restore
return copy;
@@ -261,7 +254,7 @@ exports.deepEqual = function (obj, ref, options, seen) {
options = options || { prototype: true };
- const type = typeof obj;
+ var type = typeof obj;
if (type !== typeof ref) {
return false;
@@ -294,11 +287,11 @@ exports.deepEqual = function (obj, ref, options, seen) {
return false;
}
- for (let i = 0; i < obj.length; ++i) {
+ for (var i = 0, il = obj.length; i < il; ++i) {
if (options.part) {
- let found = false;
- for (let j = 0; j < ref.length; ++j) {
- if (exports.deepEqual(obj[i], ref[j], options)) {
+ var found = false;
+ for (var r = 0, rl = ref.length; r < rl; ++r) {
+ if (exports.deepEqual(obj[i], ref[r], options, seen)) {
found = true;
break;
}
@@ -307,7 +300,7 @@ exports.deepEqual = function (obj, ref, options, seen) {
return found;
}
- if (!exports.deepEqual(obj[i], ref[i], options)) {
+ if (!exports.deepEqual(obj[i], ref[i], options, seen)) {
return false;
}
}
@@ -324,8 +317,8 @@ exports.deepEqual = function (obj, ref, options, seen) {
return false;
}
- for (let i = 0; i < obj.length; ++i) {
- if (obj[i] !== ref[i]) {
+ for (var j = 0, jl = obj.length; j < jl; ++j) {
+ if (obj[j] !== ref[j]) {
return false;
}
}
@@ -347,15 +340,15 @@ exports.deepEqual = function (obj, ref, options, seen) {
}
}
- const keys = Object.getOwnPropertyNames(obj);
+ var keys = Object.getOwnPropertyNames(obj);
if (!options.part && keys.length !== Object.getOwnPropertyNames(ref).length) {
return false;
}
- for (let i = 0; i < keys.length; ++i) {
- const key = keys[i];
- const descriptor = Object.getOwnPropertyDescriptor(obj, key);
+ for (var k = 0, kl = keys.length; k < kl; ++k) {
+ var key = keys[k];
+ var descriptor = Object.getOwnPropertyDescriptor(obj, key);
if (descriptor.get) {
if (!exports.deepEqual(descriptor, Object.getOwnPropertyDescriptor(ref, key), options, seen)) {
return false;
@@ -372,23 +365,18 @@ exports.deepEqual = function (obj, ref, options, seen) {
// Remove duplicate items from array
-exports.unique = (array, key) => {
+exports.unique = function (array, key) {
- let result;
- if (key) {
- result = [];
- const index = new Set();
- array.forEach((item) => {
+ var index = {};
+ var result = [];
- const identifier = item[key];
- if (!index.has(identifier)) {
- index.add(identifier);
- result.push(item);
- }
- });
- }
- else {
- result = Array.from(new Set(array));
+ for (var i = 0, il = array.length; i < il; ++i) {
+ var id = (key ? array[i][key] : array[i]);
+ if (index[id] !== true) {
+
+ result.push(array[i]);
+ index[id] = true;
+ }
}
return result;
@@ -403,8 +391,8 @@ exports.mapToObject = function (array, key) {
return null;
}
- const obj = {};
- for (let i = 0; i < array.length; ++i) {
+ var obj = {};
+ for (var i = 0, il = array.length; i < il; ++i) {
if (key) {
if (array[i][key]) {
obj[array[i][key]] = true;
@@ -427,10 +415,10 @@ exports.intersect = function (array1, array2, justFirst) {
return [];
}
- const common = [];
- const hash = (Array.isArray(array1) ? exports.mapToObject(array1) : array1);
- const found = {};
- for (let i = 0; i < array2.length; ++i) {
+ var common = [];
+ var hash = (Array.isArray(array1) ? exports.mapToObject(array1) : array1);
+ var found = {};
+ for (var i = 0, il = array2.length; i < il; ++i) {
if (hash[array2[i]] && !found[array2[i]]) {
if (justFirst) {
return array2[i];
@@ -456,7 +444,7 @@ exports.contain = function (ref, values, options) {
object -> object (key:value)
*/
- let valuePairs = null;
+ var valuePairs = null;
if (typeof ref === 'object' &&
typeof values === 'object' &&
!Array.isArray(ref) &&
@@ -475,13 +463,11 @@ exports.contain = function (ref, values, options) {
exports.assert(typeof ref === 'string' || typeof ref === 'object', 'Reference must be string or an object');
exports.assert(values.length, 'Values array cannot be empty');
- let compare;
- let compareFlags;
+ var compare, compareFlags;
if (options.deep) {
compare = exports.deepEqual;
- const hasOnly = options.hasOwnProperty('only');
- const hasPart = options.hasOwnProperty('part');
+ var hasOnly = options.hasOwnProperty('only'), hasPart = options.hasOwnProperty('part');
compareFlags = {
prototype: hasOnly ? options.only : hasPart ? !options.part : false,
@@ -489,27 +475,30 @@ exports.contain = function (ref, values, options) {
};
}
else {
- compare = (a, b) => a === b;
+ compare = function (a, b) {
+
+ return a === b;
+ };
}
- let misses = false;
- const matches = new Array(values.length);
- for (let i = 0; i < matches.length; ++i) {
+ var misses = false;
+ var matches = new Array(values.length);
+ for (var i = 0, il = matches.length; i < il; ++i) {
matches[i] = 0;
}
if (typeof ref === 'string') {
- let pattern = '(';
- for (let i = 0; i < values.length; ++i) {
- const value = values[i];
+ var pattern = '(';
+ for (i = 0, il = values.length; i < il; ++i) {
+ var value = values[i];
exports.assert(typeof value === 'string', 'Cannot compare string reference to non-string value');
pattern += (i ? '|' : '') + exports.escapeRegex(value);
}
- const regex = new RegExp(pattern + ')', 'g');
- const leftovers = ref.replace(regex, ($0, $1) => {
+ var regex = new RegExp(pattern + ')', 'g');
+ var leftovers = ref.replace(regex, function ($0, $1) {
- const index = values.indexOf($1);
+ var index = values.indexOf($1);
++matches[index];
return ''; // Remove from string
});
@@ -517,9 +506,8 @@ exports.contain = function (ref, values, options) {
misses = !!leftovers;
}
else if (Array.isArray(ref)) {
- for (let i = 0; i < ref.length; ++i) {
- let matched = false;
- for (let j = 0; j < values.length && matched === false; ++j) {
+ for (i = 0, il = ref.length; i < il; ++i) {
+ for (var j = 0, jl = values.length, matched = false; j < jl && matched === false; ++j) {
matched = compare(values[j], ref[i], compareFlags) && j;
}
@@ -532,10 +520,10 @@ exports.contain = function (ref, values, options) {
}
}
else {
- const keys = Object.getOwnPropertyNames(ref);
- for (let i = 0; i < keys.length; ++i) {
- const key = keys[i];
- const pos = values.indexOf(key);
+ var keys = Object.keys(ref);
+ for (i = 0, il = keys.length; i < il; ++i) {
+ var key = keys[i];
+ var pos = values.indexOf(key);
if (pos !== -1) {
if (valuePairs &&
!compare(valuePairs[key], ref[key], compareFlags)) {
@@ -551,8 +539,8 @@ exports.contain = function (ref, values, options) {
}
}
- let result = false;
- for (let i = 0; i < matches.length; ++i) {
+ var result = false;
+ for (i = 0, il = matches.length; i < il; ++i) {
result = result || !!matches[i];
if ((options.once && matches[i] > 1) ||
(!options.part && !matches[i])) {
@@ -575,9 +563,9 @@ exports.contain = function (ref, values, options) {
exports.flatten = function (array, target) {
- const result = target || [];
+ var result = target || [];
- for (let i = 0; i < array.length; ++i) {
+ for (var i = 0, il = array.length; i < il; ++i) {
if (Array.isArray(array[i])) {
exports.flatten(array[i], result);
}
@@ -606,20 +594,20 @@ exports.reach = function (obj, chain, options) {
options = { separator: options };
}
- const path = chain.split(options.separator || '.');
- let ref = obj;
- for (let i = 0; i < path.length; ++i) {
- let key = path[i];
+ var path = chain.split(options.separator || '.');
+ var ref = obj;
+ for (var i = 0, il = path.length; i < il; ++i) {
+ var key = path[i];
if (key[0] === '-' && Array.isArray(ref)) {
key = key.slice(1, key.length);
key = ref.length - key;
}
if (!ref ||
- !((typeof ref === 'object' || typeof ref === 'function') && key in ref) ||
+ !ref.hasOwnProperty(key) ||
(typeof ref !== 'object' && options.functions === false)) { // Only object and function can have properties
- exports.assert(!options.strict || i + 1 === path.length, 'Missing segment', key, 'in reach path ', chain);
+ exports.assert(!options.strict || i + 1 === il, 'Missing segment', key, 'in reach path ', chain);
exports.assert(typeof ref === 'object' || options.functions === true || typeof ref !== 'function', 'Invalid segment', key, 'in reach path ', chain);
ref = options.default;
break;
@@ -634,9 +622,9 @@ exports.reach = function (obj, chain, options) {
exports.reachTemplate = function (obj, template, options) {
- return template.replace(/{([^}]+)}/g, ($0, chain) => {
+ return template.replace(/{([^}]+)}/g, function ($0, chain) {
- const value = exports.reach(obj, chain, options);
+ var value = exports.reach(obj, chain, options);
return (value === undefined || value === null ? '' : value);
});
};
@@ -644,9 +632,9 @@ exports.reachTemplate = function (obj, template, options) {
exports.formatStack = function (stack) {
- const trace = [];
- for (let i = 0; i < stack.length; ++i) {
- const item = stack[i];
+ var trace = [];
+ for (var i = 0, il = stack.length; i < il; ++i) {
+ var item = stack[i];
trace.push([item.getFileName(), item.getLineNumber(), item.getColumnNumber(), item.getFunctionName(), item.isConstructor()]);
}
@@ -656,10 +644,10 @@ exports.formatStack = function (stack) {
exports.formatTrace = function (trace) {
- const display = [];
+ var display = [];
- for (let i = 0; i < trace.length; ++i) {
- const row = trace[i];
+ for (var i = 0, il = trace.length; i < il; ++i) {
+ var row = trace[i];
display.push((row[4] ? 'new ' : '') + row[3] + ' (' + row[0] + ':' + row[1] + ':' + row[2] + ')');
}
@@ -671,27 +659,31 @@ exports.callStack = function (slice) {
// http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
- const v8 = Error.prepareStackTrace;
- Error.prepareStackTrace = function (_, stack) {
+ var v8 = Error.prepareStackTrace;
+ Error.prepareStackTrace = function (err, stack) {
return stack;
};
- const capture = {};
- Error.captureStackTrace(capture, this); // arguments.callee is not supported in strict mode so we use this and slice the trace of this off the result
- const stack = capture.stack;
+ var capture = {};
+ Error.captureStackTrace(capture, arguments.callee); /*eslint no-caller:0 */
+ var stack = capture.stack;
Error.prepareStackTrace = v8;
- const trace = exports.formatStack(stack);
+ var trace = exports.formatStack(stack);
- return trace.slice(1 + slice);
+ if (slice) {
+ return trace.slice(slice);
+ }
+
+ return trace;
};
exports.displayStack = function (slice) {
- const trace = exports.callStack(slice === undefined ? 1 : slice + 1);
+ var trace = exports.callStack(slice === undefined ? 1 : slice + 1);
return exports.formatTrace(trace);
};
@@ -706,7 +698,7 @@ exports.abort = function (message, hideStack) {
throw new Error(message || 'Unknown error');
}
- let stack = '';
+ var stack = '';
if (!hideStack) {
stack = exports.displayStack(1).join('\n\t');
}
@@ -725,18 +717,17 @@ exports.assert = function (condition /*, msg1, msg2, msg3 */) {
throw arguments[1];
}
- let msgs = [];
- for (let i = 1; i < arguments.length; ++i) {
+ var msgs = [];
+ for (var i = 1, il = arguments.length; i < il; ++i) {
if (arguments[i] !== '') {
msgs.push(arguments[i]); // Avoids Array.slice arguments leak, allowing for V8 optimizations
}
}
- msgs = msgs.map((msg) => {
+ msgs = msgs.map(function (msg) {
return typeof msg === 'string' ? msg : msg instanceof Error ? msg.message : exports.stringify(msg);
});
-
throw new Error(msgs.join(' ') || 'Unknown error');
};
@@ -781,7 +772,7 @@ exports.Bench.prototype.elapsed = function () {
exports.Bench.now = function () {
- const ts = process.hrtime();
+ var ts = process.hrtime();
return (ts[0] * 1e3) + (ts[1] / 1e6);
};
@@ -799,8 +790,7 @@ exports.escapeRegex = function (string) {
exports.base64urlEncode = function (value, encoding) {
- exports.assert(typeof value === 'string' || Buffer.isBuffer(value), 'value must be string or buffer');
- const buf = (Buffer.isBuffer(value) ? value : new Buffer(value, encoding || 'binary'));
+ var buf = (Buffer.isBuffer(value) ? value : new Buffer(value, encoding || 'binary'));
return buf.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, '');
};
@@ -809,18 +799,19 @@ exports.base64urlEncode = function (value, encoding) {
exports.base64urlDecode = function (value, encoding) {
- if (typeof value !== 'string') {
-
- return new Error('Value not a string');
- }
-
- if (!/^[\w\-]*$/.test(value)) {
+ if (value &&
+ !/^[\w\-]*$/.test(value)) {
return new Error('Invalid character');
}
- const buf = new Buffer(value, 'base64');
- return (encoding === 'buffer' ? buf : buf.toString(encoding || 'binary'));
+ try {
+ var buf = new Buffer(value, 'base64');
+ return (encoding === 'buffer' ? buf : buf.toString(encoding || 'binary'));
+ }
+ catch (err) {
+ return err;
+ }
};
@@ -847,17 +838,13 @@ exports.escapeJavaScript = function (string) {
return Escape.escapeJavaScript(string);
};
-exports.escapeJson = function (string) {
-
- return Escape.escapeJson(string);
-};
exports.nextTick = function (callback) {
return function () {
- const args = arguments;
- process.nextTick(() => {
+ var args = arguments;
+ process.nextTick(function () {
callback.apply(null, args);
});
@@ -871,8 +858,8 @@ exports.once = function (method) {
return method;
}
- let once = false;
- const wrapped = function () {
+ var once = false;
+ var wrapped = function () {
if (!once) {
once = true;
@@ -886,7 +873,36 @@ exports.once = function (method) {
};
-exports.isInteger = Number.isSafeInteger;
+exports.isAbsolutePath = function (path, platform) {
+
+ if (!path) {
+ return false;
+ }
+
+ if (Path.isAbsolute) { // node >= 0.11
+ return Path.isAbsolute(path);
+ }
+
+ platform = platform || process.platform;
+
+ // Unix
+
+ if (platform !== 'win32') {
+ return path[0] === '/';
+ }
+
+ // Windows
+
+ return !!/^(?:[a-zA-Z]:[\\\/])|(?:[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/])/.test(path); // C:\ or \\something\something
+};
+
+
+exports.isInteger = function (value) {
+
+ return (typeof value === 'number' &&
+ parseFloat(value) === parseInt(value, 10) &&
+ !isNaN(value));
+};
exports.ignore = function () { };
@@ -901,28 +917,27 @@ exports.format = Util.format;
exports.transform = function (source, transform, options) {
exports.assert(source === null || source === undefined || typeof source === 'object' || Array.isArray(source), 'Invalid source object: must be null, undefined, an object, or an array');
- const separator = (typeof options === 'object' && options !== null) ? (options.separator || '.') : '.';
if (Array.isArray(source)) {
- const results = [];
- for (let i = 0; i < source.length; ++i) {
+ var results = [];
+ for (var i = 0, il = source.length; i < il; ++i) {
results.push(exports.transform(source[i], transform, options));
}
return results;
}
- const result = {};
- const keys = Object.keys(transform);
+ var result = {};
+ var keys = Object.keys(transform);
- for (let i = 0; i < keys.length; ++i) {
- const key = keys[i];
- const path = key.split(separator);
- const sourcePath = transform[key];
+ for (var k = 0, kl = keys.length; k < kl; ++k) {
+ var key = keys[k];
+ var path = key.split('.');
+ var sourcePath = transform[key];
exports.assert(typeof sourcePath === 'string', 'All mappings must be "." delineated strings');
- let segment;
- let res = result;
+ var segment;
+ var res = result;
while (path.length > 1) {
segment = path.shift();
@@ -949,7 +964,7 @@ exports.uniqueFilename = function (path, extension) {
}
path = Path.resolve(path);
- const name = [Date.now(), process.pid, Crypto.randomBytes(8).toString('hex')].join('-') + extension;
+ var name = [Date.now(), process.pid, Crypto.randomBytes(8).toString('hex')].join('-') + extension;
return Path.join(path, name);
};
@@ -967,10 +982,10 @@ exports.stringify = function () {
exports.shallow = function (source) {
- const target = {};
- const keys = Object.keys(source);
- for (let i = 0; i < keys.length; ++i) {
- const key = keys[i];
+ var target = {};
+ var keys = Object.keys(source);
+ for (var i = 0, il = keys.length; i < il; ++i) {
+ var key = keys[i];
target[key] = source[key];
}
diff --git a/deps/npm/node_modules/hoek/package.json b/deps/npm/node_modules/hoek/package.json
index 8d36bdcd59..8b5248e4e0 100644
--- a/deps/npm/node_modules/hoek/package.json
+++ b/deps/npm/node_modules/hoek/package.json
@@ -1,30 +1,29 @@
{
- "_from": "hoek@4.x.x",
- "_id": "hoek@4.2.1",
+ "_from": "hoek@2.x.x",
+ "_id": "hoek@2.16.3",
"_inBundle": false,
- "_integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==",
+ "_integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=",
"_location": "/hoek",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "hoek@4.x.x",
+ "raw": "hoek@2.x.x",
"name": "hoek",
"escapedName": "hoek",
- "rawSpec": "4.x.x",
+ "rawSpec": "2.x.x",
"saveSpec": null,
- "fetchSpec": "4.x.x"
+ "fetchSpec": "2.x.x"
},
"_requiredBy": [
"/boom",
- "/cryptiles/boom",
"/hawk",
"/sntp"
],
- "_resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz",
- "_shasum": "9634502aa12c445dd5a7c5734b572bb8738aacbb",
- "_spec": "hoek@4.x.x",
- "_where": "/Users/rebecca/code/npm/node_modules/hawk",
+ "_resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz",
+ "_shasum": "20bb7403d3cea398e91dc4710a8ff1b8274a25ed",
+ "_spec": "hoek@2.x.x",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/hawk",
"bugs": {
"url": "https://github.com/hapijs/hoek/issues"
},
@@ -33,11 +32,11 @@
"deprecated": false,
"description": "General purpose node utilities",
"devDependencies": {
- "code": "4.x.x",
- "lab": "13.x.x"
+ "code": "1.x.x",
+ "lab": "5.x.x"
},
"engines": {
- "node": ">=4.0.0"
+ "node": ">=0.10.40"
},
"homepage": "https://github.com/hapijs/hoek#readme",
"keywords": [
@@ -54,5 +53,5 @@
"test": "lab -a code -t 100 -L",
"test-cov-html": "lab -a code -t 100 -L -r html -o coverage.html"
},
- "version": "4.2.1"
+ "version": "2.16.3"
}
diff --git a/deps/npm/node_modules/hoek/test/escaper.js b/deps/npm/node_modules/hoek/test/escaper.js
new file mode 100644
index 0000000000..a5d048f7bc
--- /dev/null
+++ b/deps/npm/node_modules/hoek/test/escaper.js
@@ -0,0 +1,88 @@
+// Load modules
+
+var Code = require('code');
+var Hoek = require('../lib');
+var Lab = require('lab');
+
+
+// Declare internals
+
+var internals = {};
+
+
+// Test shortcuts
+
+var lab = exports.lab = Lab.script();
+var describe = lab.experiment;
+var it = lab.test;
+var expect = Code.expect;
+
+
+describe('escapeJavaScript()', function () {
+
+ it('encodes / characters', function (done) {
+
+ var encoded = Hoek.escapeJavaScript('<script>alert(1)</script>');
+ expect(encoded).to.equal('\\x3cscript\\x3ealert\\x281\\x29\\x3c\\x2fscript\\x3e');
+ done();
+ });
+
+ it('encodes \' characters', function (done) {
+
+ var encoded = Hoek.escapeJavaScript('something(\'param\')');
+ expect(encoded).to.equal('something\\x28\\x27param\\x27\\x29');
+ done();
+ });
+
+ it('encodes large unicode characters with the correct padding', function (done) {
+
+ var encoded = Hoek.escapeJavaScript(String.fromCharCode(500) + String.fromCharCode(1000));
+ expect(encoded).to.equal('\\u0500\\u1000');
+ done();
+ });
+
+ it('doesn\'t throw an exception when passed null', function (done) {
+
+ var encoded = Hoek.escapeJavaScript(null);
+ expect(encoded).to.equal('');
+ done();
+ });
+});
+
+describe('escapeHtml()', function () {
+
+ it('encodes / characters', function (done) {
+
+ var encoded = Hoek.escapeHtml('<script>alert(1)</script>');
+ expect(encoded).to.equal('&lt;script&gt;alert&#x28;1&#x29;&lt;&#x2f;script&gt;');
+ done();
+ });
+
+ it('encodes < and > as named characters', function (done) {
+
+ var encoded = Hoek.escapeHtml('<script><>');
+ expect(encoded).to.equal('&lt;script&gt;&lt;&gt;');
+ done();
+ });
+
+ it('encodes large unicode characters', function (done) {
+
+ var encoded = Hoek.escapeHtml(String.fromCharCode(500) + String.fromCharCode(1000));
+ expect(encoded).to.equal('&#500;&#1000;');
+ done();
+ });
+
+ it('doesn\'t throw an exception when passed null', function (done) {
+
+ var encoded = Hoek.escapeHtml(null);
+ expect(encoded).to.equal('');
+ done();
+ });
+
+ it('encodes {} characters', function (done) {
+
+ var encoded = Hoek.escapeHtml('{}');
+ expect(encoded).to.equal('&#x7b;&#x7d;');
+ done();
+ });
+});
diff --git a/deps/npm/node_modules/hoek/test/index.js b/deps/npm/node_modules/hoek/test/index.js
new file mode 100644
index 0000000000..1e8ef620f3
--- /dev/null
+++ b/deps/npm/node_modules/hoek/test/index.js
@@ -0,0 +1,2513 @@
+// Load modules
+
+var Fs = require('fs');
+var Path = require('path');
+var Code = require('code');
+var Hoek = require('../lib');
+var Lab = require('lab');
+
+
+// Declare internals
+
+var internals = {};
+
+
+// Test shortcuts
+
+var lab = exports.lab = Lab.script();
+var describe = lab.experiment;
+var it = lab.test;
+var expect = Code.expect;
+
+
+var nestedObj = {
+ v: [7, 8, 9],
+ w: /^something$/igm,
+ x: {
+ a: [1, 2, 3],
+ b: 123456,
+ c: new Date(),
+ d: /hi/igm,
+ e: /hello/
+ },
+ y: 'y',
+ z: new Date(1378775452757)
+};
+
+var dupsArray = [nestedObj, { z: 'z' }, nestedObj];
+var reducedDupsArray = [nestedObj, { z: 'z' }];
+
+describe('clone()', function () {
+
+ it('clones a nested object', function (done) {
+
+ var a = nestedObj;
+ var b = Hoek.clone(a);
+
+ expect(a).to.deep.equal(b);
+ expect(a.z.getTime()).to.equal(b.z.getTime());
+ done();
+ });
+
+ it('clones a null object', function (done) {
+
+ var b = Hoek.clone(null);
+
+ expect(b).to.equal(null);
+ done();
+ });
+
+ it('should not convert undefined properties to null', function (done) {
+
+ var obj = { something: undefined };
+ var b = Hoek.clone(obj);
+
+ expect(typeof b.something).to.equal('undefined');
+ done();
+ });
+
+ it('should not throw on circular reference', function (done) {
+
+ var a = {};
+ a.x = a;
+
+ var test = function () {
+
+ var b = Hoek.clone(a);
+ };
+
+ expect(test).to.not.throw();
+ done();
+ });
+
+ it('clones circular reference', function (done) {
+
+ var x = {
+ 'z': new Date()
+ };
+ x.y = x;
+
+ var b = Hoek.clone(x);
+ expect(Object.keys(b.y)).to.deep.equal(Object.keys(x));
+ expect(b.z).to.not.equal(x.z);
+ expect(b.y).to.not.equal(x.y);
+ expect(b.y.z).to.not.equal(x.y.z);
+ expect(b.y).to.equal(b);
+ expect(b.y.y.y.y).to.equal(b);
+ done();
+ });
+
+ it('clones an object with a null prototype', function (done) {
+
+ var obj = Object.create(null);
+ var b = Hoek.clone(obj);
+
+ expect(b).to.deep.equal(obj);
+ done();
+ });
+
+ it('clones deeply nested object', function (done) {
+
+ var a = {
+ x: {
+ y: {
+ a: [1, 2, 3],
+ b: 123456,
+ c: new Date(),
+ d: /hi/igm,
+ e: /hello/
+ }
+ }
+ };
+
+ var b = Hoek.clone(a);
+
+ expect(a).to.deep.equal(b);
+ expect(a.x.y.c.getTime()).to.equal(b.x.y.c.getTime());
+ done();
+ });
+
+ it('clones arrays', function (done) {
+
+ var a = [1, 2, 3];
+
+ var b = Hoek.clone(a);
+
+ expect(a).to.deep.equal(b);
+ done();
+ });
+
+ it('performs actual copy for shallow keys (no pass by reference)', function (done) {
+
+ var x = Hoek.clone(nestedObj);
+ var y = Hoek.clone(nestedObj);
+
+ // Date
+ expect(x.z).to.not.equal(nestedObj.z);
+ expect(x.z).to.not.equal(y.z);
+
+ // Regex
+ expect(x.w).to.not.equal(nestedObj.w);
+ expect(x.w).to.not.equal(y.w);
+
+ // Array
+ expect(x.v).to.not.equal(nestedObj.v);
+ expect(x.v).to.not.equal(y.v);
+
+ // Immutable(s)
+ x.y = 5;
+ expect(x.y).to.not.equal(nestedObj.y);
+ expect(x.y).to.not.equal(y.y);
+
+ done();
+ });
+
+ it('performs actual copy for deep keys (no pass by reference)', function (done) {
+
+ var x = Hoek.clone(nestedObj);
+ var y = Hoek.clone(nestedObj);
+
+ expect(x.x.c).to.not.equal(nestedObj.x.c);
+ expect(x.x.c).to.not.equal(y.x.c);
+
+ expect(x.x.c.getTime()).to.equal(nestedObj.x.c.getTime());
+ expect(x.x.c.getTime()).to.equal(y.x.c.getTime());
+ done();
+ });
+
+ it('copies functions with properties', function (done) {
+
+ var a = {
+ x: function () {
+
+ return 1;
+ },
+ y: {}
+ };
+ a.x.z = 'string in function';
+ a.x.v = function () {
+
+ return 2;
+ };
+ a.y.u = a.x;
+
+ var b = Hoek.clone(a);
+ expect(b.x()).to.equal(1);
+ expect(b.x.v()).to.equal(2);
+ expect(b.y.u).to.equal(b.x);
+ expect(b.x.z).to.equal('string in function');
+ done();
+ });
+
+ it('should copy a buffer', function (done) {
+
+ var tls = {
+ key: new Buffer([1, 2, 3, 4, 5]),
+ cert: new Buffer([1, 2, 3, 4, 5, 6, 10])
+ };
+
+ var copiedTls = Hoek.clone(tls);
+ expect(Buffer.isBuffer(copiedTls.key)).to.equal(true);
+ expect(JSON.stringify(copiedTls.key)).to.equal(JSON.stringify(tls.key));
+ expect(Buffer.isBuffer(copiedTls.cert)).to.equal(true);
+ expect(JSON.stringify(copiedTls.cert)).to.equal(JSON.stringify(tls.cert));
+ done();
+ });
+
+ it('clones an object with a prototype', function (done) {
+
+ var Obj = function () {
+
+ this.a = 5;
+ };
+
+ Obj.prototype.b = function () {
+
+ return 'c';
+ };
+
+ var a = new Obj();
+ var b = Hoek.clone(a);
+
+ expect(b.a).to.equal(5);
+ expect(b.b()).to.equal('c');
+ expect(a).to.deep.equal(b);
+ done();
+ });
+
+ it('reuses cloned Date object', function (done) {
+
+ var obj = {
+ a: new Date()
+ };
+
+ obj.b = obj.a;
+
+ var copy = Hoek.clone(obj);
+ expect(copy.a).to.equal(copy.b);
+ done();
+ });
+
+ it('shallow copies an object with a prototype and isImmutable flag', function (done) {
+
+ var Obj = function () {
+
+ this.value = 5;
+ };
+
+ Obj.prototype.b = function () {
+
+ return 'c';
+ };
+
+ Obj.prototype.isImmutable = true;
+
+ var obj = {
+ a: new Obj()
+ };
+
+ var copy = Hoek.clone(obj);
+
+ expect(obj.a.value).to.equal(5);
+ expect(copy.a.value).to.equal(5);
+ expect(copy.a.b()).to.equal('c');
+ expect(obj.a).to.equal(copy.a);
+ done();
+ });
+
+ it('clones an object with property getter without executing it', function (done) {
+
+ var obj = {};
+ var value = 1;
+ var execCount = 0;
+
+ Object.defineProperty(obj, 'test', {
+ enumerable: true,
+ configurable: true,
+ get: function () {
+
+ ++execCount;
+ return value;
+ }
+ });
+
+ var copy = Hoek.clone(obj);
+ expect(execCount).to.equal(0);
+ expect(copy.test).to.equal(1);
+ expect(execCount).to.equal(1);
+ done();
+ });
+
+ it('clones an object with property getter and setter', function (done) {
+
+ var obj = {
+ _test: 0
+ };
+
+ Object.defineProperty(obj, 'test', {
+ enumerable: true,
+ configurable: true,
+ get: function () {
+
+ return this._test;
+ },
+ set: function (value) {
+
+ this._test = value - 1;
+ }
+ });
+
+ var copy = Hoek.clone(obj);
+ expect(copy.test).to.equal(0);
+ copy.test = 5;
+ expect(copy.test).to.equal(4);
+ done();
+ });
+
+ it('clones an object with only property setter', function (done) {
+
+ var obj = {
+ _test: 0
+ };
+
+ Object.defineProperty(obj, 'test', {
+ enumerable: true,
+ configurable: true,
+ set: function (value) {
+
+ this._test = value - 1;
+ }
+ });
+
+ var copy = Hoek.clone(obj);
+ expect(copy._test).to.equal(0);
+ copy.test = 5;
+ expect(copy._test).to.equal(4);
+ done();
+ });
+
+ it('clones an object with non-enumerable properties', function (done) {
+
+ var obj = {
+ _test: 0
+ };
+
+ Object.defineProperty(obj, 'test', {
+ enumerable: false,
+ configurable: true,
+ set: function (value) {
+
+ this._test = value - 1;
+ }
+ });
+
+ var copy = Hoek.clone(obj);
+ expect(copy._test).to.equal(0);
+ copy.test = 5;
+ expect(copy._test).to.equal(4);
+ done();
+ });
+
+ it('clones an object where getOwnPropertyDescriptor returns undefined', function (done) {
+
+ var oldGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
+ var obj = { a: 'b' };
+ Object.getOwnPropertyDescriptor = function () {
+
+ return undefined;
+ };
+
+ var copy = Hoek.clone(obj);
+ Object.getOwnPropertyDescriptor = oldGetOwnPropertyDescriptor;
+ expect(copy).to.deep.equal(obj);
+ done();
+ });
+});
+
+describe('merge()', function () {
+
+ it('deep copies source items', function (done) {
+
+ var target = {
+ b: 3,
+ d: []
+ };
+
+ var source = {
+ c: {
+ d: 1
+ },
+ d: [{ e: 1 }]
+ };
+
+ Hoek.merge(target, source);
+ expect(target.c).to.not.equal(source.c);
+ expect(target.c).to.deep.equal(source.c);
+ expect(target.d).to.not.equal(source.d);
+ expect(target.d[0]).to.not.equal(source.d[0]);
+ expect(target.d).to.deep.equal(source.d);
+ done();
+ });
+
+ it('merges array over an object', function (done) {
+
+ var a = {
+ x: ['n', 'm']
+ };
+
+ var b = {
+ x: {
+ n: '1',
+ m: '2'
+ }
+ };
+
+ Hoek.merge(b, a);
+ expect(a.x[0]).to.equal('n');
+ expect(a.x.n).to.not.exist();
+ done();
+ });
+
+ it('merges object over an array', function (done) {
+
+ var a = {
+ x: ['n', 'm']
+ };
+
+ var b = {
+ x: {
+ n: '1',
+ m: '2'
+ }
+ };
+
+ Hoek.merge(a, b);
+ expect(a.x.n).to.equal('1');
+ expect(a.x[0]).to.not.exist();
+ done();
+ });
+
+ it('does not throw if source is null', function (done) {
+
+ var a = {};
+ var b = null;
+ var c = null;
+
+ expect(function () {
+
+ c = Hoek.merge(a, b);
+ }).to.not.throw();
+
+ expect(c).to.equal(a);
+ done();
+ });
+
+ it('does not throw if source is undefined', function (done) {
+
+ var a = {};
+ var b;
+ var c = null;
+
+ expect(function () {
+
+ c = Hoek.merge(a, b);
+ }).to.not.throw();
+
+ expect(c).to.equal(a);
+ done();
+ });
+
+ it('throws if source is not an object', function (done) {
+
+ expect(function () {
+
+ var a = {};
+ var b = 0;
+
+ Hoek.merge(a, b);
+ }).to.throw('Invalid source value: must be null, undefined, or an object');
+ done();
+ });
+
+ it('throws if target is not an object', function (done) {
+
+ expect(function () {
+
+ var a = 0;
+ var b = {};
+
+ Hoek.merge(a, b);
+ }).to.throw('Invalid target value: must be an object');
+ done();
+ });
+
+ it('throws if target is not an array and source is', function (done) {
+
+ expect(function () {
+
+ var a = {};
+ var b = [1, 2];
+
+ Hoek.merge(a, b);
+ }).to.throw('Cannot merge array onto an object');
+ done();
+ });
+
+ it('returns the same object when merging arrays', function (done) {
+
+ var a = [];
+ var b = [1, 2];
+
+ expect(Hoek.merge(a, b)).to.equal(a);
+ done();
+ });
+
+ it('combines an empty object with a non-empty object', function (done) {
+
+ var a = {};
+ var b = nestedObj;
+
+ var c = Hoek.merge(a, b);
+ expect(a).to.deep.equal(b);
+ expect(c).to.deep.equal(b);
+ done();
+ });
+
+ it('overrides values in target', function (done) {
+
+ var a = { x: 1, y: 2, z: 3, v: 5, t: 'test', m: 'abc' };
+ var b = { x: null, z: 4, v: 0, t: { u: 6 }, m: '123' };
+
+ var c = Hoek.merge(a, b);
+ expect(c.x).to.equal(null);
+ expect(c.y).to.equal(2);
+ expect(c.z).to.equal(4);
+ expect(c.v).to.equal(0);
+ expect(c.m).to.equal('123');
+ expect(c.t).to.deep.equal({ u: 6 });
+ done();
+ });
+
+ it('overrides values in target (flip)', function (done) {
+
+ var a = { x: 1, y: 2, z: 3, v: 5, t: 'test', m: 'abc' };
+ var b = { x: null, z: 4, v: 0, t: { u: 6 }, m: '123' };
+
+ var d = Hoek.merge(b, a);
+ expect(d.x).to.equal(1);
+ expect(d.y).to.equal(2);
+ expect(d.z).to.equal(3);
+ expect(d.v).to.equal(5);
+ expect(d.m).to.equal('abc');
+ expect(d.t).to.deep.equal('test');
+ done();
+ });
+
+ it('retains Date properties', function (done) {
+
+ var a = { x: new Date(1378776452757) };
+
+ var b = Hoek.merge({}, a);
+ expect(a.x.getTime()).to.equal(b.x.getTime());
+ done();
+ });
+
+ it('retains Date properties when merging keys', function (done) {
+
+ var a = { x: new Date(1378776452757) };
+
+ var b = Hoek.merge({ x: {} }, a);
+ expect(a.x.getTime()).to.equal(b.x.getTime());
+ done();
+ });
+
+ it('overrides Buffer', function (done) {
+
+ var a = { x: new Buffer('abc') };
+
+ var b = Hoek.merge({ x: {} }, a);
+ expect(a.x.toString()).to.equal('abc');
+ done();
+ });
+});
+
+describe('applyToDefaults()', function () {
+
+ var defaults = {
+ a: 1,
+ b: 2,
+ c: {
+ d: 3,
+ e: [5, 6]
+ },
+ f: 6,
+ g: 'test'
+ };
+
+ it('throws when target is null', function (done) {
+
+ expect(function () {
+
+ Hoek.applyToDefaults(null, {});
+ }).to.throw('Invalid defaults value: must be an object');
+ done();
+ });
+
+ it('returns null if options is false', function (done) {
+
+ var result = Hoek.applyToDefaults(defaults, false);
+ expect(result).to.equal(null);
+ done();
+ });
+
+ it('returns null if options is null', function (done) {
+
+ var result = Hoek.applyToDefaults(defaults, null);
+ expect(result).to.equal(null);
+ done();
+ });
+
+ it('returns null if options is undefined', function (done) {
+
+ var result = Hoek.applyToDefaults(defaults, undefined);
+ expect(result).to.equal(null);
+ done();
+ });
+
+ it('returns a copy of defaults if options is true', function (done) {
+
+ var result = Hoek.applyToDefaults(defaults, true);
+ expect(result).to.deep.equal(defaults);
+ done();
+ });
+
+ it('applies object to defaults', function (done) {
+
+ var obj = {
+ a: null,
+ c: {
+ e: [4]
+ },
+ f: 0,
+ g: {
+ h: 5
+ }
+ };
+
+ var result = Hoek.applyToDefaults(defaults, obj);
+ expect(result.c.e).to.deep.equal([4]);
+ expect(result.a).to.equal(1);
+ expect(result.b).to.equal(2);
+ expect(result.f).to.equal(0);
+ expect(result.g).to.deep.equal({ h: 5 });
+ done();
+ });
+
+ it('applies object to defaults with null', function (done) {
+
+ var obj = {
+ a: null,
+ c: {
+ e: [4]
+ },
+ f: 0,
+ g: {
+ h: 5
+ }
+ };
+
+ var result = Hoek.applyToDefaults(defaults, obj, true);
+ expect(result.c.e).to.deep.equal([4]);
+ expect(result.a).to.equal(null);
+ expect(result.b).to.equal(2);
+ expect(result.f).to.equal(0);
+ expect(result.g).to.deep.equal({ h: 5 });
+ done();
+ });
+});
+
+describe('cloneWithShallow()', function () {
+
+ it('deep clones except for listed keys', function (done) {
+
+ var source = {
+ a: {
+ b: 5
+ },
+ c: {
+ d: 6
+ }
+ };
+
+ var copy = Hoek.cloneWithShallow(source, ['c']);
+ expect(copy).to.deep.equal(source);
+ expect(copy).to.not.equal(source);
+ expect(copy.a).to.not.equal(source.a);
+ expect(copy.b).to.equal(source.b);
+ done();
+ });
+
+ it('returns immutable value', function (done) {
+
+ expect(Hoek.cloneWithShallow(5)).to.equal(5);
+ done();
+ });
+
+ it('returns null value', function (done) {
+
+ expect(Hoek.cloneWithShallow(null)).to.equal(null);
+ done();
+ });
+
+ it('returns undefined value', function (done) {
+
+ expect(Hoek.cloneWithShallow(undefined)).to.equal(undefined);
+ done();
+ });
+
+ it('deep clones except for listed keys (including missing keys)', function (done) {
+
+ var source = {
+ a: {
+ b: 5
+ },
+ c: {
+ d: 6
+ }
+ };
+
+ var copy = Hoek.cloneWithShallow(source, ['c', 'v']);
+ expect(copy).to.deep.equal(source);
+ expect(copy).to.not.equal(source);
+ expect(copy.a).to.not.equal(source.a);
+ expect(copy.b).to.equal(source.b);
+ done();
+ });
+});
+
+describe('applyToDefaultsWithShallow()', function () {
+
+ it('shallow copies the listed keys from options without merging', function (done) {
+
+ var defaults = {
+ a: {
+ b: 5,
+ e: 3
+ },
+ c: {
+ d: 7,
+ g: 1
+ }
+ };
+
+ var options = {
+ a: {
+ b: 4
+ },
+ c: {
+ d: 6,
+ f: 7
+ }
+ };
+
+ var merged = Hoek.applyToDefaultsWithShallow(defaults, options, ['a']);
+ expect(merged).to.deep.equal({ a: { b: 4 }, c: { d: 6, g: 1, f: 7 } });
+ expect(merged.a).to.equal(options.a);
+ expect(merged.a).to.not.equal(defaults.a);
+ expect(merged.c).to.not.equal(options.c);
+ expect(merged.c).to.not.equal(defaults.c);
+ done();
+ });
+
+ it('shallow copies the nested keys (override)', function (done) {
+
+ var defaults = {
+ a: {
+ b: 5
+ },
+ c: {
+ d: 7,
+ g: 1
+ }
+ };
+
+ var options = {
+ a: {
+ b: 4
+ },
+ c: {
+ d: 6,
+ g: {
+ h: 8
+ }
+ }
+ };
+
+ var merged = Hoek.applyToDefaultsWithShallow(defaults, options, ['c.g']);
+ expect(merged).to.deep.equal({ a: { b: 4 }, c: { d: 6, g: { h: 8 } } });
+ expect(merged.c.g).to.equal(options.c.g);
+ done();
+ });
+
+ it('shallow copies the nested keys (missing)', function (done) {
+
+ var defaults = {
+ a: {
+ b: 5
+ }
+ };
+
+ var options = {
+ a: {
+ b: 4
+ },
+ c: {
+ g: {
+ h: 8
+ }
+ }
+ };
+
+ var merged = Hoek.applyToDefaultsWithShallow(defaults, options, ['c.g']);
+ expect(merged).to.deep.equal({ a: { b: 4 }, c: { g: { h: 8 } } });
+ expect(merged.c.g).to.equal(options.c.g);
+ done();
+ });
+
+ it('shallow copies the nested keys (override)', function (done) {
+
+ var defaults = {
+ a: {
+ b: 5
+ },
+ c: {
+ g: {
+ d: 7
+ }
+ }
+ };
+
+ var options = {
+ a: {
+ b: 4
+ },
+ c: {
+ g: {
+ h: 8
+ }
+ }
+ };
+
+ var merged = Hoek.applyToDefaultsWithShallow(defaults, options, ['c.g']);
+ expect(merged).to.deep.equal({ a: { b: 4 }, c: { g: { h: 8 } } });
+ expect(merged.c.g).to.equal(options.c.g);
+ done();
+ });
+
+ it('shallow copies the nested keys (deeper)', function (done) {
+
+ var defaults = {
+ a: {
+ b: 5
+ }
+ };
+
+ var options = {
+ a: {
+ b: 4
+ },
+ c: {
+ g: {
+ r: {
+ h: 8
+ }
+ }
+ }
+ };
+
+ var merged = Hoek.applyToDefaultsWithShallow(defaults, options, ['c.g.r']);
+ expect(merged).to.deep.equal({ a: { b: 4 }, c: { g: { r: { h: 8 } } } });
+ expect(merged.c.g.r).to.equal(options.c.g.r);
+ done();
+ });
+
+ it('shallow copies the nested keys (not present)', function (done) {
+
+ var defaults = {
+ a: {
+ b: 5
+ }
+ };
+
+ var options = {
+ a: {
+ b: 4
+ },
+ c: {
+ g: {
+ r: {
+ h: 8
+ }
+ }
+ }
+ };
+
+ var merged = Hoek.applyToDefaultsWithShallow(defaults, options, ['x.y']);
+ expect(merged).to.deep.equal({ a: { b: 4 }, c: { g: { r: { h: 8 } } } });
+ done();
+ });
+
+ it('shallow copies the listed keys in the defaults', function (done) {
+
+ var defaults = {
+ a: {
+ b: 1
+ }
+ };
+
+ var merged = Hoek.applyToDefaultsWithShallow(defaults, {}, ['a']);
+ expect(merged.a).to.equal(defaults.a);
+ done();
+ });
+
+ it('shallow copies the listed keys in the defaults (true)', function (done) {
+
+ var defaults = {
+ a: {
+ b: 1
+ }
+ };
+
+ var merged = Hoek.applyToDefaultsWithShallow(defaults, true, ['a']);
+ expect(merged.a).to.equal(defaults.a);
+ done();
+ });
+
+ it('returns null on false', function (done) {
+
+ var defaults = {
+ a: {
+ b: 1
+ }
+ };
+
+ var merged = Hoek.applyToDefaultsWithShallow(defaults, false, ['a']);
+ expect(merged).to.equal(null);
+ done();
+ });
+
+ it('throws on missing defaults', function (done) {
+
+ expect(function () {
+
+ Hoek.applyToDefaultsWithShallow(null, {}, ['a']);
+ }).to.throw('Invalid defaults value: must be an object');
+ done();
+ });
+
+ it('throws on invalid defaults', function (done) {
+
+ expect(function () {
+
+ Hoek.applyToDefaultsWithShallow('abc', {}, ['a']);
+ }).to.throw('Invalid defaults value: must be an object');
+ done();
+ });
+
+ it('throws on invalid options', function (done) {
+
+ expect(function () {
+
+ Hoek.applyToDefaultsWithShallow({}, 'abc', ['a']);
+ }).to.throw('Invalid options value: must be true, falsy or an object');
+ done();
+ });
+
+ it('throws on missing keys', function (done) {
+
+ expect(function () {
+
+ Hoek.applyToDefaultsWithShallow({}, true);
+ }).to.throw('Invalid keys');
+ done();
+ });
+
+ it('throws on invalid keys', function (done) {
+
+ expect(function () {
+
+ Hoek.applyToDefaultsWithShallow({}, true, 'a');
+ }).to.throw('Invalid keys');
+ done();
+ });
+});
+
+describe('deepEqual()', function () {
+
+ it('compares simple values', function (done) {
+
+ expect(Hoek.deepEqual('x', 'x')).to.be.true();
+ expect(Hoek.deepEqual('x', 'y')).to.be.false();
+ expect(Hoek.deepEqual('x1', 'x')).to.be.false();
+ expect(Hoek.deepEqual(-0, +0)).to.be.false();
+ expect(Hoek.deepEqual(-0, -0)).to.be.true();
+ expect(Hoek.deepEqual(+0, +0)).to.be.true();
+ expect(Hoek.deepEqual(+0, -0)).to.be.false();
+ expect(Hoek.deepEqual(1, 1)).to.be.true();
+ expect(Hoek.deepEqual(0, 0)).to.be.true();
+ expect(Hoek.deepEqual(-1, 1)).to.be.false();
+ expect(Hoek.deepEqual(NaN, 0)).to.be.false();
+ expect(Hoek.deepEqual(NaN, NaN)).to.be.true();
+ done();
+ });
+
+ it('compares different types', function (done) {
+
+ expect(Hoek.deepEqual([], 5)).to.be.false();
+ expect(Hoek.deepEqual(5, [])).to.be.false();
+ expect(Hoek.deepEqual({}, null)).to.be.false();
+ expect(Hoek.deepEqual(null, {})).to.be.false();
+ expect(Hoek.deepEqual('abc', {})).to.be.false();
+ expect(Hoek.deepEqual({}, 'abc')).to.be.false();
+ done();
+ });
+
+ it('compares empty structures', function (done) {
+
+ expect(Hoek.deepEqual([], [])).to.be.true();
+ expect(Hoek.deepEqual({}, {})).to.be.true();
+ expect(Hoek.deepEqual([], {})).to.be.false();
+ done();
+ });
+
+ it('compares empty arguments object', function (done) {
+
+ var compare = function () {
+
+ expect(Hoek.deepEqual([], arguments)).to.be.false();
+ };
+
+ compare();
+ done();
+ });
+
+ it('compares empty arguments objects', function (done) {
+
+ var compare = function () {
+
+ var arg1 = arguments;
+
+ var inner = function () {
+
+ expect(Hoek.deepEqual(arg1, arguments)).to.be.false(); // callee is not the same
+ };
+
+ inner();
+ };
+
+ compare();
+ done();
+ });
+
+ it('compares dates', function (done) {
+
+ expect(Hoek.deepEqual(new Date(2015, 1, 1), new Date(2015, 1, 1))).to.be.true();
+ expect(Hoek.deepEqual(new Date(100), new Date(101))).to.be.false();
+ expect(Hoek.deepEqual(new Date(), {})).to.be.false();
+ done();
+ });
+
+ it('compares regular expressions', function (done) {
+
+ expect(Hoek.deepEqual(/\s/, new RegExp('\\\s'))).to.be.true();
+ expect(Hoek.deepEqual(/\s/g, /\s/g)).to.be.true();
+ expect(Hoek.deepEqual(/a/, {})).to.be.false();
+ expect(Hoek.deepEqual(/\s/g, /\s/i)).to.be.false();
+ expect(Hoek.deepEqual(/a/g, /b/g)).to.be.false();
+ done();
+ });
+
+ it('compares arrays', function (done) {
+
+ expect(Hoek.deepEqual([[1]], [[1]])).to.be.true();
+ expect(Hoek.deepEqual([1, 2, 3], [1, 2, 3])).to.be.true();
+ expect(Hoek.deepEqual([1, 2, 3], [1, 3, 2])).to.be.false();
+ expect(Hoek.deepEqual([1, 2, 3], [1, 2])).to.be.false();
+ expect(Hoek.deepEqual([1], [1])).to.be.true();
+ done();
+ });
+
+ it('compares buffers', function (done) {
+
+ expect(Hoek.deepEqual(new Buffer([1, 2, 3]), new Buffer([1, 2, 3]))).to.be.true();
+ expect(Hoek.deepEqual(new Buffer([1, 2, 3]), new Buffer([1, 3, 2]))).to.be.false();
+ expect(Hoek.deepEqual(new Buffer([1, 2, 3]), new Buffer([1, 2]))).to.be.false();
+ expect(Hoek.deepEqual(new Buffer([1, 2, 3]), {})).to.be.false();
+ expect(Hoek.deepEqual(new Buffer([1, 2, 3]), [1, 2, 3])).to.be.false();
+ done();
+ });
+
+ it('compares objects', function (done) {
+
+ expect(Hoek.deepEqual({ a: 1, b: 2, c: 3 }, { a: 1, b: 2, c: 3 })).to.be.true();
+ expect(Hoek.deepEqual({ foo: 'bar' }, { foo: 'baz' })).to.be.false();
+ expect(Hoek.deepEqual({ foo: { bar: 'foo' } }, { foo: { bar: 'baz' } })).to.be.false();
+ done();
+ });
+
+ it('handles circular dependency', function (done) {
+
+ var a = {};
+ a.x = a;
+
+ var b = Hoek.clone(a);
+ expect(Hoek.deepEqual(a, b)).to.be.true();
+ done();
+ });
+
+ it('compares an object with property getter without executing it', function (done) {
+
+ var obj = {};
+ var value = 1;
+ var execCount = 0;
+
+ Object.defineProperty(obj, 'test', {
+ enumerable: true,
+ configurable: true,
+ get: function () {
+
+ ++execCount;
+ return value;
+ }
+ });
+
+ var copy = Hoek.clone(obj);
+ expect(Hoek.deepEqual(obj, copy)).to.be.true();
+ expect(execCount).to.equal(0);
+ expect(copy.test).to.equal(1);
+ expect(execCount).to.equal(1);
+ done();
+ });
+
+ it('compares objects with property getters', function (done) {
+
+ var obj = {};
+ Object.defineProperty(obj, 'test', {
+ enumerable: true,
+ configurable: true,
+ get: function () {
+
+ return 1;
+ }
+ });
+
+ var ref = {};
+ Object.defineProperty(ref, 'test', {
+ enumerable: true,
+ configurable: true,
+ get: function () {
+
+ return 2;
+ }
+ });
+
+ expect(Hoek.deepEqual(obj, ref)).to.be.false();
+ done();
+ });
+
+ it('compares object prototypes', function (done) {
+
+ var Obj = function () {
+
+ this.a = 5;
+ };
+
+ Obj.prototype.b = function () {
+
+ return this.a;
+ };
+
+ var Ref = function () {
+
+ this.a = 5;
+ };
+
+ Ref.prototype.b = function () {
+
+ return this.a;
+ };
+
+ expect(Hoek.deepEqual(new Obj(), new Ref())).to.be.false();
+ expect(Hoek.deepEqual(new Obj(), new Obj())).to.be.true();
+ expect(Hoek.deepEqual(new Ref(), new Ref())).to.be.true();
+ done();
+ });
+
+ it('compares plain objects', function (done) {
+
+ var a = Object.create(null);
+ var b = Object.create(null);
+
+ a.b = 'c';
+ b.b = 'c';
+
+ expect(Hoek.deepEqual(a, b)).to.be.true();
+ expect(Hoek.deepEqual(a, { b: 'c' })).to.be.false();
+ done();
+ });
+
+ it('compares an object with an empty object', function (done) {
+
+ var a = { a: 1, b: 2 };
+
+ expect(Hoek.deepEqual({}, a)).to.be.false();
+ expect(Hoek.deepEqual(a, {})).to.be.false();
+ done();
+ });
+
+ it('compares an object ignoring the prototype', function (done) {
+
+ var a = Object.create(null);
+ var b = {};
+
+ expect(Hoek.deepEqual(a, b, { prototype: false })).to.be.true();
+ done();
+ });
+
+ it('compares an object ignoring the prototype recursively', function (done) {
+
+ var a = [Object.create(null)];
+ var b = [{}];
+
+ expect(Hoek.deepEqual(a, b, { prototype: false })).to.be.true();
+ done();
+ });
+});
+
+describe('unique()', function () {
+
+ it('ensures uniqueness within array of objects based on subkey', function (done) {
+
+ var a = Hoek.unique(dupsArray, 'x');
+ expect(a).to.deep.equal(reducedDupsArray);
+ done();
+ });
+
+ it('removes duplicated without key', function (done) {
+
+ expect(Hoek.unique([1, 2, 3, 4, 2, 1, 5])).to.deep.equal([1, 2, 3, 4, 5]);
+ done();
+ });
+});
+
+describe('mapToObject()', function () {
+
+ it('returns null on null array', function (done) {
+
+ var a = Hoek.mapToObject(null);
+ expect(a).to.equal(null);
+ done();
+ });
+
+ it('converts basic array to existential object', function (done) {
+
+ var keys = [1, 2, 3, 4];
+ var a = Hoek.mapToObject(keys);
+ for (var i in keys) {
+ expect(a[keys[i]]).to.equal(true);
+ }
+ done();
+ });
+
+ it('converts array of objects to existential object', function (done) {
+
+ var keys = [{ x: 1 }, { x: 2 }, { x: 3 }, { y: 4 }];
+ var subkey = 'x';
+ var a = Hoek.mapToObject(keys, subkey);
+ expect(a).to.deep.equal({ 1: true, 2: true, 3: true });
+ done();
+ });
+});
+
+describe('intersect()', function () {
+
+ it('returns the common objects of two arrays', function (done) {
+
+ var array1 = [1, 2, 3, 4, 4, 5, 5];
+ var array2 = [5, 4, 5, 6, 7];
+ var common = Hoek.intersect(array1, array2);
+ expect(common.length).to.equal(2);
+ done();
+ });
+
+ it('returns just the first common object of two arrays', function (done) {
+
+ var array1 = [1, 2, 3, 4, 4, 5, 5];
+ var array2 = [5, 4, 5, 6, 7];
+ var common = Hoek.intersect(array1, array2, true);
+ expect(common).to.equal(5);
+ done();
+ });
+
+ it('returns null when no common and returning just the first common object of two arrays', function (done) {
+
+ var array1 = [1, 2, 3, 4, 4, 5, 5];
+ var array2 = [6, 7];
+ var common = Hoek.intersect(array1, array2, true);
+ expect(common).to.equal(null);
+ done();
+ });
+
+ it('returns an empty array if either input is null', function (done) {
+
+ expect(Hoek.intersect([1], null).length).to.equal(0);
+ expect(Hoek.intersect(null, [1]).length).to.equal(0);
+ done();
+ });
+
+ it('returns the common objects of object and array', function (done) {
+
+ var array1 = [1, 2, 3, 4, 4, 5, 5];
+ var array2 = [5, 4, 5, 6, 7];
+ var common = Hoek.intersect(Hoek.mapToObject(array1), array2);
+ expect(common.length).to.equal(2);
+ done();
+ });
+});
+
+describe('contain()', function () {
+
+ it('tests strings', function (done) {
+
+ expect(Hoek.contain('abc', 'ab')).to.be.true();
+ expect(Hoek.contain('abc', 'abc', { only: true })).to.be.true();
+ expect(Hoek.contain('aaa', 'a', { only: true })).to.be.true();
+ expect(Hoek.contain('abc', 'b', { once: true })).to.be.true();
+ expect(Hoek.contain('abc', ['a', 'c'])).to.be.true();
+ expect(Hoek.contain('abc', ['a', 'd'], { part: true })).to.be.true();
+
+ expect(Hoek.contain('abc', 'ac')).to.be.false();
+ expect(Hoek.contain('abcd', 'abc', { only: true })).to.be.false();
+ expect(Hoek.contain('aab', 'a', { only: true })).to.be.false();
+ expect(Hoek.contain('abb', 'b', { once: true })).to.be.false();
+ expect(Hoek.contain('abc', ['a', 'd'])).to.be.false();
+ expect(Hoek.contain('abc', ['ab', 'bc'])).to.be.false(); // Overlapping values not supported
+ done();
+ });
+
+ it('tests arrays', function (done) {
+
+ expect(Hoek.contain([1, 2, 3], 1)).to.be.true();
+ expect(Hoek.contain([{ a: 1 }], { a: 1 }, { deep: true })).to.be.true();
+ expect(Hoek.contain([1, 2, 3], [1, 2])).to.be.true();
+ expect(Hoek.contain([{ a: 1 }], [{ a: 1 }], { deep: true })).to.be.true();
+ expect(Hoek.contain([1, 1, 2], [1, 2], { only: true })).to.be.true();
+ expect(Hoek.contain([1, 2], [1, 2], { once: true })).to.be.true();
+ expect(Hoek.contain([1, 2, 3], [1, 4], { part: true })).to.be.true();
+ expect(Hoek.contain([[1], [2]], [[1]], { deep: true })).to.be.true();
+
+ expect(Hoek.contain([1, 2, 3], 4)).to.be.false();
+ expect(Hoek.contain([{ a: 1 }], { a: 2 }, { deep: true })).to.be.false();
+ expect(Hoek.contain([{ a: 1 }], { a: 1 })).to.be.false();
+ expect(Hoek.contain([1, 2, 3], [4, 5])).to.be.false();
+ expect(Hoek.contain([[3], [2]], [[1]])).to.be.false();
+ expect(Hoek.contain([[1], [2]], [[1]])).to.be.false();
+ expect(Hoek.contain([{ a: 1 }], [{ a: 2 }], { deep: true })).to.be.false();
+ expect(Hoek.contain([1, 3, 2], [1, 2], { only: true })).to.be.false();
+ expect(Hoek.contain([1, 2, 2], [1, 2], { once: true })).to.be.false();
+ expect(Hoek.contain([0, 2, 3], [1, 4], { part: true })).to.be.false();
+ done();
+ });
+
+ it('tests objects', function (done) {
+
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, 'a')).to.be.true();
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, ['a', 'c'])).to.be.true();
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, ['a', 'b', 'c'], { only: true })).to.be.true();
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1 })).to.be.true();
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1, c: 3 })).to.be.true();
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1, d: 4 }, { part: true })).to.be.true();
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1, b: 2, c: 3 }, { only: true })).to.be.true();
+ expect(Hoek.contain({ a: [1], b: [2], c: [3] }, { a: [1], c: [3] }, { deep: true })).to.be.true();
+ expect(Hoek.contain({ a: [{ b: 1 }, { c: 2 }, { d: 3, e: 4 }] }, { a: [{ b: 1 }, { d: 3 }] }, { deep: true })).to.be.true();
+ expect(Hoek.contain({ a: [{ b: 1 }, { c: 2 }, { d: 3, e: 4 }] }, { a: [{ b: 1 }, { d: 3 }] }, { deep: true, part: true })).to.be.true();
+ expect(Hoek.contain({ a: [{ b: 1 }, { c: 2 }, { d: 3, e: 4 }] }, { a: [{ b: 1 }, { d: 3 }] }, { deep: true, part: false })).to.be.false();
+ expect(Hoek.contain({ a: [{ b: 1 }, { c: 2 }, { d: 3, e: 4 }] }, { a: [{ b: 1 }, { d: 3 }] }, { deep: true, only: true })).to.be.false();
+ expect(Hoek.contain({ a: [{ b: 1 }, { c: 2 }, { d: 3, e: 4 }] }, { a: [{ b: 1 }, { d: 3 }] }, { deep: true, only: false })).to.be.true();
+
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, 'd')).to.be.false();
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, ['a', 'd'])).to.be.false();
+ expect(Hoek.contain({ a: 1, b: 2, c: 3, d: 4 }, ['a', 'b', 'c'], { only: true })).to.be.false();
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 2 })).to.be.false();
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 2, b: 2 }, { part: true })).to.be.false(); // part does not ignore bad value
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1, d: 3 })).to.be.false();
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1, d: 4 })).to.be.false();
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1, b: 2 }, { only: true })).to.be.false();
+ expect(Hoek.contain({ a: [1], b: [2], c: [3] }, { a: [1], c: [3] })).to.be.false();
+ expect(Hoek.contain({ a: { b: { c: 1, d: 2 } } }, { a: { b: { c: 1 } } })).to.be.false();
+ expect(Hoek.contain({ a: { b: { c: 1, d: 2 } } }, { a: { b: { c: 1 } } }, { deep: true })).to.be.true();
+ expect(Hoek.contain({ a: { b: { c: 1, d: 2 } } }, { a: { b: { c: 1 } } }, { deep: true, only: true })).to.be.false();
+ expect(Hoek.contain({ a: { b: { c: 1, d: 2 } } }, { a: { b: { c: 1 } } }, { deep: true, only: false })).to.be.true();
+ expect(Hoek.contain({ a: { b: { c: 1, d: 2 } } }, { a: { b: { c: 1 } } }, { deep: true, part: true })).to.be.true();
+ expect(Hoek.contain({ a: { b: { c: 1, d: 2 } } }, { a: { b: { c: 1 } } }, { deep: true, part: false })).to.be.false();
+
+ // Getter check
+ var Foo = function (bar) {
+
+ this.bar = bar;
+ };
+
+ Object.defineProperty(Foo.prototype, 'baz', {
+ enumerable: true,
+ get: function () {
+
+ return this.bar;
+ }
+ });
+
+ expect(Hoek.contain({ a: new Foo('b') }, { a: new Foo('b') }, { deep: true })).to.be.true();
+ expect(Hoek.contain({ a: new Foo('b') }, { a: new Foo('b') }, { deep: true, part: true })).to.be.true();
+ expect(Hoek.contain({ a: new Foo('b') }, { a: { baz: 'b' } }, { deep: true })).to.be.true();
+ expect(Hoek.contain({ a: new Foo('b') }, { a: { baz: 'b' } }, { deep: true, only: true })).to.be.false();
+ expect(Hoek.contain({ a: new Foo('b') }, { a: { baz: 'b' } }, { deep: true, part: false })).to.be.false();
+ expect(Hoek.contain({ a: new Foo('b') }, { a: { baz: 'b' } }, { deep: true, part: true })).to.be.true();
+
+ done();
+ });
+});
+
+describe('flatten()', function () {
+
+ it('returns a flat array', function (done) {
+
+ var result = Hoek.flatten([1, 2, [3, 4, [5, 6], [7], 8], [9], [10, [11, 12]], 13]);
+ expect(result.length).to.equal(13);
+ expect(result).to.deep.equal([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]);
+ done();
+ });
+});
+
+describe('reach()', function () {
+
+ var obj = {
+ a: {
+ b: {
+ c: {
+ d: 1,
+ e: 2
+ },
+ f: 'hello'
+ },
+ g: {
+ h: 3
+ }
+ },
+ i: function () { },
+ j: null,
+ k: [4, 8, 9, 1]
+ };
+
+ obj.i.x = 5;
+
+ it('returns object itself', function (done) {
+
+ expect(Hoek.reach(obj, null)).to.equal(obj);
+ expect(Hoek.reach(obj, false)).to.equal(obj);
+ expect(Hoek.reach(obj)).to.equal(obj);
+ done();
+ });
+
+ it('returns first value of array', function (done) {
+
+ expect(Hoek.reach(obj, 'k.0')).to.equal(4);
+ done();
+ });
+
+ it('returns last value of array using negative index', function (done) {
+
+ expect(Hoek.reach(obj, 'k.-2')).to.equal(9);
+ done();
+ });
+
+ it('returns a valid member', function (done) {
+
+ expect(Hoek.reach(obj, 'a.b.c.d')).to.equal(1);
+ done();
+ });
+
+ it('returns a valid member with separator override', function (done) {
+
+ expect(Hoek.reach(obj, 'a/b/c/d', '/')).to.equal(1);
+ done();
+ });
+
+ it('returns undefined on null object', function (done) {
+
+ expect(Hoek.reach(null, 'a.b.c.d')).to.equal(undefined);
+ done();
+ });
+
+ it('returns undefined on missing object member', function (done) {
+
+ expect(Hoek.reach(obj, 'a.b.c.d.x')).to.equal(undefined);
+ done();
+ });
+
+ it('returns undefined on missing function member', function (done) {
+
+ expect(Hoek.reach(obj, 'i.y', { functions: true })).to.equal(undefined);
+ done();
+ });
+
+ it('throws on missing member in strict mode', function (done) {
+
+ expect(function () {
+
+ Hoek.reach(obj, 'a.b.c.o.x', { strict: true });
+ }).to.throw('Missing segment o in reach path a.b.c.o.x');
+
+ done();
+ });
+
+ it('returns undefined on invalid member', function (done) {
+
+ expect(Hoek.reach(obj, 'a.b.c.d-.x')).to.equal(undefined);
+ done();
+ });
+
+ it('returns function member', function (done) {
+
+ expect(typeof Hoek.reach(obj, 'i')).to.equal('function');
+ done();
+ });
+
+ it('returns function property', function (done) {
+
+ expect(Hoek.reach(obj, 'i.x')).to.equal(5);
+ done();
+ });
+
+ it('returns null', function (done) {
+
+ expect(Hoek.reach(obj, 'j')).to.equal(null);
+ done();
+ });
+
+ it('throws on function property when functions not allowed', function (done) {
+
+ expect(function () {
+
+ Hoek.reach(obj, 'i.x', { functions: false });
+ }).to.throw('Invalid segment x in reach path i.x');
+
+ done();
+ });
+
+ it('will return a default value if property is not found', function (done) {
+
+ expect(Hoek.reach(obj, 'a.b.q', { default: 'defaultValue' })).to.equal('defaultValue');
+ done();
+ });
+
+ it('will return a default value if path is not found', function (done) {
+
+ expect(Hoek.reach(obj, 'q', { default: 'defaultValue' })).to.equal('defaultValue');
+ done();
+ });
+
+ it('allows a falsey value to be used as the default value', function (done) {
+
+ expect(Hoek.reach(obj, 'q', { default: '' })).to.equal('');
+ done();
+ });
+});
+
+describe('reachTemplate()', function () {
+
+ it('applies object to template', function (done) {
+
+ var obj = {
+ a: {
+ b: {
+ c: {
+ d: 1
+ }
+ }
+ },
+ j: null,
+ k: [4, 8, 9, 1]
+ };
+
+ var template = '{k.0}:{k.-2}:{a.b.c.d}:{x.y}:{j}';
+
+ expect(Hoek.reachTemplate(obj, template)).to.equal('4:9:1::');
+ done();
+ });
+
+ it('applies object to template (options)', function (done) {
+
+ var obj = {
+ a: {
+ b: {
+ c: {
+ d: 1
+ }
+ }
+ },
+ j: null,
+ k: [4, 8, 9, 1]
+ };
+
+ var template = '{k/0}:{k/-2}:{a/b/c/d}:{x/y}:{j}';
+
+ expect(Hoek.reachTemplate(obj, template, '/')).to.equal('4:9:1::');
+ done();
+ });
+});
+
+describe('callStack()', function () {
+
+ it('returns the full call stack', function (done) {
+
+ var stack = Hoek.callStack();
+ expect(stack[0][0]).to.contain('index.js');
+ expect(stack[0][2]).to.equal(26);
+ done();
+ });
+});
+
+describe('displayStack ()', function () {
+
+ it('returns the full call stack for display', function (done) {
+
+ var stack = Hoek.displayStack();
+ expect(stack[0]).to.contain(Path.normalize('/test/index.js') + ':');
+ done();
+ });
+
+ it('includes constructor functions correctly', function (done) {
+
+ var Something = function (next) {
+
+ next();
+ };
+
+ var something = new Something(function () {
+
+ var stack = Hoek.displayStack();
+ expect(stack[1]).to.contain('new Something');
+ done();
+ });
+ });
+});
+
+describe('abort()', function () {
+
+ it('exits process when not in test mode', function (done) {
+
+ var env = process.env.NODE_ENV;
+ var write = process.stdout.write;
+ var exit = process.exit;
+
+ process.env.NODE_ENV = 'nottatest';
+ process.stdout.write = function () { };
+ process.exit = function (state) {
+
+ process.exit = exit;
+ process.env.NODE_ENV = env;
+ process.stdout.write = write;
+
+ expect(state).to.equal(1);
+ done();
+ };
+
+ Hoek.abort('Boom');
+ });
+
+ it('throws when not in test mode and abortThrow is true', function (done) {
+
+ var env = process.env.NODE_ENV;
+ process.env.NODE_ENV = 'nottatest';
+ Hoek.abortThrow = true;
+
+ var fn = function () {
+
+ Hoek.abort('my error message');
+ };
+
+ expect(fn).to.throw('my error message');
+ Hoek.abortThrow = false;
+ process.env.NODE_ENV = env;
+
+ done();
+ });
+
+ it('respects hideStack argument', function (done) {
+
+ var env = process.env.NODE_ENV;
+ var write = process.stdout.write;
+ var exit = process.exit;
+ var output = '';
+
+ process.exit = function () { };
+ process.env.NODE_ENV = '';
+ process.stdout.write = function (message) {
+
+ output = message;
+ };
+
+ Hoek.abort('my error message', true);
+
+ process.env.NODE_ENV = env;
+ process.stdout.write = write;
+ process.exit = exit;
+
+ expect(output).to.equal('ABORT: my error message\n\t\n');
+
+ done();
+ });
+
+ it('throws in test mode', function (done) {
+
+ var env = process.env.NODE_ENV;
+ process.env.NODE_ENV = 'test';
+
+ expect(function () {
+
+ Hoek.abort('my error message', true);
+ }).to.throw('my error message');
+
+ process.env.NODE_ENV = env;
+ done();
+ });
+
+ it('throws in test mode with default message', function (done) {
+
+ var env = process.env.NODE_ENV;
+ process.env.NODE_ENV = 'test';
+
+ expect(function () {
+
+ Hoek.abort('', true);
+ }).to.throw('Unknown error');
+
+ process.env.NODE_ENV = env;
+ done();
+ });
+
+ it('defaults to showing stack', function (done) {
+
+ var env = process.env.NODE_ENV;
+ var write = process.stdout.write;
+ var exit = process.exit;
+ var output = '';
+
+ process.exit = function () { };
+ process.env.NODE_ENV = '';
+ process.stdout.write = function (message) {
+
+ output = message;
+ };
+
+ Hoek.abort('my error message');
+
+ process.env.NODE_ENV = env;
+ process.stdout.write = write;
+ process.exit = exit;
+
+ expect(output).to.contain('index.js');
+
+ done();
+ });
+});
+
+describe('assert()', function () {
+
+ it('throws an Error when using assert in a test', function (done) {
+
+ var fn = function () {
+
+ Hoek.assert(false, 'my error message');
+ };
+
+ expect(fn).to.throw('my error message');
+ done();
+ });
+
+ it('throws an Error when using assert in a test with no message', function (done) {
+
+ var fn = function () {
+
+ Hoek.assert(false);
+ };
+
+ expect(fn).to.throw('Unknown error');
+ done();
+ });
+
+ it('throws an Error when using assert in a test with multipart message', function (done) {
+
+ var fn = function () {
+
+ Hoek.assert(false, 'This', 'is', 'my message');
+ };
+
+ expect(fn).to.throw('This is my message');
+ done();
+ });
+
+ it('throws an Error when using assert in a test with multipart message (empty)', function (done) {
+
+ var fn = function () {
+
+ Hoek.assert(false, 'This', 'is', '', 'my message');
+ };
+
+ expect(fn).to.throw('This is my message');
+ done();
+ });
+
+ it('throws an Error when using assert in a test with object message', function (done) {
+
+ var fn = function () {
+
+ Hoek.assert(false, 'This', 'is', { spinal: 'tap' });
+ };
+
+ expect(fn).to.throw('This is {"spinal":"tap"}');
+ done();
+ });
+
+ it('throws an Error when using assert in a test with multipart string and error messages', function (done) {
+
+ var fn = function () {
+
+ Hoek.assert(false, 'This', 'is', new Error('spinal'), new Error('tap'));
+ };
+
+ expect(fn).to.throw('This is spinal tap');
+ done();
+ });
+
+ it('throws an Error when using assert in a test with error object message', function (done) {
+
+ var fn = function () {
+
+ Hoek.assert(false, new Error('This is spinal tap'));
+ };
+
+ expect(fn).to.throw('This is spinal tap');
+ done();
+ });
+
+ it('throws the same Error that is passed to it if there is only one error passed', function (done) {
+
+ var error = new Error('ruh roh');
+ var error2 = new Error('ruh roh');
+
+ var fn = function () {
+
+ Hoek.assert(false, error);
+ };
+
+ try {
+ fn();
+ } catch (err) {
+ expect(error).to.equal(error); // should be the same reference
+ expect(error).to.not.equal(error2); // error with the same message should not match
+ }
+
+ done();
+ });
+});
+
+describe('Timer', function () {
+
+ it('returns time elapsed', function (done) {
+
+ var timer = new Hoek.Timer();
+ setTimeout(function () {
+
+ expect(timer.elapsed()).to.be.above(9);
+ done();
+ }, 12);
+ });
+});
+
+describe('Bench', function () {
+
+ it('returns time elapsed', function (done) {
+
+ var timer = new Hoek.Bench();
+ setTimeout(function () {
+
+ expect(timer.elapsed()).to.be.above(9);
+ done();
+ }, 12);
+ });
+});
+
+describe('escapeRegex()', function () {
+
+ it('escapes all special regular expression characters', function (done) {
+
+ var a = Hoek.escapeRegex('4^f$s.4*5+-_?%=#!:@|~\\/`"(>)[<]d{}s,');
+ expect(a).to.equal('4\\^f\\$s\\.4\\*5\\+\\-_\\?%\\=#\\!\\:@\\|~\\\\\\/`"\\(>\\)\\[<\\]d\\{\\}s\\,');
+ done();
+ });
+});
+
+describe('Base64Url', function () {
+
+ var base64str = 'AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0-P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn-AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq-wsbKztLW2t7i5uru8vb6_wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t_g4eLj5OXm5-jp6uvs7e7v8PHy8_T19vf4-fr7_P3-_w';
+ var str = unescape('%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%20%21%22%23%24%25%26%27%28%29*+%2C-./0123456789%3A%3B%3C%3D%3E%3F@ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D%7E%7F%80%81%82%83%84%85%86%87%88%89%8A%8B%8C%8D%8E%8F%90%91%92%93%94%95%96%97%98%99%9A%9B%9C%9D%9E%9F%A0%A1%A2%A3%A4%A5%A6%A7%A8%A9%AA%AB%AC%AD%AE%AF%B0%B1%B2%B3%B4%B5%B6%B7%B8%B9%BA%BB%BC%BD%BE%BF%C0%C1%C2%C3%C4%C5%C6%C7%C8%C9%CA%CB%CC%CD%CE%CF%D0%D1%D2%D3%D4%D5%D6%D7%D8%D9%DA%DB%DC%DD%DE%DF%E0%E1%E2%E3%E4%E5%E6%E7%E8%E9%EA%EB%EC%ED%EE%EF%F0%F1%F2%F3%F4%F5%F6%F7%F8%F9%FA%FB%FC%FD%FE%FF');
+
+ describe('base64urlEncode()', function () {
+
+ it('should base64 URL-safe a string', function (done) {
+
+ expect(Hoek.base64urlEncode(str)).to.equal(base64str);
+ done();
+ });
+
+ it('encodes a buffer', function (done) {
+
+ expect(Hoek.base64urlEncode(new Buffer(str, 'binary'))).to.equal(base64str);
+ done();
+ });
+
+ it('should base64 URL-safe a hex string', function (done) {
+
+ var buffer = new Buffer(str, 'binary');
+ expect(Hoek.base64urlEncode(buffer.toString('hex'), 'hex')).to.equal(base64str);
+ done();
+ });
+
+ it('works on larger input strings', function (done) {
+
+ var input = Fs.readFileSync(Path.join(__dirname, 'index.js')).toString();
+ var encoded = Hoek.base64urlEncode(input);
+
+ expect(encoded).to.not.contain('+');
+ expect(encoded).to.not.contain('/');
+
+ var decoded = Hoek.base64urlDecode(encoded);
+
+ expect(decoded).to.equal(input);
+ done();
+ });
+ });
+
+ describe('base64urlDecode()', function () {
+
+ it('should un-base64 URL-safe a string', function (done) {
+
+ expect(Hoek.base64urlDecode(base64str)).to.equal(str);
+ done();
+ });
+
+ it('should un-base64 URL-safe a string into hex', function (done) {
+
+ expect(Hoek.base64urlDecode(base64str, 'hex')).to.equal(new Buffer(str, 'binary').toString('hex'));
+ done();
+ });
+
+ it('should un-base64 URL-safe a string and return a buffer', function (done) {
+
+ var buf = Hoek.base64urlDecode(base64str, 'buffer');
+ expect(buf instanceof Buffer).to.equal(true);
+ expect(buf.toString('binary')).to.equal(str);
+ done();
+ });
+
+ it('returns error on undefined input', function (done) {
+
+ expect(Hoek.base64urlDecode().message).to.exist();
+ done();
+ });
+
+ it('returns error on invalid input', function (done) {
+
+ expect(Hoek.base64urlDecode('*').message).to.exist();
+ done();
+ });
+ });
+});
+
+describe('escapeHeaderAttribute()', function () {
+
+ it('should not alter ascii values', function (done) {
+
+ var a = Hoek.escapeHeaderAttribute('My Value');
+ expect(a).to.equal('My Value');
+ done();
+ });
+
+ it('escapes all special HTTP header attribute characters', function (done) {
+
+ var a = Hoek.escapeHeaderAttribute('I said go!!!#"' + String.fromCharCode(92));
+ expect(a).to.equal('I said go!!!#\\"\\\\');
+ done();
+ });
+
+ it('throws on large unicode characters', function (done) {
+
+ var fn = function () {
+
+ Hoek.escapeHeaderAttribute('this is a test' + String.fromCharCode(500) + String.fromCharCode(300));
+ };
+
+ expect(fn).to.throw(Error);
+ done();
+ });
+
+ it('throws on CRLF to prevent response splitting', function (done) {
+
+ var fn = function () {
+
+ Hoek.escapeHeaderAttribute('this is a test\r\n');
+ };
+
+ expect(fn).to.throw(Error);
+ done();
+ });
+});
+
+describe('escapeHtml()', function () {
+
+ it('escapes all special HTML characters', function (done) {
+
+ var a = Hoek.escapeHtml('&<>"\'`');
+ expect(a).to.equal('&amp;&lt;&gt;&quot;&#x27;&#x60;');
+ done();
+ });
+
+ it('returns empty string on falsy input', function (done) {
+
+ var a = Hoek.escapeHtml('');
+ expect(a).to.equal('');
+ done();
+ });
+
+ it('returns unchanged string on no reserved input', function (done) {
+
+ var a = Hoek.escapeHtml('abc');
+ expect(a).to.equal('abc');
+ done();
+ });
+});
+
+describe('nextTick()', function () {
+
+ it('calls the provided callback on nextTick', function (done) {
+
+ var a = 0;
+
+ var inc = function (step, next) {
+
+ a += step;
+ next();
+ };
+
+ var ticked = Hoek.nextTick(inc);
+
+ ticked(5, function () {
+
+ expect(a).to.equal(6);
+ done();
+ });
+
+ expect(a).to.equal(0);
+ inc(1, function () {
+
+ expect(a).to.equal(1);
+ });
+ });
+});
+
+describe('once()', function () {
+
+ it('allows function to only execute once', function (done) {
+
+ var gen = 0;
+ var add = function (x) {
+
+ gen += x;
+ };
+
+ add(5);
+ expect(gen).to.equal(5);
+ add = Hoek.once(add);
+ add(5);
+ expect(gen).to.equal(10);
+ add(5);
+ expect(gen).to.equal(10);
+ done();
+ });
+
+ it('double once wraps one time', function (done) {
+
+ var method = function () { };
+ method = Hoek.once(method);
+ method.x = 1;
+ method = Hoek.once(method);
+ expect(method.x).to.equal(1);
+ done();
+ });
+});
+
+describe('isAbsoltePath()', function () {
+
+ it('identifies if path is absolute on Unix without node support', { parallel: false }, function (done) {
+
+ var orig = Path.isAbsolute;
+ Path.isAbsolute = undefined;
+
+ expect(Hoek.isAbsolutePath('')).to.equal(false);
+ expect(Hoek.isAbsolutePath('a')).to.equal(false);
+ expect(Hoek.isAbsolutePath('./a')).to.equal(false);
+ expect(Hoek.isAbsolutePath('/a')).to.equal(true);
+ expect(Hoek.isAbsolutePath('/')).to.equal(true);
+
+ Path.isAbsolute = orig;
+
+ done();
+ });
+
+ it('identifies if path is absolute with fake node support', { parallel: false }, function (done) {
+
+ var orig = Path.isAbsolute;
+ Path.isAbsolute = function (path) {
+
+ return path[0] === '/';
+ };
+
+ expect(Hoek.isAbsolutePath('', 'linux')).to.equal(false);
+ expect(Hoek.isAbsolutePath('a', 'linux')).to.equal(false);
+ expect(Hoek.isAbsolutePath('./a', 'linux')).to.equal(false);
+ expect(Hoek.isAbsolutePath('/a', 'linux')).to.equal(true);
+ expect(Hoek.isAbsolutePath('/', 'linux')).to.equal(true);
+
+ Path.isAbsolute = orig;
+
+ done();
+ });
+
+ it('identifies if path is absolute on Windows without node support', { parallel: false }, function (done) {
+
+ var orig = Path.isAbsolute;
+ Path.isAbsolute = undefined;
+
+ expect(Hoek.isAbsolutePath('//server/file', 'win32')).to.equal(true);
+ expect(Hoek.isAbsolutePath('//server/file', 'win32')).to.equal(true);
+ expect(Hoek.isAbsolutePath('\\\\server\\file', 'win32')).to.equal(true);
+ expect(Hoek.isAbsolutePath('C:/Users/', 'win32')).to.equal(true);
+ expect(Hoek.isAbsolutePath('C:\\Users\\', 'win32')).to.equal(true);
+ expect(Hoek.isAbsolutePath('C:cwd/another', 'win32')).to.equal(false);
+ expect(Hoek.isAbsolutePath('C:cwd\\another', 'win32')).to.equal(false);
+ expect(Hoek.isAbsolutePath('directory/directory', 'win32')).to.equal(false);
+ expect(Hoek.isAbsolutePath('directory\\directory', 'win32')).to.equal(false);
+
+ Path.isAbsolute = orig;
+
+ done();
+ });
+});
+
+describe('isInteger()', function () {
+
+ it('validates integers', function (done) {
+
+ expect(Hoek.isInteger(0)).to.equal(true);
+ expect(Hoek.isInteger(1)).to.equal(true);
+ expect(Hoek.isInteger(1394035612500)).to.equal(true);
+ expect(Hoek.isInteger('0')).to.equal(false);
+ expect(Hoek.isInteger(1.0)).to.equal(true);
+ expect(Hoek.isInteger(1.1)).to.equal(false);
+ done();
+ });
+});
+
+describe('ignore()', function () {
+
+ it('exists', function (done) {
+
+ expect(Hoek.ignore).to.exist();
+ expect(typeof Hoek.ignore).to.equal('function');
+ done();
+ });
+});
+
+describe('inherits()', function () {
+
+ it('exists', function (done) {
+
+ expect(Hoek.inherits).to.exist();
+ expect(typeof Hoek.inherits).to.equal('function');
+ done();
+ });
+});
+
+describe('format()', function () {
+
+ it('exists', function (done) {
+
+ expect(Hoek.format).to.exist();
+ expect(typeof Hoek.format).to.equal('function');
+ done();
+ });
+
+ it('is a reference to Util.format', function (done) {
+
+ expect(Hoek.format('hello %s', 'world')).to.equal('hello world');
+ done();
+ });
+});
+
+describe('transform()', function () {
+
+ var source = {
+ address: {
+ one: '123 main street',
+ two: 'PO Box 1234'
+ },
+ zip: {
+ code: 3321232,
+ province: null
+ },
+ title: 'Warehouse',
+ state: 'CA'
+ };
+
+ var sourcesArray = [{
+ address: {
+ one: '123 main street',
+ two: 'PO Box 1234'
+ },
+ zip: {
+ code: 3321232,
+ province: null
+ },
+ title: 'Warehouse',
+ state: 'CA'
+ }, {
+ address: {
+ one: '456 market street',
+ two: 'PO Box 5678'
+ },
+ zip: {
+ code: 9876,
+ province: null
+ },
+ title: 'Garage',
+ state: 'NY'
+ }];
+
+ it('transforms an object based on the input object', function (done) {
+
+ var result = Hoek.transform(source, {
+ 'person.address.lineOne': 'address.one',
+ 'person.address.lineTwo': 'address.two',
+ 'title': 'title',
+ 'person.address.region': 'state',
+ 'person.address.zip': 'zip.code',
+ 'person.address.location': 'zip.province'
+ });
+
+ expect(result).to.deep.equal({
+ person: {
+ address: {
+ lineOne: '123 main street',
+ lineTwo: 'PO Box 1234',
+ region: 'CA',
+ zip: 3321232,
+ location: null
+ }
+ },
+ title: 'Warehouse'
+ });
+
+ done();
+ });
+
+ it('transforms an array of objects based on the input object', function (done) {
+
+ var result = Hoek.transform(sourcesArray, {
+ 'person.address.lineOne': 'address.one',
+ 'person.address.lineTwo': 'address.two',
+ 'title': 'title',
+ 'person.address.region': 'state',
+ 'person.address.zip': 'zip.code',
+ 'person.address.location': 'zip.province'
+ });
+
+ expect(result).to.deep.equal([
+ {
+ person: {
+ address: {
+ lineOne: '123 main street',
+ lineTwo: 'PO Box 1234',
+ region: 'CA',
+ zip: 3321232,
+ location: null
+ }
+ },
+ title: 'Warehouse'
+ },
+ {
+ person: {
+ address: {
+ lineOne: '456 market street',
+ lineTwo: 'PO Box 5678',
+ region: 'NY',
+ zip: 9876,
+ location: null
+ }
+ },
+ title: 'Garage'
+ }
+ ]);
+
+ done();
+ });
+
+ it('uses the reach options passed into it', function (done) {
+
+ var schema = {
+ 'person.address.lineOne': 'address-one',
+ 'person.address.lineTwo': 'address-two',
+ 'title': 'title',
+ 'person.address.region': 'state',
+ 'person.prefix': 'person-title',
+ 'person.zip': 'zip-code'
+ };
+ var options = {
+ separator: '-',
+ default: 'unknown'
+ };
+ var result = Hoek.transform(source, schema, options);
+
+ expect(result).to.deep.equal({
+ person: {
+ address: {
+ lineOne: '123 main street',
+ lineTwo: 'PO Box 1234',
+ region: 'CA'
+ },
+ prefix: 'unknown',
+ zip: 3321232
+ },
+ title: 'Warehouse'
+ });
+
+ done();
+ });
+
+ it('works to create shallow objects', function (done) {
+
+ var result = Hoek.transform(source, {
+ lineOne: 'address.one',
+ lineTwo: 'address.two',
+ title: 'title',
+ region: 'state',
+ province: 'zip.province'
+ });
+
+ expect(result).to.deep.equal({
+ lineOne: '123 main street',
+ lineTwo: 'PO Box 1234',
+ title: 'Warehouse',
+ region: 'CA',
+ province: null
+ });
+
+ done();
+ });
+
+ it('only allows strings in the map', function (done) {
+
+ expect(function () {
+
+ var result = Hoek.transform(source, {
+ lineOne: {}
+ });
+ }).to.throw('All mappings must be "." delineated strings');
+
+ done();
+ });
+
+ it('throws an error on invalid arguments', function (done) {
+
+ expect(function () {
+
+ var result = Hoek.transform(NaN, {});
+ }).to.throw('Invalid source object: must be null, undefined, an object, or an array');
+
+ done();
+ });
+
+ it('is safe to pass null', function (done) {
+
+ var result = Hoek.transform(null, {});
+ expect(result).to.deep.equal({});
+
+ done();
+ });
+
+ it('is safe to pass undefined', function (done) {
+
+ var result = Hoek.transform(undefined, {});
+ expect(result).to.deep.equal({});
+
+ done();
+ });
+});
+
+describe('uniqueFilename()', function () {
+
+ it('generates a random file path', function (done) {
+
+ var result = Hoek.uniqueFilename('./test/modules');
+
+ expect(result).to.exist();
+ expect(result).to.be.a.string();
+ expect(result).to.contain('test/modules');
+ done();
+ });
+
+ it('is random enough to use in fast loops', function (done) {
+
+ var results = [];
+
+ for (var i = 0; i < 10; ++i) {
+ results[i] = Hoek.uniqueFilename('./test/modules');
+ }
+
+ var filter = results.filter(function (item, index, array) {
+
+ return array.indexOf(item) === index;
+ });
+
+ expect(filter.length).to.equal(10);
+ expect(results.length).to.equal(10);
+ done();
+
+ });
+
+ it('combines the random elements with a supplied character', function (done) {
+
+ var result = Hoek.uniqueFilename('./test', 'txt');
+
+ expect(result).to.contain('test/');
+ expect(result).to.contain('.txt');
+
+ done();
+ });
+
+ it('accepts extensions with a "." in it', function (done) {
+
+ var result = Hoek.uniqueFilename('./test', '.mp3');
+
+ expect(result).to.contain('test/');
+ expect(result).to.contain('.mp3');
+
+ done();
+ });
+});
+
+describe('stringify()', function (done) {
+
+ it('converts object to string', function (done) {
+
+ var obj = { a: 1 };
+ expect(Hoek.stringify(obj)).to.equal('{"a":1}');
+ done();
+ });
+
+ it('returns error in result string', function (done) {
+
+ var obj = { a: 1 };
+ obj.b = obj;
+ expect(Hoek.stringify(obj)).to.equal('[Cannot display object: Converting circular structure to JSON]');
+ done();
+ });
+});
+
+describe('shallow()', function (done) {
+
+ it('shallow copies an object', function (done) {
+
+ var obj = {
+ a: 5,
+ b: {
+ c: 6
+ }
+ };
+
+ var shallow = Hoek.shallow(obj);
+ expect(shallow).to.not.equal(obj);
+ expect(shallow).to.deep.equal(obj);
+ expect(shallow.b).to.equal(obj.b);
+ done();
+ });
+});
diff --git a/deps/npm/node_modules/hoek/test/modules/ignore.txt b/deps/npm/node_modules/hoek/test/modules/ignore.txt
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/deps/npm/node_modules/hoek/test/modules/ignore.txt
diff --git a/deps/npm/node_modules/hoek/test/modules/test1.js b/deps/npm/node_modules/hoek/test/modules/test1.js
new file mode 100644
index 0000000000..fa4e06abe0
--- /dev/null
+++ b/deps/npm/node_modules/hoek/test/modules/test1.js
@@ -0,0 +1 @@
+exports.x = 1;
diff --git a/deps/npm/node_modules/hoek/test/modules/test2.js b/deps/npm/node_modules/hoek/test/modules/test2.js
new file mode 100644
index 0000000000..88e9166e86
--- /dev/null
+++ b/deps/npm/node_modules/hoek/test/modules/test2.js
@@ -0,0 +1 @@
+exports.y = 2;
diff --git a/deps/npm/node_modules/hoek/test/modules/test3.js b/deps/npm/node_modules/hoek/test/modules/test3.js
new file mode 100644
index 0000000000..670e724a6e
--- /dev/null
+++ b/deps/npm/node_modules/hoek/test/modules/test3.js
@@ -0,0 +1 @@
+exports.z = 3;
diff --git a/deps/npm/node_modules/http-signature/lib/parser.js b/deps/npm/node_modules/http-signature/lib/parser.js
index 5994a7e987..7c841b3171 100644
--- a/deps/npm/node_modules/http-signature/lib/parser.js
+++ b/deps/npm/node_modules/http-signature/lib/parser.js
@@ -116,14 +116,11 @@ module.exports = {
}
assert.object(options, 'options');
assert.arrayOfString(options.headers, 'options.headers');
- assert.optionalFinite(options.clockSkew, 'options.clockSkew');
+ assert.optionalNumber(options.clockSkew, 'options.clockSkew');
- var authzHeaderName = options.authorizationHeaderName || 'authorization';
-
- if (!request.headers[authzHeaderName]) {
- throw new MissingHeaderError('no ' + authzHeaderName + ' header ' +
- 'present in the request');
- }
+ if (!request.headers.authorization)
+ throw new MissingHeaderError('no authorization header present in ' +
+ 'the request');
options.clockSkew = options.clockSkew || 300;
@@ -137,10 +134,18 @@ module.exports = {
var parsed = {
scheme: '',
params: {},
- signingString: ''
+ signingString: '',
+
+ get algorithm() {
+ return this.params.algorithm.toUpperCase();
+ },
+
+ get keyId() {
+ return this.params.keyId;
+ }
};
- var authz = request.headers[authzHeaderName];
+ var authz = request.headers.authorization;
for (i = 0; i < authz.length; i++) {
var c = authz.charAt(i);
@@ -297,7 +302,7 @@ module.exports = {
options.headers.forEach(function (hdr) {
// Remember that we already checked any headers in the params
// were in the request, so if this passes we're good.
- if (parsed.params.headers.indexOf(hdr.toLowerCase()) < 0)
+ if (parsed.params.headers.indexOf(hdr) < 0)
throw new MissingHeaderError(hdr + ' was not a signed header');
});
@@ -307,8 +312,6 @@ module.exports = {
' is not a supported algorithm');
}
- parsed.algorithm = parsed.params.algorithm.toUpperCase();
- parsed.keyId = parsed.params.keyId;
return parsed;
}
diff --git a/deps/npm/node_modules/http-signature/lib/signer.js b/deps/npm/node_modules/http-signature/lib/signer.js
index deb5878679..ef9946f77c 100644
--- a/deps/npm/node_modules/http-signature/lib/signer.js
+++ b/deps/npm/node_modules/http-signature/lib/signer.js
@@ -387,9 +387,7 @@ module.exports = {
assert.notStrictEqual(signature, '', 'empty signature produced');
}
- var authzHeaderName = options.authorizationHeaderName || 'Authorization';
-
- request.setHeader(authzHeaderName, sprintf(AUTHZ_FMT,
+ request.setHeader('Authorization', sprintf(AUTHZ_FMT,
options.keyId,
options.algorithm,
options.headers.join(' '),
diff --git a/deps/npm/node_modules/http-signature/package.json b/deps/npm/node_modules/http-signature/package.json
index 0b26544060..e1d19e429e 100644
--- a/deps/npm/node_modules/http-signature/package.json
+++ b/deps/npm/node_modules/http-signature/package.json
@@ -1,27 +1,27 @@
{
- "_from": "http-signature@~1.2.0",
- "_id": "http-signature@1.2.0",
+ "_from": "http-signature@~1.1.0",
+ "_id": "http-signature@1.1.1",
"_inBundle": false,
- "_integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
+ "_integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=",
"_location": "/http-signature",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "http-signature@~1.2.0",
+ "raw": "http-signature@~1.1.0",
"name": "http-signature",
"escapedName": "http-signature",
- "rawSpec": "~1.2.0",
+ "rawSpec": "~1.1.0",
"saveSpec": null,
- "fetchSpec": "~1.2.0"
+ "fetchSpec": "~1.1.0"
},
"_requiredBy": [
"/request"
],
- "_resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
- "_shasum": "9aecd925114772f3d95b65a60abb8f7c18fbace1",
- "_spec": "http-signature@~1.2.0",
- "_where": "/Users/rebecca/code/npm/node_modules/request",
+ "_resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz",
+ "_shasum": "df72e267066cd0ac67fb76adf8e134a8fbcf91bf",
+ "_spec": "http-signature@~1.1.0",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/request",
"author": {
"name": "Joyent, Inc"
},
@@ -44,15 +44,15 @@
}
],
"dependencies": {
- "assert-plus": "^1.0.0",
+ "assert-plus": "^0.2.0",
"jsprim": "^1.2.2",
"sshpk": "^1.7.0"
},
"deprecated": false,
"description": "Reference implementation of Joyent's HTTP Signature scheme.",
"devDependencies": {
- "tap": "0.4.2",
- "uuid": "^2.0.2"
+ "node-uuid": "^1.4.1",
+ "tap": "0.4.2"
},
"engines": {
"node": ">=0.8",
@@ -73,5 +73,15 @@
"scripts": {
"test": "tap test/*.js"
},
- "version": "1.2.0"
+ "version": "1.1.1",
+ "warnings": [
+ {
+ "code": "ENOTSUP",
+ "required": {
+ "node": ">=0.8",
+ "npm": ">=1.3.7"
+ },
+ "pkgid": "http-signature@1.1.1"
+ }
+ ]
}
diff --git a/deps/npm/node_modules/is-cidr/README.md b/deps/npm/node_modules/is-cidr/README.md
index 64ea8f5722..cd7c8c9686 100644
--- a/deps/npm/node_modules/is-cidr/README.md
+++ b/deps/npm/node_modules/is-cidr/README.md
@@ -35,11 +35,11 @@ Check if `input` is a IPv4 or IPv6 CIDR address.
### isCidr.v4(input)
-Check if `input` is IPv4 CIDR address.
+Check if `input` is a IPv4 CIDR address.
### isCidr.v6(input)
-Check if `input` is IPv6 CIDR address.
+Check if `input` is a IPv6 CIDR address.
## Related
diff --git a/deps/npm/node_modules/is-cidr/package.json b/deps/npm/node_modules/is-cidr/package.json
index 5499a0dca1..6f735158ab 100644
--- a/deps/npm/node_modules/is-cidr/package.json
+++ b/deps/npm/node_modules/is-cidr/package.json
@@ -1,31 +1,27 @@
{
- "_args": [
- [
- "is-cidr@2.0.5",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "is-cidr@2.0.5",
- "_id": "is-cidr@2.0.5",
+ "_from": "is-cidr@2.0.6",
+ "_id": "is-cidr@2.0.6",
"_inBundle": false,
- "_integrity": "sha512-KUGux04sdwBgpr/YREUyuefs4s1Ib4mRmOCIX1KdPnxjUCZMg13BXEp68Uw5IiDl3N4ZZtStDgPu4MWJxNBpKQ==",
+ "_integrity": "sha512-A578p1dV22TgPXn6NCaDAPj6vJvYsBgAzUrAd28a4oldeXJjWqEUuSZOLIW3im51mazOKsoyVp8NU/OItlWacw==",
"_location": "/is-cidr",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "is-cidr@2.0.5",
+ "raw": "is-cidr@2.0.6",
"name": "is-cidr",
"escapedName": "is-cidr",
- "rawSpec": "2.0.5",
+ "rawSpec": "2.0.6",
"saveSpec": null,
- "fetchSpec": "2.0.5"
+ "fetchSpec": "2.0.6"
},
"_requiredBy": [
+ "#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/is-cidr/-/is-cidr-2.0.5.tgz",
- "_spec": "2.0.5",
+ "_resolved": "https://registry.npmjs.org/is-cidr/-/is-cidr-2.0.6.tgz",
+ "_shasum": "4b01c9693d8e18399dacd18a4f3d60ea5871ac60",
+ "_spec": "is-cidr@2.0.6",
"_where": "/Users/rebecca/code/npm",
"author": {
"name": "silverwind",
@@ -34,6 +30,7 @@
"bugs": {
"url": "https://github.com/silverwind/is-cidr/issues"
},
+ "bundleDependencies": false,
"contributors": [
{
"name": "Felipe Apostol",
@@ -44,12 +41,13 @@
"dependencies": {
"cidr-regex": "^2.0.8"
},
+ "deprecated": false,
"description": "Check if a string is an IP address in CIDR notation",
"devDependencies": {
"ava": "^0.25.0",
- "eslint": "^4.18.2",
- "eslint-config-silverwind": "^1.0.37",
- "updates": "^2.3.1"
+ "eslint": "^4.19.1",
+ "eslint-config-silverwind": "^1.0.42",
+ "updates": "^3.0.0"
},
"engines": {
"node": ">=4"
@@ -77,5 +75,5 @@
"scripts": {
"test": "make test"
},
- "version": "2.0.5"
+ "version": "2.0.6"
}
diff --git a/deps/npm/node_modules/is-fullwidth-code-point/index.js b/deps/npm/node_modules/is-fullwidth-code-point/index.js
index d506327c3e..a7d3e3855f 100644
--- a/deps/npm/node_modules/is-fullwidth-code-point/index.js
+++ b/deps/npm/node_modules/is-fullwidth-code-point/index.js
@@ -1,46 +1,46 @@
'use strict';
-/* eslint-disable yoda */
-module.exports = x => {
- if (Number.isNaN(x)) {
+var numberIsNan = require('number-is-nan');
+
+module.exports = function (x) {
+ if (numberIsNan(x)) {
return false;
}
+ // https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1369
+
// code points are derived from:
// http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
- if (
- x >= 0x1100 && (
- x <= 0x115f || // Hangul Jamo
- x === 0x2329 || // LEFT-POINTING ANGLE BRACKET
- x === 0x232a || // RIGHT-POINTING ANGLE BRACKET
- // CJK Radicals Supplement .. Enclosed CJK Letters and Months
- (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) ||
- // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
- (0x3250 <= x && x <= 0x4dbf) ||
- // CJK Unified Ideographs .. Yi Radicals
- (0x4e00 <= x && x <= 0xa4c6) ||
- // Hangul Jamo Extended-A
- (0xa960 <= x && x <= 0xa97c) ||
- // Hangul Syllables
- (0xac00 <= x && x <= 0xd7a3) ||
- // CJK Compatibility Ideographs
- (0xf900 <= x && x <= 0xfaff) ||
- // Vertical Forms
- (0xfe10 <= x && x <= 0xfe19) ||
- // CJK Compatibility Forms .. Small Form Variants
- (0xfe30 <= x && x <= 0xfe6b) ||
- // Halfwidth and Fullwidth Forms
- (0xff01 <= x && x <= 0xff60) ||
- (0xffe0 <= x && x <= 0xffe6) ||
- // Kana Supplement
- (0x1b000 <= x && x <= 0x1b001) ||
- // Enclosed Ideographic Supplement
- (0x1f200 <= x && x <= 0x1f251) ||
- // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
- (0x20000 <= x && x <= 0x3fffd)
- )
- ) {
+ if (x >= 0x1100 && (
+ x <= 0x115f || // Hangul Jamo
+ 0x2329 === x || // LEFT-POINTING ANGLE BRACKET
+ 0x232a === x || // RIGHT-POINTING ANGLE BRACKET
+ // CJK Radicals Supplement .. Enclosed CJK Letters and Months
+ (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) ||
+ // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
+ 0x3250 <= x && x <= 0x4dbf ||
+ // CJK Unified Ideographs .. Yi Radicals
+ 0x4e00 <= x && x <= 0xa4c6 ||
+ // Hangul Jamo Extended-A
+ 0xa960 <= x && x <= 0xa97c ||
+ // Hangul Syllables
+ 0xac00 <= x && x <= 0xd7a3 ||
+ // CJK Compatibility Ideographs
+ 0xf900 <= x && x <= 0xfaff ||
+ // Vertical Forms
+ 0xfe10 <= x && x <= 0xfe19 ||
+ // CJK Compatibility Forms .. Small Form Variants
+ 0xfe30 <= x && x <= 0xfe6b ||
+ // Halfwidth and Fullwidth Forms
+ 0xff01 <= x && x <= 0xff60 ||
+ 0xffe0 <= x && x <= 0xffe6 ||
+ // Kana Supplement
+ 0x1b000 <= x && x <= 0x1b001 ||
+ // Enclosed Ideographic Supplement
+ 0x1f200 <= x && x <= 0x1f251 ||
+ // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
+ 0x20000 <= x && x <= 0x3fffd)) {
return true;
}
return false;
-};
+}
diff --git a/deps/npm/node_modules/is-fullwidth-code-point/package.json b/deps/npm/node_modules/is-fullwidth-code-point/package.json
index 1e2f373437..e73475abce 100644
--- a/deps/npm/node_modules/is-fullwidth-code-point/package.json
+++ b/deps/npm/node_modules/is-fullwidth-code-point/package.json
@@ -1,28 +1,28 @@
{
- "_from": "is-fullwidth-code-point@^2.0.0",
- "_id": "is-fullwidth-code-point@2.0.0",
+ "_from": "is-fullwidth-code-point@1.0.0",
+ "_id": "is-fullwidth-code-point@1.0.0",
"_inBundle": false,
- "_integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "_integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"_location": "/is-fullwidth-code-point",
"_phantomChildren": {},
"_requested": {
- "type": "range",
+ "type": "version",
"registry": true,
- "raw": "is-fullwidth-code-point@^2.0.0",
+ "raw": "is-fullwidth-code-point@1.0.0",
"name": "is-fullwidth-code-point",
"escapedName": "is-fullwidth-code-point",
- "rawSpec": "^2.0.0",
+ "rawSpec": "1.0.0",
"saveSpec": null,
- "fetchSpec": "^2.0.0"
+ "fetchSpec": "1.0.0"
},
"_requiredBy": [
- "/slice-ansi",
- "/string-width"
+ "#USER",
+ "/"
],
- "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "_shasum": "a3b30a5c4f199183167aaab93beefae3ddfb654f",
- "_spec": "is-fullwidth-code-point@^2.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/string-width",
+ "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
+ "_shasum": "ef9e31386f031a7f0d643af82fde50c457ef00cb",
+ "_spec": "is-fullwidth-code-point@1.0.0",
+ "_where": "/Users/rebecca/code/npm",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
@@ -32,14 +32,17 @@
"url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues"
},
"bundleDependencies": false,
+ "dependencies": {
+ "number-is-nan": "^1.0.0"
+ },
"deprecated": false,
"description": "Check if the character represented by a given Unicode code point is fullwidth",
"devDependencies": {
- "ava": "*",
- "xo": "*"
+ "ava": "0.0.4",
+ "code-point-at": "^1.0.0"
},
"engines": {
- "node": ">=4"
+ "node": ">=0.10.0"
},
"files": [
"index.js"
@@ -69,10 +72,7 @@
"url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git"
},
"scripts": {
- "test": "xo && ava"
+ "test": "node test.js"
},
- "version": "2.0.0",
- "xo": {
- "esnext": true
- }
+ "version": "1.0.0"
}
diff --git a/deps/npm/node_modules/is-fullwidth-code-point/readme.md b/deps/npm/node_modules/is-fullwidth-code-point/readme.md
index 093b0281b2..4936464b1b 100644
--- a/deps/npm/node_modules/is-fullwidth-code-point/readme.md
+++ b/deps/npm/node_modules/is-fullwidth-code-point/readme.md
@@ -13,7 +13,7 @@ $ npm install --save is-fullwidth-code-point
## Usage
```js
-const isFullwidthCodePoint = require('is-fullwidth-code-point');
+var isFullwidthCodePoint = require('is-fullwidth-code-point');
isFullwidthCodePoint('谢'.codePointAt());
//=> true
@@ -36,4 +36,4 @@ Type: `number`
## License
-MIT © [Sindre Sorhus](https://sindresorhus.com)
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/json-schema-traverse/.eslintrc.yml b/deps/npm/node_modules/json-schema-traverse/.eslintrc.yml
deleted file mode 100644
index ab1762da9c..0000000000
--- a/deps/npm/node_modules/json-schema-traverse/.eslintrc.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-extends: eslint:recommended
-env:
- node: true
- browser: true
-rules:
- block-scoped-var: 2
- complexity: [2, 13]
- curly: [2, multi-or-nest, consistent]
- dot-location: [2, property]
- dot-notation: 2
- indent: [2, 2, SwitchCase: 1]
- linebreak-style: [2, unix]
- new-cap: 2
- no-console: [2, allow: [warn, error]]
- no-else-return: 2
- no-eq-null: 2
- no-fallthrough: 2
- no-invalid-this: 2
- no-return-assign: 2
- no-shadow: 1
- no-trailing-spaces: 2
- no-use-before-define: [2, nofunc]
- quotes: [2, single, avoid-escape]
- semi: [2, always]
- strict: [2, global]
- valid-jsdoc: [2, requireReturn: false]
- no-control-regex: 0
diff --git a/deps/npm/node_modules/json-schema-traverse/.npmignore b/deps/npm/node_modules/json-schema-traverse/.npmignore
deleted file mode 100644
index d093557930..0000000000
--- a/deps/npm/node_modules/json-schema-traverse/.npmignore
+++ /dev/null
@@ -1,60 +0,0 @@
-# Logs
-logs
-*.log
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-
-# Runtime data
-pids
-*.pid
-*.seed
-*.pid.lock
-
-# Directory for instrumented libs generated by jscoverage/JSCover
-lib-cov
-
-# Coverage directory used by tools like istanbul
-coverage
-
-# nyc test coverage
-.nyc_output
-
-# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
-.grunt
-
-# Bower dependency directory (https://bower.io/)
-bower_components
-
-# node-waf configuration
-.lock-wscript
-
-# Compiled binary addons (http://nodejs.org/api/addons.html)
-build/Release
-
-# Dependency directories
-node_modules/
-jspm_packages/
-
-# Typescript v1 declaration files
-typings/
-
-# Optional npm cache directory
-.npm
-
-# Optional eslint cache
-.eslintcache
-
-# Optional REPL history
-.node_repl_history
-
-# Output of 'npm pack'
-*.tgz
-
-# Yarn Integrity file
-.yarn-integrity
-
-# dotenv environment variables file
-.env
-
-.DS_Store
diff --git a/deps/npm/node_modules/json-schema-traverse/.travis.yml b/deps/npm/node_modules/json-schema-traverse/.travis.yml
deleted file mode 100644
index 7ddce74b84..0000000000
--- a/deps/npm/node_modules/json-schema-traverse/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
- - "4"
- - "6"
- - "7"
- - "8"
-after_script:
- - coveralls < coverage/lcov.info
diff --git a/deps/npm/node_modules/json-schema-traverse/LICENSE b/deps/npm/node_modules/json-schema-traverse/LICENSE
deleted file mode 100644
index 7f1543566f..0000000000
--- a/deps/npm/node_modules/json-schema-traverse/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2017 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/deps/npm/node_modules/json-schema-traverse/README.md b/deps/npm/node_modules/json-schema-traverse/README.md
deleted file mode 100644
index d4286a23b3..0000000000
--- a/deps/npm/node_modules/json-schema-traverse/README.md
+++ /dev/null
@@ -1,69 +0,0 @@
-# json-schema-traverse
-Traverse JSON Schema passing each schema object to callback
-
-[![Build Status](https://travis-ci.org/epoberezkin/json-schema-traverse.svg?branch=master)](https://travis-ci.org/epoberezkin/json-schema-traverse)
-[![npm version](https://badge.fury.io/js/json-schema-traverse.svg)](https://www.npmjs.com/package/json-schema-traverse)
-[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/json-schema-traverse/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/json-schema-traverse?branch=master)
-
-
-## Install
-
-```
-npm install json-schema-traverse
-```
-
-
-## Usage
-
-```javascript
-const traverse = require('json-schema-traverse');
-const schema = {
- properties: {
- foo: {type: 'string'},
- bar: {type: 'integer'}
- }
-};
-
-traverse(schema, cb);
-// cb is called 3 times with:
-// 1. root schema
-// 2. {type: 'string'}
-// 3. {type: 'integer'}
-```
-
-Callback function is called for each schema object (not including draft-06 boolean schemas), including the root schema. Schema references ($ref) are not resolved, they are passed as is.
-
-Callback is passed these parameters:
-
-- _schema_: the current schema object
-- _JSON pointer_: from the root schema to the current schema object
-- _root schema_: the schema passed to `traverse` object
-- _parent JSON pointer_: from the root schema to the parent schema object (see below)
-- _parent keyword_: the keyword inside which this schema appears (e.g. `properties`, `anyOf`, etc.)
-- _parent schema_: not necessarily parent object/array; in the example above the parent schema for `{type: 'string'}` is the root schema
-- _index/property_: index or property name in the array/object containing multiple schemas; in the example above for `{type: 'string'}` the property name is `'foo'`
-
-
-## Traverse objects in all unknown keywords
-
-```javascript
-const traverse = require('json-schema-traverse');
-const schema = {
- mySchema: {
- minimum: 1,
- maximum: 2
- }
-};
-
-traverse(schema, {allKeys: true}, cb);
-// cb is called 2 times with:
-// 1. root schema
-// 2. mySchema
-```
-
-Without option `allKeys: true` callback will be called only with root schema.
-
-
-## License
-
-[MIT](https://github.com/epoberezkin/json-schema-traverse/blob/master/LICENSE)
diff --git a/deps/npm/node_modules/json-schema-traverse/index.js b/deps/npm/node_modules/json-schema-traverse/index.js
deleted file mode 100644
index 79eeb6a05e..0000000000
--- a/deps/npm/node_modules/json-schema-traverse/index.js
+++ /dev/null
@@ -1,81 +0,0 @@
-'use strict';
-
-var traverse = module.exports = function (schema, opts, cb) {
- if (typeof opts == 'function') {
- cb = opts;
- opts = {};
- }
- _traverse(opts, cb, schema, '', schema);
-};
-
-
-traverse.keywords = {
- additionalItems: true,
- items: true,
- contains: true,
- additionalProperties: true,
- propertyNames: true,
- not: true
-};
-
-traverse.arrayKeywords = {
- items: true,
- allOf: true,
- anyOf: true,
- oneOf: true
-};
-
-traverse.propsKeywords = {
- definitions: true,
- properties: true,
- patternProperties: true,
- dependencies: true
-};
-
-traverse.skipKeywords = {
- enum: true,
- const: true,
- required: true,
- maximum: true,
- minimum: true,
- exclusiveMaximum: true,
- exclusiveMinimum: true,
- multipleOf: true,
- maxLength: true,
- minLength: true,
- pattern: true,
- format: true,
- maxItems: true,
- minItems: true,
- uniqueItems: true,
- maxProperties: true,
- minProperties: true
-};
-
-
-function _traverse(opts, cb, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
- if (schema && typeof schema == 'object' && !Array.isArray(schema)) {
- cb(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
- for (var key in schema) {
- var sch = schema[key];
- if (Array.isArray(sch)) {
- if (key in traverse.arrayKeywords) {
- for (var i=0; i<sch.length; i++)
- _traverse(opts, cb, sch[i], jsonPtr + '/' + key + '/' + i, rootSchema, jsonPtr, key, schema, i);
- }
- } else if (key in traverse.propsKeywords) {
- if (sch && typeof sch == 'object') {
- for (var prop in sch)
- _traverse(opts, cb, sch[prop], jsonPtr + '/' + key + '/' + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);
- }
- } else if (key in traverse.keywords || (opts.allKeys && !(key in traverse.skipKeywords))) {
- _traverse(opts, cb, sch, jsonPtr + '/' + key, rootSchema, jsonPtr, key, schema);
- }
- }
- }
-}
-
-
-function escapeJsonPtr(str) {
- return str.replace(/~/g, '~0').replace(/\//g, '~1');
-}
diff --git a/deps/npm/node_modules/json-schema-traverse/package.json b/deps/npm/node_modules/json-schema-traverse/package.json
deleted file mode 100644
index 70b1256a3c..0000000000
--- a/deps/npm/node_modules/json-schema-traverse/package.json
+++ /dev/null
@@ -1,70 +0,0 @@
-{
- "_from": "json-schema-traverse@^0.3.0",
- "_id": "json-schema-traverse@0.3.1",
- "_inBundle": false,
- "_integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=",
- "_location": "/json-schema-traverse",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "json-schema-traverse@^0.3.0",
- "name": "json-schema-traverse",
- "escapedName": "json-schema-traverse",
- "rawSpec": "^0.3.0",
- "saveSpec": null,
- "fetchSpec": "^0.3.0"
- },
- "_requiredBy": [
- "/ajv"
- ],
- "_resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
- "_shasum": "349a6d44c53a51de89b40805c5d5e59b417d3340",
- "_spec": "json-schema-traverse@^0.3.0",
- "_where": "/Users/rebecca/code/npm/node_modules/ajv",
- "author": {
- "name": "Evgeny Poberezkin"
- },
- "bugs": {
- "url": "https://github.com/epoberezkin/json-schema-traverse/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Traverse JSON Schema passing each schema object to callback",
- "devDependencies": {
- "coveralls": "^2.13.1",
- "eslint": "^3.19.0",
- "mocha": "^3.4.2",
- "nyc": "^11.0.2",
- "pre-commit": "^1.2.2"
- },
- "homepage": "https://github.com/epoberezkin/json-schema-traverse#readme",
- "keywords": [
- "JSON-Schema",
- "traverse",
- "iterate"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "json-schema-traverse",
- "nyc": {
- "exclude": [
- "**/spec/**",
- "node_modules"
- ],
- "reporter": [
- "lcov",
- "text-summary"
- ]
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/epoberezkin/json-schema-traverse.git"
- },
- "scripts": {
- "eslint": "eslint index.js spec",
- "test": "npm run eslint && nyc npm run test-spec",
- "test-spec": "mocha spec -R spec"
- },
- "version": "0.3.1"
-}
diff --git a/deps/npm/node_modules/json-schema-traverse/spec/.eslintrc.yml b/deps/npm/node_modules/json-schema-traverse/spec/.eslintrc.yml
deleted file mode 100644
index 3344da7eb3..0000000000
--- a/deps/npm/node_modules/json-schema-traverse/spec/.eslintrc.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-parserOptions:
- ecmaVersion: 6
-globals:
- beforeEach: false
- describe: false
- it: false
diff --git a/deps/npm/node_modules/json-schema-traverse/spec/fixtures/schema.js b/deps/npm/node_modules/json-schema-traverse/spec/fixtures/schema.js
deleted file mode 100644
index c51430cdc3..0000000000
--- a/deps/npm/node_modules/json-schema-traverse/spec/fixtures/schema.js
+++ /dev/null
@@ -1,125 +0,0 @@
-'use strict';
-
-var schema = {
- additionalItems: subschema('additionalItems'),
- items: subschema('items'),
- contains: subschema('contains'),
- additionalProperties: subschema('additionalProperties'),
- propertyNames: subschema('propertyNames'),
- not: subschema('not'),
- allOf: [
- subschema('allOf_0'),
- subschema('allOf_1'),
- {
- items: [
- subschema('items_0'),
- subschema('items_1'),
- ]
- }
- ],
- anyOf: [
- subschema('anyOf_0'),
- subschema('anyOf_1'),
- ],
- oneOf: [
- subschema('oneOf_0'),
- subschema('oneOf_1'),
- ],
- definitions: {
- foo: subschema('definitions_foo'),
- bar: subschema('definitions_bar'),
- },
- properties: {
- foo: subschema('properties_foo'),
- bar: subschema('properties_bar'),
- },
- patternProperties: {
- foo: subschema('patternProperties_foo'),
- bar: subschema('patternProperties_bar'),
- },
- dependencies: {
- foo: subschema('dependencies_foo'),
- bar: subschema('dependencies_bar'),
- },
- required: ['foo', 'bar']
-};
-
-
-function subschema(keyword) {
- var sch = {
- properties: {},
- additionalProperties: false,
- additionalItems: false,
- anyOf: [
- {format: 'email'},
- {format: 'hostname'}
- ]
- };
- sch.properties['foo_' + keyword] = {title: 'foo'};
- sch.properties['bar_' + keyword] = {title: 'bar'};
- return sch;
-}
-
-
-module.exports = {
- schema: schema,
-
- // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex
- expectedCalls: [[schema, '', schema, undefined, undefined, undefined, undefined]]
- .concat(expectedCalls('additionalItems'))
- .concat(expectedCalls('items'))
- .concat(expectedCalls('contains'))
- .concat(expectedCalls('additionalProperties'))
- .concat(expectedCalls('propertyNames'))
- .concat(expectedCalls('not'))
- .concat(expectedCallsChild('allOf', 0))
- .concat(expectedCallsChild('allOf', 1))
- .concat([
- [schema.allOf[2], '/allOf/2', schema, '', 'allOf', schema, 2],
- [schema.allOf[2].items[0], '/allOf/2/items/0', schema, '/allOf/2', 'items', schema.allOf[2], 0],
- [schema.allOf[2].items[0].properties.foo_items_0, '/allOf/2/items/0/properties/foo_items_0', schema, '/allOf/2/items/0', 'properties', schema.allOf[2].items[0], 'foo_items_0'],
- [schema.allOf[2].items[0].properties.bar_items_0, '/allOf/2/items/0/properties/bar_items_0', schema, '/allOf/2/items/0', 'properties', schema.allOf[2].items[0], 'bar_items_0'],
- [schema.allOf[2].items[0].anyOf[0], '/allOf/2/items/0/anyOf/0', schema, '/allOf/2/items/0', 'anyOf', schema.allOf[2].items[0], 0],
- [schema.allOf[2].items[0].anyOf[1], '/allOf/2/items/0/anyOf/1', schema, '/allOf/2/items/0', 'anyOf', schema.allOf[2].items[0], 1],
-
- [schema.allOf[2].items[1], '/allOf/2/items/1', schema, '/allOf/2', 'items', schema.allOf[2], 1],
- [schema.allOf[2].items[1].properties.foo_items_1, '/allOf/2/items/1/properties/foo_items_1', schema, '/allOf/2/items/1', 'properties', schema.allOf[2].items[1], 'foo_items_1'],
- [schema.allOf[2].items[1].properties.bar_items_1, '/allOf/2/items/1/properties/bar_items_1', schema, '/allOf/2/items/1', 'properties', schema.allOf[2].items[1], 'bar_items_1'],
- [schema.allOf[2].items[1].anyOf[0], '/allOf/2/items/1/anyOf/0', schema, '/allOf/2/items/1', 'anyOf', schema.allOf[2].items[1], 0],
- [schema.allOf[2].items[1].anyOf[1], '/allOf/2/items/1/anyOf/1', schema, '/allOf/2/items/1', 'anyOf', schema.allOf[2].items[1], 1]
- ])
- .concat(expectedCallsChild('anyOf', 0))
- .concat(expectedCallsChild('anyOf', 1))
- .concat(expectedCallsChild('oneOf', 0))
- .concat(expectedCallsChild('oneOf', 1))
- .concat(expectedCallsChild('definitions', 'foo'))
- .concat(expectedCallsChild('definitions', 'bar'))
- .concat(expectedCallsChild('properties', 'foo'))
- .concat(expectedCallsChild('properties', 'bar'))
- .concat(expectedCallsChild('patternProperties', 'foo'))
- .concat(expectedCallsChild('patternProperties', 'bar'))
- .concat(expectedCallsChild('dependencies', 'foo'))
- .concat(expectedCallsChild('dependencies', 'bar'))
-};
-
-
-function expectedCalls(keyword) {
- return [
- [schema[keyword], `/${keyword}`, schema, '', keyword, schema, undefined],
- [schema[keyword].properties[`foo_${keyword}`], `/${keyword}/properties/foo_${keyword}`, schema, `/${keyword}`, 'properties', schema[keyword], `foo_${keyword}`],
- [schema[keyword].properties[`bar_${keyword}`], `/${keyword}/properties/bar_${keyword}`, schema, `/${keyword}`, 'properties', schema[keyword], `bar_${keyword}`],
- [schema[keyword].anyOf[0], `/${keyword}/anyOf/0`, schema, `/${keyword}`, 'anyOf', schema[keyword], 0],
- [schema[keyword].anyOf[1], `/${keyword}/anyOf/1`, schema, `/${keyword}`, 'anyOf', schema[keyword], 1]
- ];
-}
-
-
-function expectedCallsChild(keyword, i) {
- return [
- [schema[keyword][i], `/${keyword}/${i}`, schema, '', keyword, schema, i],
- [schema[keyword][i].properties[`foo_${keyword}_${i}`], `/${keyword}/${i}/properties/foo_${keyword}_${i}`, schema, `/${keyword}/${i}`, 'properties', schema[keyword][i], `foo_${keyword}_${i}`],
- [schema[keyword][i].properties[`bar_${keyword}_${i}`], `/${keyword}/${i}/properties/bar_${keyword}_${i}`, schema, `/${keyword}/${i}`, 'properties', schema[keyword][i], `bar_${keyword}_${i}`],
- [schema[keyword][i].anyOf[0], `/${keyword}/${i}/anyOf/0`, schema, `/${keyword}/${i}`, 'anyOf', schema[keyword][i], 0],
- [schema[keyword][i].anyOf[1], `/${keyword}/${i}/anyOf/1`, schema, `/${keyword}/${i}`, 'anyOf', schema[keyword][i], 1]
- ];
-}
diff --git a/deps/npm/node_modules/json-schema-traverse/spec/index.spec.js b/deps/npm/node_modules/json-schema-traverse/spec/index.spec.js
deleted file mode 100644
index 7e66143d39..0000000000
--- a/deps/npm/node_modules/json-schema-traverse/spec/index.spec.js
+++ /dev/null
@@ -1,102 +0,0 @@
-'use strict';
-
-var traverse = require('../index');
-var assert = require('assert');
-
-describe('json-schema-traverse', function() {
- var calls;
-
- beforeEach(function() {
- calls = [];
- });
-
- it('should traverse all keywords containing schemas recursively', function() {
- var schema = require('./fixtures/schema').schema;
- var expectedCalls = require('./fixtures/schema').expectedCalls;
-
- traverse(schema, callback);
- assert.deepStrictEqual(calls, expectedCalls);
- });
-
-
- describe('allKeys option', function() {
- var schema = {
- someObject: {
- minimum: 1,
- maximum: 2
- }
- };
-
- it('should traverse objects with allKeys: true option', function() {
- // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex
- var expectedCalls = [
- [schema, '', schema, undefined, undefined, undefined, undefined],
- [schema.someObject, '/someObject', schema, '', 'someObject', schema, undefined]
- ];
-
- traverse(schema, {allKeys: true}, callback);
- assert.deepStrictEqual(calls, expectedCalls);
- });
-
-
- it('should NOT traverse objects with allKeys: false option', function() {
- // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex
- var expectedCalls = [
- [schema, '', schema, undefined, undefined, undefined, undefined]
- ];
-
- traverse(schema, {allKeys: false}, callback);
- assert.deepStrictEqual(calls, expectedCalls);
- });
-
-
- it('should NOT traverse objects without allKeys option', function() {
- // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex
- var expectedCalls = [
- [schema, '', schema, undefined, undefined, undefined, undefined]
- ];
-
- traverse(schema, callback);
- assert.deepStrictEqual(calls, expectedCalls);
- });
-
-
- it('should NOT travers objects in standard keywords which value is not a schema', function() {
- var schema2 = {
- const: {foo: 'bar'},
- enum: ['a', 'b'],
- required: ['foo'],
- another: {
-
- },
- patternProperties: {}, // will not traverse - no properties
- dependencies: true, // will not traverse - invalid
- properties: {
- smaller: {
- type: 'number'
- },
- larger: {
- type: 'number',
- minimum: {$data: '1/smaller'}
- }
- }
- };
-
- // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex
- var expectedCalls = [
- [schema2, '', schema2, undefined, undefined, undefined, undefined],
- [schema2.another, '/another', schema2, '', 'another', schema2, undefined],
- [schema2.properties.smaller, '/properties/smaller', schema2, '', 'properties', schema2, 'smaller'],
- [schema2.properties.larger, '/properties/larger', schema2, '', 'properties', schema2, 'larger'],
- ];
-
- traverse(schema2, {allKeys: true}, callback);
- assert.deepStrictEqual(calls, expectedCalls);
- });
- });
-
-
- function callback() {
- calls.push(Array.prototype.slice.call(arguments));
- }
-});
diff --git a/deps/npm/node_modules/json-stable-stringify/.npmignore b/deps/npm/node_modules/json-stable-stringify/.npmignore
new file mode 100644
index 0000000000..3c3629e647
--- /dev/null
+++ b/deps/npm/node_modules/json-stable-stringify/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/deps/npm/node_modules/npm-profile/node_modules/pump/.travis.yml b/deps/npm/node_modules/json-stable-stringify/.travis.yml
index 17f94330e7..cc4dba29d9 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/pump/.travis.yml
+++ b/deps/npm/node_modules/json-stable-stringify/.travis.yml
@@ -1,5 +1,4 @@
language: node_js
node_js:
+ - "0.8"
- "0.10"
-
-script: "npm test"
diff --git a/deps/npm/node_modules/fast-json-stable-stringify/LICENSE b/deps/npm/node_modules/json-stable-stringify/LICENSE
index ee27ba4b44..ee27ba4b44 100644
--- a/deps/npm/node_modules/fast-json-stable-stringify/LICENSE
+++ b/deps/npm/node_modules/json-stable-stringify/LICENSE
diff --git a/deps/npm/node_modules/fast-json-stable-stringify/example/key_cmp.js b/deps/npm/node_modules/json-stable-stringify/example/key_cmp.js
index d5f66752d8..d5f66752d8 100644
--- a/deps/npm/node_modules/fast-json-stable-stringify/example/key_cmp.js
+++ b/deps/npm/node_modules/json-stable-stringify/example/key_cmp.js
diff --git a/deps/npm/node_modules/fast-json-stable-stringify/example/nested.js b/deps/npm/node_modules/json-stable-stringify/example/nested.js
index 9a672fc65f..9a672fc65f 100644
--- a/deps/npm/node_modules/fast-json-stable-stringify/example/nested.js
+++ b/deps/npm/node_modules/json-stable-stringify/example/nested.js
diff --git a/deps/npm/node_modules/fast-json-stable-stringify/example/str.js b/deps/npm/node_modules/json-stable-stringify/example/str.js
index 9b4b3cd289..9b4b3cd289 100644
--- a/deps/npm/node_modules/fast-json-stable-stringify/example/str.js
+++ b/deps/npm/node_modules/json-stable-stringify/example/str.js
diff --git a/deps/npm/node_modules/fast-json-stable-stringify/example/value_cmp.js b/deps/npm/node_modules/json-stable-stringify/example/value_cmp.js
index 09f1c5f79b..09f1c5f79b 100644
--- a/deps/npm/node_modules/fast-json-stable-stringify/example/value_cmp.js
+++ b/deps/npm/node_modules/json-stable-stringify/example/value_cmp.js
diff --git a/deps/npm/node_modules/json-stable-stringify/index.js b/deps/npm/node_modules/json-stable-stringify/index.js
new file mode 100644
index 0000000000..6a4131d44e
--- /dev/null
+++ b/deps/npm/node_modules/json-stable-stringify/index.js
@@ -0,0 +1,84 @@
+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;
+};
diff --git a/deps/npm/node_modules/json-stable-stringify/package.json b/deps/npm/node_modules/json-stable-stringify/package.json
new file mode 100644
index 0000000000..eca371269c
--- /dev/null
+++ b/deps/npm/node_modules/json-stable-stringify/package.json
@@ -0,0 +1,74 @@
+{
+ "_from": "json-stable-stringify@^1.0.1",
+ "_id": "json-stable-stringify@1.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=",
+ "_location": "/json-stable-stringify",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "json-stable-stringify@^1.0.1",
+ "name": "json-stable-stringify",
+ "escapedName": "json-stable-stringify",
+ "rawSpec": "^1.0.1",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.1"
+ },
+ "_requiredBy": [
+ "/har-validator/ajv"
+ ],
+ "_resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
+ "_shasum": "9a759d39c5f2ff503fd5300646ed445f88c4f9af",
+ "_spec": "json-stable-stringify@^1.0.1",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/har-validator/node_modules/ajv",
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "bugs": {
+ "url": "https://github.com/substack/json-stable-stringify/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "jsonify": "~0.0.0"
+ },
+ "deprecated": false,
+ "description": "deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results",
+ "devDependencies": {
+ "tape": "~1.0.4"
+ },
+ "homepage": "https://github.com/substack/json-stable-stringify",
+ "keywords": [
+ "json",
+ "stringify",
+ "deterministic",
+ "hash",
+ "sort",
+ "stable"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "json-stable-stringify",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/substack/json-stable-stringify.git"
+ },
+ "scripts": {
+ "test": "tape test/*.js"
+ },
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/8..latest",
+ "ff/5",
+ "ff/latest",
+ "chrome/15",
+ "chrome/latest",
+ "safari/latest",
+ "opera/latest"
+ ]
+ },
+ "version": "1.0.1"
+}
diff --git a/deps/npm/node_modules/json-stable-stringify/readme.markdown b/deps/npm/node_modules/json-stable-stringify/readme.markdown
new file mode 100644
index 0000000000..406c3c7261
--- /dev/null
+++ b/deps/npm/node_modules/json-stable-stringify/readme.markdown
@@ -0,0 +1,130 @@
+# json-stable-stringify
+
+deterministic version of `JSON.stringify()` so you can get a consistent hash
+from stringified results
+
+You can also pass in a custom comparison function.
+
+[![browser support](https://ci.testling.com/substack/json-stable-stringify.png)](https://ci.testling.com/substack/json-stable-stringify)
+
+[![build status](https://secure.travis-ci.org/substack/json-stable-stringify.png)](http://travis-ci.org/substack/json-stable-stringify)
+
+# example
+
+``` js
+var stringify = require('json-stable-stringify');
+var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
+console.log(stringify(obj));
+```
+
+output:
+
+```
+{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}
+```
+
+# methods
+
+``` js
+var stringify = require('json-stable-stringify')
+```
+
+## var str = stringify(obj, opts)
+
+Return a deterministic stringified string `str` from the object `obj`.
+
+## options
+
+### cmp
+
+If `opts` is given, you can supply an `opts.cmp` to have a custom comparison
+function for object keys. Your function `opts.cmp` is called with these
+parameters:
+
+``` js
+opts.cmp({ key: akey, value: avalue }, { key: bkey, value: bvalue })
+```
+
+For example, to sort on the object key names in reverse order you could write:
+
+``` js
+var stringify = require('json-stable-stringify');
+
+var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
+var s = stringify(obj, function (a, b) {
+ return a.key < b.key ? 1 : -1;
+});
+console.log(s);
+```
+
+which results in the output string:
+
+```
+{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}
+```
+
+Or if you wanted to sort on the object values in reverse order, you could write:
+
+```
+var stringify = require('json-stable-stringify');
+
+var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 };
+var s = stringify(obj, function (a, b) {
+ return a.value < b.value ? 1 : -1;
+});
+console.log(s);
+```
+
+which outputs:
+
+```
+{"d":6,"c":5,"b":[{"z":3,"y":2,"x":1},9],"a":10}
+```
+
+### space
+
+If you specify `opts.space`, it will indent the output for pretty-printing.
+Valid values are strings (e.g. `{space: \t}`) or a number of spaces
+(`{space: 3}`).
+
+For example:
+
+```js
+var obj = { b: 1, a: { foo: 'bar', and: [1, 2, 3] } };
+var s = stringify(obj, { space: ' ' });
+console.log(s);
+```
+
+which outputs:
+
+```
+{
+ "a": {
+ "and": [
+ 1,
+ 2,
+ 3
+ ],
+ "foo": "bar"
+ },
+ "b": 1
+}
+```
+
+### replacer
+
+The replacer parameter is a function `opts.replacer(key, value)` that behaves
+the same as the replacer
+[from the core JSON object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_native_JSON#The_replacer_parameter).
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```
+npm install json-stable-stringify
+```
+
+# license
+
+MIT
diff --git a/deps/npm/node_modules/fast-json-stable-stringify/test/cmp.js b/deps/npm/node_modules/json-stable-stringify/test/cmp.js
index 4efd6b5972..2dbb39355c 100644
--- a/deps/npm/node_modules/fast-json-stable-stringify/test/cmp.js
+++ b/deps/npm/node_modules/json-stable-stringify/test/cmp.js
@@ -1,5 +1,3 @@
-'use strict';
-
var test = require('tape');
var stringify = require('../');
diff --git a/deps/npm/node_modules/fast-json-stable-stringify/test/nested.js b/deps/npm/node_modules/json-stable-stringify/test/nested.js
index 167a358e09..e7f5a0e65b 100644
--- a/deps/npm/node_modules/fast-json-stable-stringify/test/nested.js
+++ b/deps/npm/node_modules/json-stable-stringify/test/nested.js
@@ -1,5 +1,3 @@
-'use strict';
-
var test = require('tape');
var stringify = require('../');
@@ -15,9 +13,9 @@ test('cyclic (default)', function (t) {
var two = { a: 2, one: one };
one.two = two;
try {
- stringify(one);
+ stringify(one);
} catch (ex) {
- t.equal(ex.toString(), 'TypeError: Converting circular structure to JSON');
+ t.equal(ex.toString(), 'TypeError: Converting circular structure to JSON');
}
});
@@ -35,10 +33,3 @@ test('repeated non-cyclic value', function(t) {
var two = { a: one, b: one };
t.equal(stringify(two), '{"a":{"x":1},"b":{"x":1}}');
});
-
-test('acyclic but with reused obj-property pointers', function (t) {
- t.plan(1);
- var x = { a: 1 };
- var y = { b: x, c: x };
- t.equal(stringify(y), '{"b":{"a":1},"c":{"a":1}}');
-});
diff --git a/deps/npm/node_modules/json-stable-stringify/test/replacer.js b/deps/npm/node_modules/json-stable-stringify/test/replacer.js
new file mode 100644
index 0000000000..98802a72d6
--- /dev/null
+++ b/deps/npm/node_modules/json-stable-stringify/test/replacer.js
@@ -0,0 +1,74 @@
+var test = require('tape');
+var stringify = require('../');
+
+test('replace root', function (t) {
+ t.plan(1);
+
+ var obj = { a: 1, b: 2, c: false };
+ var replacer = function(key, value) { return 'one'; };
+
+ t.equal(stringify(obj, { replacer: replacer }), '"one"');
+});
+
+test('replace numbers', function (t) {
+ t.plan(1);
+
+ var obj = { a: 1, b: 2, c: false };
+ var replacer = function(key, value) {
+ if(value === 1) return 'one';
+ if(value === 2) return 'two';
+ return value;
+ };
+
+ t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":"two","c":false}');
+});
+
+test('replace with object', function (t) {
+ t.plan(1);
+
+ var obj = { a: 1, b: 2, c: false };
+ var replacer = function(key, value) {
+ if(key === 'b') return { d: 1 };
+ if(value === 1) return 'one';
+ return value;
+ };
+
+ t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":{"d":"one"},"c":false}');
+});
+
+test('replace with undefined', function (t) {
+ t.plan(1);
+
+ var obj = { a: 1, b: 2, c: false };
+ var replacer = function(key, value) {
+ if(value === false) return;
+ return value;
+ };
+
+ t.equal(stringify(obj, { replacer: replacer }), '{"a":1,"b":2}');
+});
+
+test('replace with array', function (t) {
+ t.plan(1);
+
+ var obj = { a: 1, b: 2, c: false };
+ var replacer = function(key, value) {
+ if(key === 'b') return ['one', 'two'];
+ return value;
+ };
+
+ t.equal(stringify(obj, { replacer: replacer }), '{"a":1,"b":["one","two"],"c":false}');
+});
+
+test('replace array item', function (t) {
+ t.plan(1);
+
+ var obj = { a: 1, b: 2, c: [1,2] };
+ var replacer = function(key, value) {
+ if(value === 1) return 'one';
+ if(value === 2) return 'two';
+ return value;
+ };
+
+ t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":"two","c":["one","two"]}');
+});
diff --git a/deps/npm/node_modules/json-stable-stringify/test/space.js b/deps/npm/node_modules/json-stable-stringify/test/space.js
new file mode 100644
index 0000000000..2621122ae3
--- /dev/null
+++ b/deps/npm/node_modules/json-stable-stringify/test/space.js
@@ -0,0 +1,59 @@
+var test = require('tape');
+var stringify = require('../');
+
+test('space parameter', function (t) {
+ t.plan(1);
+ var obj = { one: 1, two: 2 };
+ t.equal(stringify(obj, {space: ' '}), ''
+ + '{\n'
+ + ' "one": 1,\n'
+ + ' "two": 2\n'
+ + '}'
+ );
+});
+
+test('space parameter (with tabs)', function (t) {
+ t.plan(1);
+ var obj = { one: 1, two: 2 };
+ t.equal(stringify(obj, {space: '\t'}), ''
+ + '{\n'
+ + '\t"one": 1,\n'
+ + '\t"two": 2\n'
+ + '}'
+ );
+});
+
+test('space parameter (with a number)', function (t) {
+ t.plan(1);
+ var obj = { one: 1, two: 2 };
+ t.equal(stringify(obj, {space: 3}), ''
+ + '{\n'
+ + ' "one": 1,\n'
+ + ' "two": 2\n'
+ + '}'
+ );
+});
+
+test('space parameter (nested objects)', function (t) {
+ t.plan(1);
+ var obj = { one: 1, two: { b: 4, a: [2,3] } };
+ t.equal(stringify(obj, {space: ' '}), ''
+ + '{\n'
+ + ' "one": 1,\n'
+ + ' "two": {\n'
+ + ' "a": [\n'
+ + ' 2,\n'
+ + ' 3\n'
+ + ' ],\n'
+ + ' "b": 4\n'
+ + ' }\n'
+ + '}'
+ );
+});
+
+test('space parameter (same as native)', function (t) {
+ t.plan(1);
+ // for this test, properties need to be in alphabetical order
+ var obj = { one: 1, two: { a: [2,3], b: 4 } };
+ t.equal(stringify(obj, {space: ' '}), JSON.stringify(obj, null, ' '));
+});
diff --git a/deps/npm/node_modules/json-stable-stringify/test/str.js b/deps/npm/node_modules/json-stable-stringify/test/str.js
new file mode 100644
index 0000000000..67426b99e3
--- /dev/null
+++ b/deps/npm/node_modules/json-stable-stringify/test/str.js
@@ -0,0 +1,32 @@
+var test = require('tape');
+var stringify = require('../');
+
+test('simple object', function (t) {
+ t.plan(1);
+ var obj = { c: 6, b: [4,5], a: 3, z: null };
+ t.equal(stringify(obj), '{"a":3,"b":[4,5],"c":6,"z":null}');
+});
+
+test('object with undefined', function (t) {
+ t.plan(1);
+ var obj = { a: 3, z: undefined };
+ t.equal(stringify(obj), '{"a":3}');
+});
+
+test('array with undefined', function (t) {
+ t.plan(1);
+ var obj = [4, undefined, 6];
+ t.equal(stringify(obj), '[4,null,6]');
+});
+
+test('object with empty string', function (t) {
+ t.plan(1);
+ var obj = { a: 3, z: '' };
+ t.equal(stringify(obj), '{"a":3,"z":""}');
+});
+
+test('array with empty string', function (t) {
+ t.plan(1);
+ var obj = [4, '', 6];
+ t.equal(stringify(obj), '[4,"",6]');
+});
diff --git a/deps/npm/node_modules/fast-json-stable-stringify/test/to-json.js b/deps/npm/node_modules/json-stable-stringify/test/to-json.js
index 2fb2cfa3e8..ef9a980929 100644
--- a/deps/npm/node_modules/fast-json-stable-stringify/test/to-json.js
+++ b/deps/npm/node_modules/json-stable-stringify/test/to-json.js
@@ -1,5 +1,3 @@
-'use strict';
-
var test = require('tape');
var stringify = require('../');
@@ -10,13 +8,13 @@ test('toJSON function', function (t) {
});
test('toJSON returns string', function (t) {
- t.plan(1);
- var obj = { one: 1, two: 2, toJSON: function() { return 'one'; } };
- t.equal(stringify(obj), '"one"');
+ t.plan(1);
+ var obj = { one: 1, two: 2, toJSON: function() { return 'one'; } };
+ t.equal(stringify(obj), '"one"');
});
test('toJSON returns array', function (t) {
- t.plan(1);
- var obj = { one: 1, two: 2, toJSON: function() { return ['one']; } };
- t.equal(stringify(obj), '["one"]');
+ t.plan(1);
+ var obj = { one: 1, two: 2, toJSON: function() { return ['one']; } };
+ t.equal(stringify(obj), '["one"]');
});
diff --git a/deps/npm/node_modules/jsonify/README.markdown b/deps/npm/node_modules/jsonify/README.markdown
new file mode 100644
index 0000000000..71d9a93b59
--- /dev/null
+++ b/deps/npm/node_modules/jsonify/README.markdown
@@ -0,0 +1,34 @@
+jsonify
+=======
+
+This module provides Douglas Crockford's JSON implementation without modifying
+any globals.
+
+`stringify` and `parse` are merely exported without respect to whether or not a
+global `JSON` object exists.
+
+methods
+=======
+
+var json = require('jsonify');
+
+json.parse(source, reviver)
+---------------------------
+
+Return a new javascript object from a parse of the `source` string.
+
+If a `reviver` function is specified, walk the structure passing each name/value
+pair to `reviver.call(parent, key, value)` to transform the `value` before
+parsing it.
+
+json.stringify(value, replacer, space)
+--------------------------------------
+
+Return a string representation for `value`.
+
+If `replacer` is specified, walk the structure passing each name/value pair to
+`replacer.call(parent, key, value)` to transform the `value` before stringifying
+it.
+
+If `space` is a number, indent the result by that many spaces.
+If `space` is a string, use `space` as the indentation.
diff --git a/deps/npm/node_modules/jsonify/index.js b/deps/npm/node_modules/jsonify/index.js
new file mode 100644
index 0000000000..f728a1605a
--- /dev/null
+++ b/deps/npm/node_modules/jsonify/index.js
@@ -0,0 +1,2 @@
+exports.parse = require('./lib/parse');
+exports.stringify = require('./lib/stringify');
diff --git a/deps/npm/node_modules/jsonify/lib/parse.js b/deps/npm/node_modules/jsonify/lib/parse.js
new file mode 100644
index 0000000000..2b88cfff0b
--- /dev/null
+++ b/deps/npm/node_modules/jsonify/lib/parse.js
@@ -0,0 +1,273 @@
+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;
+};
diff --git a/deps/npm/node_modules/jsonify/lib/stringify.js b/deps/npm/node_modules/jsonify/lib/stringify.js
new file mode 100644
index 0000000000..e88fb83406
--- /dev/null
+++ b/deps/npm/node_modules/jsonify/lib/stringify.js
@@ -0,0 +1,154 @@
+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});
+};
diff --git a/deps/npm/node_modules/jsonify/package.json b/deps/npm/node_modules/jsonify/package.json
new file mode 100644
index 0000000000..6d92f5c80d
--- /dev/null
+++ b/deps/npm/node_modules/jsonify/package.json
@@ -0,0 +1,62 @@
+{
+ "_from": "jsonify@~0.0.0",
+ "_id": "jsonify@0.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=",
+ "_location": "/jsonify",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "jsonify@~0.0.0",
+ "name": "jsonify",
+ "escapedName": "jsonify",
+ "rawSpec": "~0.0.0",
+ "saveSpec": null,
+ "fetchSpec": "~0.0.0"
+ },
+ "_requiredBy": [
+ "/json-stable-stringify"
+ ],
+ "_resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
+ "_shasum": "2c74b6ee41d93ca51b7b5aaee8f503631d252a73",
+ "_spec": "jsonify@~0.0.0",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/json-stable-stringify",
+ "author": {
+ "name": "Douglas Crockford",
+ "url": "http://crockford.com/"
+ },
+ "bugs": {
+ "url": "https://github.com/substack/jsonify/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "JSON without touching any globals",
+ "devDependencies": {
+ "garbage": "0.0.x",
+ "tap": "0.0.x"
+ },
+ "directories": {
+ "lib": ".",
+ "test": "test"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "homepage": "https://github.com/substack/jsonify#readme",
+ "keywords": [
+ "json",
+ "browser"
+ ],
+ "license": "Public Domain",
+ "main": "index.js",
+ "name": "jsonify",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/substack/jsonify.git"
+ },
+ "scripts": {
+ "test": "tap test"
+ },
+ "version": "0.0.0"
+}
diff --git a/deps/npm/node_modules/jsonify/test/parse.js b/deps/npm/node_modules/jsonify/test/parse.js
new file mode 100644
index 0000000000..d23de157e1
--- /dev/null
+++ b/deps/npm/node_modules/jsonify/test/parse.js
@@ -0,0 +1,16 @@
+var test = require('tap').test;
+var json = require('../');
+var garbage = require('garbage');
+
+test('parse', function (t) {
+ for (var i = 0; i < 50; i++) {
+ var s = JSON.stringify(garbage(50));
+
+ t.deepEqual(
+ json.parse(s),
+ JSON.parse(s)
+ );
+ }
+
+ t.end();
+});
diff --git a/deps/npm/node_modules/jsonify/test/stringify.js b/deps/npm/node_modules/jsonify/test/stringify.js
new file mode 100644
index 0000000000..72de91f2b6
--- /dev/null
+++ b/deps/npm/node_modules/jsonify/test/stringify.js
@@ -0,0 +1,15 @@
+var test = require('tap').test;
+var json = require('../');
+var garbage = require('garbage');
+
+test('stringify', function (t) {
+ for (var i = 0; i < 50; i++) {
+ var obj = garbage(50);
+ t.equal(
+ json.stringify(obj),
+ JSON.stringify(obj)
+ );
+ }
+
+ t.end();
+});
diff --git a/deps/npm/node_modules/jsprim/node_modules/assert-plus/AUTHORS b/deps/npm/node_modules/jsprim/node_modules/assert-plus/AUTHORS
new file mode 100644
index 0000000000..1923524fe4
--- /dev/null
+++ b/deps/npm/node_modules/jsprim/node_modules/assert-plus/AUTHORS
@@ -0,0 +1,6 @@
+Dave Eddy <dave@daveeddy.com>
+Fred Kuo <fred.kuo@joyent.com>
+Lars-Magnus Skog <ralphtheninja@riseup.net>
+Mark Cavage <mcavage@gmail.com>
+Patrick Mooney <pmooney@pfmooney.com>
+Rob Gulewich <robert.gulewich@joyent.com>
diff --git a/deps/npm/node_modules/jsprim/node_modules/assert-plus/CHANGES.md b/deps/npm/node_modules/jsprim/node_modules/assert-plus/CHANGES.md
new file mode 100644
index 0000000000..57d92bfdb9
--- /dev/null
+++ b/deps/npm/node_modules/jsprim/node_modules/assert-plus/CHANGES.md
@@ -0,0 +1,14 @@
+# assert-plus Changelog
+
+## 1.0.0
+
+- *BREAKING* assert.number (and derivatives) now accept Infinity as valid input
+- Add assert.finite check. Previous assert.number callers should use this if
+ they expect Infinity inputs to throw.
+
+## 0.2.0
+
+- Fix `assert.object(null)` so it throws
+- Fix optional/arrayOf exports for non-type-of asserts
+- Add optiona/arrayOf exports for Stream/Date/Regex/uuid
+- Add basic unit test coverage
diff --git a/deps/npm/node_modules/jsprim/node_modules/assert-plus/README.md b/deps/npm/node_modules/jsprim/node_modules/assert-plus/README.md
new file mode 100644
index 0000000000..ec200d161e
--- /dev/null
+++ b/deps/npm/node_modules/jsprim/node_modules/assert-plus/README.md
@@ -0,0 +1,162 @@
+# assert-plus
+
+This library is a super small wrapper over node's assert module that has two
+things: (1) the ability to disable assertions with the environment variable
+NODE\_NDEBUG, and (2) some API wrappers for argument testing. Like
+`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks
+like this:
+
+```javascript
+ var assert = require('assert-plus');
+
+ function fooAccount(options, callback) {
+ assert.object(options, 'options');
+ assert.number(options.id, 'options.id');
+ assert.bool(options.isManager, 'options.isManager');
+ assert.string(options.name, 'options.name');
+ assert.arrayOfString(options.email, 'options.email');
+ assert.func(callback, 'callback');
+
+ // Do stuff
+ callback(null, {});
+ }
+```
+
+# API
+
+All methods that *aren't* part of node's core assert API are simply assumed to
+take an argument, and then a string 'name' that's not a message; `AssertionError`
+will be thrown if the assertion fails with a message like:
+
+ AssertionError: foo (string) is required
+ at test (/home/mark/work/foo/foo.js:3:9)
+ at Object.<anonymous> (/home/mark/work/foo/foo.js:15:1)
+ at Module._compile (module.js:446:26)
+ at Object..js (module.js:464:10)
+ at Module.load (module.js:353:31)
+ at Function._load (module.js:311:12)
+ at Array.0 (module.js:484:10)
+ at EventEmitter._tickCallback (node.js:190:38)
+
+from:
+
+```javascript
+ function test(foo) {
+ assert.string(foo, 'foo');
+ }
+```
+
+There you go. You can check that arrays are of a homogeneous type with `Arrayof$Type`:
+
+```javascript
+ function test(foo) {
+ assert.arrayOfString(foo, 'foo');
+ }
+```
+
+You can assert IFF an argument is not `undefined` (i.e., an optional arg):
+
+```javascript
+ assert.optionalString(foo, 'foo');
+```
+
+Lastly, you can opt-out of assertion checking altogether by setting the
+environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have
+lots of assertions, and don't want to pay `typeof ()` taxes to v8 in
+production. Be advised: The standard functions re-exported from `assert` are
+also disabled in assert-plus if NDEBUG is specified. Using them directly from
+the `assert` module avoids this behavior.
+
+The complete list of APIs is:
+
+* assert.array
+* assert.bool
+* assert.buffer
+* assert.func
+* assert.number
+* assert.finite
+* assert.object
+* assert.string
+* assert.stream
+* assert.date
+* assert.regexp
+* assert.uuid
+* assert.arrayOfArray
+* assert.arrayOfBool
+* assert.arrayOfBuffer
+* assert.arrayOfFunc
+* assert.arrayOfNumber
+* assert.arrayOfFinite
+* assert.arrayOfObject
+* assert.arrayOfString
+* assert.arrayOfStream
+* assert.arrayOfDate
+* assert.arrayOfRegexp
+* assert.arrayOfUuid
+* assert.optionalArray
+* assert.optionalBool
+* assert.optionalBuffer
+* assert.optionalFunc
+* assert.optionalNumber
+* assert.optionalFinite
+* assert.optionalObject
+* assert.optionalString
+* assert.optionalStream
+* assert.optionalDate
+* assert.optionalRegexp
+* assert.optionalUuid
+* assert.optionalArrayOfArray
+* assert.optionalArrayOfBool
+* assert.optionalArrayOfBuffer
+* assert.optionalArrayOfFunc
+* assert.optionalArrayOfNumber
+* assert.optionalArrayOfFinite
+* assert.optionalArrayOfObject
+* assert.optionalArrayOfString
+* assert.optionalArrayOfStream
+* assert.optionalArrayOfDate
+* assert.optionalArrayOfRegexp
+* assert.optionalArrayOfUuid
+* assert.AssertionError
+* assert.fail
+* assert.ok
+* assert.equal
+* assert.notEqual
+* assert.deepEqual
+* assert.notDeepEqual
+* assert.strictEqual
+* assert.notStrictEqual
+* assert.throws
+* assert.doesNotThrow
+* assert.ifError
+
+# Installation
+
+ npm install assert-plus
+
+## License
+
+The MIT License (MIT)
+Copyright (c) 2012 Mark Cavage
+
+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.
+
+## Bugs
+
+See <https://github.com/mcavage/node-assert-plus/issues>.
diff --git a/deps/npm/node_modules/jsprim/node_modules/assert-plus/assert.js b/deps/npm/node_modules/jsprim/node_modules/assert-plus/assert.js
new file mode 100644
index 0000000000..26f944eec3
--- /dev/null
+++ b/deps/npm/node_modules/jsprim/node_modules/assert-plus/assert.js
@@ -0,0 +1,211 @@
+// Copyright (c) 2012, Mark Cavage. All rights reserved.
+// Copyright 2015 Joyent, Inc.
+
+var assert = require('assert');
+var Stream = require('stream').Stream;
+var util = require('util');
+
+
+///--- Globals
+
+/* JSSTYLED */
+var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
+
+
+///--- Internal
+
+function _capitalize(str) {
+ return (str.charAt(0).toUpperCase() + str.slice(1));
+}
+
+function _toss(name, expected, oper, arg, actual) {
+ throw new assert.AssertionError({
+ message: util.format('%s (%s) is required', name, expected),
+ actual: (actual === undefined) ? typeof (arg) : actual(arg),
+ expected: expected,
+ operator: oper || '===',
+ stackStartFunction: _toss.caller
+ });
+}
+
+function _getClass(arg) {
+ return (Object.prototype.toString.call(arg).slice(8, -1));
+}
+
+function noop() {
+ // Why even bother with asserts?
+}
+
+
+///--- Exports
+
+var types = {
+ bool: {
+ check: function (arg) { return typeof (arg) === 'boolean'; }
+ },
+ func: {
+ check: function (arg) { return typeof (arg) === 'function'; }
+ },
+ string: {
+ check: function (arg) { return typeof (arg) === 'string'; }
+ },
+ object: {
+ check: function (arg) {
+ return typeof (arg) === 'object' && arg !== null;
+ }
+ },
+ number: {
+ check: function (arg) {
+ return typeof (arg) === 'number' && !isNaN(arg);
+ }
+ },
+ finite: {
+ check: function (arg) {
+ return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg);
+ }
+ },
+ buffer: {
+ check: function (arg) { return Buffer.isBuffer(arg); },
+ operator: 'Buffer.isBuffer'
+ },
+ array: {
+ check: function (arg) { return Array.isArray(arg); },
+ operator: 'Array.isArray'
+ },
+ stream: {
+ check: function (arg) { return arg instanceof Stream; },
+ operator: 'instanceof',
+ actual: _getClass
+ },
+ date: {
+ check: function (arg) { return arg instanceof Date; },
+ operator: 'instanceof',
+ actual: _getClass
+ },
+ regexp: {
+ check: function (arg) { return arg instanceof RegExp; },
+ operator: 'instanceof',
+ actual: _getClass
+ },
+ uuid: {
+ check: function (arg) {
+ return typeof (arg) === 'string' && UUID_REGEXP.test(arg);
+ },
+ operator: 'isUUID'
+ }
+};
+
+function _setExports(ndebug) {
+ var keys = Object.keys(types);
+ var out;
+
+ /* re-export standard assert */
+ if (process.env.NODE_NDEBUG) {
+ out = noop;
+ } else {
+ out = function (arg, msg) {
+ if (!arg) {
+ _toss(msg, 'true', arg);
+ }
+ };
+ }
+
+ /* standard checks */
+ keys.forEach(function (k) {
+ if (ndebug) {
+ out[k] = noop;
+ return;
+ }
+ var type = types[k];
+ out[k] = function (arg, msg) {
+ if (!type.check(arg)) {
+ _toss(msg, k, type.operator, arg, type.actual);
+ }
+ };
+ });
+
+ /* optional checks */
+ keys.forEach(function (k) {
+ var name = 'optional' + _capitalize(k);
+ if (ndebug) {
+ out[name] = noop;
+ return;
+ }
+ var type = types[k];
+ out[name] = function (arg, msg) {
+ if (arg === undefined || arg === null) {
+ return;
+ }
+ if (!type.check(arg)) {
+ _toss(msg, k, type.operator, arg, type.actual);
+ }
+ };
+ });
+
+ /* arrayOf checks */
+ keys.forEach(function (k) {
+ var name = 'arrayOf' + _capitalize(k);
+ if (ndebug) {
+ out[name] = noop;
+ return;
+ }
+ var type = types[k];
+ var expected = '[' + k + ']';
+ out[name] = function (arg, msg) {
+ if (!Array.isArray(arg)) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ var i;
+ for (i = 0; i < arg.length; i++) {
+ if (!type.check(arg[i])) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ }
+ };
+ });
+
+ /* optionalArrayOf checks */
+ keys.forEach(function (k) {
+ var name = 'optionalArrayOf' + _capitalize(k);
+ if (ndebug) {
+ out[name] = noop;
+ return;
+ }
+ var type = types[k];
+ var expected = '[' + k + ']';
+ out[name] = function (arg, msg) {
+ if (arg === undefined || arg === null) {
+ return;
+ }
+ if (!Array.isArray(arg)) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ var i;
+ for (i = 0; i < arg.length; i++) {
+ if (!type.check(arg[i])) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ }
+ };
+ });
+
+ /* re-export built-in assertions */
+ Object.keys(assert).forEach(function (k) {
+ if (k === 'AssertionError') {
+ out[k] = assert[k];
+ return;
+ }
+ if (ndebug) {
+ out[k] = noop;
+ return;
+ }
+ out[k] = assert[k];
+ });
+
+ /* export ourselves (for unit tests _only_) */
+ out._setExports = _setExports;
+
+ return out;
+}
+
+module.exports = _setExports(process.env.NODE_NDEBUG);
diff --git a/deps/npm/node_modules/jsprim/node_modules/assert-plus/package.json b/deps/npm/node_modules/jsprim/node_modules/assert-plus/package.json
new file mode 100644
index 0000000000..86c11827db
--- /dev/null
+++ b/deps/npm/node_modules/jsprim/node_modules/assert-plus/package.json
@@ -0,0 +1,82 @@
+{
+ "_from": "assert-plus@1.0.0",
+ "_id": "assert-plus@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+ "_location": "/jsprim/assert-plus",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "assert-plus@1.0.0",
+ "name": "assert-plus",
+ "escapedName": "assert-plus",
+ "rawSpec": "1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "1.0.0"
+ },
+ "_requiredBy": [
+ "/jsprim"
+ ],
+ "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+ "_shasum": "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525",
+ "_spec": "assert-plus@1.0.0",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/jsprim",
+ "author": {
+ "name": "Mark Cavage",
+ "email": "mcavage@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/mcavage/node-assert-plus/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Dave Eddy",
+ "email": "dave@daveeddy.com"
+ },
+ {
+ "name": "Fred Kuo",
+ "email": "fred.kuo@joyent.com"
+ },
+ {
+ "name": "Lars-Magnus Skog",
+ "email": "ralphtheninja@riseup.net"
+ },
+ {
+ "name": "Mark Cavage",
+ "email": "mcavage@gmail.com"
+ },
+ {
+ "name": "Patrick Mooney",
+ "email": "pmooney@pfmooney.com"
+ },
+ {
+ "name": "Rob Gulewich",
+ "email": "robert.gulewich@joyent.com"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Extra assertions on top of node's assert module",
+ "devDependencies": {
+ "faucet": "0.0.1",
+ "tape": "4.2.2"
+ },
+ "engines": {
+ "node": ">=0.8"
+ },
+ "homepage": "https://github.com/mcavage/node-assert-plus#readme",
+ "license": "MIT",
+ "main": "./assert.js",
+ "name": "assert-plus",
+ "optionalDependencies": {},
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mcavage/node-assert-plus.git"
+ },
+ "scripts": {
+ "test": "tape tests/*.js | ./node_modules/.bin/faucet"
+ },
+ "version": "1.0.0"
+}
diff --git a/deps/npm/node_modules/lodash/LICENSE b/deps/npm/node_modules/lodash/LICENSE
deleted file mode 100644
index 9cd87e5dce..0000000000
--- a/deps/npm/node_modules/lodash/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-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/deps/npm/node_modules/lodash/README.md b/deps/npm/node_modules/lodash/README.md
deleted file mode 100644
index fd98e5c989..0000000000
--- a/deps/npm/node_modules/lodash/README.md
+++ /dev/null
@@ -1,121 +0,0 @@
-# lodash v3.10.1
-
-The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash](https://lodash.com/) exported as [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) modules.
-
-Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli):
-```bash
-$ lodash modularize modern exports=node -o ./
-$ lodash modern -d -o ./index.js
-```
-
-## Installation
-
-Using npm:
-
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash
-```
-
-In Node.js/io.js:
-
-```js
-// load the modern build
-var _ = require('lodash');
-// or a method category
-var array = require('lodash/array');
-// or a method (great for smaller builds with browserify/webpack)
-var chunk = require('lodash/array/chunk');
-```
-
-See the [package source](https://github.com/lodash/lodash/tree/3.10.1-npm) for more details.
-
-**Note:**<br>
-Don’t assign values to the [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL.<br>
-Install [n_](https://www.npmjs.com/package/n_) for a REPL that includes lodash by default.
-
-## Module formats
-
-lodash is also available in a variety of other builds & module formats.
-
- * npm packages for [modern](https://www.npmjs.com/package/lodash), [compatibility](https://www.npmjs.com/package/lodash-compat), & [per method](https://www.npmjs.com/browse/keyword/lodash-modularized) builds
- * AMD modules for [modern](https://github.com/lodash/lodash/tree/3.10.1-amd) & [compatibility](https://github.com/lodash/lodash-compat/tree/3.10.1-amd) builds
- * ES modules for the [modern](https://github.com/lodash/lodash/tree/3.10.1-es) build
-
-## Further Reading
-
- * [API Documentation](https://lodash.com/docs)
- * [Build Differences](https://github.com/lodash/lodash/wiki/Build-Differences)
- * [Changelog](https://github.com/lodash/lodash/wiki/Changelog)
- * [Roadmap](https://github.com/lodash/lodash/wiki/Roadmap)
- * [More Resources](https://github.com/lodash/lodash/wiki/Resources)
-
-## Features
-
- * ~100% [code coverage](https://coveralls.io/r/lodash)
- * Follows [semantic versioning](http://semver.org/) for releases
- * [Lazily evaluated](http://filimanjaro.com/blog/2014/introducing-lazy-evaluation/) chaining
- * [_(…)](https://lodash.com/docs#_) supports implicit chaining
- * [_.ary](https://lodash.com/docs#ary) & [_.rearg](https://lodash.com/docs#rearg) to change function argument limits & order
- * [_.at](https://lodash.com/docs#at) for cherry-picking collection values
- * [_.attempt](https://lodash.com/docs#attempt) to execute functions which may error without a try-catch
- * [_.before](https://lodash.com/docs#before) to complement [_.after](https://lodash.com/docs#after)
- * [_.bindKey](https://lodash.com/docs#bindKey) for binding [*“lazy”*](http://michaux.ca/articles/lazy-function-definition-pattern) defined methods
- * [_.chunk](https://lodash.com/docs#chunk) for splitting an array into chunks of a given size
- * [_.clone](https://lodash.com/docs#clone) supports shallow cloning of `Date` & `RegExp` objects
- * [_.cloneDeep](https://lodash.com/docs#cloneDeep) for deep cloning arrays & objects
- * [_.curry](https://lodash.com/docs#curry) & [_.curryRight](https://lodash.com/docs#curryRight) for creating [curried](http://hughfdjackson.com/javascript/why-curry-helps/) functions
- * [_.debounce](https://lodash.com/docs#debounce) & [_.throttle](https://lodash.com/docs#throttle) are cancelable & accept options for more control
- * [_.defaultsDeep](https://lodash.com/docs#defaultsDeep) for recursively assigning default properties
- * [_.fill](https://lodash.com/docs#fill) to fill arrays with values
- * [_.findKey](https://lodash.com/docs#findKey) for finding keys
- * [_.flow](https://lodash.com/docs#flow) to complement [_.flowRight](https://lodash.com/docs#flowRight) (a.k.a `_.compose`)
- * [_.forEach](https://lodash.com/docs#forEach) supports exiting early
- * [_.forIn](https://lodash.com/docs#forIn) for iterating all enumerable properties
- * [_.forOwn](https://lodash.com/docs#forOwn) for iterating own properties
- * [_.get](https://lodash.com/docs#get) & [_.set](https://lodash.com/docs#set) for deep property getting & setting
- * [_.gt](https://lodash.com/docs#gt), [_.gte](https://lodash.com/docs#gte), [_.lt](https://lodash.com/docs#lt), & [_.lte](https://lodash.com/docs#lte) relational methods
- * [_.inRange](https://lodash.com/docs#inRange) for checking whether a number is within a given range
- * [_.isNative](https://lodash.com/docs#isNative) to check for native functions
- * [_.isPlainObject](https://lodash.com/docs#isPlainObject) & [_.toPlainObject](https://lodash.com/docs#toPlainObject) to check for & convert to `Object` objects
- * [_.isTypedArray](https://lodash.com/docs#isTypedArray) to check for typed arrays
- * [_.mapKeys](https://lodash.com/docs#mapKeys) for mapping keys to an object
- * [_.matches](https://lodash.com/docs#matches) supports deep object comparisons
- * [_.matchesProperty](https://lodash.com/docs#matchesProperty) to complement [_.matches](https://lodash.com/docs#matches) & [_.property](https://lodash.com/docs#property)
- * [_.merge](https://lodash.com/docs#merge) for a deep [_.extend](https://lodash.com/docs#extend)
- * [_.method](https://lodash.com/docs#method) & [_.methodOf](https://lodash.com/docs#methodOf) to create functions that invoke methods
- * [_.modArgs](https://lodash.com/docs#modArgs) for more advanced functional composition
- * [_.parseInt](https://lodash.com/docs#parseInt) for consistent cross-environment behavior
- * [_.pull](https://lodash.com/docs#pull), [_.pullAt](https://lodash.com/docs#pullAt), & [_.remove](https://lodash.com/docs#remove) for mutating arrays
- * [_.random](https://lodash.com/docs#random) supports returning floating-point numbers
- * [_.restParam](https://lodash.com/docs#restParam) & [_.spread](https://lodash.com/docs#spread) for applying rest parameters & spreading arguments to functions
- * [_.runInContext](https://lodash.com/docs#runInContext) for collisionless mixins & easier mocking
- * [_.slice](https://lodash.com/docs#slice) for creating subsets of array-like values
- * [_.sortByAll](https://lodash.com/docs#sortByAll) & [_.sortByOrder](https://lodash.com/docs#sortByOrder) for sorting by multiple properties & orders
- * [_.support](https://lodash.com/docs#support) for flagging environment features
- * [_.template](https://lodash.com/docs#template) supports [*“imports”*](https://lodash.com/docs#templateSettings-imports) options & [ES template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components)
- * [_.transform](https://lodash.com/docs#transform) as a powerful alternative to [_.reduce](https://lodash.com/docs#reduce) for transforming objects
- * [_.unzipWith](https://lodash.com/docs#unzipWith) & [_.zipWith](https://lodash.com/docs#zipWith) to specify how grouped values should be combined
- * [_.valuesIn](https://lodash.com/docs#valuesIn) for getting values of all enumerable properties
- * [_.xor](https://lodash.com/docs#xor) to complement [_.difference](https://lodash.com/docs#difference), [_.intersection](https://lodash.com/docs#intersection), & [_.union](https://lodash.com/docs#union)
- * [_.add](https://lodash.com/docs#add), [_.round](https://lodash.com/docs#round), [_.sum](https://lodash.com/docs#sum), &
- [more](https://lodash.com/docs "_.ceil & _.floor") math methods
- * [_.bind](https://lodash.com/docs#bind), [_.curry](https://lodash.com/docs#curry), [_.partial](https://lodash.com/docs#partial), &
- [more](https://lodash.com/docs "_.bindKey, _.curryRight, _.partialRight") support customizable argument placeholders
- * [_.capitalize](https://lodash.com/docs#capitalize), [_.trim](https://lodash.com/docs#trim), &
- [more](https://lodash.com/docs "_.camelCase, _.deburr, _.endsWith, _.escapeRegExp, _.kebabCase, _.pad, _.padLeft, _.padRight, _.repeat, _.snakeCase, _.startCase, _.startsWith, _.trimLeft, _.trimRight, _.trunc, _.words") string methods
- * [_.clone](https://lodash.com/docs#clone), [_.isEqual](https://lodash.com/docs#isEqual), &
- [more](https://lodash.com/docs "_.assign, _.cloneDeep, _.merge") accept customizer callbacks
- * [_.dropWhile](https://lodash.com/docs#dropWhile), [_.takeWhile](https://lodash.com/docs#takeWhile), &
- [more](https://lodash.com/docs "_.drop, _.dropRight, _.dropRightWhile, _.take, _.takeRight, _.takeRightWhile") to complement [_.first](https://lodash.com/docs#first), [_.initial](https://lodash.com/docs#initial), [_.last](https://lodash.com/docs#last), & [_.rest](https://lodash.com/docs#rest)
- * [_.findLast](https://lodash.com/docs#findLast), [_.findLastKey](https://lodash.com/docs#findLastKey), &
- [more](https://lodash.com/docs "_.curryRight, _.dropRight, _.dropRightWhile, _.flowRight, _.forEachRight, _.forInRight, _.forOwnRight, _.padRight, partialRight, _.takeRight, _.trimRight, _.takeRightWhile") right-associative methods
- * [_.includes](https://lodash.com/docs#includes), [_.toArray](https://lodash.com/docs#toArray), &
- [more](https://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.findLast, _.findWhere, _.forEach, _.forEachRight, _.groupBy, _.indexBy, _.invoke, _.map, _.max, _.min, _.partition, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.sortByAll, _.sortByOrder, _.sum, _.where") accept strings
- * [_#commit](https://lodash.com/docs#prototype-commit) & [_#plant](https://lodash.com/docs#prototype-plant) for working with chain sequences
- * [_#thru](https://lodash.com/docs#thru) to pass values thru a chain sequence
-
-## Support
-
-Tested in Chrome 43-44, Firefox 38-39, IE 6-11, MS Edge, Safari 5-8, ChakraNode 0.12.2, io.js 2.5.0, Node.js 0.8.28, 0.10.40, & 0.12.7, PhantomJS 1.9.8, RingoJS 0.11, & Rhino 1.7.6.
-Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. Special thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing.
diff --git a/deps/npm/node_modules/lodash/array.js b/deps/npm/node_modules/lodash/array.js
deleted file mode 100644
index e5121fa52e..0000000000
--- a/deps/npm/node_modules/lodash/array.js
+++ /dev/null
@@ -1,44 +0,0 @@
-module.exports = {
- 'chunk': require('./array/chunk'),
- 'compact': require('./array/compact'),
- 'difference': require('./array/difference'),
- 'drop': require('./array/drop'),
- 'dropRight': require('./array/dropRight'),
- 'dropRightWhile': require('./array/dropRightWhile'),
- 'dropWhile': require('./array/dropWhile'),
- 'fill': require('./array/fill'),
- 'findIndex': require('./array/findIndex'),
- 'findLastIndex': require('./array/findLastIndex'),
- 'first': require('./array/first'),
- 'flatten': require('./array/flatten'),
- 'flattenDeep': require('./array/flattenDeep'),
- 'head': require('./array/head'),
- 'indexOf': require('./array/indexOf'),
- 'initial': require('./array/initial'),
- 'intersection': require('./array/intersection'),
- 'last': require('./array/last'),
- 'lastIndexOf': require('./array/lastIndexOf'),
- 'object': require('./array/object'),
- 'pull': require('./array/pull'),
- 'pullAt': require('./array/pullAt'),
- 'remove': require('./array/remove'),
- 'rest': require('./array/rest'),
- 'slice': require('./array/slice'),
- 'sortedIndex': require('./array/sortedIndex'),
- 'sortedLastIndex': require('./array/sortedLastIndex'),
- 'tail': require('./array/tail'),
- 'take': require('./array/take'),
- 'takeRight': require('./array/takeRight'),
- 'takeRightWhile': require('./array/takeRightWhile'),
- 'takeWhile': require('./array/takeWhile'),
- 'union': require('./array/union'),
- 'uniq': require('./array/uniq'),
- 'unique': require('./array/unique'),
- 'unzip': require('./array/unzip'),
- 'unzipWith': require('./array/unzipWith'),
- 'without': require('./array/without'),
- 'xor': require('./array/xor'),
- 'zip': require('./array/zip'),
- 'zipObject': require('./array/zipObject'),
- 'zipWith': require('./array/zipWith')
-};
diff --git a/deps/npm/node_modules/lodash/array/chunk.js b/deps/npm/node_modules/lodash/array/chunk.js
deleted file mode 100644
index c8be1fb02d..0000000000
--- a/deps/npm/node_modules/lodash/array/chunk.js
+++ /dev/null
@@ -1,46 +0,0 @@
-var baseSlice = require('../internal/baseSlice'),
- isIterateeCall = require('../internal/isIterateeCall');
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeCeil = Math.ceil,
- nativeFloor = Math.floor,
- nativeMax = Math.max;
-
-/**
- * Creates an array of elements split into groups the length of `size`.
- * If `collection` can't be split evenly, the final chunk will be the remaining
- * elements.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to process.
- * @param {number} [size=1] The length of each chunk.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Array} Returns the new array containing chunks.
- * @example
- *
- * _.chunk(['a', 'b', 'c', 'd'], 2);
- * // => [['a', 'b'], ['c', 'd']]
- *
- * _.chunk(['a', 'b', 'c', 'd'], 3);
- * // => [['a', 'b', 'c'], ['d']]
- */
-function chunk(array, size, guard) {
- if (guard ? isIterateeCall(array, size, guard) : size == null) {
- size = 1;
- } else {
- size = nativeMax(nativeFloor(size) || 1, 1);
- }
- var index = 0,
- length = array ? array.length : 0,
- resIndex = -1,
- result = Array(nativeCeil(length / size));
-
- while (index < length) {
- result[++resIndex] = baseSlice(array, index, (index += size));
- }
- return result;
-}
-
-module.exports = chunk;
diff --git a/deps/npm/node_modules/lodash/array/compact.js b/deps/npm/node_modules/lodash/array/compact.js
deleted file mode 100644
index 1dc1c55e8f..0000000000
--- a/deps/npm/node_modules/lodash/array/compact.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Creates an array with all falsey values removed. The values `false`, `null`,
- * `0`, `""`, `undefined`, and `NaN` are falsey.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to compact.
- * @returns {Array} Returns the new array of filtered values.
- * @example
- *
- * _.compact([0, 1, false, 2, '', 3]);
- * // => [1, 2, 3]
- */
-function compact(array) {
- var index = -1,
- length = array ? array.length : 0,
- resIndex = -1,
- result = [];
-
- while (++index < length) {
- var value = array[index];
- if (value) {
- result[++resIndex] = value;
- }
- }
- return result;
-}
-
-module.exports = compact;
diff --git a/deps/npm/node_modules/lodash/array/difference.js b/deps/npm/node_modules/lodash/array/difference.js
deleted file mode 100644
index 128932a146..0000000000
--- a/deps/npm/node_modules/lodash/array/difference.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var baseDifference = require('../internal/baseDifference'),
- baseFlatten = require('../internal/baseFlatten'),
- isArrayLike = require('../internal/isArrayLike'),
- isObjectLike = require('../internal/isObjectLike'),
- restParam = require('../function/restParam');
-
-/**
- * Creates an array of unique `array` values not included in the other
- * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {...Array} [values] The arrays of values to exclude.
- * @returns {Array} Returns the new array of filtered values.
- * @example
- *
- * _.difference([1, 2, 3], [4, 2]);
- * // => [1, 3]
- */
-var difference = restParam(function(array, values) {
- return (isObjectLike(array) && isArrayLike(array))
- ? baseDifference(array, baseFlatten(values, false, true))
- : [];
-});
-
-module.exports = difference;
diff --git a/deps/npm/node_modules/lodash/array/drop.js b/deps/npm/node_modules/lodash/array/drop.js
deleted file mode 100644
index 039a0b5fdc..0000000000
--- a/deps/npm/node_modules/lodash/array/drop.js
+++ /dev/null
@@ -1,39 +0,0 @@
-var baseSlice = require('../internal/baseSlice'),
- isIterateeCall = require('../internal/isIterateeCall');
-
-/**
- * Creates a slice of `array` with `n` elements dropped from the beginning.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=1] The number of elements to drop.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.drop([1, 2, 3]);
- * // => [2, 3]
- *
- * _.drop([1, 2, 3], 2);
- * // => [3]
- *
- * _.drop([1, 2, 3], 5);
- * // => []
- *
- * _.drop([1, 2, 3], 0);
- * // => [1, 2, 3]
- */
-function drop(array, n, guard) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (guard ? isIterateeCall(array, n, guard) : n == null) {
- n = 1;
- }
- return baseSlice(array, n < 0 ? 0 : n);
-}
-
-module.exports = drop;
diff --git a/deps/npm/node_modules/lodash/array/dropRight.js b/deps/npm/node_modules/lodash/array/dropRight.js
deleted file mode 100644
index 14b5eb6f0a..0000000000
--- a/deps/npm/node_modules/lodash/array/dropRight.js
+++ /dev/null
@@ -1,40 +0,0 @@
-var baseSlice = require('../internal/baseSlice'),
- isIterateeCall = require('../internal/isIterateeCall');
-
-/**
- * Creates a slice of `array` with `n` elements dropped from the end.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=1] The number of elements to drop.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.dropRight([1, 2, 3]);
- * // => [1, 2]
- *
- * _.dropRight([1, 2, 3], 2);
- * // => [1]
- *
- * _.dropRight([1, 2, 3], 5);
- * // => []
- *
- * _.dropRight([1, 2, 3], 0);
- * // => [1, 2, 3]
- */
-function dropRight(array, n, guard) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (guard ? isIterateeCall(array, n, guard) : n == null) {
- n = 1;
- }
- n = length - (+n || 0);
- return baseSlice(array, 0, n < 0 ? 0 : n);
-}
-
-module.exports = dropRight;
diff --git a/deps/npm/node_modules/lodash/array/dropRightWhile.js b/deps/npm/node_modules/lodash/array/dropRightWhile.js
deleted file mode 100644
index be158bd5fa..0000000000
--- a/deps/npm/node_modules/lodash/array/dropRightWhile.js
+++ /dev/null
@@ -1,59 +0,0 @@
-var baseCallback = require('../internal/baseCallback'),
- baseWhile = require('../internal/baseWhile');
-
-/**
- * Creates a slice of `array` excluding elements dropped from the end.
- * Elements are dropped until `predicate` returns falsey. The predicate is
- * bound to `thisArg` and invoked with three arguments: (value, index, array).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that match the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.dropRightWhile([1, 2, 3], function(n) {
- * return n > 1;
- * });
- * // => [1]
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': false }
- * ];
- *
- * // using the `_.matches` callback shorthand
- * _.pluck(_.dropRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user');
- * // => ['barney', 'fred']
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.pluck(_.dropRightWhile(users, 'active', false), 'user');
- * // => ['barney']
- *
- * // using the `_.property` callback shorthand
- * _.pluck(_.dropRightWhile(users, 'active'), 'user');
- * // => ['barney', 'fred', 'pebbles']
- */
-function dropRightWhile(array, predicate, thisArg) {
- return (array && array.length)
- ? baseWhile(array, baseCallback(predicate, thisArg, 3), true, true)
- : [];
-}
-
-module.exports = dropRightWhile;
diff --git a/deps/npm/node_modules/lodash/array/dropWhile.js b/deps/npm/node_modules/lodash/array/dropWhile.js
deleted file mode 100644
index d9eabae9fa..0000000000
--- a/deps/npm/node_modules/lodash/array/dropWhile.js
+++ /dev/null
@@ -1,59 +0,0 @@
-var baseCallback = require('../internal/baseCallback'),
- baseWhile = require('../internal/baseWhile');
-
-/**
- * Creates a slice of `array` excluding elements dropped from the beginning.
- * Elements are dropped until `predicate` returns falsey. The predicate is
- * bound to `thisArg` and invoked with three arguments: (value, index, array).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.dropWhile([1, 2, 3], function(n) {
- * return n < 3;
- * });
- * // => [3]
- *
- * var users = [
- * { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': true }
- * ];
- *
- * // using the `_.matches` callback shorthand
- * _.pluck(_.dropWhile(users, { 'user': 'barney', 'active': false }), 'user');
- * // => ['fred', 'pebbles']
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.pluck(_.dropWhile(users, 'active', false), 'user');
- * // => ['pebbles']
- *
- * // using the `_.property` callback shorthand
- * _.pluck(_.dropWhile(users, 'active'), 'user');
- * // => ['barney', 'fred', 'pebbles']
- */
-function dropWhile(array, predicate, thisArg) {
- return (array && array.length)
- ? baseWhile(array, baseCallback(predicate, thisArg, 3), true)
- : [];
-}
-
-module.exports = dropWhile;
diff --git a/deps/npm/node_modules/lodash/array/fill.js b/deps/npm/node_modules/lodash/array/fill.js
deleted file mode 100644
index 2c8f6da71d..0000000000
--- a/deps/npm/node_modules/lodash/array/fill.js
+++ /dev/null
@@ -1,44 +0,0 @@
-var baseFill = require('../internal/baseFill'),
- isIterateeCall = require('../internal/isIterateeCall');
-
-/**
- * Fills elements of `array` with `value` from `start` up to, but not
- * including, `end`.
- *
- * **Note:** This method mutates `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to fill.
- * @param {*} value The value to fill `array` with.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns `array`.
- * @example
- *
- * var array = [1, 2, 3];
- *
- * _.fill(array, 'a');
- * console.log(array);
- * // => ['a', 'a', 'a']
- *
- * _.fill(Array(3), 2);
- * // => [2, 2, 2]
- *
- * _.fill([4, 6, 8], '*', 1, 2);
- * // => [4, '*', 8]
- */
-function fill(array, value, start, end) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
- start = 0;
- end = length;
- }
- return baseFill(array, value, start, end);
-}
-
-module.exports = fill;
diff --git a/deps/npm/node_modules/lodash/array/findIndex.js b/deps/npm/node_modules/lodash/array/findIndex.js
deleted file mode 100644
index 2a6b8e14ba..0000000000
--- a/deps/npm/node_modules/lodash/array/findIndex.js
+++ /dev/null
@@ -1,53 +0,0 @@
-var createFindIndex = require('../internal/createFindIndex');
-
-/**
- * This method is like `_.find` except that it returns the index of the first
- * element `predicate` returns truthy for instead of the element itself.
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to search.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {number} Returns the index of the found element, else `-1`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': true }
- * ];
- *
- * _.findIndex(users, function(chr) {
- * return chr.user == 'barney';
- * });
- * // => 0
- *
- * // using the `_.matches` callback shorthand
- * _.findIndex(users, { 'user': 'fred', 'active': false });
- * // => 1
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.findIndex(users, 'active', false);
- * // => 0
- *
- * // using the `_.property` callback shorthand
- * _.findIndex(users, 'active');
- * // => 2
- */
-var findIndex = createFindIndex();
-
-module.exports = findIndex;
diff --git a/deps/npm/node_modules/lodash/array/findLastIndex.js b/deps/npm/node_modules/lodash/array/findLastIndex.js
deleted file mode 100644
index d6d8eca6df..0000000000
--- a/deps/npm/node_modules/lodash/array/findLastIndex.js
+++ /dev/null
@@ -1,53 +0,0 @@
-var createFindIndex = require('../internal/createFindIndex');
-
-/**
- * This method is like `_.findIndex` except that it iterates over elements
- * of `collection` from right to left.
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to search.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {number} Returns the index of the found element, else `-1`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': false }
- * ];
- *
- * _.findLastIndex(users, function(chr) {
- * return chr.user == 'pebbles';
- * });
- * // => 2
- *
- * // using the `_.matches` callback shorthand
- * _.findLastIndex(users, { 'user': 'barney', 'active': true });
- * // => 0
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.findLastIndex(users, 'active', false);
- * // => 2
- *
- * // using the `_.property` callback shorthand
- * _.findLastIndex(users, 'active');
- * // => 0
- */
-var findLastIndex = createFindIndex(true);
-
-module.exports = findLastIndex;
diff --git a/deps/npm/node_modules/lodash/array/first.js b/deps/npm/node_modules/lodash/array/first.js
deleted file mode 100644
index b3b9c79c7b..0000000000
--- a/deps/npm/node_modules/lodash/array/first.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Gets the first element of `array`.
- *
- * @static
- * @memberOf _
- * @alias head
- * @category Array
- * @param {Array} array The array to query.
- * @returns {*} Returns the first element of `array`.
- * @example
- *
- * _.first([1, 2, 3]);
- * // => 1
- *
- * _.first([]);
- * // => undefined
- */
-function first(array) {
- return array ? array[0] : undefined;
-}
-
-module.exports = first;
diff --git a/deps/npm/node_modules/lodash/array/flatten.js b/deps/npm/node_modules/lodash/array/flatten.js
deleted file mode 100644
index dc2eff8686..0000000000
--- a/deps/npm/node_modules/lodash/array/flatten.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var baseFlatten = require('../internal/baseFlatten'),
- isIterateeCall = require('../internal/isIterateeCall');
-
-/**
- * Flattens a nested array. If `isDeep` is `true` the array is recursively
- * flattened, otherwise it's only flattened a single level.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to flatten.
- * @param {boolean} [isDeep] Specify a deep flatten.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * _.flatten([1, [2, 3, [4]]]);
- * // => [1, 2, 3, [4]]
- *
- * // using `isDeep`
- * _.flatten([1, [2, 3, [4]]], true);
- * // => [1, 2, 3, 4]
- */
-function flatten(array, isDeep, guard) {
- var length = array ? array.length : 0;
- if (guard && isIterateeCall(array, isDeep, guard)) {
- isDeep = false;
- }
- return length ? baseFlatten(array, isDeep) : [];
-}
-
-module.exports = flatten;
diff --git a/deps/npm/node_modules/lodash/array/flattenDeep.js b/deps/npm/node_modules/lodash/array/flattenDeep.js
deleted file mode 100644
index 9f775febe2..0000000000
--- a/deps/npm/node_modules/lodash/array/flattenDeep.js
+++ /dev/null
@@ -1,21 +0,0 @@
-var baseFlatten = require('../internal/baseFlatten');
-
-/**
- * Recursively flattens a nested array.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to recursively flatten.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * _.flattenDeep([1, [2, 3, [4]]]);
- * // => [1, 2, 3, 4]
- */
-function flattenDeep(array) {
- var length = array ? array.length : 0;
- return length ? baseFlatten(array, true) : [];
-}
-
-module.exports = flattenDeep;
diff --git a/deps/npm/node_modules/lodash/array/head.js b/deps/npm/node_modules/lodash/array/head.js
deleted file mode 100644
index 1961b08c7e..0000000000
--- a/deps/npm/node_modules/lodash/array/head.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./first');
diff --git a/deps/npm/node_modules/lodash/array/indexOf.js b/deps/npm/node_modules/lodash/array/indexOf.js
deleted file mode 100644
index 4cfc682319..0000000000
--- a/deps/npm/node_modules/lodash/array/indexOf.js
+++ /dev/null
@@ -1,53 +0,0 @@
-var baseIndexOf = require('../internal/baseIndexOf'),
- binaryIndex = require('../internal/binaryIndex');
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeMax = Math.max;
-
-/**
- * Gets the index at which the first occurrence of `value` is found in `array`
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons. If `fromIndex` is negative, it's used as the offset
- * from the end of `array`. If `array` is sorted providing `true` for `fromIndex`
- * performs a faster binary search.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to search.
- * @param {*} value The value to search for.
- * @param {boolean|number} [fromIndex=0] The index to search from or `true`
- * to perform a binary search on a sorted array.
- * @returns {number} Returns the index of the matched value, else `-1`.
- * @example
- *
- * _.indexOf([1, 2, 1, 2], 2);
- * // => 1
- *
- * // using `fromIndex`
- * _.indexOf([1, 2, 1, 2], 2, 2);
- * // => 3
- *
- * // performing a binary search
- * _.indexOf([1, 1, 2, 2], 2, true);
- * // => 2
- */
-function indexOf(array, value, fromIndex) {
- var length = array ? array.length : 0;
- if (!length) {
- return -1;
- }
- if (typeof fromIndex == 'number') {
- fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex;
- } else if (fromIndex) {
- var index = binaryIndex(array, value);
- if (index < length &&
- (value === value ? (value === array[index]) : (array[index] !== array[index]))) {
- return index;
- }
- return -1;
- }
- return baseIndexOf(array, value, fromIndex || 0);
-}
-
-module.exports = indexOf;
diff --git a/deps/npm/node_modules/lodash/array/initial.js b/deps/npm/node_modules/lodash/array/initial.js
deleted file mode 100644
index 59b7a7d96d..0000000000
--- a/deps/npm/node_modules/lodash/array/initial.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var dropRight = require('./dropRight');
-
-/**
- * Gets all but the last element of `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.initial([1, 2, 3]);
- * // => [1, 2]
- */
-function initial(array) {
- return dropRight(array, 1);
-}
-
-module.exports = initial;
diff --git a/deps/npm/node_modules/lodash/array/intersection.js b/deps/npm/node_modules/lodash/array/intersection.js
deleted file mode 100644
index f218432cfb..0000000000
--- a/deps/npm/node_modules/lodash/array/intersection.js
+++ /dev/null
@@ -1,58 +0,0 @@
-var baseIndexOf = require('../internal/baseIndexOf'),
- cacheIndexOf = require('../internal/cacheIndexOf'),
- createCache = require('../internal/createCache'),
- isArrayLike = require('../internal/isArrayLike'),
- restParam = require('../function/restParam');
-
-/**
- * Creates an array of unique values that are included in all of the provided
- * arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @returns {Array} Returns the new array of shared values.
- * @example
- * _.intersection([1, 2], [4, 2], [2, 1]);
- * // => [2]
- */
-var intersection = restParam(function(arrays) {
- var othLength = arrays.length,
- othIndex = othLength,
- caches = Array(length),
- indexOf = baseIndexOf,
- isCommon = true,
- result = [];
-
- while (othIndex--) {
- var value = arrays[othIndex] = isArrayLike(value = arrays[othIndex]) ? value : [];
- caches[othIndex] = (isCommon && value.length >= 120) ? createCache(othIndex && value) : null;
- }
- var array = arrays[0],
- index = -1,
- length = array ? array.length : 0,
- seen = caches[0];
-
- outer:
- while (++index < length) {
- value = array[index];
- if ((seen ? cacheIndexOf(seen, value) : indexOf(result, value, 0)) < 0) {
- var othIndex = othLength;
- while (--othIndex) {
- var cache = caches[othIndex];
- if ((cache ? cacheIndexOf(cache, value) : indexOf(arrays[othIndex], value, 0)) < 0) {
- continue outer;
- }
- }
- if (seen) {
- seen.push(value);
- }
- result.push(value);
- }
- }
- return result;
-});
-
-module.exports = intersection;
diff --git a/deps/npm/node_modules/lodash/array/last.js b/deps/npm/node_modules/lodash/array/last.js
deleted file mode 100644
index 299af3146c..0000000000
--- a/deps/npm/node_modules/lodash/array/last.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Gets the last element of `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @returns {*} Returns the last element of `array`.
- * @example
- *
- * _.last([1, 2, 3]);
- * // => 3
- */
-function last(array) {
- var length = array ? array.length : 0;
- return length ? array[length - 1] : undefined;
-}
-
-module.exports = last;
diff --git a/deps/npm/node_modules/lodash/array/lastIndexOf.js b/deps/npm/node_modules/lodash/array/lastIndexOf.js
deleted file mode 100644
index 02b806269b..0000000000
--- a/deps/npm/node_modules/lodash/array/lastIndexOf.js
+++ /dev/null
@@ -1,60 +0,0 @@
-var binaryIndex = require('../internal/binaryIndex'),
- indexOfNaN = require('../internal/indexOfNaN');
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeMax = Math.max,
- nativeMin = Math.min;
-
-/**
- * This method is like `_.indexOf` except that it iterates over elements of
- * `array` from right to left.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to search.
- * @param {*} value The value to search for.
- * @param {boolean|number} [fromIndex=array.length-1] The index to search from
- * or `true` to perform a binary search on a sorted array.
- * @returns {number} Returns the index of the matched value, else `-1`.
- * @example
- *
- * _.lastIndexOf([1, 2, 1, 2], 2);
- * // => 3
- *
- * // using `fromIndex`
- * _.lastIndexOf([1, 2, 1, 2], 2, 2);
- * // => 1
- *
- * // performing a binary search
- * _.lastIndexOf([1, 1, 2, 2], 2, true);
- * // => 3
- */
-function lastIndexOf(array, value, fromIndex) {
- var length = array ? array.length : 0;
- if (!length) {
- return -1;
- }
- var index = length;
- if (typeof fromIndex == 'number') {
- index = (fromIndex < 0 ? nativeMax(length + fromIndex, 0) : nativeMin(fromIndex || 0, length - 1)) + 1;
- } else if (fromIndex) {
- index = binaryIndex(array, value, true) - 1;
- var other = array[index];
- if (value === value ? (value === other) : (other !== other)) {
- return index;
- }
- return -1;
- }
- if (value !== value) {
- return indexOfNaN(array, index, true);
- }
- while (index--) {
- if (array[index] === value) {
- return index;
- }
- }
- return -1;
-}
-
-module.exports = lastIndexOf;
diff --git a/deps/npm/node_modules/lodash/array/object.js b/deps/npm/node_modules/lodash/array/object.js
deleted file mode 100644
index f4a34531b1..0000000000
--- a/deps/npm/node_modules/lodash/array/object.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./zipObject');
diff --git a/deps/npm/node_modules/lodash/array/pull.js b/deps/npm/node_modules/lodash/array/pull.js
deleted file mode 100644
index 7bcbb4a63c..0000000000
--- a/deps/npm/node_modules/lodash/array/pull.js
+++ /dev/null
@@ -1,52 +0,0 @@
-var baseIndexOf = require('../internal/baseIndexOf');
-
-/** Used for native method references. */
-var arrayProto = Array.prototype;
-
-/** Native method references. */
-var splice = arrayProto.splice;
-
-/**
- * Removes all provided values from `array` using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * **Note:** Unlike `_.without`, this method mutates `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to modify.
- * @param {...*} [values] The values to remove.
- * @returns {Array} Returns `array`.
- * @example
- *
- * var array = [1, 2, 3, 1, 2, 3];
- *
- * _.pull(array, 2, 3);
- * console.log(array);
- * // => [1, 1]
- */
-function pull() {
- var args = arguments,
- array = args[0];
-
- if (!(array && array.length)) {
- return array;
- }
- var index = 0,
- indexOf = baseIndexOf,
- length = args.length;
-
- while (++index < length) {
- var fromIndex = 0,
- value = args[index];
-
- while ((fromIndex = indexOf(array, value, fromIndex)) > -1) {
- splice.call(array, fromIndex, 1);
- }
- }
- return array;
-}
-
-module.exports = pull;
diff --git a/deps/npm/node_modules/lodash/array/pullAt.js b/deps/npm/node_modules/lodash/array/pullAt.js
deleted file mode 100644
index 4ca2476f0e..0000000000
--- a/deps/npm/node_modules/lodash/array/pullAt.js
+++ /dev/null
@@ -1,40 +0,0 @@
-var baseAt = require('../internal/baseAt'),
- baseCompareAscending = require('../internal/baseCompareAscending'),
- baseFlatten = require('../internal/baseFlatten'),
- basePullAt = require('../internal/basePullAt'),
- restParam = require('../function/restParam');
-
-/**
- * Removes elements from `array` corresponding to the given indexes and returns
- * an array of the removed elements. Indexes may be specified as an array of
- * indexes or as individual arguments.
- *
- * **Note:** Unlike `_.at`, this method mutates `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to modify.
- * @param {...(number|number[])} [indexes] The indexes of elements to remove,
- * specified as individual indexes or arrays of indexes.
- * @returns {Array} Returns the new array of removed elements.
- * @example
- *
- * var array = [5, 10, 15, 20];
- * var evens = _.pullAt(array, 1, 3);
- *
- * console.log(array);
- * // => [5, 15]
- *
- * console.log(evens);
- * // => [10, 20]
- */
-var pullAt = restParam(function(array, indexes) {
- indexes = baseFlatten(indexes);
-
- var result = baseAt(array, indexes);
- basePullAt(array, indexes.sort(baseCompareAscending));
- return result;
-});
-
-module.exports = pullAt;
diff --git a/deps/npm/node_modules/lodash/array/remove.js b/deps/npm/node_modules/lodash/array/remove.js
deleted file mode 100644
index 0cf979bda0..0000000000
--- a/deps/npm/node_modules/lodash/array/remove.js
+++ /dev/null
@@ -1,64 +0,0 @@
-var baseCallback = require('../internal/baseCallback'),
- basePullAt = require('../internal/basePullAt');
-
-/**
- * Removes all elements from `array` that `predicate` returns truthy for
- * and returns an array of the removed elements. The predicate is bound to
- * `thisArg` and invoked with three arguments: (value, index, array).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * **Note:** Unlike `_.filter`, this method mutates `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to modify.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Array} Returns the new array of removed elements.
- * @example
- *
- * var array = [1, 2, 3, 4];
- * var evens = _.remove(array, function(n) {
- * return n % 2 == 0;
- * });
- *
- * console.log(array);
- * // => [1, 3]
- *
- * console.log(evens);
- * // => [2, 4]
- */
-function remove(array, predicate, thisArg) {
- var result = [];
- if (!(array && array.length)) {
- return result;
- }
- var index = -1,
- indexes = [],
- length = array.length;
-
- predicate = baseCallback(predicate, thisArg, 3);
- while (++index < length) {
- var value = array[index];
- if (predicate(value, index, array)) {
- result.push(value);
- indexes.push(index);
- }
- }
- basePullAt(array, indexes);
- return result;
-}
-
-module.exports = remove;
diff --git a/deps/npm/node_modules/lodash/array/rest.js b/deps/npm/node_modules/lodash/array/rest.js
deleted file mode 100644
index 9bfb734f1f..0000000000
--- a/deps/npm/node_modules/lodash/array/rest.js
+++ /dev/null
@@ -1,21 +0,0 @@
-var drop = require('./drop');
-
-/**
- * Gets all but the first element of `array`.
- *
- * @static
- * @memberOf _
- * @alias tail
- * @category Array
- * @param {Array} array The array to query.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.rest([1, 2, 3]);
- * // => [2, 3]
- */
-function rest(array) {
- return drop(array, 1);
-}
-
-module.exports = rest;
diff --git a/deps/npm/node_modules/lodash/array/slice.js b/deps/npm/node_modules/lodash/array/slice.js
deleted file mode 100644
index 48ef1a1a28..0000000000
--- a/deps/npm/node_modules/lodash/array/slice.js
+++ /dev/null
@@ -1,30 +0,0 @@
-var baseSlice = require('../internal/baseSlice'),
- isIterateeCall = require('../internal/isIterateeCall');
-
-/**
- * Creates a slice of `array` from `start` up to, but not including, `end`.
- *
- * **Note:** This method is used instead of `Array#slice` to support node
- * lists in IE < 9 and to ensure dense arrays are returned.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to slice.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns the slice of `array`.
- */
-function slice(array, start, end) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
- start = 0;
- end = length;
- }
- return baseSlice(array, start, end);
-}
-
-module.exports = slice;
diff --git a/deps/npm/node_modules/lodash/array/sortedIndex.js b/deps/npm/node_modules/lodash/array/sortedIndex.js
deleted file mode 100644
index 6903bca437..0000000000
--- a/deps/npm/node_modules/lodash/array/sortedIndex.js
+++ /dev/null
@@ -1,53 +0,0 @@
-var createSortedIndex = require('../internal/createSortedIndex');
-
-/**
- * Uses a binary search to determine the lowest index at which `value` should
- * be inserted into `array` in order to maintain its sort order. If an iteratee
- * function is provided it's invoked for `value` and each element of `array`
- * to compute their sort ranking. The iteratee is bound to `thisArg` and
- * invoked with one argument; (value).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- * @example
- *
- * _.sortedIndex([30, 50], 40);
- * // => 1
- *
- * _.sortedIndex([4, 4, 5, 5], 5);
- * // => 2
- *
- * var dict = { 'data': { 'thirty': 30, 'forty': 40, 'fifty': 50 } };
- *
- * // using an iteratee function
- * _.sortedIndex(['thirty', 'fifty'], 'forty', function(word) {
- * return this.data[word];
- * }, dict);
- * // => 1
- *
- * // using the `_.property` callback shorthand
- * _.sortedIndex([{ 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x');
- * // => 1
- */
-var sortedIndex = createSortedIndex();
-
-module.exports = sortedIndex;
diff --git a/deps/npm/node_modules/lodash/array/sortedLastIndex.js b/deps/npm/node_modules/lodash/array/sortedLastIndex.js
deleted file mode 100644
index 81a4a8689e..0000000000
--- a/deps/npm/node_modules/lodash/array/sortedLastIndex.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var createSortedIndex = require('../internal/createSortedIndex');
-
-/**
- * This method is like `_.sortedIndex` except that it returns the highest
- * index at which `value` should be inserted into `array` in order to
- * maintain its sort order.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- * @example
- *
- * _.sortedLastIndex([4, 4, 5, 5], 5);
- * // => 4
- */
-var sortedLastIndex = createSortedIndex(true);
-
-module.exports = sortedLastIndex;
diff --git a/deps/npm/node_modules/lodash/array/tail.js b/deps/npm/node_modules/lodash/array/tail.js
deleted file mode 100644
index c5dfe779d6..0000000000
--- a/deps/npm/node_modules/lodash/array/tail.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./rest');
diff --git a/deps/npm/node_modules/lodash/array/take.js b/deps/npm/node_modules/lodash/array/take.js
deleted file mode 100644
index 875917a746..0000000000
--- a/deps/npm/node_modules/lodash/array/take.js
+++ /dev/null
@@ -1,39 +0,0 @@
-var baseSlice = require('../internal/baseSlice'),
- isIterateeCall = require('../internal/isIterateeCall');
-
-/**
- * Creates a slice of `array` with `n` elements taken from the beginning.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=1] The number of elements to take.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.take([1, 2, 3]);
- * // => [1]
- *
- * _.take([1, 2, 3], 2);
- * // => [1, 2]
- *
- * _.take([1, 2, 3], 5);
- * // => [1, 2, 3]
- *
- * _.take([1, 2, 3], 0);
- * // => []
- */
-function take(array, n, guard) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (guard ? isIterateeCall(array, n, guard) : n == null) {
- n = 1;
- }
- return baseSlice(array, 0, n < 0 ? 0 : n);
-}
-
-module.exports = take;
diff --git a/deps/npm/node_modules/lodash/array/takeRight.js b/deps/npm/node_modules/lodash/array/takeRight.js
deleted file mode 100644
index 6e89c87480..0000000000
--- a/deps/npm/node_modules/lodash/array/takeRight.js
+++ /dev/null
@@ -1,40 +0,0 @@
-var baseSlice = require('../internal/baseSlice'),
- isIterateeCall = require('../internal/isIterateeCall');
-
-/**
- * Creates a slice of `array` with `n` elements taken from the end.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=1] The number of elements to take.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.takeRight([1, 2, 3]);
- * // => [3]
- *
- * _.takeRight([1, 2, 3], 2);
- * // => [2, 3]
- *
- * _.takeRight([1, 2, 3], 5);
- * // => [1, 2, 3]
- *
- * _.takeRight([1, 2, 3], 0);
- * // => []
- */
-function takeRight(array, n, guard) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (guard ? isIterateeCall(array, n, guard) : n == null) {
- n = 1;
- }
- n = length - (+n || 0);
- return baseSlice(array, n < 0 ? 0 : n);
-}
-
-module.exports = takeRight;
diff --git a/deps/npm/node_modules/lodash/array/takeRightWhile.js b/deps/npm/node_modules/lodash/array/takeRightWhile.js
deleted file mode 100644
index 5464d13b7f..0000000000
--- a/deps/npm/node_modules/lodash/array/takeRightWhile.js
+++ /dev/null
@@ -1,59 +0,0 @@
-var baseCallback = require('../internal/baseCallback'),
- baseWhile = require('../internal/baseWhile');
-
-/**
- * Creates a slice of `array` with elements taken from the end. Elements are
- * taken until `predicate` returns falsey. The predicate is bound to `thisArg`
- * and invoked with three arguments: (value, index, array).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.takeRightWhile([1, 2, 3], function(n) {
- * return n > 1;
- * });
- * // => [2, 3]
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': false }
- * ];
- *
- * // using the `_.matches` callback shorthand
- * _.pluck(_.takeRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user');
- * // => ['pebbles']
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.pluck(_.takeRightWhile(users, 'active', false), 'user');
- * // => ['fred', 'pebbles']
- *
- * // using the `_.property` callback shorthand
- * _.pluck(_.takeRightWhile(users, 'active'), 'user');
- * // => []
- */
-function takeRightWhile(array, predicate, thisArg) {
- return (array && array.length)
- ? baseWhile(array, baseCallback(predicate, thisArg, 3), false, true)
- : [];
-}
-
-module.exports = takeRightWhile;
diff --git a/deps/npm/node_modules/lodash/array/takeWhile.js b/deps/npm/node_modules/lodash/array/takeWhile.js
deleted file mode 100644
index f7e28a1d42..0000000000
--- a/deps/npm/node_modules/lodash/array/takeWhile.js
+++ /dev/null
@@ -1,59 +0,0 @@
-var baseCallback = require('../internal/baseCallback'),
- baseWhile = require('../internal/baseWhile');
-
-/**
- * Creates a slice of `array` with elements taken from the beginning. Elements
- * are taken until `predicate` returns falsey. The predicate is bound to
- * `thisArg` and invoked with three arguments: (value, index, array).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.takeWhile([1, 2, 3], function(n) {
- * return n < 3;
- * });
- * // => [1, 2]
- *
- * var users = [
- * { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false},
- * { 'user': 'pebbles', 'active': true }
- * ];
- *
- * // using the `_.matches` callback shorthand
- * _.pluck(_.takeWhile(users, { 'user': 'barney', 'active': false }), 'user');
- * // => ['barney']
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.pluck(_.takeWhile(users, 'active', false), 'user');
- * // => ['barney', 'fred']
- *
- * // using the `_.property` callback shorthand
- * _.pluck(_.takeWhile(users, 'active'), 'user');
- * // => []
- */
-function takeWhile(array, predicate, thisArg) {
- return (array && array.length)
- ? baseWhile(array, baseCallback(predicate, thisArg, 3))
- : [];
-}
-
-module.exports = takeWhile;
diff --git a/deps/npm/node_modules/lodash/array/union.js b/deps/npm/node_modules/lodash/array/union.js
deleted file mode 100644
index 53cefe432d..0000000000
--- a/deps/npm/node_modules/lodash/array/union.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var baseFlatten = require('../internal/baseFlatten'),
- baseUniq = require('../internal/baseUniq'),
- restParam = require('../function/restParam');
-
-/**
- * Creates an array of unique values, in order, from all of the provided arrays
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @returns {Array} Returns the new array of combined values.
- * @example
- *
- * _.union([1, 2], [4, 2], [2, 1]);
- * // => [1, 2, 4]
- */
-var union = restParam(function(arrays) {
- return baseUniq(baseFlatten(arrays, false, true));
-});
-
-module.exports = union;
diff --git a/deps/npm/node_modules/lodash/array/uniq.js b/deps/npm/node_modules/lodash/array/uniq.js
deleted file mode 100644
index ae937efdf5..0000000000
--- a/deps/npm/node_modules/lodash/array/uniq.js
+++ /dev/null
@@ -1,71 +0,0 @@
-var baseCallback = require('../internal/baseCallback'),
- baseUniq = require('../internal/baseUniq'),
- isIterateeCall = require('../internal/isIterateeCall'),
- sortedUniq = require('../internal/sortedUniq');
-
-/**
- * Creates a duplicate-free version of an array, using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons, in which only the first occurence of each element
- * is kept. Providing `true` for `isSorted` performs a faster search algorithm
- * for sorted arrays. If an iteratee function is provided it's invoked for
- * each element in the array to generate the criterion by which uniqueness
- * is computed. The `iteratee` is bound to `thisArg` and invoked with three
- * arguments: (value, index, array).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @alias unique
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {boolean} [isSorted] Specify the array is sorted.
- * @param {Function|Object|string} [iteratee] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Array} Returns the new duplicate-value-free array.
- * @example
- *
- * _.uniq([2, 1, 2]);
- * // => [2, 1]
- *
- * // using `isSorted`
- * _.uniq([1, 1, 2], true);
- * // => [1, 2]
- *
- * // using an iteratee function
- * _.uniq([1, 2.5, 1.5, 2], function(n) {
- * return this.floor(n);
- * }, Math);
- * // => [1, 2.5]
- *
- * // using the `_.property` callback shorthand
- * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
- * // => [{ 'x': 1 }, { 'x': 2 }]
- */
-function uniq(array, isSorted, iteratee, thisArg) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (isSorted != null && typeof isSorted != 'boolean') {
- thisArg = iteratee;
- iteratee = isIterateeCall(array, isSorted, thisArg) ? undefined : isSorted;
- isSorted = false;
- }
- iteratee = iteratee == null ? iteratee : baseCallback(iteratee, thisArg, 3);
- return (isSorted)
- ? sortedUniq(array, iteratee)
- : baseUniq(array, iteratee);
-}
-
-module.exports = uniq;
diff --git a/deps/npm/node_modules/lodash/array/unique.js b/deps/npm/node_modules/lodash/array/unique.js
deleted file mode 100644
index 396de1b804..0000000000
--- a/deps/npm/node_modules/lodash/array/unique.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./uniq');
diff --git a/deps/npm/node_modules/lodash/array/unzip.js b/deps/npm/node_modules/lodash/array/unzip.js
deleted file mode 100644
index 0a539fa631..0000000000
--- a/deps/npm/node_modules/lodash/array/unzip.js
+++ /dev/null
@@ -1,47 +0,0 @@
-var arrayFilter = require('../internal/arrayFilter'),
- arrayMap = require('../internal/arrayMap'),
- baseProperty = require('../internal/baseProperty'),
- isArrayLike = require('../internal/isArrayLike');
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeMax = Math.max;
-
-/**
- * This method is like `_.zip` except that it accepts an array of grouped
- * elements and creates an array regrouping the elements to their pre-zip
- * configuration.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array of grouped elements to process.
- * @returns {Array} Returns the new array of regrouped elements.
- * @example
- *
- * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]);
- * // => [['fred', 30, true], ['barney', 40, false]]
- *
- * _.unzip(zipped);
- * // => [['fred', 'barney'], [30, 40], [true, false]]
- */
-function unzip(array) {
- if (!(array && array.length)) {
- return [];
- }
- var index = -1,
- length = 0;
-
- array = arrayFilter(array, function(group) {
- if (isArrayLike(group)) {
- length = nativeMax(group.length, length);
- return true;
- }
- });
- var result = Array(length);
- while (++index < length) {
- result[index] = arrayMap(array, baseProperty(index));
- }
- return result;
-}
-
-module.exports = unzip;
diff --git a/deps/npm/node_modules/lodash/array/unzipWith.js b/deps/npm/node_modules/lodash/array/unzipWith.js
deleted file mode 100644
index 324a2b1db2..0000000000
--- a/deps/npm/node_modules/lodash/array/unzipWith.js
+++ /dev/null
@@ -1,41 +0,0 @@
-var arrayMap = require('../internal/arrayMap'),
- arrayReduce = require('../internal/arrayReduce'),
- bindCallback = require('../internal/bindCallback'),
- unzip = require('./unzip');
-
-/**
- * This method is like `_.unzip` except that it accepts an iteratee to specify
- * how regrouped values should be combined. The `iteratee` is bound to `thisArg`
- * and invoked with four arguments: (accumulator, value, index, group).
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array of grouped elements to process.
- * @param {Function} [iteratee] The function to combine regrouped values.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Array} Returns the new array of regrouped elements.
- * @example
- *
- * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
- * // => [[1, 10, 100], [2, 20, 200]]
- *
- * _.unzipWith(zipped, _.add);
- * // => [3, 30, 300]
- */
-function unzipWith(array, iteratee, thisArg) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- var result = unzip(array);
- if (iteratee == null) {
- return result;
- }
- iteratee = bindCallback(iteratee, thisArg, 4);
- return arrayMap(result, function(group) {
- return arrayReduce(group, iteratee, undefined, true);
- });
-}
-
-module.exports = unzipWith;
diff --git a/deps/npm/node_modules/lodash/array/without.js b/deps/npm/node_modules/lodash/array/without.js
deleted file mode 100644
index 2ac3d1176e..0000000000
--- a/deps/npm/node_modules/lodash/array/without.js
+++ /dev/null
@@ -1,27 +0,0 @@
-var baseDifference = require('../internal/baseDifference'),
- isArrayLike = require('../internal/isArrayLike'),
- restParam = require('../function/restParam');
-
-/**
- * Creates an array excluding all provided values using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to filter.
- * @param {...*} [values] The values to exclude.
- * @returns {Array} Returns the new array of filtered values.
- * @example
- *
- * _.without([1, 2, 1, 3], 1, 2);
- * // => [3]
- */
-var without = restParam(function(array, values) {
- return isArrayLike(array)
- ? baseDifference(array, values)
- : [];
-});
-
-module.exports = without;
diff --git a/deps/npm/node_modules/lodash/array/xor.js b/deps/npm/node_modules/lodash/array/xor.js
deleted file mode 100644
index 04ef32aefd..0000000000
--- a/deps/npm/node_modules/lodash/array/xor.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var arrayPush = require('../internal/arrayPush'),
- baseDifference = require('../internal/baseDifference'),
- baseUniq = require('../internal/baseUniq'),
- isArrayLike = require('../internal/isArrayLike');
-
-/**
- * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
- * of the provided arrays.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @returns {Array} Returns the new array of values.
- * @example
- *
- * _.xor([1, 2], [4, 2]);
- * // => [1, 4]
- */
-function xor() {
- var index = -1,
- length = arguments.length;
-
- while (++index < length) {
- var array = arguments[index];
- if (isArrayLike(array)) {
- var result = result
- ? arrayPush(baseDifference(result, array), baseDifference(array, result))
- : array;
- }
- }
- return result ? baseUniq(result) : [];
-}
-
-module.exports = xor;
diff --git a/deps/npm/node_modules/lodash/array/zip.js b/deps/npm/node_modules/lodash/array/zip.js
deleted file mode 100644
index 53a6f69912..0000000000
--- a/deps/npm/node_modules/lodash/array/zip.js
+++ /dev/null
@@ -1,21 +0,0 @@
-var restParam = require('../function/restParam'),
- unzip = require('./unzip');
-
-/**
- * Creates an array of grouped elements, the first of which contains the first
- * elements of the given arrays, the second of which contains the second elements
- * of the given arrays, and so on.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to process.
- * @returns {Array} Returns the new array of grouped elements.
- * @example
- *
- * _.zip(['fred', 'barney'], [30, 40], [true, false]);
- * // => [['fred', 30, true], ['barney', 40, false]]
- */
-var zip = restParam(unzip);
-
-module.exports = zip;
diff --git a/deps/npm/node_modules/lodash/array/zipObject.js b/deps/npm/node_modules/lodash/array/zipObject.js
deleted file mode 100644
index dec7a211b7..0000000000
--- a/deps/npm/node_modules/lodash/array/zipObject.js
+++ /dev/null
@@ -1,43 +0,0 @@
-var isArray = require('../lang/isArray');
-
-/**
- * The inverse of `_.pairs`; this method returns an object composed from arrays
- * of property names and values. Provide either a single two dimensional array,
- * e.g. `[[key1, value1], [key2, value2]]` or two arrays, one of property names
- * and one of corresponding values.
- *
- * @static
- * @memberOf _
- * @alias object
- * @category Array
- * @param {Array} props The property names.
- * @param {Array} [values=[]] The property values.
- * @returns {Object} Returns the new object.
- * @example
- *
- * _.zipObject([['fred', 30], ['barney', 40]]);
- * // => { 'fred': 30, 'barney': 40 }
- *
- * _.zipObject(['fred', 'barney'], [30, 40]);
- * // => { 'fred': 30, 'barney': 40 }
- */
-function zipObject(props, values) {
- var index = -1,
- length = props ? props.length : 0,
- result = {};
-
- if (length && !values && !isArray(props[0])) {
- values = [];
- }
- while (++index < length) {
- var key = props[index];
- if (values) {
- result[key] = values[index];
- } else if (key) {
- result[key[0]] = key[1];
- }
- }
- return result;
-}
-
-module.exports = zipObject;
diff --git a/deps/npm/node_modules/lodash/array/zipWith.js b/deps/npm/node_modules/lodash/array/zipWith.js
deleted file mode 100644
index ad103742cd..0000000000
--- a/deps/npm/node_modules/lodash/array/zipWith.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var restParam = require('../function/restParam'),
- unzipWith = require('./unzipWith');
-
-/**
- * This method is like `_.zip` except that it accepts an iteratee to specify
- * how grouped values should be combined. The `iteratee` is bound to `thisArg`
- * and invoked with four arguments: (accumulator, value, index, group).
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to process.
- * @param {Function} [iteratee] The function to combine grouped values.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Array} Returns the new array of grouped elements.
- * @example
- *
- * _.zipWith([1, 2], [10, 20], [100, 200], _.add);
- * // => [111, 222]
- */
-var zipWith = restParam(function(arrays) {
- var length = arrays.length,
- iteratee = length > 2 ? arrays[length - 2] : undefined,
- thisArg = length > 1 ? arrays[length - 1] : undefined;
-
- if (length > 2 && typeof iteratee == 'function') {
- length -= 2;
- } else {
- iteratee = (length > 1 && typeof thisArg == 'function') ? (--length, thisArg) : undefined;
- thisArg = undefined;
- }
- arrays.length = length;
- return unzipWith(arrays, iteratee, thisArg);
-});
-
-module.exports = zipWith;
diff --git a/deps/npm/node_modules/lodash/chain.js b/deps/npm/node_modules/lodash/chain.js
deleted file mode 100644
index 6439627f3d..0000000000
--- a/deps/npm/node_modules/lodash/chain.js
+++ /dev/null
@@ -1,16 +0,0 @@
-module.exports = {
- 'chain': require('./chain/chain'),
- 'commit': require('./chain/commit'),
- 'concat': require('./chain/concat'),
- 'lodash': require('./chain/lodash'),
- 'plant': require('./chain/plant'),
- 'reverse': require('./chain/reverse'),
- 'run': require('./chain/run'),
- 'tap': require('./chain/tap'),
- 'thru': require('./chain/thru'),
- 'toJSON': require('./chain/toJSON'),
- 'toString': require('./chain/toString'),
- 'value': require('./chain/value'),
- 'valueOf': require('./chain/valueOf'),
- 'wrapperChain': require('./chain/wrapperChain')
-};
diff --git a/deps/npm/node_modules/lodash/chain/chain.js b/deps/npm/node_modules/lodash/chain/chain.js
deleted file mode 100644
index 453ba1eb5e..0000000000
--- a/deps/npm/node_modules/lodash/chain/chain.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var lodash = require('./lodash');
-
-/**
- * Creates a `lodash` object that wraps `value` with explicit method
- * chaining enabled.
- *
- * @static
- * @memberOf _
- * @category Chain
- * @param {*} value The value to wrap.
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 },
- * { 'user': 'pebbles', 'age': 1 }
- * ];
- *
- * var youngest = _.chain(users)
- * .sortBy('age')
- * .map(function(chr) {
- * return chr.user + ' is ' + chr.age;
- * })
- * .first()
- * .value();
- * // => 'pebbles is 1'
- */
-function chain(value) {
- var result = lodash(value);
- result.__chain__ = true;
- return result;
-}
-
-module.exports = chain;
diff --git a/deps/npm/node_modules/lodash/chain/commit.js b/deps/npm/node_modules/lodash/chain/commit.js
deleted file mode 100644
index c732d1bf91..0000000000
--- a/deps/npm/node_modules/lodash/chain/commit.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./wrapperCommit');
diff --git a/deps/npm/node_modules/lodash/chain/concat.js b/deps/npm/node_modules/lodash/chain/concat.js
deleted file mode 100644
index 90607d1ee1..0000000000
--- a/deps/npm/node_modules/lodash/chain/concat.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./wrapperConcat');
diff --git a/deps/npm/node_modules/lodash/chain/lodash.js b/deps/npm/node_modules/lodash/chain/lodash.js
deleted file mode 100644
index 1c3467efee..0000000000
--- a/deps/npm/node_modules/lodash/chain/lodash.js
+++ /dev/null
@@ -1,125 +0,0 @@
-var LazyWrapper = require('../internal/LazyWrapper'),
- LodashWrapper = require('../internal/LodashWrapper'),
- baseLodash = require('../internal/baseLodash'),
- isArray = require('../lang/isArray'),
- isObjectLike = require('../internal/isObjectLike'),
- wrapperClone = require('../internal/wrapperClone');
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Creates a `lodash` object which wraps `value` to enable implicit chaining.
- * Methods that operate on and return arrays, collections, and functions can
- * be chained together. Methods that retrieve a single value or may return a
- * primitive value will automatically end the chain returning the unwrapped
- * value. Explicit chaining may be enabled using `_.chain`. The execution of
- * chained methods is lazy, that is, execution is deferred until `_#value`
- * is implicitly or explicitly called.
- *
- * Lazy evaluation allows several methods to support shortcut fusion. Shortcut
- * fusion is an optimization strategy which merge iteratee calls; this can help
- * to avoid the creation of intermediate data structures and greatly reduce the
- * number of iteratee executions.
- *
- * Chaining is supported in custom builds as long as the `_#value` method is
- * directly or indirectly included in the build.
- *
- * In addition to lodash methods, wrappers have `Array` and `String` methods.
- *
- * The wrapper `Array` methods are:
- * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`,
- * `splice`, and `unshift`
- *
- * The wrapper `String` methods are:
- * `replace` and `split`
- *
- * The wrapper methods that support shortcut fusion are:
- * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`,
- * `first`, `initial`, `last`, `map`, `pluck`, `reject`, `rest`, `reverse`,
- * `slice`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `toArray`,
- * and `where`
- *
- * The chainable wrapper methods are:
- * `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`,
- * `callback`, `chain`, `chunk`, `commit`, `compact`, `concat`, `constant`,
- * `countBy`, `create`, `curry`, `debounce`, `defaults`, `defaultsDeep`,
- * `defer`, `delay`, `difference`, `drop`, `dropRight`, `dropRightWhile`,
- * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`,
- * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`,
- * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`,
- * `invoke`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`,
- * `matchesProperty`, `memoize`, `merge`, `method`, `methodOf`, `mixin`,
- * `modArgs`, `negate`, `omit`, `once`, `pairs`, `partial`, `partialRight`,
- * `partition`, `pick`, `plant`, `pluck`, `property`, `propertyOf`, `pull`,
- * `pullAt`, `push`, `range`, `rearg`, `reject`, `remove`, `rest`, `restParam`,
- * `reverse`, `set`, `shuffle`, `slice`, `sort`, `sortBy`, `sortByAll`,
- * `sortByOrder`, `splice`, `spread`, `take`, `takeRight`, `takeRightWhile`,
- * `takeWhile`, `tap`, `throttle`, `thru`, `times`, `toArray`, `toPlainObject`,
- * `transform`, `union`, `uniq`, `unshift`, `unzip`, `unzipWith`, `values`,
- * `valuesIn`, `where`, `without`, `wrap`, `xor`, `zip`, `zipObject`, `zipWith`
- *
- * The wrapper methods that are **not** chainable by default are:
- * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clone`, `cloneDeep`,
- * `deburr`, `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`,
- * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`,
- * `floor`, `get`, `gt`, `gte`, `has`, `identity`, `includes`, `indexOf`,
- * `inRange`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`,
- * `isEmpty`, `isEqual`, `isError`, `isFinite` `isFunction`, `isMatch`,
- * `isNative`, `isNaN`, `isNull`, `isNumber`, `isObject`, `isPlainObject`,
- * `isRegExp`, `isString`, `isUndefined`, `isTypedArray`, `join`, `kebabCase`,
- * `last`, `lastIndexOf`, `lt`, `lte`, `max`, `min`, `noConflict`, `noop`,
- * `now`, `pad`, `padLeft`, `padRight`, `parseInt`, `pop`, `random`, `reduce`,
- * `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `shift`, `size`,
- * `snakeCase`, `some`, `sortedIndex`, `sortedLastIndex`, `startCase`,
- * `startsWith`, `sum`, `template`, `trim`, `trimLeft`, `trimRight`, `trunc`,
- * `unescape`, `uniqueId`, `value`, and `words`
- *
- * The wrapper method `sample` will return a wrapped value when `n` is provided,
- * otherwise an unwrapped value is returned.
- *
- * @name _
- * @constructor
- * @category Chain
- * @param {*} value The value to wrap in a `lodash` instance.
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var wrapped = _([1, 2, 3]);
- *
- * // returns an unwrapped value
- * wrapped.reduce(function(total, n) {
- * return total + n;
- * });
- * // => 6
- *
- * // returns a wrapped value
- * var squares = wrapped.map(function(n) {
- * return n * n;
- * });
- *
- * _.isArray(squares);
- * // => false
- *
- * _.isArray(squares.value());
- * // => true
- */
-function lodash(value) {
- if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
- if (value instanceof LodashWrapper) {
- return value;
- }
- if (hasOwnProperty.call(value, '__chain__') && hasOwnProperty.call(value, '__wrapped__')) {
- return wrapperClone(value);
- }
- }
- return new LodashWrapper(value);
-}
-
-// Ensure wrappers are instances of `baseLodash`.
-lodash.prototype = baseLodash.prototype;
-
-module.exports = lodash;
diff --git a/deps/npm/node_modules/lodash/chain/plant.js b/deps/npm/node_modules/lodash/chain/plant.js
deleted file mode 100644
index 04099f2386..0000000000
--- a/deps/npm/node_modules/lodash/chain/plant.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./wrapperPlant');
diff --git a/deps/npm/node_modules/lodash/chain/reverse.js b/deps/npm/node_modules/lodash/chain/reverse.js
deleted file mode 100644
index f72a64a19b..0000000000
--- a/deps/npm/node_modules/lodash/chain/reverse.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./wrapperReverse');
diff --git a/deps/npm/node_modules/lodash/chain/run.js b/deps/npm/node_modules/lodash/chain/run.js
deleted file mode 100644
index 5e751a2c32..0000000000
--- a/deps/npm/node_modules/lodash/chain/run.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./wrapperValue');
diff --git a/deps/npm/node_modules/lodash/chain/tap.js b/deps/npm/node_modules/lodash/chain/tap.js
deleted file mode 100644
index 3d0257ecfd..0000000000
--- a/deps/npm/node_modules/lodash/chain/tap.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * This method invokes `interceptor` and returns `value`. The interceptor is
- * bound to `thisArg` and invoked with one argument; (value). The purpose of
- * this method is to "tap into" a method chain in order to perform operations
- * on intermediate results within the chain.
- *
- * @static
- * @memberOf _
- * @category Chain
- * @param {*} value The value to provide to `interceptor`.
- * @param {Function} interceptor The function to invoke.
- * @param {*} [thisArg] The `this` binding of `interceptor`.
- * @returns {*} Returns `value`.
- * @example
- *
- * _([1, 2, 3])
- * .tap(function(array) {
- * array.pop();
- * })
- * .reverse()
- * .value();
- * // => [2, 1]
- */
-function tap(value, interceptor, thisArg) {
- interceptor.call(thisArg, value);
- return value;
-}
-
-module.exports = tap;
diff --git a/deps/npm/node_modules/lodash/chain/thru.js b/deps/npm/node_modules/lodash/chain/thru.js
deleted file mode 100644
index a715780376..0000000000
--- a/deps/npm/node_modules/lodash/chain/thru.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * This method is like `_.tap` except that it returns the result of `interceptor`.
- *
- * @static
- * @memberOf _
- * @category Chain
- * @param {*} value The value to provide to `interceptor`.
- * @param {Function} interceptor The function to invoke.
- * @param {*} [thisArg] The `this` binding of `interceptor`.
- * @returns {*} Returns the result of `interceptor`.
- * @example
- *
- * _(' abc ')
- * .chain()
- * .trim()
- * .thru(function(value) {
- * return [value];
- * })
- * .value();
- * // => ['abc']
- */
-function thru(value, interceptor, thisArg) {
- return interceptor.call(thisArg, value);
-}
-
-module.exports = thru;
diff --git a/deps/npm/node_modules/lodash/chain/toJSON.js b/deps/npm/node_modules/lodash/chain/toJSON.js
deleted file mode 100644
index 5e751a2c32..0000000000
--- a/deps/npm/node_modules/lodash/chain/toJSON.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./wrapperValue');
diff --git a/deps/npm/node_modules/lodash/chain/toString.js b/deps/npm/node_modules/lodash/chain/toString.js
deleted file mode 100644
index c7bcbf9a54..0000000000
--- a/deps/npm/node_modules/lodash/chain/toString.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./wrapperToString');
diff --git a/deps/npm/node_modules/lodash/chain/value.js b/deps/npm/node_modules/lodash/chain/value.js
deleted file mode 100644
index 5e751a2c32..0000000000
--- a/deps/npm/node_modules/lodash/chain/value.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./wrapperValue');
diff --git a/deps/npm/node_modules/lodash/chain/valueOf.js b/deps/npm/node_modules/lodash/chain/valueOf.js
deleted file mode 100644
index 5e751a2c32..0000000000
--- a/deps/npm/node_modules/lodash/chain/valueOf.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./wrapperValue');
diff --git a/deps/npm/node_modules/lodash/chain/wrapperChain.js b/deps/npm/node_modules/lodash/chain/wrapperChain.js
deleted file mode 100644
index 38234819ba..0000000000
--- a/deps/npm/node_modules/lodash/chain/wrapperChain.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var chain = require('./chain');
-
-/**
- * Enables explicit method chaining on the wrapper object.
- *
- * @name chain
- * @memberOf _
- * @category Chain
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 }
- * ];
- *
- * // without explicit chaining
- * _(users).first();
- * // => { 'user': 'barney', 'age': 36 }
- *
- * // with explicit chaining
- * _(users).chain()
- * .first()
- * .pick('user')
- * .value();
- * // => { 'user': 'barney' }
- */
-function wrapperChain() {
- return chain(this);
-}
-
-module.exports = wrapperChain;
diff --git a/deps/npm/node_modules/lodash/chain/wrapperCommit.js b/deps/npm/node_modules/lodash/chain/wrapperCommit.js
deleted file mode 100644
index c3d289804b..0000000000
--- a/deps/npm/node_modules/lodash/chain/wrapperCommit.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var LodashWrapper = require('../internal/LodashWrapper');
-
-/**
- * Executes the chained sequence and returns the wrapped result.
- *
- * @name commit
- * @memberOf _
- * @category Chain
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var array = [1, 2];
- * var wrapped = _(array).push(3);
- *
- * console.log(array);
- * // => [1, 2]
- *
- * wrapped = wrapped.commit();
- * console.log(array);
- * // => [1, 2, 3]
- *
- * wrapped.last();
- * // => 3
- *
- * console.log(array);
- * // => [1, 2, 3]
- */
-function wrapperCommit() {
- return new LodashWrapper(this.value(), this.__chain__);
-}
-
-module.exports = wrapperCommit;
diff --git a/deps/npm/node_modules/lodash/chain/wrapperConcat.js b/deps/npm/node_modules/lodash/chain/wrapperConcat.js
deleted file mode 100644
index 799156cd83..0000000000
--- a/deps/npm/node_modules/lodash/chain/wrapperConcat.js
+++ /dev/null
@@ -1,34 +0,0 @@
-var arrayConcat = require('../internal/arrayConcat'),
- baseFlatten = require('../internal/baseFlatten'),
- isArray = require('../lang/isArray'),
- restParam = require('../function/restParam'),
- toObject = require('../internal/toObject');
-
-/**
- * Creates a new array joining a wrapped array with any additional arrays
- * and/or values.
- *
- * @name concat
- * @memberOf _
- * @category Chain
- * @param {...*} [values] The values to concatenate.
- * @returns {Array} Returns the new concatenated array.
- * @example
- *
- * var array = [1];
- * var wrapped = _(array).concat(2, [3], [[4]]);
- *
- * console.log(wrapped.value());
- * // => [1, 2, 3, [4]]
- *
- * console.log(array);
- * // => [1]
- */
-var wrapperConcat = restParam(function(values) {
- values = baseFlatten(values);
- return this.thru(function(array) {
- return arrayConcat(isArray(array) ? array : [toObject(array)], values);
- });
-});
-
-module.exports = wrapperConcat;
diff --git a/deps/npm/node_modules/lodash/chain/wrapperPlant.js b/deps/npm/node_modules/lodash/chain/wrapperPlant.js
deleted file mode 100644
index 234fe41fec..0000000000
--- a/deps/npm/node_modules/lodash/chain/wrapperPlant.js
+++ /dev/null
@@ -1,45 +0,0 @@
-var baseLodash = require('../internal/baseLodash'),
- wrapperClone = require('../internal/wrapperClone');
-
-/**
- * Creates a clone of the chained sequence planting `value` as the wrapped value.
- *
- * @name plant
- * @memberOf _
- * @category Chain
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var array = [1, 2];
- * var wrapped = _(array).map(function(value) {
- * return Math.pow(value, 2);
- * });
- *
- * var other = [3, 4];
- * var otherWrapped = wrapped.plant(other);
- *
- * otherWrapped.value();
- * // => [9, 16]
- *
- * wrapped.value();
- * // => [1, 4]
- */
-function wrapperPlant(value) {
- var result,
- parent = this;
-
- while (parent instanceof baseLodash) {
- var clone = wrapperClone(parent);
- if (result) {
- previous.__wrapped__ = clone;
- } else {
- result = clone;
- }
- var previous = clone;
- parent = parent.__wrapped__;
- }
- previous.__wrapped__ = value;
- return result;
-}
-
-module.exports = wrapperPlant;
diff --git a/deps/npm/node_modules/lodash/chain/wrapperReverse.js b/deps/npm/node_modules/lodash/chain/wrapperReverse.js
deleted file mode 100644
index 6ba546de4e..0000000000
--- a/deps/npm/node_modules/lodash/chain/wrapperReverse.js
+++ /dev/null
@@ -1,43 +0,0 @@
-var LazyWrapper = require('../internal/LazyWrapper'),
- LodashWrapper = require('../internal/LodashWrapper'),
- thru = require('./thru');
-
-/**
- * Reverses the wrapped array so the first element becomes the last, the
- * second element becomes the second to last, and so on.
- *
- * **Note:** This method mutates the wrapped array.
- *
- * @name reverse
- * @memberOf _
- * @category Chain
- * @returns {Object} Returns the new reversed `lodash` wrapper instance.
- * @example
- *
- * var array = [1, 2, 3];
- *
- * _(array).reverse().value()
- * // => [3, 2, 1]
- *
- * console.log(array);
- * // => [3, 2, 1]
- */
-function wrapperReverse() {
- var value = this.__wrapped__;
-
- var interceptor = function(value) {
- return value.reverse();
- };
- if (value instanceof LazyWrapper) {
- var wrapped = value;
- if (this.__actions__.length) {
- wrapped = new LazyWrapper(this);
- }
- wrapped = wrapped.reverse();
- wrapped.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
- return new LodashWrapper(wrapped, this.__chain__);
- }
- return this.thru(interceptor);
-}
-
-module.exports = wrapperReverse;
diff --git a/deps/npm/node_modules/lodash/chain/wrapperToString.js b/deps/npm/node_modules/lodash/chain/wrapperToString.js
deleted file mode 100644
index db975a5a35..0000000000
--- a/deps/npm/node_modules/lodash/chain/wrapperToString.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Produces the result of coercing the unwrapped value to a string.
- *
- * @name toString
- * @memberOf _
- * @category Chain
- * @returns {string} Returns the coerced string value.
- * @example
- *
- * _([1, 2, 3]).toString();
- * // => '1,2,3'
- */
-function wrapperToString() {
- return (this.value() + '');
-}
-
-module.exports = wrapperToString;
diff --git a/deps/npm/node_modules/lodash/chain/wrapperValue.js b/deps/npm/node_modules/lodash/chain/wrapperValue.js
deleted file mode 100644
index 2734e41c4a..0000000000
--- a/deps/npm/node_modules/lodash/chain/wrapperValue.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var baseWrapperValue = require('../internal/baseWrapperValue');
-
-/**
- * Executes the chained sequence to extract the unwrapped value.
- *
- * @name value
- * @memberOf _
- * @alias run, toJSON, valueOf
- * @category Chain
- * @returns {*} Returns the resolved unwrapped value.
- * @example
- *
- * _([1, 2, 3]).value();
- * // => [1, 2, 3]
- */
-function wrapperValue() {
- return baseWrapperValue(this.__wrapped__, this.__actions__);
-}
-
-module.exports = wrapperValue;
diff --git a/deps/npm/node_modules/lodash/collection.js b/deps/npm/node_modules/lodash/collection.js
deleted file mode 100644
index 03388571c3..0000000000
--- a/deps/npm/node_modules/lodash/collection.js
+++ /dev/null
@@ -1,44 +0,0 @@
-module.exports = {
- 'all': require('./collection/all'),
- 'any': require('./collection/any'),
- 'at': require('./collection/at'),
- 'collect': require('./collection/collect'),
- 'contains': require('./collection/contains'),
- 'countBy': require('./collection/countBy'),
- 'detect': require('./collection/detect'),
- 'each': require('./collection/each'),
- 'eachRight': require('./collection/eachRight'),
- 'every': require('./collection/every'),
- 'filter': require('./collection/filter'),
- 'find': require('./collection/find'),
- 'findLast': require('./collection/findLast'),
- 'findWhere': require('./collection/findWhere'),
- 'foldl': require('./collection/foldl'),
- 'foldr': require('./collection/foldr'),
- 'forEach': require('./collection/forEach'),
- 'forEachRight': require('./collection/forEachRight'),
- 'groupBy': require('./collection/groupBy'),
- 'include': require('./collection/include'),
- 'includes': require('./collection/includes'),
- 'indexBy': require('./collection/indexBy'),
- 'inject': require('./collection/inject'),
- 'invoke': require('./collection/invoke'),
- 'map': require('./collection/map'),
- 'max': require('./math/max'),
- 'min': require('./math/min'),
- 'partition': require('./collection/partition'),
- 'pluck': require('./collection/pluck'),
- 'reduce': require('./collection/reduce'),
- 'reduceRight': require('./collection/reduceRight'),
- 'reject': require('./collection/reject'),
- 'sample': require('./collection/sample'),
- 'select': require('./collection/select'),
- 'shuffle': require('./collection/shuffle'),
- 'size': require('./collection/size'),
- 'some': require('./collection/some'),
- 'sortBy': require('./collection/sortBy'),
- 'sortByAll': require('./collection/sortByAll'),
- 'sortByOrder': require('./collection/sortByOrder'),
- 'sum': require('./math/sum'),
- 'where': require('./collection/where')
-};
diff --git a/deps/npm/node_modules/lodash/collection/all.js b/deps/npm/node_modules/lodash/collection/all.js
deleted file mode 100644
index d0839f77ed..0000000000
--- a/deps/npm/node_modules/lodash/collection/all.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./every');
diff --git a/deps/npm/node_modules/lodash/collection/any.js b/deps/npm/node_modules/lodash/collection/any.js
deleted file mode 100644
index 900ac25e83..0000000000
--- a/deps/npm/node_modules/lodash/collection/any.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./some');
diff --git a/deps/npm/node_modules/lodash/collection/at.js b/deps/npm/node_modules/lodash/collection/at.js
deleted file mode 100644
index 29236e577d..0000000000
--- a/deps/npm/node_modules/lodash/collection/at.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var baseAt = require('../internal/baseAt'),
- baseFlatten = require('../internal/baseFlatten'),
- restParam = require('../function/restParam');
-
-/**
- * Creates an array of elements corresponding to the given keys, or indexes,
- * of `collection`. Keys may be specified as individual arguments or as arrays
- * of keys.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {...(number|number[]|string|string[])} [props] The property names
- * or indexes of elements to pick, specified individually or in arrays.
- * @returns {Array} Returns the new array of picked elements.
- * @example
- *
- * _.at(['a', 'b', 'c'], [0, 2]);
- * // => ['a', 'c']
- *
- * _.at(['barney', 'fred', 'pebbles'], 0, 2);
- * // => ['barney', 'pebbles']
- */
-var at = restParam(function(collection, props) {
- return baseAt(collection, baseFlatten(props));
-});
-
-module.exports = at;
diff --git a/deps/npm/node_modules/lodash/collection/collect.js b/deps/npm/node_modules/lodash/collection/collect.js
deleted file mode 100644
index 0d1e1abfaf..0000000000
--- a/deps/npm/node_modules/lodash/collection/collect.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./map');
diff --git a/deps/npm/node_modules/lodash/collection/contains.js b/deps/npm/node_modules/lodash/collection/contains.js
deleted file mode 100644
index 594722af59..0000000000
--- a/deps/npm/node_modules/lodash/collection/contains.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./includes');
diff --git a/deps/npm/node_modules/lodash/collection/countBy.js b/deps/npm/node_modules/lodash/collection/countBy.js
deleted file mode 100644
index e97dbb749d..0000000000
--- a/deps/npm/node_modules/lodash/collection/countBy.js
+++ /dev/null
@@ -1,54 +0,0 @@
-var createAggregator = require('../internal/createAggregator');
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Creates an object composed of keys generated from the results of running
- * each element of `collection` through `iteratee`. The corresponding value
- * of each key is the number of times the key was returned by `iteratee`.
- * The `iteratee` is bound to `thisArg` and invoked with three arguments:
- * (value, index|key, collection).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns the composed aggregate object.
- * @example
- *
- * _.countBy([4.3, 6.1, 6.4], function(n) {
- * return Math.floor(n);
- * });
- * // => { '4': 1, '6': 2 }
- *
- * _.countBy([4.3, 6.1, 6.4], function(n) {
- * return this.floor(n);
- * }, Math);
- * // => { '4': 1, '6': 2 }
- *
- * _.countBy(['one', 'two', 'three'], 'length');
- * // => { '3': 2, '5': 1 }
- */
-var countBy = createAggregator(function(result, value, key) {
- hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1);
-});
-
-module.exports = countBy;
diff --git a/deps/npm/node_modules/lodash/collection/detect.js b/deps/npm/node_modules/lodash/collection/detect.js
deleted file mode 100644
index 2fb6303efb..0000000000
--- a/deps/npm/node_modules/lodash/collection/detect.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./find');
diff --git a/deps/npm/node_modules/lodash/collection/each.js b/deps/npm/node_modules/lodash/collection/each.js
deleted file mode 100644
index 8800f42046..0000000000
--- a/deps/npm/node_modules/lodash/collection/each.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./forEach');
diff --git a/deps/npm/node_modules/lodash/collection/eachRight.js b/deps/npm/node_modules/lodash/collection/eachRight.js
deleted file mode 100644
index 3252b2aba3..0000000000
--- a/deps/npm/node_modules/lodash/collection/eachRight.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./forEachRight');
diff --git a/deps/npm/node_modules/lodash/collection/every.js b/deps/npm/node_modules/lodash/collection/every.js
deleted file mode 100644
index 5a2d0f5dd4..0000000000
--- a/deps/npm/node_modules/lodash/collection/every.js
+++ /dev/null
@@ -1,66 +0,0 @@
-var arrayEvery = require('../internal/arrayEvery'),
- baseCallback = require('../internal/baseCallback'),
- baseEvery = require('../internal/baseEvery'),
- isArray = require('../lang/isArray'),
- isIterateeCall = require('../internal/isIterateeCall');
-
-/**
- * Checks if `predicate` returns truthy for **all** elements of `collection`.
- * The predicate is bound to `thisArg` and invoked with three arguments:
- * (value, index|key, collection).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @alias all
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {boolean} Returns `true` if all elements pass the predicate check,
- * else `false`.
- * @example
- *
- * _.every([true, 1, null, 'yes'], Boolean);
- * // => false
- *
- * var users = [
- * { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false }
- * ];
- *
- * // using the `_.matches` callback shorthand
- * _.every(users, { 'user': 'barney', 'active': false });
- * // => false
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.every(users, 'active', false);
- * // => true
- *
- * // using the `_.property` callback shorthand
- * _.every(users, 'active');
- * // => false
- */
-function every(collection, predicate, thisArg) {
- var func = isArray(collection) ? arrayEvery : baseEvery;
- if (thisArg && isIterateeCall(collection, predicate, thisArg)) {
- predicate = undefined;
- }
- if (typeof predicate != 'function' || thisArg !== undefined) {
- predicate = baseCallback(predicate, thisArg, 3);
- }
- return func(collection, predicate);
-}
-
-module.exports = every;
diff --git a/deps/npm/node_modules/lodash/collection/filter.js b/deps/npm/node_modules/lodash/collection/filter.js
deleted file mode 100644
index 7620aa7619..0000000000
--- a/deps/npm/node_modules/lodash/collection/filter.js
+++ /dev/null
@@ -1,61 +0,0 @@
-var arrayFilter = require('../internal/arrayFilter'),
- baseCallback = require('../internal/baseCallback'),
- baseFilter = require('../internal/baseFilter'),
- isArray = require('../lang/isArray');
-
-/**
- * Iterates over elements of `collection`, returning an array of all elements
- * `predicate` returns truthy for. The predicate is bound to `thisArg` and
- * invoked with three arguments: (value, index|key, collection).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @alias select
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Array} Returns the new filtered array.
- * @example
- *
- * _.filter([4, 5, 6], function(n) {
- * return n % 2 == 0;
- * });
- * // => [4, 6]
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false }
- * ];
- *
- * // using the `_.matches` callback shorthand
- * _.pluck(_.filter(users, { 'age': 36, 'active': true }), 'user');
- * // => ['barney']
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.pluck(_.filter(users, 'active', false), 'user');
- * // => ['fred']
- *
- * // using the `_.property` callback shorthand
- * _.pluck(_.filter(users, 'active'), 'user');
- * // => ['barney']
- */
-function filter(collection, predicate, thisArg) {
- var func = isArray(collection) ? arrayFilter : baseFilter;
- predicate = baseCallback(predicate, thisArg, 3);
- return func(collection, predicate);
-}
-
-module.exports = filter;
diff --git a/deps/npm/node_modules/lodash/collection/find.js b/deps/npm/node_modules/lodash/collection/find.js
deleted file mode 100644
index 7358cfe86c..0000000000
--- a/deps/npm/node_modules/lodash/collection/find.js
+++ /dev/null
@@ -1,56 +0,0 @@
-var baseEach = require('../internal/baseEach'),
- createFind = require('../internal/createFind');
-
-/**
- * Iterates over elements of `collection`, returning the first element
- * `predicate` returns truthy for. The predicate is bound to `thisArg` and
- * invoked with three arguments: (value, index|key, collection).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @alias detect
- * @category Collection
- * @param {Array|Object|string} collection The collection to search.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {*} Returns the matched element, else `undefined`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false },
- * { 'user': 'pebbles', 'age': 1, 'active': true }
- * ];
- *
- * _.result(_.find(users, function(chr) {
- * return chr.age < 40;
- * }), 'user');
- * // => 'barney'
- *
- * // using the `_.matches` callback shorthand
- * _.result(_.find(users, { 'age': 1, 'active': true }), 'user');
- * // => 'pebbles'
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.result(_.find(users, 'active', false), 'user');
- * // => 'fred'
- *
- * // using the `_.property` callback shorthand
- * _.result(_.find(users, 'active'), 'user');
- * // => 'barney'
- */
-var find = createFind(baseEach);
-
-module.exports = find;
diff --git a/deps/npm/node_modules/lodash/collection/findLast.js b/deps/npm/node_modules/lodash/collection/findLast.js
deleted file mode 100644
index 75dbadca24..0000000000
--- a/deps/npm/node_modules/lodash/collection/findLast.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var baseEachRight = require('../internal/baseEachRight'),
- createFind = require('../internal/createFind');
-
-/**
- * This method is like `_.find` except that it iterates over elements of
- * `collection` from right to left.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to search.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {*} Returns the matched element, else `undefined`.
- * @example
- *
- * _.findLast([1, 2, 3, 4], function(n) {
- * return n % 2 == 1;
- * });
- * // => 3
- */
-var findLast = createFind(baseEachRight, true);
-
-module.exports = findLast;
diff --git a/deps/npm/node_modules/lodash/collection/findWhere.js b/deps/npm/node_modules/lodash/collection/findWhere.js
deleted file mode 100644
index 2d620655ed..0000000000
--- a/deps/npm/node_modules/lodash/collection/findWhere.js
+++ /dev/null
@@ -1,37 +0,0 @@
-var baseMatches = require('../internal/baseMatches'),
- find = require('./find');
-
-/**
- * Performs a deep comparison between each element in `collection` and the
- * source object, returning the first element that has equivalent property
- * values.
- *
- * **Note:** This method supports comparing arrays, booleans, `Date` objects,
- * numbers, `Object` objects, regexes, and strings. Objects are compared by
- * their own, not inherited, enumerable properties. For comparing a single
- * own or inherited property value see `_.matchesProperty`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to search.
- * @param {Object} source The object of property values to match.
- * @returns {*} Returns the matched element, else `undefined`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false }
- * ];
- *
- * _.result(_.findWhere(users, { 'age': 36, 'active': true }), 'user');
- * // => 'barney'
- *
- * _.result(_.findWhere(users, { 'age': 40, 'active': false }), 'user');
- * // => 'fred'
- */
-function findWhere(collection, source) {
- return find(collection, baseMatches(source));
-}
-
-module.exports = findWhere;
diff --git a/deps/npm/node_modules/lodash/collection/foldl.js b/deps/npm/node_modules/lodash/collection/foldl.js
deleted file mode 100644
index 26f53cf7b2..0000000000
--- a/deps/npm/node_modules/lodash/collection/foldl.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./reduce');
diff --git a/deps/npm/node_modules/lodash/collection/foldr.js b/deps/npm/node_modules/lodash/collection/foldr.js
deleted file mode 100644
index 8fb199eda6..0000000000
--- a/deps/npm/node_modules/lodash/collection/foldr.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./reduceRight');
diff --git a/deps/npm/node_modules/lodash/collection/forEach.js b/deps/npm/node_modules/lodash/collection/forEach.js
deleted file mode 100644
index 05a8e2140e..0000000000
--- a/deps/npm/node_modules/lodash/collection/forEach.js
+++ /dev/null
@@ -1,37 +0,0 @@
-var arrayEach = require('../internal/arrayEach'),
- baseEach = require('../internal/baseEach'),
- createForEach = require('../internal/createForEach');
-
-/**
- * Iterates over elements of `collection` invoking `iteratee` for each element.
- * The `iteratee` is bound to `thisArg` and invoked with three arguments:
- * (value, index|key, collection). Iteratee functions may exit iteration early
- * by explicitly returning `false`.
- *
- * **Note:** As with other "Collections" methods, objects with a "length" property
- * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn`
- * may be used for object iteration.
- *
- * @static
- * @memberOf _
- * @alias each
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Array|Object|string} Returns `collection`.
- * @example
- *
- * _([1, 2]).forEach(function(n) {
- * console.log(n);
- * }).value();
- * // => logs each value from left to right and returns the array
- *
- * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) {
- * console.log(n, key);
- * });
- * // => logs each value-key pair and returns the object (iteration order is not guaranteed)
- */
-var forEach = createForEach(arrayEach, baseEach);
-
-module.exports = forEach;
diff --git a/deps/npm/node_modules/lodash/collection/forEachRight.js b/deps/npm/node_modules/lodash/collection/forEachRight.js
deleted file mode 100644
index 3499711002..0000000000
--- a/deps/npm/node_modules/lodash/collection/forEachRight.js
+++ /dev/null
@@ -1,26 +0,0 @@
-var arrayEachRight = require('../internal/arrayEachRight'),
- baseEachRight = require('../internal/baseEachRight'),
- createForEach = require('../internal/createForEach');
-
-/**
- * This method is like `_.forEach` except that it iterates over elements of
- * `collection` from right to left.
- *
- * @static
- * @memberOf _
- * @alias eachRight
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Array|Object|string} Returns `collection`.
- * @example
- *
- * _([1, 2]).forEachRight(function(n) {
- * console.log(n);
- * }).value();
- * // => logs each value from right to left and returns the array
- */
-var forEachRight = createForEach(arrayEachRight, baseEachRight);
-
-module.exports = forEachRight;
diff --git a/deps/npm/node_modules/lodash/collection/groupBy.js b/deps/npm/node_modules/lodash/collection/groupBy.js
deleted file mode 100644
index a925c894a0..0000000000
--- a/deps/npm/node_modules/lodash/collection/groupBy.js
+++ /dev/null
@@ -1,59 +0,0 @@
-var createAggregator = require('../internal/createAggregator');
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Creates an object composed of keys generated from the results of running
- * each element of `collection` through `iteratee`. The corresponding value
- * of each key is an array of the elements responsible for generating the key.
- * The `iteratee` is bound to `thisArg` and invoked with three arguments:
- * (value, index|key, collection).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns the composed aggregate object.
- * @example
- *
- * _.groupBy([4.2, 6.1, 6.4], function(n) {
- * return Math.floor(n);
- * });
- * // => { '4': [4.2], '6': [6.1, 6.4] }
- *
- * _.groupBy([4.2, 6.1, 6.4], function(n) {
- * return this.floor(n);
- * }, Math);
- * // => { '4': [4.2], '6': [6.1, 6.4] }
- *
- * // using the `_.property` callback shorthand
- * _.groupBy(['one', 'two', 'three'], 'length');
- * // => { '3': ['one', 'two'], '5': ['three'] }
- */
-var groupBy = createAggregator(function(result, value, key) {
- if (hasOwnProperty.call(result, key)) {
- result[key].push(value);
- } else {
- result[key] = [value];
- }
-});
-
-module.exports = groupBy;
diff --git a/deps/npm/node_modules/lodash/collection/include.js b/deps/npm/node_modules/lodash/collection/include.js
deleted file mode 100644
index 594722af59..0000000000
--- a/deps/npm/node_modules/lodash/collection/include.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./includes');
diff --git a/deps/npm/node_modules/lodash/collection/includes.js b/deps/npm/node_modules/lodash/collection/includes.js
deleted file mode 100644
index 329486a530..0000000000
--- a/deps/npm/node_modules/lodash/collection/includes.js
+++ /dev/null
@@ -1,57 +0,0 @@
-var baseIndexOf = require('../internal/baseIndexOf'),
- getLength = require('../internal/getLength'),
- isArray = require('../lang/isArray'),
- isIterateeCall = require('../internal/isIterateeCall'),
- isLength = require('../internal/isLength'),
- isString = require('../lang/isString'),
- values = require('../object/values');
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeMax = Math.max;
-
-/**
- * Checks if `target` is in `collection` using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons. If `fromIndex` is negative, it's used as the offset
- * from the end of `collection`.
- *
- * @static
- * @memberOf _
- * @alias contains, include
- * @category Collection
- * @param {Array|Object|string} collection The collection to search.
- * @param {*} target The value to search for.
- * @param {number} [fromIndex=0] The index to search from.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`.
- * @returns {boolean} Returns `true` if a matching element is found, else `false`.
- * @example
- *
- * _.includes([1, 2, 3], 1);
- * // => true
- *
- * _.includes([1, 2, 3], 1, 2);
- * // => false
- *
- * _.includes({ 'user': 'fred', 'age': 40 }, 'fred');
- * // => true
- *
- * _.includes('pebbles', 'eb');
- * // => true
- */
-function includes(collection, target, fromIndex, guard) {
- var length = collection ? getLength(collection) : 0;
- if (!isLength(length)) {
- collection = values(collection);
- length = collection.length;
- }
- if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) {
- fromIndex = 0;
- } else {
- fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0);
- }
- return (typeof collection == 'string' || !isArray(collection) && isString(collection))
- ? (fromIndex <= length && collection.indexOf(target, fromIndex) > -1)
- : (!!length && baseIndexOf(collection, target, fromIndex) > -1);
-}
-
-module.exports = includes;
diff --git a/deps/npm/node_modules/lodash/collection/indexBy.js b/deps/npm/node_modules/lodash/collection/indexBy.js
deleted file mode 100644
index 34a941e729..0000000000
--- a/deps/npm/node_modules/lodash/collection/indexBy.js
+++ /dev/null
@@ -1,53 +0,0 @@
-var createAggregator = require('../internal/createAggregator');
-
-/**
- * Creates an object composed of keys generated from the results of running
- * each element of `collection` through `iteratee`. The corresponding value
- * of each key is the last element responsible for generating the key. The
- * iteratee function is bound to `thisArg` and invoked with three arguments:
- * (value, index|key, collection).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns the composed aggregate object.
- * @example
- *
- * var keyData = [
- * { 'dir': 'left', 'code': 97 },
- * { 'dir': 'right', 'code': 100 }
- * ];
- *
- * _.indexBy(keyData, 'dir');
- * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
- *
- * _.indexBy(keyData, function(object) {
- * return String.fromCharCode(object.code);
- * });
- * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
- *
- * _.indexBy(keyData, function(object) {
- * return this.fromCharCode(object.code);
- * }, String);
- * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
- */
-var indexBy = createAggregator(function(result, value, key) {
- result[key] = value;
-});
-
-module.exports = indexBy;
diff --git a/deps/npm/node_modules/lodash/collection/inject.js b/deps/npm/node_modules/lodash/collection/inject.js
deleted file mode 100644
index 26f53cf7b2..0000000000
--- a/deps/npm/node_modules/lodash/collection/inject.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./reduce');
diff --git a/deps/npm/node_modules/lodash/collection/invoke.js b/deps/npm/node_modules/lodash/collection/invoke.js
deleted file mode 100644
index 6e71721957..0000000000
--- a/deps/npm/node_modules/lodash/collection/invoke.js
+++ /dev/null
@@ -1,42 +0,0 @@
-var baseEach = require('../internal/baseEach'),
- invokePath = require('../internal/invokePath'),
- isArrayLike = require('../internal/isArrayLike'),
- isKey = require('../internal/isKey'),
- restParam = require('../function/restParam');
-
-/**
- * Invokes the method at `path` of each element in `collection`, returning
- * an array of the results of each invoked method. Any additional arguments
- * are provided to each invoked method. If `methodName` is a function it's
- * invoked for, and `this` bound to, each element in `collection`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Array|Function|string} path The path of the method to invoke or
- * the function invoked per iteration.
- * @param {...*} [args] The arguments to invoke the method with.
- * @returns {Array} Returns the array of results.
- * @example
- *
- * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort');
- * // => [[1, 5, 7], [1, 2, 3]]
- *
- * _.invoke([123, 456], String.prototype.split, '');
- * // => [['1', '2', '3'], ['4', '5', '6']]
- */
-var invoke = restParam(function(collection, path, args) {
- var index = -1,
- isFunc = typeof path == 'function',
- isProp = isKey(path),
- result = isArrayLike(collection) ? Array(collection.length) : [];
-
- baseEach(collection, function(value) {
- var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined);
- result[++index] = func ? func.apply(value, args) : invokePath(value, path, args);
- });
- return result;
-});
-
-module.exports = invoke;
diff --git a/deps/npm/node_modules/lodash/collection/map.js b/deps/npm/node_modules/lodash/collection/map.js
deleted file mode 100644
index 5381110df1..0000000000
--- a/deps/npm/node_modules/lodash/collection/map.js
+++ /dev/null
@@ -1,68 +0,0 @@
-var arrayMap = require('../internal/arrayMap'),
- baseCallback = require('../internal/baseCallback'),
- baseMap = require('../internal/baseMap'),
- isArray = require('../lang/isArray');
-
-/**
- * Creates an array of values by running each element in `collection` through
- * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three
- * arguments: (value, index|key, collection).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * Many lodash methods are guarded to work as iteratees for methods like
- * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
- *
- * The guarded methods are:
- * `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`,
- * `drop`, `dropRight`, `every`, `fill`, `flatten`, `invert`, `max`, `min`,
- * `parseInt`, `slice`, `sortBy`, `take`, `takeRight`, `template`, `trim`,
- * `trimLeft`, `trimRight`, `trunc`, `random`, `range`, `sample`, `some`,
- * `sum`, `uniq`, and `words`
- *
- * @static
- * @memberOf _
- * @alias collect
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Array} Returns the new mapped array.
- * @example
- *
- * function timesThree(n) {
- * return n * 3;
- * }
- *
- * _.map([1, 2], timesThree);
- * // => [3, 6]
- *
- * _.map({ 'a': 1, 'b': 2 }, timesThree);
- * // => [3, 6] (iteration order is not guaranteed)
- *
- * var users = [
- * { 'user': 'barney' },
- * { 'user': 'fred' }
- * ];
- *
- * // using the `_.property` callback shorthand
- * _.map(users, 'user');
- * // => ['barney', 'fred']
- */
-function map(collection, iteratee, thisArg) {
- var func = isArray(collection) ? arrayMap : baseMap;
- iteratee = baseCallback(iteratee, thisArg, 3);
- return func(collection, iteratee);
-}
-
-module.exports = map;
diff --git a/deps/npm/node_modules/lodash/collection/max.js b/deps/npm/node_modules/lodash/collection/max.js
deleted file mode 100644
index bb1d213c33..0000000000
--- a/deps/npm/node_modules/lodash/collection/max.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('../math/max');
diff --git a/deps/npm/node_modules/lodash/collection/min.js b/deps/npm/node_modules/lodash/collection/min.js
deleted file mode 100644
index eef13d02b8..0000000000
--- a/deps/npm/node_modules/lodash/collection/min.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('../math/min');
diff --git a/deps/npm/node_modules/lodash/collection/partition.js b/deps/npm/node_modules/lodash/collection/partition.js
deleted file mode 100644
index ee35f27d93..0000000000
--- a/deps/npm/node_modules/lodash/collection/partition.js
+++ /dev/null
@@ -1,66 +0,0 @@
-var createAggregator = require('../internal/createAggregator');
-
-/**
- * Creates an array of elements split into two groups, the first of which
- * contains elements `predicate` returns truthy for, while the second of which
- * contains elements `predicate` returns falsey for. The predicate is bound
- * to `thisArg` and invoked with three arguments: (value, index|key, collection).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Array} Returns the array of grouped elements.
- * @example
- *
- * _.partition([1, 2, 3], function(n) {
- * return n % 2;
- * });
- * // => [[1, 3], [2]]
- *
- * _.partition([1.2, 2.3, 3.4], function(n) {
- * return this.floor(n) % 2;
- * }, Math);
- * // => [[1.2, 3.4], [2.3]]
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': false },
- * { 'user': 'fred', 'age': 40, 'active': true },
- * { 'user': 'pebbles', 'age': 1, 'active': false }
- * ];
- *
- * var mapper = function(array) {
- * return _.pluck(array, 'user');
- * };
- *
- * // using the `_.matches` callback shorthand
- * _.map(_.partition(users, { 'age': 1, 'active': false }), mapper);
- * // => [['pebbles'], ['barney', 'fred']]
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.map(_.partition(users, 'active', false), mapper);
- * // => [['barney', 'pebbles'], ['fred']]
- *
- * // using the `_.property` callback shorthand
- * _.map(_.partition(users, 'active'), mapper);
- * // => [['fred'], ['barney', 'pebbles']]
- */
-var partition = createAggregator(function(result, value, key) {
- result[key ? 0 : 1].push(value);
-}, function() { return [[], []]; });
-
-module.exports = partition;
diff --git a/deps/npm/node_modules/lodash/collection/pluck.js b/deps/npm/node_modules/lodash/collection/pluck.js
deleted file mode 100644
index 5ee1ec84ee..0000000000
--- a/deps/npm/node_modules/lodash/collection/pluck.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var map = require('./map'),
- property = require('../utility/property');
-
-/**
- * Gets the property value of `path` from all elements in `collection`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Array|string} path The path of the property to pluck.
- * @returns {Array} Returns the property values.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 }
- * ];
- *
- * _.pluck(users, 'user');
- * // => ['barney', 'fred']
- *
- * var userIndex = _.indexBy(users, 'user');
- * _.pluck(userIndex, 'age');
- * // => [36, 40] (iteration order is not guaranteed)
- */
-function pluck(collection, path) {
- return map(collection, property(path));
-}
-
-module.exports = pluck;
diff --git a/deps/npm/node_modules/lodash/collection/reduce.js b/deps/npm/node_modules/lodash/collection/reduce.js
deleted file mode 100644
index 5d5e8c9169..0000000000
--- a/deps/npm/node_modules/lodash/collection/reduce.js
+++ /dev/null
@@ -1,44 +0,0 @@
-var arrayReduce = require('../internal/arrayReduce'),
- baseEach = require('../internal/baseEach'),
- createReduce = require('../internal/createReduce');
-
-/**
- * Reduces `collection` to a value which is the accumulated result of running
- * each element in `collection` through `iteratee`, where each successive
- * invocation is supplied the return value of the previous. If `accumulator`
- * is not provided the first element of `collection` is used as the initial
- * value. The `iteratee` is bound to `thisArg` and invoked with four arguments:
- * (accumulator, value, index|key, collection).
- *
- * Many lodash methods are guarded to work as iteratees for methods like
- * `_.reduce`, `_.reduceRight`, and `_.transform`.
- *
- * The guarded methods are:
- * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `sortByAll`,
- * and `sortByOrder`
- *
- * @static
- * @memberOf _
- * @alias foldl, inject
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {*} Returns the accumulated value.
- * @example
- *
- * _.reduce([1, 2], function(total, n) {
- * return total + n;
- * });
- * // => 3
- *
- * _.reduce({ 'a': 1, 'b': 2 }, function(result, n, key) {
- * result[key] = n * 3;
- * return result;
- * }, {});
- * // => { 'a': 3, 'b': 6 } (iteration order is not guaranteed)
- */
-var reduce = createReduce(arrayReduce, baseEach);
-
-module.exports = reduce;
diff --git a/deps/npm/node_modules/lodash/collection/reduceRight.js b/deps/npm/node_modules/lodash/collection/reduceRight.js
deleted file mode 100644
index 5a5753b9c2..0000000000
--- a/deps/npm/node_modules/lodash/collection/reduceRight.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var arrayReduceRight = require('../internal/arrayReduceRight'),
- baseEachRight = require('../internal/baseEachRight'),
- createReduce = require('../internal/createReduce');
-
-/**
- * This method is like `_.reduce` except that it iterates over elements of
- * `collection` from right to left.
- *
- * @static
- * @memberOf _
- * @alias foldr
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {*} Returns the accumulated value.
- * @example
- *
- * var array = [[0, 1], [2, 3], [4, 5]];
- *
- * _.reduceRight(array, function(flattened, other) {
- * return flattened.concat(other);
- * }, []);
- * // => [4, 5, 2, 3, 0, 1]
- */
-var reduceRight = createReduce(arrayReduceRight, baseEachRight);
-
-module.exports = reduceRight;
diff --git a/deps/npm/node_modules/lodash/collection/reject.js b/deps/npm/node_modules/lodash/collection/reject.js
deleted file mode 100644
index 55924539b5..0000000000
--- a/deps/npm/node_modules/lodash/collection/reject.js
+++ /dev/null
@@ -1,50 +0,0 @@
-var arrayFilter = require('../internal/arrayFilter'),
- baseCallback = require('../internal/baseCallback'),
- baseFilter = require('../internal/baseFilter'),
- isArray = require('../lang/isArray');
-
-/**
- * The opposite of `_.filter`; this method returns the elements of `collection`
- * that `predicate` does **not** return truthy for.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Array} Returns the new filtered array.
- * @example
- *
- * _.reject([1, 2, 3, 4], function(n) {
- * return n % 2 == 0;
- * });
- * // => [1, 3]
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': false },
- * { 'user': 'fred', 'age': 40, 'active': true }
- * ];
- *
- * // using the `_.matches` callback shorthand
- * _.pluck(_.reject(users, { 'age': 40, 'active': true }), 'user');
- * // => ['barney']
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.pluck(_.reject(users, 'active', false), 'user');
- * // => ['fred']
- *
- * // using the `_.property` callback shorthand
- * _.pluck(_.reject(users, 'active'), 'user');
- * // => ['barney']
- */
-function reject(collection, predicate, thisArg) {
- var func = isArray(collection) ? arrayFilter : baseFilter;
- predicate = baseCallback(predicate, thisArg, 3);
- return func(collection, function(value, index, collection) {
- return !predicate(value, index, collection);
- });
-}
-
-module.exports = reject;
diff --git a/deps/npm/node_modules/lodash/collection/sample.js b/deps/npm/node_modules/lodash/collection/sample.js
deleted file mode 100644
index 8e01533016..0000000000
--- a/deps/npm/node_modules/lodash/collection/sample.js
+++ /dev/null
@@ -1,50 +0,0 @@
-var baseRandom = require('../internal/baseRandom'),
- isIterateeCall = require('../internal/isIterateeCall'),
- toArray = require('../lang/toArray'),
- toIterable = require('../internal/toIterable');
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeMin = Math.min;
-
-/**
- * Gets a random element or `n` random elements from a collection.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to sample.
- * @param {number} [n] The number of elements to sample.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {*} Returns the random sample(s).
- * @example
- *
- * _.sample([1, 2, 3, 4]);
- * // => 2
- *
- * _.sample([1, 2, 3, 4], 2);
- * // => [3, 1]
- */
-function sample(collection, n, guard) {
- if (guard ? isIterateeCall(collection, n, guard) : n == null) {
- collection = toIterable(collection);
- var length = collection.length;
- return length > 0 ? collection[baseRandom(0, length - 1)] : undefined;
- }
- var index = -1,
- result = toArray(collection),
- length = result.length,
- lastIndex = length - 1;
-
- n = nativeMin(n < 0 ? 0 : (+n || 0), length);
- while (++index < n) {
- var rand = baseRandom(index, lastIndex),
- value = result[rand];
-
- result[rand] = result[index];
- result[index] = value;
- }
- result.length = n;
- return result;
-}
-
-module.exports = sample;
diff --git a/deps/npm/node_modules/lodash/collection/select.js b/deps/npm/node_modules/lodash/collection/select.js
deleted file mode 100644
index ade80f6fba..0000000000
--- a/deps/npm/node_modules/lodash/collection/select.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./filter');
diff --git a/deps/npm/node_modules/lodash/collection/shuffle.js b/deps/npm/node_modules/lodash/collection/shuffle.js
deleted file mode 100644
index 949689c5fc..0000000000
--- a/deps/npm/node_modules/lodash/collection/shuffle.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var sample = require('./sample');
-
-/** Used as references for `-Infinity` and `Infinity`. */
-var POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
-
-/**
- * Creates an array of shuffled values, using a version of the
- * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to shuffle.
- * @returns {Array} Returns the new shuffled array.
- * @example
- *
- * _.shuffle([1, 2, 3, 4]);
- * // => [4, 1, 3, 2]
- */
-function shuffle(collection) {
- return sample(collection, POSITIVE_INFINITY);
-}
-
-module.exports = shuffle;
diff --git a/deps/npm/node_modules/lodash/collection/size.js b/deps/npm/node_modules/lodash/collection/size.js
deleted file mode 100644
index 78dcf4ce9b..0000000000
--- a/deps/npm/node_modules/lodash/collection/size.js
+++ /dev/null
@@ -1,30 +0,0 @@
-var getLength = require('../internal/getLength'),
- isLength = require('../internal/isLength'),
- keys = require('../object/keys');
-
-/**
- * Gets the size of `collection` by returning its length for array-like
- * values or the number of own enumerable properties for objects.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to inspect.
- * @returns {number} Returns the size of `collection`.
- * @example
- *
- * _.size([1, 2, 3]);
- * // => 3
- *
- * _.size({ 'a': 1, 'b': 2 });
- * // => 2
- *
- * _.size('pebbles');
- * // => 7
- */
-function size(collection) {
- var length = collection ? getLength(collection) : 0;
- return isLength(length) ? length : keys(collection).length;
-}
-
-module.exports = size;
diff --git a/deps/npm/node_modules/lodash/collection/some.js b/deps/npm/node_modules/lodash/collection/some.js
deleted file mode 100644
index d0b09a4746..0000000000
--- a/deps/npm/node_modules/lodash/collection/some.js
+++ /dev/null
@@ -1,67 +0,0 @@
-var arraySome = require('../internal/arraySome'),
- baseCallback = require('../internal/baseCallback'),
- baseSome = require('../internal/baseSome'),
- isArray = require('../lang/isArray'),
- isIterateeCall = require('../internal/isIterateeCall');
-
-/**
- * Checks if `predicate` returns truthy for **any** element of `collection`.
- * The function returns as soon as it finds a passing value and does not iterate
- * over the entire collection. The predicate is bound to `thisArg` and invoked
- * with three arguments: (value, index|key, collection).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @alias any
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- * else `false`.
- * @example
- *
- * _.some([null, 0, 'yes', false], Boolean);
- * // => true
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false }
- * ];
- *
- * // using the `_.matches` callback shorthand
- * _.some(users, { 'user': 'barney', 'active': false });
- * // => false
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.some(users, 'active', false);
- * // => true
- *
- * // using the `_.property` callback shorthand
- * _.some(users, 'active');
- * // => true
- */
-function some(collection, predicate, thisArg) {
- var func = isArray(collection) ? arraySome : baseSome;
- if (thisArg && isIterateeCall(collection, predicate, thisArg)) {
- predicate = undefined;
- }
- if (typeof predicate != 'function' || thisArg !== undefined) {
- predicate = baseCallback(predicate, thisArg, 3);
- }
- return func(collection, predicate);
-}
-
-module.exports = some;
diff --git a/deps/npm/node_modules/lodash/collection/sortBy.js b/deps/npm/node_modules/lodash/collection/sortBy.js
deleted file mode 100644
index 4401c777f4..0000000000
--- a/deps/npm/node_modules/lodash/collection/sortBy.js
+++ /dev/null
@@ -1,71 +0,0 @@
-var baseCallback = require('../internal/baseCallback'),
- baseMap = require('../internal/baseMap'),
- baseSortBy = require('../internal/baseSortBy'),
- compareAscending = require('../internal/compareAscending'),
- isIterateeCall = require('../internal/isIterateeCall');
-
-/**
- * Creates an array of elements, sorted in ascending order by the results of
- * running each element in a collection through `iteratee`. This method performs
- * a stable sort, that is, it preserves the original sort order of equal elements.
- * The `iteratee` is bound to `thisArg` and invoked with three arguments:
- * (value, index|key, collection).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Array} Returns the new sorted array.
- * @example
- *
- * _.sortBy([1, 2, 3], function(n) {
- * return Math.sin(n);
- * });
- * // => [3, 1, 2]
- *
- * _.sortBy([1, 2, 3], function(n) {
- * return this.sin(n);
- * }, Math);
- * // => [3, 1, 2]
- *
- * var users = [
- * { 'user': 'fred' },
- * { 'user': 'pebbles' },
- * { 'user': 'barney' }
- * ];
- *
- * // using the `_.property` callback shorthand
- * _.pluck(_.sortBy(users, 'user'), 'user');
- * // => ['barney', 'fred', 'pebbles']
- */
-function sortBy(collection, iteratee, thisArg) {
- if (collection == null) {
- return [];
- }
- if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
- iteratee = undefined;
- }
- var index = -1;
- iteratee = baseCallback(iteratee, thisArg, 3);
-
- var result = baseMap(collection, function(value, key, collection) {
- return { 'criteria': iteratee(value, key, collection), 'index': ++index, 'value': value };
- });
- return baseSortBy(result, compareAscending);
-}
-
-module.exports = sortBy;
diff --git a/deps/npm/node_modules/lodash/collection/sortByAll.js b/deps/npm/node_modules/lodash/collection/sortByAll.js
deleted file mode 100644
index 4766c20985..0000000000
--- a/deps/npm/node_modules/lodash/collection/sortByAll.js
+++ /dev/null
@@ -1,52 +0,0 @@
-var baseFlatten = require('../internal/baseFlatten'),
- baseSortByOrder = require('../internal/baseSortByOrder'),
- isIterateeCall = require('../internal/isIterateeCall'),
- restParam = require('../function/restParam');
-
-/**
- * This method is like `_.sortBy` except that it can sort by multiple iteratees
- * or property names.
- *
- * If a property name is provided for an iteratee the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If an object is provided for an iteratee the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {...(Function|Function[]|Object|Object[]|string|string[])} iteratees
- * The iteratees to sort by, specified as individual values or arrays of values.
- * @returns {Array} Returns the new sorted array.
- * @example
- *
- * var users = [
- * { 'user': 'fred', 'age': 48 },
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 42 },
- * { 'user': 'barney', 'age': 34 }
- * ];
- *
- * _.map(_.sortByAll(users, ['user', 'age']), _.values);
- * // => [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]]
- *
- * _.map(_.sortByAll(users, 'user', function(chr) {
- * return Math.floor(chr.age / 10);
- * }), _.values);
- * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
- */
-var sortByAll = restParam(function(collection, iteratees) {
- if (collection == null) {
- return [];
- }
- var guard = iteratees[2];
- if (guard && isIterateeCall(iteratees[0], iteratees[1], guard)) {
- iteratees.length = 1;
- }
- return baseSortByOrder(collection, baseFlatten(iteratees), []);
-});
-
-module.exports = sortByAll;
diff --git a/deps/npm/node_modules/lodash/collection/sortByOrder.js b/deps/npm/node_modules/lodash/collection/sortByOrder.js
deleted file mode 100644
index 8b4fc19687..0000000000
--- a/deps/npm/node_modules/lodash/collection/sortByOrder.js
+++ /dev/null
@@ -1,55 +0,0 @@
-var baseSortByOrder = require('../internal/baseSortByOrder'),
- isArray = require('../lang/isArray'),
- isIterateeCall = require('../internal/isIterateeCall');
-
-/**
- * This method is like `_.sortByAll` except that it allows specifying the
- * sort orders of the iteratees to sort by. If `orders` is unspecified, all
- * values are sorted in ascending order. Otherwise, a value is sorted in
- * ascending order if its corresponding order is "asc", and descending if "desc".
- *
- * If a property name is provided for an iteratee the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If an object is provided for an iteratee the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
- * @param {boolean[]} [orders] The sort orders of `iteratees`.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`.
- * @returns {Array} Returns the new sorted array.
- * @example
- *
- * var users = [
- * { 'user': 'fred', 'age': 48 },
- * { 'user': 'barney', 'age': 34 },
- * { 'user': 'fred', 'age': 42 },
- * { 'user': 'barney', 'age': 36 }
- * ];
- *
- * // sort by `user` in ascending order and by `age` in descending order
- * _.map(_.sortByOrder(users, ['user', 'age'], ['asc', 'desc']), _.values);
- * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
- */
-function sortByOrder(collection, iteratees, orders, guard) {
- if (collection == null) {
- return [];
- }
- if (guard && isIterateeCall(iteratees, orders, guard)) {
- orders = undefined;
- }
- if (!isArray(iteratees)) {
- iteratees = iteratees == null ? [] : [iteratees];
- }
- if (!isArray(orders)) {
- orders = orders == null ? [] : [orders];
- }
- return baseSortByOrder(collection, iteratees, orders);
-}
-
-module.exports = sortByOrder;
diff --git a/deps/npm/node_modules/lodash/collection/sum.js b/deps/npm/node_modules/lodash/collection/sum.js
deleted file mode 100644
index a2e93808ae..0000000000
--- a/deps/npm/node_modules/lodash/collection/sum.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('../math/sum');
diff --git a/deps/npm/node_modules/lodash/collection/where.js b/deps/npm/node_modules/lodash/collection/where.js
deleted file mode 100644
index f603bf8ce4..0000000000
--- a/deps/npm/node_modules/lodash/collection/where.js
+++ /dev/null
@@ -1,37 +0,0 @@
-var baseMatches = require('../internal/baseMatches'),
- filter = require('./filter');
-
-/**
- * Performs a deep comparison between each element in `collection` and the
- * source object, returning an array of all elements that have equivalent
- * property values.
- *
- * **Note:** This method supports comparing arrays, booleans, `Date` objects,
- * numbers, `Object` objects, regexes, and strings. Objects are compared by
- * their own, not inherited, enumerable properties. For comparing a single
- * own or inherited property value see `_.matchesProperty`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to search.
- * @param {Object} source The object of property values to match.
- * @returns {Array} Returns the new filtered array.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': false, 'pets': ['hoppy'] },
- * { 'user': 'fred', 'age': 40, 'active': true, 'pets': ['baby puss', 'dino'] }
- * ];
- *
- * _.pluck(_.where(users, { 'age': 36, 'active': false }), 'user');
- * // => ['barney']
- *
- * _.pluck(_.where(users, { 'pets': ['dino'] }), 'user');
- * // => ['fred']
- */
-function where(collection, source) {
- return filter(collection, baseMatches(source));
-}
-
-module.exports = where;
diff --git a/deps/npm/node_modules/lodash/date.js b/deps/npm/node_modules/lodash/date.js
deleted file mode 100644
index 195366e777..0000000000
--- a/deps/npm/node_modules/lodash/date.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = {
- 'now': require('./date/now')
-};
diff --git a/deps/npm/node_modules/lodash/date/now.js b/deps/npm/node_modules/lodash/date/now.js
deleted file mode 100644
index ffe3060e5b..0000000000
--- a/deps/npm/node_modules/lodash/date/now.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var getNative = require('../internal/getNative');
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeNow = getNative(Date, 'now');
-
-/**
- * Gets the number of milliseconds that have elapsed since the Unix epoch
- * (1 January 1970 00:00:00 UTC).
- *
- * @static
- * @memberOf _
- * @category Date
- * @example
- *
- * _.defer(function(stamp) {
- * console.log(_.now() - stamp);
- * }, _.now());
- * // => logs the number of milliseconds it took for the deferred function to be invoked
- */
-var now = nativeNow || function() {
- return new Date().getTime();
-};
-
-module.exports = now;
diff --git a/deps/npm/node_modules/lodash/function.js b/deps/npm/node_modules/lodash/function.js
deleted file mode 100644
index 71f8ebeb27..0000000000
--- a/deps/npm/node_modules/lodash/function.js
+++ /dev/null
@@ -1,28 +0,0 @@
-module.exports = {
- 'after': require('./function/after'),
- 'ary': require('./function/ary'),
- 'backflow': require('./function/backflow'),
- 'before': require('./function/before'),
- 'bind': require('./function/bind'),
- 'bindAll': require('./function/bindAll'),
- 'bindKey': require('./function/bindKey'),
- 'compose': require('./function/compose'),
- 'curry': require('./function/curry'),
- 'curryRight': require('./function/curryRight'),
- 'debounce': require('./function/debounce'),
- 'defer': require('./function/defer'),
- 'delay': require('./function/delay'),
- 'flow': require('./function/flow'),
- 'flowRight': require('./function/flowRight'),
- 'memoize': require('./function/memoize'),
- 'modArgs': require('./function/modArgs'),
- 'negate': require('./function/negate'),
- 'once': require('./function/once'),
- 'partial': require('./function/partial'),
- 'partialRight': require('./function/partialRight'),
- 'rearg': require('./function/rearg'),
- 'restParam': require('./function/restParam'),
- 'spread': require('./function/spread'),
- 'throttle': require('./function/throttle'),
- 'wrap': require('./function/wrap')
-};
diff --git a/deps/npm/node_modules/lodash/function/after.js b/deps/npm/node_modules/lodash/function/after.js
deleted file mode 100644
index 96a51fdbcf..0000000000
--- a/deps/npm/node_modules/lodash/function/after.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/** Used as the `TypeError` message for "Functions" methods. */
-var FUNC_ERROR_TEXT = 'Expected a function';
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeIsFinite = global.isFinite;
-
-/**
- * The opposite of `_.before`; this method creates a function that invokes
- * `func` once it's called `n` or more times.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {number} n The number of calls before `func` is invoked.
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new restricted function.
- * @example
- *
- * var saves = ['profile', 'settings'];
- *
- * var done = _.after(saves.length, function() {
- * console.log('done saving!');
- * });
- *
- * _.forEach(saves, function(type) {
- * asyncSave({ 'type': type, 'complete': done });
- * });
- * // => logs 'done saving!' after the two async saves have completed
- */
-function after(n, func) {
- if (typeof func != 'function') {
- if (typeof n == 'function') {
- var temp = n;
- n = func;
- func = temp;
- } else {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- }
- n = nativeIsFinite(n = +n) ? n : 0;
- return function() {
- if (--n < 1) {
- return func.apply(this, arguments);
- }
- };
-}
-
-module.exports = after;
diff --git a/deps/npm/node_modules/lodash/function/ary.js b/deps/npm/node_modules/lodash/function/ary.js
deleted file mode 100644
index 53a6913e3f..0000000000
--- a/deps/npm/node_modules/lodash/function/ary.js
+++ /dev/null
@@ -1,34 +0,0 @@
-var createWrapper = require('../internal/createWrapper'),
- isIterateeCall = require('../internal/isIterateeCall');
-
-/** Used to compose bitmasks for wrapper metadata. */
-var ARY_FLAG = 128;
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeMax = Math.max;
-
-/**
- * Creates a function that accepts up to `n` arguments ignoring any
- * additional arguments.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to cap arguments for.
- * @param {number} [n=func.length] The arity cap.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Function} Returns the new function.
- * @example
- *
- * _.map(['6', '8', '10'], _.ary(parseInt, 1));
- * // => [6, 8, 10]
- */
-function ary(func, n, guard) {
- if (guard && isIterateeCall(func, n, guard)) {
- n = undefined;
- }
- n = (func && n == null) ? func.length : nativeMax(+n || 0, 0);
- return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n);
-}
-
-module.exports = ary;
diff --git a/deps/npm/node_modules/lodash/function/backflow.js b/deps/npm/node_modules/lodash/function/backflow.js
deleted file mode 100644
index 1954e94239..0000000000
--- a/deps/npm/node_modules/lodash/function/backflow.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./flowRight');
diff --git a/deps/npm/node_modules/lodash/function/before.js b/deps/npm/node_modules/lodash/function/before.js
deleted file mode 100644
index 3d94216825..0000000000
--- a/deps/npm/node_modules/lodash/function/before.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/** Used as the `TypeError` message for "Functions" methods. */
-var FUNC_ERROR_TEXT = 'Expected a function';
-
-/**
- * Creates a function that invokes `func`, with the `this` binding and arguments
- * of the created function, while it's called less than `n` times. Subsequent
- * calls to the created function return the result of the last `func` invocation.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {number} n The number of calls at which `func` is no longer invoked.
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new restricted function.
- * @example
- *
- * jQuery('#add').on('click', _.before(5, addContactToList));
- * // => allows adding up to 4 contacts to the list
- */
-function before(n, func) {
- var result;
- if (typeof func != 'function') {
- if (typeof n == 'function') {
- var temp = n;
- n = func;
- func = temp;
- } else {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- }
- return function() {
- if (--n > 0) {
- result = func.apply(this, arguments);
- }
- if (n <= 1) {
- func = undefined;
- }
- return result;
- };
-}
-
-module.exports = before;
diff --git a/deps/npm/node_modules/lodash/function/bind.js b/deps/npm/node_modules/lodash/function/bind.js
deleted file mode 100644
index 0de126ae35..0000000000
--- a/deps/npm/node_modules/lodash/function/bind.js
+++ /dev/null
@@ -1,56 +0,0 @@
-var createWrapper = require('../internal/createWrapper'),
- replaceHolders = require('../internal/replaceHolders'),
- restParam = require('./restParam');
-
-/** Used to compose bitmasks for wrapper metadata. */
-var BIND_FLAG = 1,
- PARTIAL_FLAG = 32;
-
-/**
- * Creates a function that invokes `func` with the `this` binding of `thisArg`
- * and prepends any additional `_.bind` arguments to those provided to the
- * bound function.
- *
- * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
- * may be used as a placeholder for partially applied arguments.
- *
- * **Note:** Unlike native `Function#bind` this method does not set the "length"
- * property of bound functions.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to bind.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new bound function.
- * @example
- *
- * var greet = function(greeting, punctuation) {
- * return greeting + ' ' + this.user + punctuation;
- * };
- *
- * var object = { 'user': 'fred' };
- *
- * var bound = _.bind(greet, object, 'hi');
- * bound('!');
- * // => 'hi fred!'
- *
- * // using placeholders
- * var bound = _.bind(greet, object, _, '!');
- * bound('hi');
- * // => 'hi fred!'
- */
-var bind = restParam(function(func, thisArg, partials) {
- var bitmask = BIND_FLAG;
- if (partials.length) {
- var holders = replaceHolders(partials, bind.placeholder);
- bitmask |= PARTIAL_FLAG;
- }
- return createWrapper(func, bitmask, thisArg, partials, holders);
-});
-
-// Assign default placeholders.
-bind.placeholder = {};
-
-module.exports = bind;
diff --git a/deps/npm/node_modules/lodash/function/bindAll.js b/deps/npm/node_modules/lodash/function/bindAll.js
deleted file mode 100644
index a09e948524..0000000000
--- a/deps/npm/node_modules/lodash/function/bindAll.js
+++ /dev/null
@@ -1,50 +0,0 @@
-var baseFlatten = require('../internal/baseFlatten'),
- createWrapper = require('../internal/createWrapper'),
- functions = require('../object/functions'),
- restParam = require('./restParam');
-
-/** Used to compose bitmasks for wrapper metadata. */
-var BIND_FLAG = 1;
-
-/**
- * Binds methods of an object to the object itself, overwriting the existing
- * method. Method names may be specified as individual arguments or as arrays
- * of method names. If no method names are provided all enumerable function
- * properties, own and inherited, of `object` are bound.
- *
- * **Note:** This method does not set the "length" property of bound functions.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Object} object The object to bind and assign the bound methods to.
- * @param {...(string|string[])} [methodNames] The object method names to bind,
- * specified as individual method names or arrays of method names.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var view = {
- * 'label': 'docs',
- * 'onClick': function() {
- * console.log('clicked ' + this.label);
- * }
- * };
- *
- * _.bindAll(view);
- * jQuery('#docs').on('click', view.onClick);
- * // => logs 'clicked docs' when the element is clicked
- */
-var bindAll = restParam(function(object, methodNames) {
- methodNames = methodNames.length ? baseFlatten(methodNames) : functions(object);
-
- var index = -1,
- length = methodNames.length;
-
- while (++index < length) {
- var key = methodNames[index];
- object[key] = createWrapper(object[key], BIND_FLAG, object);
- }
- return object;
-});
-
-module.exports = bindAll;
diff --git a/deps/npm/node_modules/lodash/function/bindKey.js b/deps/npm/node_modules/lodash/function/bindKey.js
deleted file mode 100644
index b787fe7022..0000000000
--- a/deps/npm/node_modules/lodash/function/bindKey.js
+++ /dev/null
@@ -1,66 +0,0 @@
-var createWrapper = require('../internal/createWrapper'),
- replaceHolders = require('../internal/replaceHolders'),
- restParam = require('./restParam');
-
-/** Used to compose bitmasks for wrapper metadata. */
-var BIND_FLAG = 1,
- BIND_KEY_FLAG = 2,
- PARTIAL_FLAG = 32;
-
-/**
- * Creates a function that invokes the method at `object[key]` and prepends
- * any additional `_.bindKey` arguments to those provided to the bound function.
- *
- * This method differs from `_.bind` by allowing bound functions to reference
- * methods that may be redefined or don't yet exist.
- * See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
- * for more details.
- *
- * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
- * builds, may be used as a placeholder for partially applied arguments.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Object} object The object the method belongs to.
- * @param {string} key The key of the method.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new bound function.
- * @example
- *
- * var object = {
- * 'user': 'fred',
- * 'greet': function(greeting, punctuation) {
- * return greeting + ' ' + this.user + punctuation;
- * }
- * };
- *
- * var bound = _.bindKey(object, 'greet', 'hi');
- * bound('!');
- * // => 'hi fred!'
- *
- * object.greet = function(greeting, punctuation) {
- * return greeting + 'ya ' + this.user + punctuation;
- * };
- *
- * bound('!');
- * // => 'hiya fred!'
- *
- * // using placeholders
- * var bound = _.bindKey(object, 'greet', _, '!');
- * bound('hi');
- * // => 'hiya fred!'
- */
-var bindKey = restParam(function(object, key, partials) {
- var bitmask = BIND_FLAG | BIND_KEY_FLAG;
- if (partials.length) {
- var holders = replaceHolders(partials, bindKey.placeholder);
- bitmask |= PARTIAL_FLAG;
- }
- return createWrapper(key, bitmask, object, partials, holders);
-});
-
-// Assign default placeholders.
-bindKey.placeholder = {};
-
-module.exports = bindKey;
diff --git a/deps/npm/node_modules/lodash/function/compose.js b/deps/npm/node_modules/lodash/function/compose.js
deleted file mode 100644
index 1954e94239..0000000000
--- a/deps/npm/node_modules/lodash/function/compose.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./flowRight');
diff --git a/deps/npm/node_modules/lodash/function/curry.js b/deps/npm/node_modules/lodash/function/curry.js
deleted file mode 100644
index b7db3fdad8..0000000000
--- a/deps/npm/node_modules/lodash/function/curry.js
+++ /dev/null
@@ -1,51 +0,0 @@
-var createCurry = require('../internal/createCurry');
-
-/** Used to compose bitmasks for wrapper metadata. */
-var CURRY_FLAG = 8;
-
-/**
- * Creates a function that accepts one or more arguments of `func` that when
- * called either invokes `func` returning its result, if all `func` arguments
- * have been provided, or returns a function that accepts one or more of the
- * remaining `func` arguments, and so on. The arity of `func` may be specified
- * if `func.length` is not sufficient.
- *
- * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
- * may be used as a placeholder for provided arguments.
- *
- * **Note:** This method does not set the "length" property of curried functions.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to curry.
- * @param {number} [arity=func.length] The arity of `func`.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Function} Returns the new curried function.
- * @example
- *
- * var abc = function(a, b, c) {
- * return [a, b, c];
- * };
- *
- * var curried = _.curry(abc);
- *
- * curried(1)(2)(3);
- * // => [1, 2, 3]
- *
- * curried(1, 2)(3);
- * // => [1, 2, 3]
- *
- * curried(1, 2, 3);
- * // => [1, 2, 3]
- *
- * // using placeholders
- * curried(1)(_, 3)(2);
- * // => [1, 2, 3]
- */
-var curry = createCurry(CURRY_FLAG);
-
-// Assign default placeholders.
-curry.placeholder = {};
-
-module.exports = curry;
diff --git a/deps/npm/node_modules/lodash/function/curryRight.js b/deps/npm/node_modules/lodash/function/curryRight.js
deleted file mode 100644
index 11c540393b..0000000000
--- a/deps/npm/node_modules/lodash/function/curryRight.js
+++ /dev/null
@@ -1,48 +0,0 @@
-var createCurry = require('../internal/createCurry');
-
-/** Used to compose bitmasks for wrapper metadata. */
-var CURRY_RIGHT_FLAG = 16;
-
-/**
- * This method is like `_.curry` except that arguments are applied to `func`
- * in the manner of `_.partialRight` instead of `_.partial`.
- *
- * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
- * builds, may be used as a placeholder for provided arguments.
- *
- * **Note:** This method does not set the "length" property of curried functions.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to curry.
- * @param {number} [arity=func.length] The arity of `func`.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Function} Returns the new curried function.
- * @example
- *
- * var abc = function(a, b, c) {
- * return [a, b, c];
- * };
- *
- * var curried = _.curryRight(abc);
- *
- * curried(3)(2)(1);
- * // => [1, 2, 3]
- *
- * curried(2, 3)(1);
- * // => [1, 2, 3]
- *
- * curried(1, 2, 3);
- * // => [1, 2, 3]
- *
- * // using placeholders
- * curried(3)(1, _)(2);
- * // => [1, 2, 3]
- */
-var curryRight = createCurry(CURRY_RIGHT_FLAG);
-
-// Assign default placeholders.
-curryRight.placeholder = {};
-
-module.exports = curryRight;
diff --git a/deps/npm/node_modules/lodash/function/debounce.js b/deps/npm/node_modules/lodash/function/debounce.js
deleted file mode 100644
index 163af90f38..0000000000
--- a/deps/npm/node_modules/lodash/function/debounce.js
+++ /dev/null
@@ -1,181 +0,0 @@
-var isObject = require('../lang/isObject'),
- now = require('../date/now');
-
-/** Used as the `TypeError` message for "Functions" methods. */
-var FUNC_ERROR_TEXT = 'Expected a function';
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeMax = Math.max;
-
-/**
- * Creates a debounced function that delays invoking `func` until after `wait`
- * milliseconds have elapsed since the last time the debounced function was
- * invoked. The debounced function comes with a `cancel` method to cancel
- * delayed invocations. Provide an options object to indicate that `func`
- * should be invoked on the leading and/or trailing edge of the `wait` timeout.
- * Subsequent calls to the debounced function return the result of the last
- * `func` invocation.
- *
- * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
- * on the trailing edge of the timeout only if the the debounced function is
- * invoked more than once during the `wait` timeout.
- *
- * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)
- * for details over the differences between `_.debounce` and `_.throttle`.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to debounce.
- * @param {number} [wait=0] The number of milliseconds to delay.
- * @param {Object} [options] The options object.
- * @param {boolean} [options.leading=false] Specify invoking on the leading
- * edge of the timeout.
- * @param {number} [options.maxWait] The maximum time `func` is allowed to be
- * delayed before it's invoked.
- * @param {boolean} [options.trailing=true] Specify invoking on the trailing
- * edge of the timeout.
- * @returns {Function} Returns the new debounced function.
- * @example
- *
- * // avoid costly calculations while the window size is in flux
- * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
- *
- * // invoke `sendMail` when the click event is fired, debouncing subsequent calls
- * jQuery('#postbox').on('click', _.debounce(sendMail, 300, {
- * 'leading': true,
- * 'trailing': false
- * }));
- *
- * // ensure `batchLog` is invoked once after 1 second of debounced calls
- * var source = new EventSource('/stream');
- * jQuery(source).on('message', _.debounce(batchLog, 250, {
- * 'maxWait': 1000
- * }));
- *
- * // cancel a debounced call
- * var todoChanges = _.debounce(batchLog, 1000);
- * Object.observe(models.todo, todoChanges);
- *
- * Object.observe(models, function(changes) {
- * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) {
- * todoChanges.cancel();
- * }
- * }, ['delete']);
- *
- * // ...at some point `models.todo` is changed
- * models.todo.completed = true;
- *
- * // ...before 1 second has passed `models.todo` is deleted
- * // which cancels the debounced `todoChanges` call
- * delete models.todo;
- */
-function debounce(func, wait, options) {
- var args,
- maxTimeoutId,
- result,
- stamp,
- thisArg,
- timeoutId,
- trailingCall,
- lastCalled = 0,
- maxWait = false,
- trailing = true;
-
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- wait = wait < 0 ? 0 : (+wait || 0);
- if (options === true) {
- var leading = true;
- trailing = false;
- } else if (isObject(options)) {
- leading = !!options.leading;
- maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait);
- trailing = 'trailing' in options ? !!options.trailing : trailing;
- }
-
- function cancel() {
- if (timeoutId) {
- clearTimeout(timeoutId);
- }
- if (maxTimeoutId) {
- clearTimeout(maxTimeoutId);
- }
- lastCalled = 0;
- maxTimeoutId = timeoutId = trailingCall = undefined;
- }
-
- function complete(isCalled, id) {
- if (id) {
- clearTimeout(id);
- }
- maxTimeoutId = timeoutId = trailingCall = undefined;
- if (isCalled) {
- lastCalled = now();
- result = func.apply(thisArg, args);
- if (!timeoutId && !maxTimeoutId) {
- args = thisArg = undefined;
- }
- }
- }
-
- function delayed() {
- var remaining = wait - (now() - stamp);
- if (remaining <= 0 || remaining > wait) {
- complete(trailingCall, maxTimeoutId);
- } else {
- timeoutId = setTimeout(delayed, remaining);
- }
- }
-
- function maxDelayed() {
- complete(trailing, timeoutId);
- }
-
- function debounced() {
- args = arguments;
- stamp = now();
- thisArg = this;
- trailingCall = trailing && (timeoutId || !leading);
-
- if (maxWait === false) {
- var leadingCall = leading && !timeoutId;
- } else {
- if (!maxTimeoutId && !leading) {
- lastCalled = stamp;
- }
- var remaining = maxWait - (stamp - lastCalled),
- isCalled = remaining <= 0 || remaining > maxWait;
-
- if (isCalled) {
- if (maxTimeoutId) {
- maxTimeoutId = clearTimeout(maxTimeoutId);
- }
- lastCalled = stamp;
- result = func.apply(thisArg, args);
- }
- else if (!maxTimeoutId) {
- maxTimeoutId = setTimeout(maxDelayed, remaining);
- }
- }
- if (isCalled && timeoutId) {
- timeoutId = clearTimeout(timeoutId);
- }
- else if (!timeoutId && wait !== maxWait) {
- timeoutId = setTimeout(delayed, wait);
- }
- if (leadingCall) {
- isCalled = true;
- result = func.apply(thisArg, args);
- }
- if (isCalled && !timeoutId && !maxTimeoutId) {
- args = thisArg = undefined;
- }
- return result;
- }
- debounced.cancel = cancel;
- return debounced;
-}
-
-module.exports = debounce;
diff --git a/deps/npm/node_modules/lodash/function/defer.js b/deps/npm/node_modules/lodash/function/defer.js
deleted file mode 100644
index 3accbf9b10..0000000000
--- a/deps/npm/node_modules/lodash/function/defer.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var baseDelay = require('../internal/baseDelay'),
- restParam = require('./restParam');
-
-/**
- * Defers invoking the `func` until the current call stack has cleared. Any
- * additional arguments are provided to `func` when it's invoked.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to defer.
- * @param {...*} [args] The arguments to invoke the function with.
- * @returns {number} Returns the timer id.
- * @example
- *
- * _.defer(function(text) {
- * console.log(text);
- * }, 'deferred');
- * // logs 'deferred' after one or more milliseconds
- */
-var defer = restParam(function(func, args) {
- return baseDelay(func, 1, args);
-});
-
-module.exports = defer;
diff --git a/deps/npm/node_modules/lodash/function/delay.js b/deps/npm/node_modules/lodash/function/delay.js
deleted file mode 100644
index d5eef27a9f..0000000000
--- a/deps/npm/node_modules/lodash/function/delay.js
+++ /dev/null
@@ -1,26 +0,0 @@
-var baseDelay = require('../internal/baseDelay'),
- restParam = require('./restParam');
-
-/**
- * Invokes `func` after `wait` milliseconds. Any additional arguments are
- * provided to `func` when it's invoked.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to delay.
- * @param {number} wait The number of milliseconds to delay invocation.
- * @param {...*} [args] The arguments to invoke the function with.
- * @returns {number} Returns the timer id.
- * @example
- *
- * _.delay(function(text) {
- * console.log(text);
- * }, 1000, 'later');
- * // => logs 'later' after one second
- */
-var delay = restParam(function(func, wait, args) {
- return baseDelay(func, wait, args);
-});
-
-module.exports = delay;
diff --git a/deps/npm/node_modules/lodash/function/flow.js b/deps/npm/node_modules/lodash/function/flow.js
deleted file mode 100644
index a435a3d878..0000000000
--- a/deps/npm/node_modules/lodash/function/flow.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var createFlow = require('../internal/createFlow');
-
-/**
- * Creates a function that returns the result of invoking the provided
- * functions with the `this` binding of the created function, where each
- * successive invocation is supplied the return value of the previous.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {...Function} [funcs] Functions to invoke.
- * @returns {Function} Returns the new function.
- * @example
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * var addSquare = _.flow(_.add, square);
- * addSquare(1, 2);
- * // => 9
- */
-var flow = createFlow();
-
-module.exports = flow;
diff --git a/deps/npm/node_modules/lodash/function/flowRight.js b/deps/npm/node_modules/lodash/function/flowRight.js
deleted file mode 100644
index 23b9d76b58..0000000000
--- a/deps/npm/node_modules/lodash/function/flowRight.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var createFlow = require('../internal/createFlow');
-
-/**
- * This method is like `_.flow` except that it creates a function that
- * invokes the provided functions from right to left.
- *
- * @static
- * @memberOf _
- * @alias backflow, compose
- * @category Function
- * @param {...Function} [funcs] Functions to invoke.
- * @returns {Function} Returns the new function.
- * @example
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * var addSquare = _.flowRight(square, _.add);
- * addSquare(1, 2);
- * // => 9
- */
-var flowRight = createFlow(true);
-
-module.exports = flowRight;
diff --git a/deps/npm/node_modules/lodash/function/memoize.js b/deps/npm/node_modules/lodash/function/memoize.js
deleted file mode 100644
index f3b8d69920..0000000000
--- a/deps/npm/node_modules/lodash/function/memoize.js
+++ /dev/null
@@ -1,80 +0,0 @@
-var MapCache = require('../internal/MapCache');
-
-/** Used as the `TypeError` message for "Functions" methods. */
-var FUNC_ERROR_TEXT = 'Expected a function';
-
-/**
- * Creates a function that memoizes the result of `func`. If `resolver` is
- * provided it determines the cache key for storing the result based on the
- * arguments provided to the memoized function. By default, the first argument
- * provided to the memoized function is coerced to a string and used as the
- * cache key. The `func` is invoked with the `this` binding of the memoized
- * function.
- *
- * **Note:** The cache is exposed as the `cache` property on the memoized
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
- * constructor with one whose instances implement the [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
- * method interface of `get`, `has`, and `set`.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to have its output memoized.
- * @param {Function} [resolver] The function to resolve the cache key.
- * @returns {Function} Returns the new memoizing function.
- * @example
- *
- * var upperCase = _.memoize(function(string) {
- * return string.toUpperCase();
- * });
- *
- * upperCase('fred');
- * // => 'FRED'
- *
- * // modifying the result cache
- * upperCase.cache.set('fred', 'BARNEY');
- * upperCase('fred');
- * // => 'BARNEY'
- *
- * // replacing `_.memoize.Cache`
- * var object = { 'user': 'fred' };
- * var other = { 'user': 'barney' };
- * var identity = _.memoize(_.identity);
- *
- * identity(object);
- * // => { 'user': 'fred' }
- * identity(other);
- * // => { 'user': 'fred' }
- *
- * _.memoize.Cache = WeakMap;
- * var identity = _.memoize(_.identity);
- *
- * identity(object);
- * // => { 'user': 'fred' }
- * identity(other);
- * // => { 'user': 'barney' }
- */
-function memoize(func, resolver) {
- if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- var memoized = function() {
- var args = arguments,
- key = resolver ? resolver.apply(this, args) : args[0],
- cache = memoized.cache;
-
- if (cache.has(key)) {
- return cache.get(key);
- }
- var result = func.apply(this, args);
- memoized.cache = cache.set(key, result);
- return result;
- };
- memoized.cache = new memoize.Cache;
- return memoized;
-}
-
-// Assign cache to `_.memoize`.
-memoize.Cache = MapCache;
-
-module.exports = memoize;
diff --git a/deps/npm/node_modules/lodash/function/modArgs.js b/deps/npm/node_modules/lodash/function/modArgs.js
deleted file mode 100644
index 49b9b5e682..0000000000
--- a/deps/npm/node_modules/lodash/function/modArgs.js
+++ /dev/null
@@ -1,58 +0,0 @@
-var arrayEvery = require('../internal/arrayEvery'),
- baseFlatten = require('../internal/baseFlatten'),
- baseIsFunction = require('../internal/baseIsFunction'),
- restParam = require('./restParam');
-
-/** Used as the `TypeError` message for "Functions" methods. */
-var FUNC_ERROR_TEXT = 'Expected a function';
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeMin = Math.min;
-
-/**
- * Creates a function that runs each argument through a corresponding
- * transform function.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to wrap.
- * @param {...(Function|Function[])} [transforms] The functions to transform
- * arguments, specified as individual functions or arrays of functions.
- * @returns {Function} Returns the new function.
- * @example
- *
- * function doubled(n) {
- * return n * 2;
- * }
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * var modded = _.modArgs(function(x, y) {
- * return [x, y];
- * }, square, doubled);
- *
- * modded(1, 2);
- * // => [1, 4]
- *
- * modded(5, 10);
- * // => [25, 20]
- */
-var modArgs = restParam(function(func, transforms) {
- transforms = baseFlatten(transforms);
- if (typeof func != 'function' || !arrayEvery(transforms, baseIsFunction)) {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- var length = transforms.length;
- return restParam(function(args) {
- var index = nativeMin(args.length, length);
- while (index--) {
- args[index] = transforms[index](args[index]);
- }
- return func.apply(this, args);
- });
-});
-
-module.exports = modArgs;
diff --git a/deps/npm/node_modules/lodash/function/negate.js b/deps/npm/node_modules/lodash/function/negate.js
deleted file mode 100644
index 82479390ad..0000000000
--- a/deps/npm/node_modules/lodash/function/negate.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/** Used as the `TypeError` message for "Functions" methods. */
-var FUNC_ERROR_TEXT = 'Expected a function';
-
-/**
- * Creates a function that negates the result of the predicate `func`. The
- * `func` predicate is invoked with the `this` binding and arguments of the
- * created function.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} predicate The predicate to negate.
- * @returns {Function} Returns the new function.
- * @example
- *
- * function isEven(n) {
- * return n % 2 == 0;
- * }
- *
- * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
- * // => [1, 3, 5]
- */
-function negate(predicate) {
- if (typeof predicate != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- return function() {
- return !predicate.apply(this, arguments);
- };
-}
-
-module.exports = negate;
diff --git a/deps/npm/node_modules/lodash/function/once.js b/deps/npm/node_modules/lodash/function/once.js
deleted file mode 100644
index 0b5bd853cb..0000000000
--- a/deps/npm/node_modules/lodash/function/once.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var before = require('./before');
-
-/**
- * Creates a function that is restricted to invoking `func` once. Repeat calls
- * to the function return the value of the first call. The `func` is invoked
- * with the `this` binding and arguments of the created function.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new restricted function.
- * @example
- *
- * var initialize = _.once(createApplication);
- * initialize();
- * initialize();
- * // `initialize` invokes `createApplication` once
- */
-function once(func) {
- return before(2, func);
-}
-
-module.exports = once;
diff --git a/deps/npm/node_modules/lodash/function/partial.js b/deps/npm/node_modules/lodash/function/partial.js
deleted file mode 100644
index fb1d04fb6c..0000000000
--- a/deps/npm/node_modules/lodash/function/partial.js
+++ /dev/null
@@ -1,43 +0,0 @@
-var createPartial = require('../internal/createPartial');
-
-/** Used to compose bitmasks for wrapper metadata. */
-var PARTIAL_FLAG = 32;
-
-/**
- * Creates a function that invokes `func` with `partial` arguments prepended
- * to those provided to the new function. This method is like `_.bind` except
- * it does **not** alter the `this` binding.
- *
- * The `_.partial.placeholder` value, which defaults to `_` in monolithic
- * builds, may be used as a placeholder for partially applied arguments.
- *
- * **Note:** This method does not set the "length" property of partially
- * applied functions.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to partially apply arguments to.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new partially applied function.
- * @example
- *
- * var greet = function(greeting, name) {
- * return greeting + ' ' + name;
- * };
- *
- * var sayHelloTo = _.partial(greet, 'hello');
- * sayHelloTo('fred');
- * // => 'hello fred'
- *
- * // using placeholders
- * var greetFred = _.partial(greet, _, 'fred');
- * greetFred('hi');
- * // => 'hi fred'
- */
-var partial = createPartial(PARTIAL_FLAG);
-
-// Assign default placeholders.
-partial.placeholder = {};
-
-module.exports = partial;
diff --git a/deps/npm/node_modules/lodash/function/partialRight.js b/deps/npm/node_modules/lodash/function/partialRight.js
deleted file mode 100644
index 634e6a4c40..0000000000
--- a/deps/npm/node_modules/lodash/function/partialRight.js
+++ /dev/null
@@ -1,42 +0,0 @@
-var createPartial = require('../internal/createPartial');
-
-/** Used to compose bitmasks for wrapper metadata. */
-var PARTIAL_RIGHT_FLAG = 64;
-
-/**
- * This method is like `_.partial` except that partially applied arguments
- * are appended to those provided to the new function.
- *
- * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
- * builds, may be used as a placeholder for partially applied arguments.
- *
- * **Note:** This method does not set the "length" property of partially
- * applied functions.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to partially apply arguments to.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new partially applied function.
- * @example
- *
- * var greet = function(greeting, name) {
- * return greeting + ' ' + name;
- * };
- *
- * var greetFred = _.partialRight(greet, 'fred');
- * greetFred('hi');
- * // => 'hi fred'
- *
- * // using placeholders
- * var sayHelloTo = _.partialRight(greet, 'hello', _);
- * sayHelloTo('fred');
- * // => 'hello fred'
- */
-var partialRight = createPartial(PARTIAL_RIGHT_FLAG);
-
-// Assign default placeholders.
-partialRight.placeholder = {};
-
-module.exports = partialRight;
diff --git a/deps/npm/node_modules/lodash/function/rearg.js b/deps/npm/node_modules/lodash/function/rearg.js
deleted file mode 100644
index f2bd9c41ec..0000000000
--- a/deps/npm/node_modules/lodash/function/rearg.js
+++ /dev/null
@@ -1,40 +0,0 @@
-var baseFlatten = require('../internal/baseFlatten'),
- createWrapper = require('../internal/createWrapper'),
- restParam = require('./restParam');
-
-/** Used to compose bitmasks for wrapper metadata. */
-var REARG_FLAG = 256;
-
-/**
- * Creates a function that invokes `func` with arguments arranged according
- * to the specified indexes where the argument value at the first index is
- * provided as the first argument, the argument value at the second index is
- * provided as the second argument, and so on.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to rearrange arguments for.
- * @param {...(number|number[])} indexes The arranged argument indexes,
- * specified as individual indexes or arrays of indexes.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var rearged = _.rearg(function(a, b, c) {
- * return [a, b, c];
- * }, 2, 0, 1);
- *
- * rearged('b', 'c', 'a')
- * // => ['a', 'b', 'c']
- *
- * var map = _.rearg(_.map, [1, 0]);
- * map(function(n) {
- * return n * 3;
- * }, [1, 2, 3]);
- * // => [3, 6, 9]
- */
-var rearg = restParam(function(func, indexes) {
- return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes));
-});
-
-module.exports = rearg;
diff --git a/deps/npm/node_modules/lodash/function/restParam.js b/deps/npm/node_modules/lodash/function/restParam.js
deleted file mode 100644
index 8852286dd5..0000000000
--- a/deps/npm/node_modules/lodash/function/restParam.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/** Used as the `TypeError` message for "Functions" methods. */
-var FUNC_ERROR_TEXT = 'Expected a function';
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeMax = Math.max;
-
-/**
- * Creates a function that invokes `func` with the `this` binding of the
- * created function and arguments from `start` and beyond provided as an array.
- *
- * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters).
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to apply a rest parameter to.
- * @param {number} [start=func.length-1] The start position of the rest parameter.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var say = _.restParam(function(what, names) {
- * return what + ' ' + _.initial(names).join(', ') +
- * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
- * });
- *
- * say('hello', 'fred', 'barney', 'pebbles');
- * // => 'hello fred, barney, & pebbles'
- */
-function restParam(func, start) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);
- return function() {
- var args = arguments,
- index = -1,
- length = nativeMax(args.length - start, 0),
- rest = Array(length);
-
- while (++index < length) {
- rest[index] = args[start + index];
- }
- switch (start) {
- case 0: return func.call(this, rest);
- case 1: return func.call(this, args[0], rest);
- case 2: return func.call(this, args[0], args[1], rest);
- }
- var otherArgs = Array(start + 1);
- index = -1;
- while (++index < start) {
- otherArgs[index] = args[index];
- }
- otherArgs[start] = rest;
- return func.apply(this, otherArgs);
- };
-}
-
-module.exports = restParam;
diff --git a/deps/npm/node_modules/lodash/function/spread.js b/deps/npm/node_modules/lodash/function/spread.js
deleted file mode 100644
index 780f5042ad..0000000000
--- a/deps/npm/node_modules/lodash/function/spread.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/** Used as the `TypeError` message for "Functions" methods. */
-var FUNC_ERROR_TEXT = 'Expected a function';
-
-/**
- * Creates a function that invokes `func` with the `this` binding of the created
- * function and an array of arguments much like [`Function#apply`](https://es5.github.io/#x15.3.4.3).
- *
- * **Note:** This method is based on the [spread operator](https://developer.mozilla.org/Web/JavaScript/Reference/Operators/Spread_operator).
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to spread arguments over.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var say = _.spread(function(who, what) {
- * return who + ' says ' + what;
- * });
- *
- * say(['fred', 'hello']);
- * // => 'fred says hello'
- *
- * // with a Promise
- * var numbers = Promise.all([
- * Promise.resolve(40),
- * Promise.resolve(36)
- * ]);
- *
- * numbers.then(_.spread(function(x, y) {
- * return x + y;
- * }));
- * // => a Promise of 76
- */
-function spread(func) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- return function(array) {
- return func.apply(this, array);
- };
-}
-
-module.exports = spread;
diff --git a/deps/npm/node_modules/lodash/function/throttle.js b/deps/npm/node_modules/lodash/function/throttle.js
deleted file mode 100644
index 1dd00eab75..0000000000
--- a/deps/npm/node_modules/lodash/function/throttle.js
+++ /dev/null
@@ -1,62 +0,0 @@
-var debounce = require('./debounce'),
- isObject = require('../lang/isObject');
-
-/** Used as the `TypeError` message for "Functions" methods. */
-var FUNC_ERROR_TEXT = 'Expected a function';
-
-/**
- * Creates a throttled function that only invokes `func` at most once per
- * every `wait` milliseconds. The throttled function comes with a `cancel`
- * method to cancel delayed invocations. Provide an options object to indicate
- * that `func` should be invoked on the leading and/or trailing edge of the
- * `wait` timeout. Subsequent calls to the throttled function return the
- * result of the last `func` call.
- *
- * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
- * on the trailing edge of the timeout only if the the throttled function is
- * invoked more than once during the `wait` timeout.
- *
- * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)
- * for details over the differences between `_.throttle` and `_.debounce`.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to throttle.
- * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
- * @param {Object} [options] The options object.
- * @param {boolean} [options.leading=true] Specify invoking on the leading
- * edge of the timeout.
- * @param {boolean} [options.trailing=true] Specify invoking on the trailing
- * edge of the timeout.
- * @returns {Function} Returns the new throttled function.
- * @example
- *
- * // avoid excessively updating the position while scrolling
- * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
- *
- * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes
- * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, {
- * 'trailing': false
- * }));
- *
- * // cancel a trailing throttled call
- * jQuery(window).on('popstate', throttled.cancel);
- */
-function throttle(func, wait, options) {
- var leading = true,
- trailing = true;
-
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- if (options === false) {
- leading = false;
- } else if (isObject(options)) {
- leading = 'leading' in options ? !!options.leading : leading;
- trailing = 'trailing' in options ? !!options.trailing : trailing;
- }
- return debounce(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing });
-}
-
-module.exports = throttle;
diff --git a/deps/npm/node_modules/lodash/function/wrap.js b/deps/npm/node_modules/lodash/function/wrap.js
deleted file mode 100644
index 6a33c5ec6f..0000000000
--- a/deps/npm/node_modules/lodash/function/wrap.js
+++ /dev/null
@@ -1,33 +0,0 @@
-var createWrapper = require('../internal/createWrapper'),
- identity = require('../utility/identity');
-
-/** Used to compose bitmasks for wrapper metadata. */
-var PARTIAL_FLAG = 32;
-
-/**
- * Creates a function that provides `value` to the wrapper function as its
- * first argument. Any additional arguments provided to the function are
- * appended to those provided to the wrapper function. The wrapper is invoked
- * with the `this` binding of the created function.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {*} value The value to wrap.
- * @param {Function} wrapper The wrapper function.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var p = _.wrap(_.escape, function(func, text) {
- * return '<p>' + func(text) + '</p>';
- * });
- *
- * p('fred, barney, & pebbles');
- * // => '<p>fred, barney, &amp; pebbles</p>'
- */
-function wrap(value, wrapper) {
- wrapper = wrapper == null ? identity : wrapper;
- return createWrapper(wrapper, PARTIAL_FLAG, undefined, [value], []);
-}
-
-module.exports = wrap;
diff --git a/deps/npm/node_modules/lodash/index.js b/deps/npm/node_modules/lodash/index.js
deleted file mode 100644
index 5f17319b9b..0000000000
--- a/deps/npm/node_modules/lodash/index.js
+++ /dev/null
@@ -1,12351 +0,0 @@
-/**
- * @license
- * lodash 3.10.1 (Custom Build) <https://lodash.com/>
- * Build: `lodash modern -d -o ./index.js`
- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
- */
-;(function() {
-
- /** Used as a safe reference for `undefined` in pre-ES5 environments. */
- var undefined;
-
- /** Used as the semantic version number. */
- var VERSION = '3.10.1';
-
- /** Used to compose bitmasks for wrapper metadata. */
- var BIND_FLAG = 1,
- BIND_KEY_FLAG = 2,
- CURRY_BOUND_FLAG = 4,
- CURRY_FLAG = 8,
- CURRY_RIGHT_FLAG = 16,
- PARTIAL_FLAG = 32,
- PARTIAL_RIGHT_FLAG = 64,
- ARY_FLAG = 128,
- REARG_FLAG = 256;
-
- /** Used as default options for `_.trunc`. */
- var DEFAULT_TRUNC_LENGTH = 30,
- DEFAULT_TRUNC_OMISSION = '...';
-
- /** Used to detect when a function becomes hot. */
- var HOT_COUNT = 150,
- HOT_SPAN = 16;
-
- /** Used as the size to enable large array optimizations. */
- var LARGE_ARRAY_SIZE = 200;
-
- /** Used to indicate the type of lazy iteratees. */
- var LAZY_FILTER_FLAG = 1,
- LAZY_MAP_FLAG = 2;
-
- /** Used as the `TypeError` message for "Functions" methods. */
- var FUNC_ERROR_TEXT = 'Expected a function';
-
- /** Used as the internal argument placeholder. */
- var PLACEHOLDER = '__lodash_placeholder__';
-
- /** `Object#toString` result references. */
- var argsTag = '[object Arguments]',
- arrayTag = '[object Array]',
- boolTag = '[object Boolean]',
- dateTag = '[object Date]',
- errorTag = '[object Error]',
- funcTag = '[object Function]',
- mapTag = '[object Map]',
- numberTag = '[object Number]',
- objectTag = '[object Object]',
- regexpTag = '[object RegExp]',
- setTag = '[object Set]',
- stringTag = '[object String]',
- weakMapTag = '[object WeakMap]';
-
- var arrayBufferTag = '[object ArrayBuffer]',
- float32Tag = '[object Float32Array]',
- float64Tag = '[object Float64Array]',
- int8Tag = '[object Int8Array]',
- int16Tag = '[object Int16Array]',
- int32Tag = '[object Int32Array]',
- uint8Tag = '[object Uint8Array]',
- uint8ClampedTag = '[object Uint8ClampedArray]',
- uint16Tag = '[object Uint16Array]',
- uint32Tag = '[object Uint32Array]';
-
- /** Used to match empty string literals in compiled template source. */
- var reEmptyStringLeading = /\b__p \+= '';/g,
- reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
- reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
-
- /** Used to match HTML entities and HTML characters. */
- var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g,
- reUnescapedHtml = /[&<>"'`]/g,
- reHasEscapedHtml = RegExp(reEscapedHtml.source),
- reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
-
- /** Used to match template delimiters. */
- var reEscape = /<%-([\s\S]+?)%>/g,
- reEvaluate = /<%([\s\S]+?)%>/g,
- reInterpolate = /<%=([\s\S]+?)%>/g;
-
- /** Used to match property names within property paths. */
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,
- reIsPlainProp = /^\w*$/,
- rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;
-
- /**
- * Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns)
- * and those outlined by [`EscapeRegExpPattern`](http://ecma-international.org/ecma-262/6.0/#sec-escaperegexppattern).
- */
- var reRegExpChars = /^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,
- reHasRegExpChars = RegExp(reRegExpChars.source);
-
- /** Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). */
- var reComboMark = /[\u0300-\u036f\ufe20-\ufe23]/g;
-
- /** Used to match backslashes in property paths. */
- var reEscapeChar = /\\(\\)?/g;
-
- /** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */
- var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
-
- /** Used to match `RegExp` flags from their coerced string values. */
- var reFlags = /\w*$/;
-
- /** Used to detect hexadecimal string values. */
- var reHasHexPrefix = /^0[xX]/;
-
- /** Used to detect host constructors (Safari > 5). */
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
-
- /** Used to detect unsigned integer values. */
- var reIsUint = /^\d+$/;
-
- /** Used to match latin-1 supplementary letters (excluding mathematical operators). */
- var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;
-
- /** Used to ensure capturing order of template delimiters. */
- var reNoMatch = /($^)/;
-
- /** Used to match unescaped characters in compiled string literals. */
- var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
-
- /** Used to match words to create compound words. */
- var reWords = (function() {
- var upper = '[A-Z\\xc0-\\xd6\\xd8-\\xde]',
- lower = '[a-z\\xdf-\\xf6\\xf8-\\xff]+';
-
- return RegExp(upper + '+(?=' + upper + lower + ')|' + upper + '?' + lower + '|' + upper + '+|[0-9]+', 'g');
- }());
-
- /** Used to assign default `context` object properties. */
- var contextProps = [
- 'Array', 'ArrayBuffer', 'Date', 'Error', 'Float32Array', 'Float64Array',
- 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Math', 'Number',
- 'Object', 'RegExp', 'Set', 'String', '_', 'clearTimeout', 'isFinite',
- 'parseFloat', 'parseInt', 'setTimeout', 'TypeError', 'Uint8Array',
- 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap'
- ];
-
- /** Used to make template sourceURLs easier to identify. */
- var templateCounter = -1;
-
- /** Used to identify `toStringTag` values of typed arrays. */
- var typedArrayTags = {};
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
- typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
- typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
- typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
- typedArrayTags[uint32Tag] = true;
- typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
- typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
- typedArrayTags[dateTag] = typedArrayTags[errorTag] =
- typedArrayTags[funcTag] = typedArrayTags[mapTag] =
- typedArrayTags[numberTag] = typedArrayTags[objectTag] =
- typedArrayTags[regexpTag] = typedArrayTags[setTag] =
- typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
-
- /** Used to identify `toStringTag` values supported by `_.clone`. */
- var cloneableTags = {};
- cloneableTags[argsTag] = cloneableTags[arrayTag] =
- cloneableTags[arrayBufferTag] = cloneableTags[boolTag] =
- cloneableTags[dateTag] = cloneableTags[float32Tag] =
- cloneableTags[float64Tag] = cloneableTags[int8Tag] =
- cloneableTags[int16Tag] = cloneableTags[int32Tag] =
- cloneableTags[numberTag] = cloneableTags[objectTag] =
- cloneableTags[regexpTag] = cloneableTags[stringTag] =
- cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
- cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
- cloneableTags[errorTag] = cloneableTags[funcTag] =
- cloneableTags[mapTag] = cloneableTags[setTag] =
- cloneableTags[weakMapTag] = false;
-
- /** Used to map latin-1 supplementary letters to basic latin letters. */
- var deburredLetters = {
- '\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'
- };
-
- /** Used to map characters to HTML entities. */
- var htmlEscapes = {
- '&': '&amp;',
- '<': '&lt;',
- '>': '&gt;',
- '"': '&quot;',
- "'": '&#39;',
- '`': '&#96;'
- };
-
- /** Used to map HTML entities to characters. */
- var htmlUnescapes = {
- '&amp;': '&',
- '&lt;': '<',
- '&gt;': '>',
- '&quot;': '"',
- '&#39;': "'",
- '&#96;': '`'
- };
-
- /** Used to determine if values are of the language type `Object`. */
- var objectTypes = {
- 'function': true,
- 'object': true
- };
-
- /** Used to escape characters for inclusion in compiled regexes. */
- var regexpEscapes = {
- '0': 'x30', '1': 'x31', '2': 'x32', '3': 'x33', '4': 'x34',
- '5': 'x35', '6': 'x36', '7': 'x37', '8': 'x38', '9': 'x39',
- 'A': 'x41', 'B': 'x42', 'C': 'x43', 'D': 'x44', 'E': 'x45', 'F': 'x46',
- 'a': 'x61', 'b': 'x62', 'c': 'x63', 'd': 'x64', 'e': 'x65', 'f': 'x66',
- 'n': 'x6e', 'r': 'x72', 't': 'x74', 'u': 'x75', 'v': 'x76', 'x': 'x78'
- };
-
- /** Used to escape characters for inclusion in compiled string literals. */
- var stringEscapes = {
- '\\': '\\',
- "'": "'",
- '\n': 'n',
- '\r': 'r',
- '\u2028': 'u2028',
- '\u2029': 'u2029'
- };
-
- /** Detect free variable `exports`. */
- var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
-
- /** Detect free variable `module`. */
- var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;
-
- /** Detect free variable `global` from Node.js. */
- var freeGlobal = freeExports && freeModule && typeof global == 'object' && global && global.Object && global;
-
- /** Detect free variable `self`. */
- var freeSelf = objectTypes[typeof self] && self && self.Object && self;
-
- /** Detect free variable `window`. */
- var freeWindow = objectTypes[typeof window] && window && window.Object && window;
-
- /** Detect the popular CommonJS extension `module.exports`. */
- var moduleExports = freeModule && freeModule.exports === freeExports && freeExports;
-
- /**
- * Used as a reference to the global object.
- *
- * The `this` value is used if it's the global object to avoid Greasemonkey's
- * restricted `window` object, otherwise the `window` object is used.
- */
- var root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this;
-
- /*--------------------------------------------------------------------------*/
-
- /**
- * The base implementation of `compareAscending` which compares values and
- * sorts them in ascending order without guaranteeing a stable sort.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {number} Returns the sort order indicator for `value`.
- */
- function baseCompareAscending(value, other) {
- if (value !== other) {
- var valIsNull = value === null,
- valIsUndef = value === undefined,
- valIsReflexive = value === value;
-
- var othIsNull = other === null,
- othIsUndef = other === undefined,
- othIsReflexive = other === other;
-
- if ((value > other && !othIsNull) || !valIsReflexive ||
- (valIsNull && !othIsUndef && othIsReflexive) ||
- (valIsUndef && othIsReflexive)) {
- return 1;
- }
- if ((value < other && !valIsNull) || !othIsReflexive ||
- (othIsNull && !valIsUndef && valIsReflexive) ||
- (othIsUndef && valIsReflexive)) {
- return -1;
- }
- }
- return 0;
- }
-
- /**
- * The base implementation of `_.findIndex` and `_.findLastIndex` without
- * support for callback shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to search.
- * @param {Function} predicate The function invoked per iteration.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function baseFindIndex(array, predicate, fromRight) {
- var length = array.length,
- index = fromRight ? length : -1;
-
- while ((fromRight ? index-- : ++index < length)) {
- if (predicate(array[index], index, array)) {
- return index;
- }
- }
- return -1;
- }
-
- /**
- * The base implementation of `_.indexOf` without support for binary searches.
- *
- * @private
- * @param {Array} array The array to search.
- * @param {*} value The value to search for.
- * @param {number} fromIndex The index to search from.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function baseIndexOf(array, value, fromIndex) {
- if (value !== value) {
- return indexOfNaN(array, fromIndex);
- }
- var index = fromIndex - 1,
- length = array.length;
-
- while (++index < length) {
- if (array[index] === value) {
- return index;
- }
- }
- return -1;
- }
-
- /**
- * The base implementation of `_.isFunction` without support for environments
- * with incorrect `typeof` results.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- */
- function baseIsFunction(value) {
- // Avoid a Chakra JIT bug in compatibility modes of IE 11.
- // See https://github.com/jashkenas/underscore/issues/1621 for more details.
- return typeof value == 'function' || false;
- }
-
- /**
- * Converts `value` to a string if it's not one. An empty string is returned
- * for `null` or `undefined` values.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
- */
- function baseToString(value) {
- return value == null ? '' : (value + '');
- }
-
- /**
- * Used by `_.trim` and `_.trimLeft` to get the index of the first character
- * of `string` that is not found in `chars`.
- *
- * @private
- * @param {string} string The string to inspect.
- * @param {string} chars The characters to find.
- * @returns {number} Returns the index of the first character not found in `chars`.
- */
- function charsLeftIndex(string, chars) {
- var index = -1,
- length = string.length;
-
- while (++index < length && chars.indexOf(string.charAt(index)) > -1) {}
- return index;
- }
-
- /**
- * Used by `_.trim` and `_.trimRight` to get the index of the last character
- * of `string` that is not found in `chars`.
- *
- * @private
- * @param {string} string The string to inspect.
- * @param {string} chars The characters to find.
- * @returns {number} Returns the index of the last character not found in `chars`.
- */
- function charsRightIndex(string, chars) {
- var index = string.length;
-
- while (index-- && chars.indexOf(string.charAt(index)) > -1) {}
- return index;
- }
-
- /**
- * Used by `_.sortBy` to compare transformed elements of a collection and stable
- * sort them in ascending order.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @returns {number} Returns the sort order indicator for `object`.
- */
- function compareAscending(object, other) {
- return baseCompareAscending(object.criteria, other.criteria) || (object.index - other.index);
- }
-
- /**
- * Used by `_.sortByOrder` to compare multiple properties of a value to another
- * and stable sort them.
- *
- * If `orders` is unspecified, all valuess are sorted in ascending order. Otherwise,
- * a value is sorted in ascending order if its corresponding order is "asc", and
- * descending if "desc".
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {boolean[]} orders The order to sort by for each property.
- * @returns {number} Returns the sort order indicator for `object`.
- */
- function compareMultiple(object, other, orders) {
- var index = -1,
- objCriteria = object.criteria,
- othCriteria = other.criteria,
- length = objCriteria.length,
- ordersLength = orders.length;
-
- while (++index < length) {
- var result = baseCompareAscending(objCriteria[index], othCriteria[index]);
- if (result) {
- if (index >= ordersLength) {
- return result;
- }
- var order = orders[index];
- return result * ((order === 'asc' || order === true) ? 1 : -1);
- }
- }
- // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
- // that causes it, under certain circumstances, to provide the same value for
- // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
- // for more details.
- //
- // This also ensures a stable sort in V8 and other engines.
- // See https://code.google.com/p/v8/issues/detail?id=90 for more details.
- return object.index - other.index;
- }
-
- /**
- * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters.
- *
- * @private
- * @param {string} letter The matched letter to deburr.
- * @returns {string} Returns the deburred letter.
- */
- function deburrLetter(letter) {
- return deburredLetters[letter];
- }
-
- /**
- * Used by `_.escape` to convert characters to HTML entities.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @returns {string} Returns the escaped character.
- */
- function escapeHtmlChar(chr) {
- return htmlEscapes[chr];
- }
-
- /**
- * Used by `_.escapeRegExp` to escape characters for inclusion in compiled regexes.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @param {string} leadingChar The capture group for a leading character.
- * @param {string} whitespaceChar The capture group for a whitespace character.
- * @returns {string} Returns the escaped character.
- */
- function escapeRegExpChar(chr, leadingChar, whitespaceChar) {
- if (leadingChar) {
- chr = regexpEscapes[chr];
- } else if (whitespaceChar) {
- chr = stringEscapes[chr];
- }
- return '\\' + chr;
- }
-
- /**
- * Used by `_.template` to escape characters for inclusion in compiled string literals.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @returns {string} Returns the escaped character.
- */
- function escapeStringChar(chr) {
- return '\\' + stringEscapes[chr];
- }
-
- /**
- * Gets the index at which the first occurrence of `NaN` is found in `array`.
- *
- * @private
- * @param {Array} array The array to search.
- * @param {number} fromIndex The index to search from.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {number} Returns the index of the matched `NaN`, else `-1`.
- */
- function indexOfNaN(array, fromIndex, fromRight) {
- var length = array.length,
- index = fromIndex + (fromRight ? 0 : -1);
-
- while ((fromRight ? index-- : ++index < length)) {
- var other = array[index];
- if (other !== other) {
- return index;
- }
- }
- return -1;
- }
-
- /**
- * Checks if `value` is object-like.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- */
- function isObjectLike(value) {
- return !!value && typeof value == 'object';
- }
-
- /**
- * Used by `trimmedLeftIndex` and `trimmedRightIndex` to determine if a
- * character code is whitespace.
- *
- * @private
- * @param {number} charCode The character code to inspect.
- * @returns {boolean} Returns `true` if `charCode` is whitespace, else `false`.
- */
- function isSpace(charCode) {
- return ((charCode <= 160 && (charCode >= 9 && charCode <= 13) || charCode == 32 || charCode == 160) || charCode == 5760 || charCode == 6158 ||
- (charCode >= 8192 && (charCode <= 8202 || charCode == 8232 || charCode == 8233 || charCode == 8239 || charCode == 8287 || charCode == 12288 || charCode == 65279)));
- }
-
- /**
- * Replaces all `placeholder` elements in `array` with an internal placeholder
- * and returns an array of their indexes.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {*} placeholder The placeholder to replace.
- * @returns {Array} Returns the new array of placeholder indexes.
- */
- function replaceHolders(array, placeholder) {
- var index = -1,
- length = array.length,
- resIndex = -1,
- result = [];
-
- while (++index < length) {
- if (array[index] === placeholder) {
- array[index] = PLACEHOLDER;
- result[++resIndex] = index;
- }
- }
- return result;
- }
-
- /**
- * An implementation of `_.uniq` optimized for sorted arrays without support
- * for callback shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Function} [iteratee] The function invoked per iteration.
- * @returns {Array} Returns the new duplicate-value-free array.
- */
- function sortedUniq(array, iteratee) {
- var seen,
- index = -1,
- length = array.length,
- resIndex = -1,
- result = [];
-
- while (++index < length) {
- var value = array[index],
- computed = iteratee ? iteratee(value, index, array) : value;
-
- if (!index || seen !== computed) {
- seen = computed;
- result[++resIndex] = value;
- }
- }
- return result;
- }
-
- /**
- * Used by `_.trim` and `_.trimLeft` to get the index of the first non-whitespace
- * character of `string`.
- *
- * @private
- * @param {string} string The string to inspect.
- * @returns {number} Returns the index of the first non-whitespace character.
- */
- function trimmedLeftIndex(string) {
- var index = -1,
- length = string.length;
-
- while (++index < length && isSpace(string.charCodeAt(index))) {}
- return index;
- }
-
- /**
- * Used by `_.trim` and `_.trimRight` to get the index of the last non-whitespace
- * character of `string`.
- *
- * @private
- * @param {string} string The string to inspect.
- * @returns {number} Returns the index of the last non-whitespace character.
- */
- function trimmedRightIndex(string) {
- var index = string.length;
-
- while (index-- && isSpace(string.charCodeAt(index))) {}
- return index;
- }
-
- /**
- * Used by `_.unescape` to convert HTML entities to characters.
- *
- * @private
- * @param {string} chr The matched character to unescape.
- * @returns {string} Returns the unescaped character.
- */
- function unescapeHtmlChar(chr) {
- return htmlUnescapes[chr];
- }
-
- /*--------------------------------------------------------------------------*/
-
- /**
- * Create a new pristine `lodash` function using the given `context` object.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Object} [context=root] The context object.
- * @returns {Function} Returns a new `lodash` function.
- * @example
- *
- * _.mixin({ 'foo': _.constant('foo') });
- *
- * var lodash = _.runInContext();
- * lodash.mixin({ 'bar': lodash.constant('bar') });
- *
- * _.isFunction(_.foo);
- * // => true
- * _.isFunction(_.bar);
- * // => false
- *
- * lodash.isFunction(lodash.foo);
- * // => false
- * lodash.isFunction(lodash.bar);
- * // => true
- *
- * // using `context` to mock `Date#getTime` use in `_.now`
- * var mock = _.runInContext({
- * 'Date': function() {
- * return { 'getTime': getTimeMock };
- * }
- * });
- *
- * // or creating a suped-up `defer` in Node.js
- * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
- */
- function runInContext(context) {
- // Avoid issues with some ES3 environments that attempt to use values, named
- // after built-in constructors like `Object`, for the creation of literals.
- // ES5 clears this up by stating that literals must use built-in constructors.
- // See https://es5.github.io/#x11.1.5 for more details.
- context = context ? _.defaults(root.Object(), context, _.pick(root, contextProps)) : root;
-
- /** Native constructor references. */
- var Array = context.Array,
- Date = context.Date,
- Error = context.Error,
- Function = context.Function,
- Math = context.Math,
- Number = context.Number,
- Object = context.Object,
- RegExp = context.RegExp,
- String = context.String,
- TypeError = context.TypeError;
-
- /** Used for native method references. */
- var arrayProto = Array.prototype,
- objectProto = Object.prototype,
- stringProto = String.prototype;
-
- /** Used to resolve the decompiled source of functions. */
- var fnToString = Function.prototype.toString;
-
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
-
- /** Used to generate unique IDs. */
- var idCounter = 0;
-
- /**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
- var objToString = objectProto.toString;
-
- /** Used to restore the original `_` reference in `_.noConflict`. */
- var oldDash = root._;
-
- /** Used to detect if a method is native. */
- var reIsNative = RegExp('^' +
- fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
- );
-
- /** Native method references. */
- var ArrayBuffer = context.ArrayBuffer,
- clearTimeout = context.clearTimeout,
- parseFloat = context.parseFloat,
- pow = Math.pow,
- propertyIsEnumerable = objectProto.propertyIsEnumerable,
- Set = getNative(context, 'Set'),
- setTimeout = context.setTimeout,
- splice = arrayProto.splice,
- Uint8Array = context.Uint8Array,
- WeakMap = getNative(context, 'WeakMap');
-
- /* Native method references for those with the same name as other `lodash` methods. */
- var nativeCeil = Math.ceil,
- nativeCreate = getNative(Object, 'create'),
- nativeFloor = Math.floor,
- nativeIsArray = getNative(Array, 'isArray'),
- nativeIsFinite = context.isFinite,
- nativeKeys = getNative(Object, 'keys'),
- nativeMax = Math.max,
- nativeMin = Math.min,
- nativeNow = getNative(Date, 'now'),
- nativeParseInt = context.parseInt,
- nativeRandom = Math.random;
-
- /** Used as references for `-Infinity` and `Infinity`. */
- var NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY,
- POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
-
- /** Used as references for the maximum length and index of an array. */
- var MAX_ARRAY_LENGTH = 4294967295,
- MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
- HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
-
- /**
- * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
- * of an array-like value.
- */
- var MAX_SAFE_INTEGER = 9007199254740991;
-
- /** Used to store function metadata. */
- var metaMap = WeakMap && new WeakMap;
-
- /** Used to lookup unminified function names. */
- var realNames = {};
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a `lodash` object which wraps `value` to enable implicit chaining.
- * Methods that operate on and return arrays, collections, and functions can
- * be chained together. Methods that retrieve a single value or may return a
- * primitive value will automatically end the chain returning the unwrapped
- * value. Explicit chaining may be enabled using `_.chain`. The execution of
- * chained methods is lazy, that is, execution is deferred until `_#value`
- * is implicitly or explicitly called.
- *
- * Lazy evaluation allows several methods to support shortcut fusion. Shortcut
- * fusion is an optimization strategy which merge iteratee calls; this can help
- * to avoid the creation of intermediate data structures and greatly reduce the
- * number of iteratee executions.
- *
- * Chaining is supported in custom builds as long as the `_#value` method is
- * directly or indirectly included in the build.
- *
- * In addition to lodash methods, wrappers have `Array` and `String` methods.
- *
- * The wrapper `Array` methods are:
- * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`,
- * `splice`, and `unshift`
- *
- * The wrapper `String` methods are:
- * `replace` and `split`
- *
- * The wrapper methods that support shortcut fusion are:
- * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`,
- * `first`, `initial`, `last`, `map`, `pluck`, `reject`, `rest`, `reverse`,
- * `slice`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `toArray`,
- * and `where`
- *
- * The chainable wrapper methods are:
- * `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`,
- * `callback`, `chain`, `chunk`, `commit`, `compact`, `concat`, `constant`,
- * `countBy`, `create`, `curry`, `debounce`, `defaults`, `defaultsDeep`,
- * `defer`, `delay`, `difference`, `drop`, `dropRight`, `dropRightWhile`,
- * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`,
- * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`,
- * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`,
- * `invoke`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`,
- * `matchesProperty`, `memoize`, `merge`, `method`, `methodOf`, `mixin`,
- * `modArgs`, `negate`, `omit`, `once`, `pairs`, `partial`, `partialRight`,
- * `partition`, `pick`, `plant`, `pluck`, `property`, `propertyOf`, `pull`,
- * `pullAt`, `push`, `range`, `rearg`, `reject`, `remove`, `rest`, `restParam`,
- * `reverse`, `set`, `shuffle`, `slice`, `sort`, `sortBy`, `sortByAll`,
- * `sortByOrder`, `splice`, `spread`, `take`, `takeRight`, `takeRightWhile`,
- * `takeWhile`, `tap`, `throttle`, `thru`, `times`, `toArray`, `toPlainObject`,
- * `transform`, `union`, `uniq`, `unshift`, `unzip`, `unzipWith`, `values`,
- * `valuesIn`, `where`, `without`, `wrap`, `xor`, `zip`, `zipObject`, `zipWith`
- *
- * The wrapper methods that are **not** chainable by default are:
- * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clone`, `cloneDeep`,
- * `deburr`, `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`,
- * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`,
- * `floor`, `get`, `gt`, `gte`, `has`, `identity`, `includes`, `indexOf`,
- * `inRange`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`,
- * `isEmpty`, `isEqual`, `isError`, `isFinite` `isFunction`, `isMatch`,
- * `isNative`, `isNaN`, `isNull`, `isNumber`, `isObject`, `isPlainObject`,
- * `isRegExp`, `isString`, `isUndefined`, `isTypedArray`, `join`, `kebabCase`,
- * `last`, `lastIndexOf`, `lt`, `lte`, `max`, `min`, `noConflict`, `noop`,
- * `now`, `pad`, `padLeft`, `padRight`, `parseInt`, `pop`, `random`, `reduce`,
- * `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `shift`, `size`,
- * `snakeCase`, `some`, `sortedIndex`, `sortedLastIndex`, `startCase`,
- * `startsWith`, `sum`, `template`, `trim`, `trimLeft`, `trimRight`, `trunc`,
- * `unescape`, `uniqueId`, `value`, and `words`
- *
- * The wrapper method `sample` will return a wrapped value when `n` is provided,
- * otherwise an unwrapped value is returned.
- *
- * @name _
- * @constructor
- * @category Chain
- * @param {*} value The value to wrap in a `lodash` instance.
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var wrapped = _([1, 2, 3]);
- *
- * // returns an unwrapped value
- * wrapped.reduce(function(total, n) {
- * return total + n;
- * });
- * // => 6
- *
- * // returns a wrapped value
- * var squares = wrapped.map(function(n) {
- * return n * n;
- * });
- *
- * _.isArray(squares);
- * // => false
- *
- * _.isArray(squares.value());
- * // => true
- */
- function lodash(value) {
- if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
- if (value instanceof LodashWrapper) {
- return value;
- }
- if (hasOwnProperty.call(value, '__chain__') && hasOwnProperty.call(value, '__wrapped__')) {
- return wrapperClone(value);
- }
- }
- return new LodashWrapper(value);
- }
-
- /**
- * The function whose prototype all chaining wrappers inherit from.
- *
- * @private
- */
- function baseLodash() {
- // No operation performed.
- }
-
- /**
- * The base constructor for creating `lodash` wrapper objects.
- *
- * @private
- * @param {*} value The value to wrap.
- * @param {boolean} [chainAll] Enable chaining for all wrapper methods.
- * @param {Array} [actions=[]] Actions to peform to resolve the unwrapped value.
- */
- function LodashWrapper(value, chainAll, actions) {
- this.__wrapped__ = value;
- this.__actions__ = actions || [];
- this.__chain__ = !!chainAll;
- }
-
- /**
- * An object environment feature flags.
- *
- * @static
- * @memberOf _
- * @type Object
- */
- var support = lodash.support = {};
-
- /**
- * By default, the template delimiters used by lodash are like those in
- * embedded Ruby (ERB). Change the following template settings to use
- * alternative delimiters.
- *
- * @static
- * @memberOf _
- * @type Object
- */
- lodash.templateSettings = {
-
- /**
- * Used to detect `data` property values to be HTML-escaped.
- *
- * @memberOf _.templateSettings
- * @type RegExp
- */
- 'escape': reEscape,
-
- /**
- * Used to detect code to be evaluated.
- *
- * @memberOf _.templateSettings
- * @type RegExp
- */
- 'evaluate': reEvaluate,
-
- /**
- * Used to detect `data` property values to inject.
- *
- * @memberOf _.templateSettings
- * @type RegExp
- */
- 'interpolate': reInterpolate,
-
- /**
- * Used to reference the data object in the template text.
- *
- * @memberOf _.templateSettings
- * @type string
- */
- 'variable': '',
-
- /**
- * Used to import variables into the compiled template.
- *
- * @memberOf _.templateSettings
- * @type Object
- */
- 'imports': {
-
- /**
- * A reference to the `lodash` function.
- *
- * @memberOf _.templateSettings.imports
- * @type Function
- */
- '_': lodash
- }
- };
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
- *
- * @private
- * @param {*} value The value to wrap.
- */
- function LazyWrapper(value) {
- this.__wrapped__ = value;
- this.__actions__ = [];
- this.__dir__ = 1;
- this.__filtered__ = false;
- this.__iteratees__ = [];
- this.__takeCount__ = POSITIVE_INFINITY;
- this.__views__ = [];
- }
-
- /**
- * Creates a clone of the lazy wrapper object.
- *
- * @private
- * @name clone
- * @memberOf LazyWrapper
- * @returns {Object} Returns the cloned `LazyWrapper` object.
- */
- function lazyClone() {
- var result = new LazyWrapper(this.__wrapped__);
- result.__actions__ = arrayCopy(this.__actions__);
- result.__dir__ = this.__dir__;
- result.__filtered__ = this.__filtered__;
- result.__iteratees__ = arrayCopy(this.__iteratees__);
- result.__takeCount__ = this.__takeCount__;
- result.__views__ = arrayCopy(this.__views__);
- return result;
- }
-
- /**
- * Reverses the direction of lazy iteration.
- *
- * @private
- * @name reverse
- * @memberOf LazyWrapper
- * @returns {Object} Returns the new reversed `LazyWrapper` object.
- */
- function lazyReverse() {
- if (this.__filtered__) {
- var result = new LazyWrapper(this);
- result.__dir__ = -1;
- result.__filtered__ = true;
- } else {
- result = this.clone();
- result.__dir__ *= -1;
- }
- return result;
- }
-
- /**
- * Extracts the unwrapped value from its lazy wrapper.
- *
- * @private
- * @name value
- * @memberOf LazyWrapper
- * @returns {*} Returns the unwrapped value.
- */
- function lazyValue() {
- var array = this.__wrapped__.value(),
- dir = this.__dir__,
- isArr = isArray(array),
- isRight = dir < 0,
- arrLength = isArr ? array.length : 0,
- view = getView(0, arrLength, this.__views__),
- start = view.start,
- end = view.end,
- length = end - start,
- index = isRight ? end : (start - 1),
- iteratees = this.__iteratees__,
- iterLength = iteratees.length,
- resIndex = 0,
- takeCount = nativeMin(length, this.__takeCount__);
-
- if (!isArr || arrLength < LARGE_ARRAY_SIZE || (arrLength == length && takeCount == length)) {
- return baseWrapperValue((isRight && isArr) ? array.reverse() : array, this.__actions__);
- }
- var result = [];
-
- outer:
- while (length-- && resIndex < takeCount) {
- index += dir;
-
- var iterIndex = -1,
- value = array[index];
-
- while (++iterIndex < iterLength) {
- var data = iteratees[iterIndex],
- iteratee = data.iteratee,
- type = data.type,
- computed = iteratee(value);
-
- if (type == LAZY_MAP_FLAG) {
- value = computed;
- } else if (!computed) {
- if (type == LAZY_FILTER_FLAG) {
- continue outer;
- } else {
- break outer;
- }
- }
- }
- result[resIndex++] = value;
- }
- return result;
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a cache object to store key/value pairs.
- *
- * @private
- * @static
- * @name Cache
- * @memberOf _.memoize
- */
- function MapCache() {
- this.__data__ = {};
- }
-
- /**
- * Removes `key` and its value from the cache.
- *
- * @private
- * @name delete
- * @memberOf _.memoize.Cache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed successfully, else `false`.
- */
- function mapDelete(key) {
- return this.has(key) && delete this.__data__[key];
- }
-
- /**
- * Gets the cached value for `key`.
- *
- * @private
- * @name get
- * @memberOf _.memoize.Cache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the cached value.
- */
- function mapGet(key) {
- return key == '__proto__' ? undefined : this.__data__[key];
- }
-
- /**
- * Checks if a cached value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf _.memoize.Cache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function mapHas(key) {
- return key != '__proto__' && hasOwnProperty.call(this.__data__, key);
- }
-
- /**
- * Sets `value` to `key` of the cache.
- *
- * @private
- * @name set
- * @memberOf _.memoize.Cache
- * @param {string} key The key of the value to cache.
- * @param {*} value The value to cache.
- * @returns {Object} Returns the cache object.
- */
- function mapSet(key, value) {
- if (key != '__proto__') {
- this.__data__[key] = value;
- }
- return this;
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- *
- * Creates a cache object to store unique values.
- *
- * @private
- * @param {Array} [values] The values to cache.
- */
- function SetCache(values) {
- var length = values ? values.length : 0;
-
- this.data = { 'hash': nativeCreate(null), 'set': new Set };
- while (length--) {
- this.push(values[length]);
- }
- }
-
- /**
- * Checks if `value` is in `cache` mimicking the return signature of
- * `_.indexOf` by returning `0` if the value is found, else `-1`.
- *
- * @private
- * @param {Object} cache The cache to search.
- * @param {*} value The value to search for.
- * @returns {number} Returns `0` if `value` is found, else `-1`.
- */
- function cacheIndexOf(cache, value) {
- var data = cache.data,
- result = (typeof value == 'string' || isObject(value)) ? data.set.has(value) : data.hash[value];
-
- return result ? 0 : -1;
- }
-
- /**
- * Adds `value` to the cache.
- *
- * @private
- * @name push
- * @memberOf SetCache
- * @param {*} value The value to cache.
- */
- function cachePush(value) {
- var data = this.data;
- if (typeof value == 'string' || isObject(value)) {
- data.set.add(value);
- } else {
- data.hash[value] = true;
- }
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a new array joining `array` with `other`.
- *
- * @private
- * @param {Array} array The array to join.
- * @param {Array} other The other array to join.
- * @returns {Array} Returns the new concatenated array.
- */
- function arrayConcat(array, other) {
- var index = -1,
- length = array.length,
- othIndex = -1,
- othLength = other.length,
- result = Array(length + othLength);
-
- while (++index < length) {
- result[index] = array[index];
- }
- while (++othIndex < othLength) {
- result[index++] = other[othIndex];
- }
- return result;
- }
-
- /**
- * Copies the values of `source` to `array`.
- *
- * @private
- * @param {Array} source The array to copy values from.
- * @param {Array} [array=[]] The array to copy values to.
- * @returns {Array} Returns `array`.
- */
- function arrayCopy(source, array) {
- var index = -1,
- length = source.length;
-
- array || (array = Array(length));
- while (++index < length) {
- array[index] = source[index];
- }
- return array;
- }
-
- /**
- * A specialized version of `_.forEach` for arrays without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns `array`.
- */
- function arrayEach(array, iteratee) {
- var index = -1,
- length = array.length;
-
- while (++index < length) {
- if (iteratee(array[index], index, array) === false) {
- break;
- }
- }
- return array;
- }
-
- /**
- * A specialized version of `_.forEachRight` for arrays without support for
- * callback shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns `array`.
- */
- function arrayEachRight(array, iteratee) {
- var length = array.length;
-
- while (length--) {
- if (iteratee(array[length], length, array) === false) {
- break;
- }
- }
- return array;
- }
-
- /**
- * A specialized version of `_.every` for arrays without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if all elements pass the predicate check,
- * else `false`.
- */
- function arrayEvery(array, predicate) {
- var index = -1,
- length = array.length;
-
- while (++index < length) {
- if (!predicate(array[index], index, array)) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * A specialized version of `baseExtremum` for arrays which invokes `iteratee`
- * with one argument: (value).
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} comparator The function used to compare values.
- * @param {*} exValue The initial extremum value.
- * @returns {*} Returns the extremum value.
- */
- function arrayExtremum(array, iteratee, comparator, exValue) {
- var index = -1,
- length = array.length,
- computed = exValue,
- result = computed;
-
- while (++index < length) {
- var value = array[index],
- current = +iteratee(value);
-
- if (comparator(current, computed)) {
- computed = current;
- result = value;
- }
- }
- return result;
- }
-
- /**
- * A specialized version of `_.filter` for arrays without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- */
- function arrayFilter(array, predicate) {
- var index = -1,
- length = array.length,
- resIndex = -1,
- result = [];
-
- while (++index < length) {
- var value = array[index];
- if (predicate(value, index, array)) {
- result[++resIndex] = value;
- }
- }
- return result;
- }
-
- /**
- * A specialized version of `_.map` for arrays without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- */
- function arrayMap(array, iteratee) {
- var index = -1,
- length = array.length,
- result = Array(length);
-
- while (++index < length) {
- result[index] = iteratee(array[index], index, array);
- }
- return result;
- }
-
- /**
- * Appends the elements of `values` to `array`.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {Array} values The values to append.
- * @returns {Array} Returns `array`.
- */
- function arrayPush(array, values) {
- var index = -1,
- length = values.length,
- offset = array.length;
-
- while (++index < length) {
- array[offset + index] = values[index];
- }
- return array;
- }
-
- /**
- * A specialized version of `_.reduce` for arrays without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {boolean} [initFromArray] Specify using the first element of `array`
- * as the initial value.
- * @returns {*} Returns the accumulated value.
- */
- function arrayReduce(array, iteratee, accumulator, initFromArray) {
- var index = -1,
- length = array.length;
-
- if (initFromArray && length) {
- accumulator = array[++index];
- }
- while (++index < length) {
- accumulator = iteratee(accumulator, array[index], index, array);
- }
- return accumulator;
- }
-
- /**
- * A specialized version of `_.reduceRight` for arrays without support for
- * callback shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {boolean} [initFromArray] Specify using the last element of `array`
- * as the initial value.
- * @returns {*} Returns the accumulated value.
- */
- function arrayReduceRight(array, iteratee, accumulator, initFromArray) {
- var length = array.length;
- if (initFromArray && length) {
- accumulator = array[--length];
- }
- while (length--) {
- accumulator = iteratee(accumulator, array[length], length, array);
- }
- return accumulator;
- }
-
- /**
- * A specialized version of `_.some` for arrays without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- * else `false`.
- */
- function arraySome(array, predicate) {
- var index = -1,
- length = array.length;
-
- while (++index < length) {
- if (predicate(array[index], index, array)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * A specialized version of `_.sum` for arrays without support for callback
- * shorthands and `this` binding..
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {number} Returns the sum.
- */
- function arraySum(array, iteratee) {
- var length = array.length,
- result = 0;
-
- while (length--) {
- result += +iteratee(array[length]) || 0;
- }
- return result;
- }
-
- /**
- * Used by `_.defaults` to customize its `_.assign` use.
- *
- * @private
- * @param {*} objectValue The destination object property value.
- * @param {*} sourceValue The source object property value.
- * @returns {*} Returns the value to assign to the destination object.
- */
- function assignDefaults(objectValue, sourceValue) {
- return objectValue === undefined ? sourceValue : objectValue;
- }
-
- /**
- * Used by `_.template` to customize its `_.assign` use.
- *
- * **Note:** This function is like `assignDefaults` except that it ignores
- * inherited property values when checking if a property is `undefined`.
- *
- * @private
- * @param {*} objectValue The destination object property value.
- * @param {*} sourceValue The source object property value.
- * @param {string} key The key associated with the object and source values.
- * @param {Object} object The destination object.
- * @returns {*} Returns the value to assign to the destination object.
- */
- function assignOwnDefaults(objectValue, sourceValue, key, object) {
- return (objectValue === undefined || !hasOwnProperty.call(object, key))
- ? sourceValue
- : objectValue;
- }
-
- /**
- * A specialized version of `_.assign` for customizing assigned values without
- * support for argument juggling, multiple sources, and `this` binding `customizer`
- * functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {Function} customizer The function to customize assigned values.
- * @returns {Object} Returns `object`.
- */
- function assignWith(object, source, customizer) {
- var index = -1,
- props = keys(source),
- length = props.length;
-
- while (++index < length) {
- var key = props[index],
- value = object[key],
- result = customizer(value, source[key], key, object, source);
-
- if ((result === result ? (result !== value) : (value === value)) ||
- (value === undefined && !(key in object))) {
- object[key] = result;
- }
- }
- return object;
- }
-
- /**
- * The base implementation of `_.assign` without support for argument juggling,
- * multiple sources, and `customizer` functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @returns {Object} Returns `object`.
- */
- function baseAssign(object, source) {
- return source == null
- ? object
- : baseCopy(source, keys(source), object);
- }
-
- /**
- * The base implementation of `_.at` without support for string collections
- * and individual key arguments.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {number[]|string[]} props The property names or indexes of elements to pick.
- * @returns {Array} Returns the new array of picked elements.
- */
- function baseAt(collection, props) {
- var index = -1,
- isNil = collection == null,
- isArr = !isNil && isArrayLike(collection),
- length = isArr ? collection.length : 0,
- propsLength = props.length,
- result = Array(propsLength);
-
- while(++index < propsLength) {
- var key = props[index];
- if (isArr) {
- result[index] = isIndex(key, length) ? collection[key] : undefined;
- } else {
- result[index] = isNil ? undefined : collection[key];
- }
- }
- return result;
- }
-
- /**
- * Copies properties of `source` to `object`.
- *
- * @private
- * @param {Object} source The object to copy properties from.
- * @param {Array} props The property names to copy.
- * @param {Object} [object={}] The object to copy properties to.
- * @returns {Object} Returns `object`.
- */
- function baseCopy(source, props, object) {
- object || (object = {});
-
- var index = -1,
- length = props.length;
-
- while (++index < length) {
- var key = props[index];
- object[key] = source[key];
- }
- return object;
- }
-
- /**
- * The base implementation of `_.callback` which supports specifying the
- * number of arguments to provide to `func`.
- *
- * @private
- * @param {*} [func=_.identity] The value to convert to a callback.
- * @param {*} [thisArg] The `this` binding of `func`.
- * @param {number} [argCount] The number of arguments to provide to `func`.
- * @returns {Function} Returns the callback.
- */
- function baseCallback(func, thisArg, argCount) {
- var type = typeof func;
- if (type == 'function') {
- return thisArg === undefined
- ? func
- : bindCallback(func, thisArg, argCount);
- }
- if (func == null) {
- return identity;
- }
- if (type == 'object') {
- return baseMatches(func);
- }
- return thisArg === undefined
- ? property(func)
- : baseMatchesProperty(func, thisArg);
- }
-
- /**
- * The base implementation of `_.clone` without support for argument juggling
- * and `this` binding `customizer` functions.
- *
- * @private
- * @param {*} value The value to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @param {Function} [customizer] The function to customize cloning values.
- * @param {string} [key] The key of `value`.
- * @param {Object} [object] The object `value` belongs to.
- * @param {Array} [stackA=[]] Tracks traversed source objects.
- * @param {Array} [stackB=[]] Associates clones with source counterparts.
- * @returns {*} Returns the cloned value.
- */
- function baseClone(value, isDeep, customizer, key, object, stackA, stackB) {
- var result;
- if (customizer) {
- result = object ? customizer(value, key, object) : customizer(value);
- }
- if (result !== undefined) {
- return result;
- }
- if (!isObject(value)) {
- return value;
- }
- var isArr = isArray(value);
- if (isArr) {
- result = initCloneArray(value);
- if (!isDeep) {
- return arrayCopy(value, result);
- }
- } else {
- var tag = objToString.call(value),
- isFunc = tag == funcTag;
-
- if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
- result = initCloneObject(isFunc ? {} : value);
- if (!isDeep) {
- return baseAssign(result, value);
- }
- } else {
- return cloneableTags[tag]
- ? initCloneByTag(value, tag, isDeep)
- : (object ? value : {});
- }
- }
- // Check for circular references and return its corresponding clone.
- stackA || (stackA = []);
- stackB || (stackB = []);
-
- var length = stackA.length;
- while (length--) {
- if (stackA[length] == value) {
- return stackB[length];
- }
- }
- // Add the source value to the stack of traversed objects and associate it with its clone.
- stackA.push(value);
- stackB.push(result);
-
- // Recursively populate clone (susceptible to call stack limits).
- (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) {
- result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB);
- });
- return result;
- }
-
- /**
- * 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.
- */
- var baseCreate = (function() {
- function object() {}
- return function(prototype) {
- if (isObject(prototype)) {
- object.prototype = prototype;
- var result = new object;
- object.prototype = undefined;
- }
- return result || {};
- };
- }());
-
- /**
- * The base implementation of `_.delay` and `_.defer` which accepts an index
- * of where to slice the arguments to provide to `func`.
- *
- * @private
- * @param {Function} func The function to delay.
- * @param {number} wait The number of milliseconds to delay invocation.
- * @param {Object} args The arguments provide to `func`.
- * @returns {number} Returns the timer id.
- */
- function baseDelay(func, wait, args) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- return setTimeout(function() { func.apply(undefined, args); }, wait);
- }
-
- /**
- * The base implementation of `_.difference` which accepts a single array
- * of values to exclude.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Array} values The values to exclude.
- * @returns {Array} Returns the new array of filtered values.
- */
- function baseDifference(array, values) {
- var length = array ? array.length : 0,
- result = [];
-
- if (!length) {
- return result;
- }
- var index = -1,
- indexOf = getIndexOf(),
- isCommon = indexOf == baseIndexOf,
- cache = (isCommon && values.length >= LARGE_ARRAY_SIZE) ? createCache(values) : null,
- valuesLength = values.length;
-
- if (cache) {
- indexOf = cacheIndexOf;
- isCommon = false;
- values = cache;
- }
- outer:
- while (++index < length) {
- var value = array[index];
-
- if (isCommon && value === value) {
- var valuesIndex = valuesLength;
- while (valuesIndex--) {
- if (values[valuesIndex] === value) {
- continue outer;
- }
- }
- result.push(value);
- }
- else if (indexOf(values, value, 0) < 0) {
- result.push(value);
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `_.forEach` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array|Object|string} Returns `collection`.
- */
- var baseEach = createBaseEach(baseForOwn);
-
- /**
- * The base implementation of `_.forEachRight` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array|Object|string} Returns `collection`.
- */
- var baseEachRight = createBaseEach(baseForOwnRight, true);
-
- /**
- * The base implementation of `_.every` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if all elements pass the predicate check,
- * else `false`
- */
- function baseEvery(collection, predicate) {
- var result = true;
- baseEach(collection, function(value, index, collection) {
- result = !!predicate(value, index, collection);
- return result;
- });
- return result;
- }
-
- /**
- * Gets the extremum value of `collection` invoking `iteratee` for each value
- * in `collection` to generate the criterion by which the value is ranked.
- * The `iteratee` is invoked with three arguments: (value, index|key, collection).
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} comparator The function used to compare values.
- * @param {*} exValue The initial extremum value.
- * @returns {*} Returns the extremum value.
- */
- function baseExtremum(collection, iteratee, comparator, exValue) {
- var computed = exValue,
- result = computed;
-
- baseEach(collection, function(value, index, collection) {
- var current = +iteratee(value, index, collection);
- if (comparator(current, computed) || (current === exValue && current === result)) {
- computed = current;
- result = value;
- }
- });
- return result;
- }
-
- /**
- * The base implementation of `_.fill` without an iteratee call guard.
- *
- * @private
- * @param {Array} array The array to fill.
- * @param {*} value The value to fill `array` with.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns `array`.
- */
- function baseFill(array, value, start, end) {
- var length = array.length;
-
- start = start == null ? 0 : (+start || 0);
- if (start < 0) {
- start = -start > length ? 0 : (length + start);
- }
- end = (end === undefined || end > length) ? length : (+end || 0);
- if (end < 0) {
- end += length;
- }
- length = start > end ? 0 : (end >>> 0);
- start >>>= 0;
-
- while (start < length) {
- array[start++] = value;
- }
- return array;
- }
-
- /**
- * The base implementation of `_.filter` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- */
- function baseFilter(collection, predicate) {
- var result = [];
- baseEach(collection, function(value, index, collection) {
- if (predicate(value, index, collection)) {
- result.push(value);
- }
- });
- return result;
- }
-
- /**
- * The base implementation of `_.find`, `_.findLast`, `_.findKey`, and `_.findLastKey`,
- * without support for callback shorthands and `this` binding, which iterates
- * over `collection` using the provided `eachFunc`.
- *
- * @private
- * @param {Array|Object|string} collection The collection to search.
- * @param {Function} predicate The function invoked per iteration.
- * @param {Function} eachFunc The function to iterate over `collection`.
- * @param {boolean} [retKey] Specify returning the key of the found element
- * instead of the element itself.
- * @returns {*} Returns the found element or its key, else `undefined`.
- */
- function baseFind(collection, predicate, eachFunc, retKey) {
- var result;
- eachFunc(collection, function(value, key, collection) {
- if (predicate(value, key, collection)) {
- result = retKey ? key : value;
- return false;
- }
- });
- return result;
- }
-
- /**
- * The base implementation of `_.flatten` with added support for restricting
- * flattening and specifying the start index.
- *
- * @private
- * @param {Array} array The array to flatten.
- * @param {boolean} [isDeep] Specify a deep flatten.
- * @param {boolean} [isStrict] Restrict flattening to arrays-like objects.
- * @param {Array} [result=[]] The initial result value.
- * @returns {Array} Returns the new flattened array.
- */
- function baseFlatten(array, isDeep, isStrict, result) {
- result || (result = []);
-
- var index = -1,
- length = array.length;
-
- while (++index < length) {
- var value = array[index];
- if (isObjectLike(value) && isArrayLike(value) &&
- (isStrict || isArray(value) || isArguments(value))) {
- if (isDeep) {
- // Recursively flatten arrays (susceptible to call stack limits).
- baseFlatten(value, isDeep, isStrict, result);
- } else {
- arrayPush(result, value);
- }
- } else if (!isStrict) {
- result[result.length] = value;
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `baseForIn` and `baseForOwn` which iterates
- * over `object` properties returned by `keysFunc` invoking `iteratee` for
- * each property. Iteratee functions may exit iteration early by explicitly
- * returning `false`.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @returns {Object} Returns `object`.
- */
- var baseFor = createBaseFor();
-
- /**
- * This function is like `baseFor` except that it iterates over properties
- * in the opposite order.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @returns {Object} Returns `object`.
- */
- var baseForRight = createBaseFor(true);
-
- /**
- * The base implementation of `_.forIn` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Object} Returns `object`.
- */
- function baseForIn(object, iteratee) {
- return baseFor(object, iteratee, keysIn);
- }
-
- /**
- * The base implementation of `_.forOwn` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Object} Returns `object`.
- */
- function baseForOwn(object, iteratee) {
- return baseFor(object, iteratee, keys);
- }
-
- /**
- * The base implementation of `_.forOwnRight` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Object} Returns `object`.
- */
- function baseForOwnRight(object, iteratee) {
- return baseForRight(object, iteratee, keys);
- }
-
- /**
- * The base implementation of `_.functions` which creates an array of
- * `object` function property names filtered from those provided.
- *
- * @private
- * @param {Object} object The object to inspect.
- * @param {Array} props The property names to filter.
- * @returns {Array} Returns the new array of filtered property names.
- */
- function baseFunctions(object, props) {
- var index = -1,
- length = props.length,
- resIndex = -1,
- result = [];
-
- while (++index < length) {
- var key = props[index];
- if (isFunction(object[key])) {
- result[++resIndex] = key;
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `get` without support for string paths
- * and default values.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array} path The path of the property to get.
- * @param {string} [pathKey] The key representation of path.
- * @returns {*} Returns the resolved value.
- */
- function baseGet(object, path, pathKey) {
- if (object == null) {
- return;
- }
- if (pathKey !== undefined && pathKey in toObject(object)) {
- path = [pathKey];
- }
- var index = 0,
- length = path.length;
-
- while (object != null && index < length) {
- object = object[path[index++]];
- }
- return (index && index == length) ? object : undefined;
- }
-
- /**
- * The base implementation of `_.isEqual` without support for `this` binding
- * `customizer` functions.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @param {Function} [customizer] The function to customize comparing values.
- * @param {boolean} [isLoose] Specify performing partial comparisons.
- * @param {Array} [stackA] Tracks traversed `value` objects.
- * @param {Array} [stackB] Tracks traversed `other` objects.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- */
- function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) {
- if (value === other) {
- return true;
- }
- if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
- return value !== value && other !== other;
- }
- return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB);
- }
-
- /**
- * A specialized version of `baseIsEqual` for arrays and objects which performs
- * deep comparisons and tracks traversed objects enabling objects with circular
- * references to be compared.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} [customizer] The function to customize comparing objects.
- * @param {boolean} [isLoose] Specify performing partial comparisons.
- * @param {Array} [stackA=[]] Tracks traversed `value` objects.
- * @param {Array} [stackB=[]] Tracks traversed `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
- var objIsArr = isArray(object),
- othIsArr = isArray(other),
- objTag = arrayTag,
- othTag = arrayTag;
-
- if (!objIsArr) {
- objTag = objToString.call(object);
- if (objTag == argsTag) {
- objTag = objectTag;
- } else if (objTag != objectTag) {
- objIsArr = isTypedArray(object);
- }
- }
- if (!othIsArr) {
- othTag = objToString.call(other);
- if (othTag == argsTag) {
- othTag = objectTag;
- } else if (othTag != objectTag) {
- othIsArr = isTypedArray(other);
- }
- }
- var objIsObj = objTag == objectTag,
- othIsObj = othTag == objectTag,
- isSameTag = objTag == othTag;
-
- if (isSameTag && !(objIsArr || objIsObj)) {
- return equalByTag(object, other, objTag);
- }
- if (!isLoose) {
- var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
- othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
-
- if (objIsWrapped || othIsWrapped) {
- return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB);
- }
- }
- if (!isSameTag) {
- return false;
- }
- // Assume cyclic values are equal.
- // For more information on detecting circular references see https://es5.github.io/#JO.
- stackA || (stackA = []);
- stackB || (stackB = []);
-
- var length = stackA.length;
- while (length--) {
- if (stackA[length] == object) {
- return stackB[length] == other;
- }
- }
- // Add `object` and `other` to the stack of traversed objects.
- stackA.push(object);
- stackB.push(other);
-
- var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB);
-
- stackA.pop();
- stackB.pop();
-
- return result;
- }
-
- /**
- * The base implementation of `_.isMatch` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Object} object The object to inspect.
- * @param {Array} matchData The propery names, values, and compare flags to match.
- * @param {Function} [customizer] The function to customize comparing objects.
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
- */
- function baseIsMatch(object, matchData, customizer) {
- var index = matchData.length,
- length = index,
- noCustomizer = !customizer;
-
- if (object == null) {
- return !length;
- }
- object = toObject(object);
- while (index--) {
- var data = matchData[index];
- if ((noCustomizer && data[2])
- ? data[1] !== object[data[0]]
- : !(data[0] in object)
- ) {
- return false;
- }
- }
- while (++index < length) {
- data = matchData[index];
- var key = data[0],
- objValue = object[key],
- srcValue = data[1];
-
- if (noCustomizer && data[2]) {
- if (objValue === undefined && !(key in object)) {
- return false;
- }
- } else {
- var result = customizer ? customizer(objValue, srcValue, key) : undefined;
- if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) {
- return false;
- }
- }
- }
- return true;
- }
-
- /**
- * The base implementation of `_.map` without support for callback shorthands
- * and `this` binding.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- */
- function baseMap(collection, iteratee) {
- var index = -1,
- result = isArrayLike(collection) ? Array(collection.length) : [];
-
- baseEach(collection, function(value, key, collection) {
- result[++index] = iteratee(value, key, collection);
- });
- return result;
- }
-
- /**
- * The base implementation of `_.matches` which does not clone `source`.
- *
- * @private
- * @param {Object} source The object of property values to match.
- * @returns {Function} Returns the new function.
- */
- function baseMatches(source) {
- var matchData = getMatchData(source);
- if (matchData.length == 1 && matchData[0][2]) {
- var key = matchData[0][0],
- value = matchData[0][1];
-
- return function(object) {
- if (object == null) {
- return false;
- }
- return object[key] === value && (value !== undefined || (key in toObject(object)));
- };
- }
- return function(object) {
- return baseIsMatch(object, matchData);
- };
- }
-
- /**
- * The base implementation of `_.matchesProperty` which does not clone `srcValue`.
- *
- * @private
- * @param {string} path The path of the property to get.
- * @param {*} srcValue The value to compare.
- * @returns {Function} Returns the new function.
- */
- function baseMatchesProperty(path, srcValue) {
- var isArr = isArray(path),
- isCommon = isKey(path) && isStrictComparable(srcValue),
- pathKey = (path + '');
-
- path = toPath(path);
- return function(object) {
- if (object == null) {
- return false;
- }
- var key = pathKey;
- object = toObject(object);
- if ((isArr || !isCommon) && !(key in object)) {
- object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
- if (object == null) {
- return false;
- }
- key = last(path);
- object = toObject(object);
- }
- return object[key] === srcValue
- ? (srcValue !== undefined || (key in object))
- : baseIsEqual(srcValue, object[key], undefined, true);
- };
- }
-
- /**
- * The base implementation of `_.merge` without support for argument juggling,
- * multiple sources, and `this` binding `customizer` functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {Function} [customizer] The function to customize merged values.
- * @param {Array} [stackA=[]] Tracks traversed source objects.
- * @param {Array} [stackB=[]] Associates values with source counterparts.
- * @returns {Object} Returns `object`.
- */
- function baseMerge(object, source, customizer, stackA, stackB) {
- if (!isObject(object)) {
- return object;
- }
- var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)),
- props = isSrcArr ? undefined : keys(source);
-
- arrayEach(props || source, function(srcValue, key) {
- if (props) {
- key = srcValue;
- srcValue = source[key];
- }
- if (isObjectLike(srcValue)) {
- stackA || (stackA = []);
- stackB || (stackB = []);
- baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB);
- }
- else {
- var value = object[key],
- result = customizer ? customizer(value, srcValue, key, object, source) : undefined,
- isCommon = result === undefined;
-
- if (isCommon) {
- result = srcValue;
- }
- if ((result !== undefined || (isSrcArr && !(key in object))) &&
- (isCommon || (result === result ? (result !== value) : (value === value)))) {
- object[key] = result;
- }
- }
- });
- return object;
- }
-
- /**
- * A specialized version of `baseMerge` for arrays and objects which performs
- * deep merges and tracks traversed objects enabling objects with circular
- * references to be merged.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {string} key The key of the value to merge.
- * @param {Function} mergeFunc The function to merge values.
- * @param {Function} [customizer] The function to customize merged values.
- * @param {Array} [stackA=[]] Tracks traversed source objects.
- * @param {Array} [stackB=[]] Associates values with source counterparts.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) {
- var length = stackA.length,
- srcValue = source[key];
-
- while (length--) {
- if (stackA[length] == srcValue) {
- object[key] = stackB[length];
- return;
- }
- }
- var value = object[key],
- result = customizer ? customizer(value, srcValue, key, object, source) : undefined,
- isCommon = result === undefined;
-
- if (isCommon) {
- result = srcValue;
- if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) {
- result = isArray(value)
- ? value
- : (isArrayLike(value) ? arrayCopy(value) : []);
- }
- else if (isPlainObject(srcValue) || isArguments(srcValue)) {
- result = isArguments(value)
- ? toPlainObject(value)
- : (isPlainObject(value) ? value : {});
- }
- else {
- isCommon = false;
- }
- }
- // Add the source value to the stack of traversed objects and associate
- // it with its merged value.
- stackA.push(srcValue);
- stackB.push(result);
-
- if (isCommon) {
- // Recursively merge objects and arrays (susceptible to call stack limits).
- object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB);
- } else if (result === result ? (result !== value) : (value === value)) {
- object[key] = result;
- }
- }
-
- /**
- * The base implementation of `_.property` without support for deep paths.
- *
- * @private
- * @param {string} key The key of the property to get.
- * @returns {Function} Returns the new function.
- */
- function baseProperty(key) {
- return function(object) {
- return object == null ? undefined : object[key];
- };
- }
-
- /**
- * A specialized version of `baseProperty` which supports deep paths.
- *
- * @private
- * @param {Array|string} path The path of the property to get.
- * @returns {Function} Returns the new function.
- */
- function basePropertyDeep(path) {
- var pathKey = (path + '');
- path = toPath(path);
- return function(object) {
- return baseGet(object, path, pathKey);
- };
- }
-
- /**
- * The base implementation of `_.pullAt` without support for individual
- * index arguments and capturing the removed elements.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {number[]} indexes The indexes of elements to remove.
- * @returns {Array} Returns `array`.
- */
- function basePullAt(array, indexes) {
- var length = array ? indexes.length : 0;
- while (length--) {
- var index = indexes[length];
- if (index != previous && isIndex(index)) {
- var previous = index;
- splice.call(array, index, 1);
- }
- }
- return array;
- }
-
- /**
- * The base implementation of `_.random` without support for argument juggling
- * and returning floating-point numbers.
- *
- * @private
- * @param {number} min The minimum possible value.
- * @param {number} max The maximum possible value.
- * @returns {number} Returns the random number.
- */
- function baseRandom(min, max) {
- return min + nativeFloor(nativeRandom() * (max - min + 1));
- }
-
- /**
- * The base implementation of `_.reduce` and `_.reduceRight` without support
- * for callback shorthands and `this` binding, which iterates over `collection`
- * using the provided `eachFunc`.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} accumulator The initial value.
- * @param {boolean} initFromCollection Specify using the first or last element
- * of `collection` as the initial value.
- * @param {Function} eachFunc The function to iterate over `collection`.
- * @returns {*} Returns the accumulated value.
- */
- function baseReduce(collection, iteratee, accumulator, initFromCollection, eachFunc) {
- eachFunc(collection, function(value, index, collection) {
- accumulator = initFromCollection
- ? (initFromCollection = false, value)
- : iteratee(accumulator, value, index, collection);
- });
- return accumulator;
- }
-
- /**
- * The base implementation of `setData` without support for hot loop detection.
- *
- * @private
- * @param {Function} func The function to associate metadata with.
- * @param {*} data The metadata.
- * @returns {Function} Returns `func`.
- */
- var baseSetData = !metaMap ? identity : function(func, data) {
- metaMap.set(func, data);
- return func;
- };
-
- /**
- * The base implementation of `_.slice` without an iteratee call guard.
- *
- * @private
- * @param {Array} array The array to slice.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns the slice of `array`.
- */
- function baseSlice(array, start, end) {
- var index = -1,
- length = array.length;
-
- start = start == null ? 0 : (+start || 0);
- if (start < 0) {
- start = -start > length ? 0 : (length + start);
- }
- end = (end === undefined || end > length) ? length : (+end || 0);
- if (end < 0) {
- end += length;
- }
- length = start > end ? 0 : ((end - start) >>> 0);
- start >>>= 0;
-
- var result = Array(length);
- while (++index < length) {
- result[index] = array[index + start];
- }
- return result;
- }
-
- /**
- * The base implementation of `_.some` without support for callback shorthands
- * and `this` binding.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- * else `false`.
- */
- function baseSome(collection, predicate) {
- var result;
-
- baseEach(collection, function(value, index, collection) {
- result = predicate(value, index, collection);
- return !result;
- });
- return !!result;
- }
-
- /**
- * The base implementation of `_.sortBy` which uses `comparer` to define
- * the sort order of `array` and replaces criteria objects with their
- * corresponding values.
- *
- * @private
- * @param {Array} array The array to sort.
- * @param {Function} comparer The function to define sort order.
- * @returns {Array} Returns `array`.
- */
- function baseSortBy(array, comparer) {
- var length = array.length;
-
- array.sort(comparer);
- while (length--) {
- array[length] = array[length].value;
- }
- return array;
- }
-
- /**
- * The base implementation of `_.sortByOrder` without param guards.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
- * @param {boolean[]} orders The sort orders of `iteratees`.
- * @returns {Array} Returns the new sorted array.
- */
- function baseSortByOrder(collection, iteratees, orders) {
- var callback = getCallback(),
- index = -1;
-
- iteratees = arrayMap(iteratees, function(iteratee) { return callback(iteratee); });
-
- var result = baseMap(collection, function(value) {
- var criteria = arrayMap(iteratees, function(iteratee) { return iteratee(value); });
- return { 'criteria': criteria, 'index': ++index, 'value': value };
- });
-
- return baseSortBy(result, function(object, other) {
- return compareMultiple(object, other, orders);
- });
- }
-
- /**
- * The base implementation of `_.sum` without support for callback shorthands
- * and `this` binding.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {number} Returns the sum.
- */
- function baseSum(collection, iteratee) {
- var result = 0;
- baseEach(collection, function(value, index, collection) {
- result += +iteratee(value, index, collection) || 0;
- });
- return result;
- }
-
- /**
- * The base implementation of `_.uniq` without support for callback shorthands
- * and `this` binding.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Function} [iteratee] The function invoked per iteration.
- * @returns {Array} Returns the new duplicate-value-free array.
- */
- function baseUniq(array, iteratee) {
- var index = -1,
- indexOf = getIndexOf(),
- length = array.length,
- isCommon = indexOf == baseIndexOf,
- isLarge = isCommon && length >= LARGE_ARRAY_SIZE,
- seen = isLarge ? createCache() : null,
- result = [];
-
- if (seen) {
- indexOf = cacheIndexOf;
- isCommon = false;
- } else {
- isLarge = false;
- seen = iteratee ? [] : result;
- }
- outer:
- while (++index < length) {
- var value = array[index],
- computed = iteratee ? iteratee(value, index, array) : value;
-
- if (isCommon && value === value) {
- var seenIndex = seen.length;
- while (seenIndex--) {
- if (seen[seenIndex] === computed) {
- continue outer;
- }
- }
- if (iteratee) {
- seen.push(computed);
- }
- result.push(value);
- }
- else if (indexOf(seen, computed, 0) < 0) {
- if (iteratee || isLarge) {
- seen.push(computed);
- }
- result.push(value);
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `_.values` and `_.valuesIn` which creates an
- * array of `object` property values corresponding to the property names
- * of `props`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array} props The property names to get values for.
- * @returns {Object} Returns the array of property values.
- */
- function baseValues(object, props) {
- var index = -1,
- length = props.length,
- result = Array(length);
-
- while (++index < length) {
- result[index] = object[props[index]];
- }
- return result;
- }
-
- /**
- * The base implementation of `_.dropRightWhile`, `_.dropWhile`, `_.takeRightWhile`,
- * and `_.takeWhile` without support for callback shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to query.
- * @param {Function} predicate The function invoked per iteration.
- * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Array} Returns the slice of `array`.
- */
- function baseWhile(array, predicate, isDrop, fromRight) {
- var length = array.length,
- index = fromRight ? length : -1;
-
- while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {}
- return isDrop
- ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
- : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
- }
-
- /**
- * The base implementation of `wrapperValue` which returns the result of
- * performing a sequence of actions on the unwrapped `value`, where each
- * successive action is supplied the return value of the previous.
- *
- * @private
- * @param {*} value The unwrapped value.
- * @param {Array} actions Actions to peform to resolve the unwrapped value.
- * @returns {*} Returns the resolved value.
- */
- function baseWrapperValue(value, actions) {
- var result = value;
- if (result instanceof LazyWrapper) {
- result = result.value();
- }
- var index = -1,
- length = actions.length;
-
- while (++index < length) {
- var action = actions[index];
- result = action.func.apply(action.thisArg, arrayPush([result], action.args));
- }
- return result;
- }
-
- /**
- * Performs a binary search of `array` to determine the index at which `value`
- * should be inserted into `array` in order to maintain its sort order.
- *
- * @private
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {boolean} [retHighest] Specify returning the highest qualified index.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- */
- function binaryIndex(array, value, retHighest) {
- var low = 0,
- high = array ? array.length : low;
-
- if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
- while (low < high) {
- var mid = (low + high) >>> 1,
- computed = array[mid];
-
- if ((retHighest ? (computed <= value) : (computed < value)) && computed !== null) {
- low = mid + 1;
- } else {
- high = mid;
- }
- }
- return high;
- }
- return binaryIndexBy(array, value, identity, retHighest);
- }
-
- /**
- * This function is like `binaryIndex` except that it invokes `iteratee` for
- * `value` and each element of `array` to compute their sort ranking. The
- * iteratee is invoked with one argument; (value).
- *
- * @private
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {boolean} [retHighest] Specify returning the highest qualified index.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- */
- function binaryIndexBy(array, value, iteratee, retHighest) {
- value = iteratee(value);
-
- var low = 0,
- high = array ? array.length : 0,
- valIsNaN = value !== value,
- valIsNull = value === null,
- valIsUndef = value === undefined;
-
- while (low < high) {
- var mid = nativeFloor((low + high) / 2),
- computed = iteratee(array[mid]),
- isDef = computed !== undefined,
- isReflexive = computed === computed;
-
- if (valIsNaN) {
- var setLow = isReflexive || retHighest;
- } else if (valIsNull) {
- setLow = isReflexive && isDef && (retHighest || computed != null);
- } else if (valIsUndef) {
- setLow = isReflexive && (retHighest || isDef);
- } else if (computed == null) {
- setLow = false;
- } else {
- setLow = retHighest ? (computed <= value) : (computed < value);
- }
- if (setLow) {
- low = mid + 1;
- } else {
- high = mid;
- }
- }
- return nativeMin(high, MAX_ARRAY_INDEX);
- }
-
- /**
- * A specialized version of `baseCallback` which only supports `this` binding
- * and specifying the number of arguments to provide to `func`.
- *
- * @private
- * @param {Function} func The function to bind.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {number} [argCount] The number of arguments to provide to `func`.
- * @returns {Function} Returns the callback.
- */
- function bindCallback(func, thisArg, argCount) {
- if (typeof func != 'function') {
- return identity;
- }
- if (thisArg === undefined) {
- return func;
- }
- switch (argCount) {
- case 1: return function(value) {
- return func.call(thisArg, value);
- };
- case 3: return function(value, index, collection) {
- return func.call(thisArg, value, index, collection);
- };
- case 4: return function(accumulator, value, index, collection) {
- return func.call(thisArg, accumulator, value, index, collection);
- };
- case 5: return function(value, other, key, object, source) {
- return func.call(thisArg, value, other, key, object, source);
- };
- }
- return function() {
- return func.apply(thisArg, arguments);
- };
- }
-
- /**
- * Creates a clone of the given array buffer.
- *
- * @private
- * @param {ArrayBuffer} buffer The array buffer to clone.
- * @returns {ArrayBuffer} Returns the cloned array buffer.
- */
- function bufferClone(buffer) {
- var result = new ArrayBuffer(buffer.byteLength),
- view = new Uint8Array(result);
-
- view.set(new Uint8Array(buffer));
- return result;
- }
-
- /**
- * Creates an array that is the composition of partially applied arguments,
- * placeholders, and provided arguments into a single array of arguments.
- *
- * @private
- * @param {Array|Object} args The provided arguments.
- * @param {Array} partials The arguments to prepend to those provided.
- * @param {Array} holders The `partials` placeholder indexes.
- * @returns {Array} Returns the new array of composed arguments.
- */
- function composeArgs(args, partials, holders) {
- var holdersLength = holders.length,
- argsIndex = -1,
- argsLength = nativeMax(args.length - holdersLength, 0),
- leftIndex = -1,
- leftLength = partials.length,
- result = Array(leftLength + argsLength);
-
- while (++leftIndex < leftLength) {
- result[leftIndex] = partials[leftIndex];
- }
- while (++argsIndex < holdersLength) {
- result[holders[argsIndex]] = args[argsIndex];
- }
- while (argsLength--) {
- result[leftIndex++] = args[argsIndex++];
- }
- return result;
- }
-
- /**
- * This function is like `composeArgs` except that the arguments composition
- * is tailored for `_.partialRight`.
- *
- * @private
- * @param {Array|Object} args The provided arguments.
- * @param {Array} partials The arguments to append to those provided.
- * @param {Array} holders The `partials` placeholder indexes.
- * @returns {Array} Returns the new array of composed arguments.
- */
- function composeArgsRight(args, partials, holders) {
- var holdersIndex = -1,
- holdersLength = holders.length,
- argsIndex = -1,
- argsLength = nativeMax(args.length - holdersLength, 0),
- rightIndex = -1,
- rightLength = partials.length,
- result = Array(argsLength + rightLength);
-
- while (++argsIndex < argsLength) {
- result[argsIndex] = args[argsIndex];
- }
- var offset = argsIndex;
- while (++rightIndex < rightLength) {
- result[offset + rightIndex] = partials[rightIndex];
- }
- while (++holdersIndex < holdersLength) {
- result[offset + holders[holdersIndex]] = args[argsIndex++];
- }
- return result;
- }
-
- /**
- * Creates a `_.countBy`, `_.groupBy`, `_.indexBy`, or `_.partition` function.
- *
- * @private
- * @param {Function} setter The function to set keys and values of the accumulator object.
- * @param {Function} [initializer] The function to initialize the accumulator object.
- * @returns {Function} Returns the new aggregator function.
- */
- function createAggregator(setter, initializer) {
- return function(collection, iteratee, thisArg) {
- var result = initializer ? initializer() : {};
- iteratee = getCallback(iteratee, thisArg, 3);
-
- if (isArray(collection)) {
- var index = -1,
- length = collection.length;
-
- while (++index < length) {
- var value = collection[index];
- setter(result, value, iteratee(value, index, collection), collection);
- }
- } else {
- baseEach(collection, function(value, key, collection) {
- setter(result, value, iteratee(value, key, collection), collection);
- });
- }
- return result;
- };
- }
-
- /**
- * Creates a `_.assign`, `_.defaults`, or `_.merge` function.
- *
- * @private
- * @param {Function} assigner The function to assign values.
- * @returns {Function} Returns the new assigner function.
- */
- function createAssigner(assigner) {
- return restParam(function(object, sources) {
- var index = -1,
- length = object == null ? 0 : sources.length,
- customizer = length > 2 ? sources[length - 2] : undefined,
- guard = length > 2 ? sources[2] : undefined,
- thisArg = length > 1 ? sources[length - 1] : undefined;
-
- if (typeof customizer == 'function') {
- customizer = bindCallback(customizer, thisArg, 5);
- length -= 2;
- } else {
- customizer = typeof thisArg == 'function' ? thisArg : undefined;
- length -= (customizer ? 1 : 0);
- }
- if (guard && isIterateeCall(sources[0], sources[1], guard)) {
- customizer = length < 3 ? undefined : customizer;
- length = 1;
- }
- while (++index < length) {
- var source = sources[index];
- if (source) {
- assigner(object, source, customizer);
- }
- }
- return object;
- });
- }
-
- /**
- * Creates a `baseEach` or `baseEachRight` function.
- *
- * @private
- * @param {Function} eachFunc The function to iterate over a collection.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
- */
- function createBaseEach(eachFunc, fromRight) {
- return function(collection, iteratee) {
- var length = collection ? getLength(collection) : 0;
- if (!isLength(length)) {
- return eachFunc(collection, iteratee);
- }
- var index = fromRight ? length : -1,
- iterable = toObject(collection);
-
- while ((fromRight ? index-- : ++index < length)) {
- if (iteratee(iterable[index], index, iterable) === false) {
- break;
- }
- }
- return collection;
- };
- }
-
- /**
- * Creates a base function for `_.forIn` or `_.forInRight`.
- *
- * @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
- */
- function createBaseFor(fromRight) {
- return function(object, iteratee, keysFunc) {
- var iterable = toObject(object),
- props = keysFunc(object),
- length = props.length,
- index = fromRight ? length : -1;
-
- while ((fromRight ? index-- : ++index < length)) {
- var key = props[index];
- if (iteratee(iterable[key], key, iterable) === false) {
- break;
- }
- }
- return object;
- };
- }
-
- /**
- * Creates a function that wraps `func` and invokes it with the `this`
- * binding of `thisArg`.
- *
- * @private
- * @param {Function} func The function to bind.
- * @param {*} [thisArg] The `this` binding of `func`.
- * @returns {Function} Returns the new bound function.
- */
- function createBindWrapper(func, thisArg) {
- var Ctor = createCtorWrapper(func);
-
- function wrapper() {
- var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
- return fn.apply(thisArg, arguments);
- }
- return wrapper;
- }
-
- /**
- * Creates a `Set` cache object to optimize linear searches of large arrays.
- *
- * @private
- * @param {Array} [values] The values to cache.
- * @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`.
- */
- function createCache(values) {
- return (nativeCreate && Set) ? new SetCache(values) : null;
- }
-
- /**
- * Creates a function that produces compound words out of the words in a
- * given string.
- *
- * @private
- * @param {Function} callback The function to combine each word.
- * @returns {Function} Returns the new compounder function.
- */
- function createCompounder(callback) {
- return function(string) {
- var index = -1,
- array = words(deburr(string)),
- length = array.length,
- result = '';
-
- while (++index < length) {
- result = callback(result, array[index], index);
- }
- return result;
- };
- }
-
- /**
- * Creates a function that produces an instance of `Ctor` regardless of
- * whether it was invoked as part of a `new` expression or by `call` or `apply`.
- *
- * @private
- * @param {Function} Ctor The constructor to wrap.
- * @returns {Function} Returns the new wrapped function.
- */
- function createCtorWrapper(Ctor) {
- return function() {
- // Use a `switch` statement to work with class constructors.
- // See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
- // for more details.
- var args = arguments;
- switch (args.length) {
- case 0: return new Ctor;
- case 1: return new Ctor(args[0]);
- case 2: return new Ctor(args[0], args[1]);
- case 3: return new Ctor(args[0], args[1], args[2]);
- case 4: return new Ctor(args[0], args[1], args[2], args[3]);
- case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
- case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
- case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
- }
- var thisBinding = baseCreate(Ctor.prototype),
- result = Ctor.apply(thisBinding, args);
-
- // Mimic the constructor's `return` behavior.
- // See https://es5.github.io/#x13.2.2 for more details.
- return isObject(result) ? result : thisBinding;
- };
- }
-
- /**
- * Creates a `_.curry` or `_.curryRight` function.
- *
- * @private
- * @param {boolean} flag The curry bit flag.
- * @returns {Function} Returns the new curry function.
- */
- function createCurry(flag) {
- function curryFunc(func, arity, guard) {
- if (guard && isIterateeCall(func, arity, guard)) {
- arity = undefined;
- }
- var result = createWrapper(func, flag, undefined, undefined, undefined, undefined, undefined, arity);
- result.placeholder = curryFunc.placeholder;
- return result;
- }
- return curryFunc;
- }
-
- /**
- * Creates a `_.defaults` or `_.defaultsDeep` function.
- *
- * @private
- * @param {Function} assigner The function to assign values.
- * @param {Function} customizer The function to customize assigned values.
- * @returns {Function} Returns the new defaults function.
- */
- function createDefaults(assigner, customizer) {
- return restParam(function(args) {
- var object = args[0];
- if (object == null) {
- return object;
- }
- args.push(customizer);
- return assigner.apply(undefined, args);
- });
- }
-
- /**
- * Creates a `_.max` or `_.min` function.
- *
- * @private
- * @param {Function} comparator The function used to compare values.
- * @param {*} exValue The initial extremum value.
- * @returns {Function} Returns the new extremum function.
- */
- function createExtremum(comparator, exValue) {
- return function(collection, iteratee, thisArg) {
- if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
- iteratee = undefined;
- }
- iteratee = getCallback(iteratee, thisArg, 3);
- if (iteratee.length == 1) {
- collection = isArray(collection) ? collection : toIterable(collection);
- var result = arrayExtremum(collection, iteratee, comparator, exValue);
- if (!(collection.length && result === exValue)) {
- return result;
- }
- }
- return baseExtremum(collection, iteratee, comparator, exValue);
- };
- }
-
- /**
- * Creates a `_.find` or `_.findLast` function.
- *
- * @private
- * @param {Function} eachFunc The function to iterate over a collection.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new find function.
- */
- function createFind(eachFunc, fromRight) {
- return function(collection, predicate, thisArg) {
- predicate = getCallback(predicate, thisArg, 3);
- if (isArray(collection)) {
- var index = baseFindIndex(collection, predicate, fromRight);
- return index > -1 ? collection[index] : undefined;
- }
- return baseFind(collection, predicate, eachFunc);
- };
- }
-
- /**
- * Creates a `_.findIndex` or `_.findLastIndex` function.
- *
- * @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new find function.
- */
- function createFindIndex(fromRight) {
- return function(array, predicate, thisArg) {
- if (!(array && array.length)) {
- return -1;
- }
- predicate = getCallback(predicate, thisArg, 3);
- return baseFindIndex(array, predicate, fromRight);
- };
- }
-
- /**
- * Creates a `_.findKey` or `_.findLastKey` function.
- *
- * @private
- * @param {Function} objectFunc The function to iterate over an object.
- * @returns {Function} Returns the new find function.
- */
- function createFindKey(objectFunc) {
- return function(object, predicate, thisArg) {
- predicate = getCallback(predicate, thisArg, 3);
- return baseFind(object, predicate, objectFunc, true);
- };
- }
-
- /**
- * Creates a `_.flow` or `_.flowRight` function.
- *
- * @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new flow function.
- */
- function createFlow(fromRight) {
- return function() {
- var wrapper,
- length = arguments.length,
- index = fromRight ? length : -1,
- leftIndex = 0,
- funcs = Array(length);
-
- while ((fromRight ? index-- : ++index < length)) {
- var func = funcs[leftIndex++] = arguments[index];
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- if (!wrapper && LodashWrapper.prototype.thru && getFuncName(func) == 'wrapper') {
- wrapper = new LodashWrapper([], true);
- }
- }
- index = wrapper ? -1 : length;
- while (++index < length) {
- func = funcs[index];
-
- var funcName = getFuncName(func),
- data = funcName == 'wrapper' ? getData(func) : undefined;
-
- if (data && isLaziable(data[0]) && data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) && !data[4].length && data[9] == 1) {
- wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
- } else {
- wrapper = (func.length == 1 && isLaziable(func)) ? wrapper[funcName]() : wrapper.thru(func);
- }
- }
- return function() {
- var args = arguments,
- value = args[0];
-
- if (wrapper && args.length == 1 && isArray(value) && value.length >= LARGE_ARRAY_SIZE) {
- return wrapper.plant(value).value();
- }
- var index = 0,
- result = length ? funcs[index].apply(this, args) : value;
-
- while (++index < length) {
- result = funcs[index].call(this, result);
- }
- return result;
- };
- };
- }
-
- /**
- * Creates a function for `_.forEach` or `_.forEachRight`.
- *
- * @private
- * @param {Function} arrayFunc The function to iterate over an array.
- * @param {Function} eachFunc The function to iterate over a collection.
- * @returns {Function} Returns the new each function.
- */
- function createForEach(arrayFunc, eachFunc) {
- return function(collection, iteratee, thisArg) {
- return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection))
- ? arrayFunc(collection, iteratee)
- : eachFunc(collection, bindCallback(iteratee, thisArg, 3));
- };
- }
-
- /**
- * Creates a function for `_.forIn` or `_.forInRight`.
- *
- * @private
- * @param {Function} objectFunc The function to iterate over an object.
- * @returns {Function} Returns the new each function.
- */
- function createForIn(objectFunc) {
- return function(object, iteratee, thisArg) {
- if (typeof iteratee != 'function' || thisArg !== undefined) {
- iteratee = bindCallback(iteratee, thisArg, 3);
- }
- return objectFunc(object, iteratee, keysIn);
- };
- }
-
- /**
- * Creates a function for `_.forOwn` or `_.forOwnRight`.
- *
- * @private
- * @param {Function} objectFunc The function to iterate over an object.
- * @returns {Function} Returns the new each function.
- */
- function createForOwn(objectFunc) {
- return function(object, iteratee, thisArg) {
- if (typeof iteratee != 'function' || thisArg !== undefined) {
- iteratee = bindCallback(iteratee, thisArg, 3);
- }
- return objectFunc(object, iteratee);
- };
- }
-
- /**
- * Creates a function for `_.mapKeys` or `_.mapValues`.
- *
- * @private
- * @param {boolean} [isMapKeys] Specify mapping keys instead of values.
- * @returns {Function} Returns the new map function.
- */
- function createObjectMapper(isMapKeys) {
- return function(object, iteratee, thisArg) {
- var result = {};
- iteratee = getCallback(iteratee, thisArg, 3);
-
- baseForOwn(object, function(value, key, object) {
- var mapped = iteratee(value, key, object);
- key = isMapKeys ? mapped : key;
- value = isMapKeys ? value : mapped;
- result[key] = value;
- });
- return result;
- };
- }
-
- /**
- * Creates a function for `_.padLeft` or `_.padRight`.
- *
- * @private
- * @param {boolean} [fromRight] Specify padding from the right.
- * @returns {Function} Returns the new pad function.
- */
- function createPadDir(fromRight) {
- return function(string, length, chars) {
- string = baseToString(string);
- return (fromRight ? string : '') + createPadding(string, length, chars) + (fromRight ? '' : string);
- };
- }
-
- /**
- * Creates a `_.partial` or `_.partialRight` function.
- *
- * @private
- * @param {boolean} flag The partial bit flag.
- * @returns {Function} Returns the new partial function.
- */
- function createPartial(flag) {
- var partialFunc = restParam(function(func, partials) {
- var holders = replaceHolders(partials, partialFunc.placeholder);
- return createWrapper(func, flag, undefined, partials, holders);
- });
- return partialFunc;
- }
-
- /**
- * Creates a function for `_.reduce` or `_.reduceRight`.
- *
- * @private
- * @param {Function} arrayFunc The function to iterate over an array.
- * @param {Function} eachFunc The function to iterate over a collection.
- * @returns {Function} Returns the new each function.
- */
- function createReduce(arrayFunc, eachFunc) {
- return function(collection, iteratee, accumulator, thisArg) {
- var initFromArray = arguments.length < 3;
- return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection))
- ? arrayFunc(collection, iteratee, accumulator, initFromArray)
- : baseReduce(collection, getCallback(iteratee, thisArg, 4), accumulator, initFromArray, eachFunc);
- };
- }
-
- /**
- * Creates a function that wraps `func` and invokes it with optional `this`
- * binding of, partial application, and currying.
- *
- * @private
- * @param {Function|string} func The function or method name to reference.
- * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details.
- * @param {*} [thisArg] The `this` binding of `func`.
- * @param {Array} [partials] The arguments to prepend to those provided to the new function.
- * @param {Array} [holders] The `partials` placeholder indexes.
- * @param {Array} [partialsRight] The arguments to append to those provided to the new function.
- * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
- * @param {Array} [argPos] The argument positions of the new function.
- * @param {number} [ary] The arity cap of `func`.
- * @param {number} [arity] The arity of `func`.
- * @returns {Function} Returns the new wrapped function.
- */
- function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
- var isAry = bitmask & ARY_FLAG,
- isBind = bitmask & BIND_FLAG,
- isBindKey = bitmask & BIND_KEY_FLAG,
- isCurry = bitmask & CURRY_FLAG,
- isCurryBound = bitmask & CURRY_BOUND_FLAG,
- isCurryRight = bitmask & CURRY_RIGHT_FLAG,
- Ctor = isBindKey ? undefined : createCtorWrapper(func);
-
- function wrapper() {
- // Avoid `arguments` object use disqualifying optimizations by
- // converting it to an array before providing it to other functions.
- var length = arguments.length,
- index = length,
- args = Array(length);
-
- while (index--) {
- args[index] = arguments[index];
- }
- if (partials) {
- args = composeArgs(args, partials, holders);
- }
- if (partialsRight) {
- args = composeArgsRight(args, partialsRight, holdersRight);
- }
- if (isCurry || isCurryRight) {
- var placeholder = wrapper.placeholder,
- argsHolders = replaceHolders(args, placeholder);
-
- length -= argsHolders.length;
- if (length < arity) {
- var newArgPos = argPos ? arrayCopy(argPos) : undefined,
- newArity = nativeMax(arity - length, 0),
- newsHolders = isCurry ? argsHolders : undefined,
- newHoldersRight = isCurry ? undefined : argsHolders,
- newPartials = isCurry ? args : undefined,
- newPartialsRight = isCurry ? undefined : args;
-
- bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG);
- bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);
-
- if (!isCurryBound) {
- bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);
- }
- var newData = [func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, newArity],
- result = createHybridWrapper.apply(undefined, newData);
-
- if (isLaziable(func)) {
- setData(result, newData);
- }
- result.placeholder = placeholder;
- return result;
- }
- }
- var thisBinding = isBind ? thisArg : this,
- fn = isBindKey ? thisBinding[func] : func;
-
- if (argPos) {
- args = reorder(args, argPos);
- }
- if (isAry && ary < args.length) {
- args.length = ary;
- }
- if (this && this !== root && this instanceof wrapper) {
- fn = Ctor || createCtorWrapper(func);
- }
- return fn.apply(thisBinding, args);
- }
- return wrapper;
- }
-
- /**
- * Creates the padding required for `string` based on the given `length`.
- * The `chars` string is truncated if the number of characters exceeds `length`.
- *
- * @private
- * @param {string} string The string to create padding for.
- * @param {number} [length=0] The padding length.
- * @param {string} [chars=' '] The string used as padding.
- * @returns {string} Returns the pad for `string`.
- */
- function createPadding(string, length, chars) {
- var strLength = string.length;
- length = +length;
-
- if (strLength >= length || !nativeIsFinite(length)) {
- return '';
- }
- var padLength = length - strLength;
- chars = chars == null ? ' ' : (chars + '');
- return repeat(chars, nativeCeil(padLength / chars.length)).slice(0, padLength);
- }
-
- /**
- * Creates a function that wraps `func` and invokes it with the optional `this`
- * binding of `thisArg` and the `partials` prepended to those provided to
- * the wrapper.
- *
- * @private
- * @param {Function} func The function to partially apply arguments to.
- * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {Array} partials The arguments to prepend to those provided to the new function.
- * @returns {Function} Returns the new bound function.
- */
- function createPartialWrapper(func, bitmask, thisArg, partials) {
- var isBind = bitmask & BIND_FLAG,
- Ctor = createCtorWrapper(func);
-
- function wrapper() {
- // Avoid `arguments` object use disqualifying optimizations by
- // converting it to an array before providing it `func`.
- var argsIndex = -1,
- argsLength = arguments.length,
- leftIndex = -1,
- leftLength = partials.length,
- args = Array(leftLength + argsLength);
-
- while (++leftIndex < leftLength) {
- args[leftIndex] = partials[leftIndex];
- }
- while (argsLength--) {
- args[leftIndex++] = arguments[++argsIndex];
- }
- var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
- return fn.apply(isBind ? thisArg : this, args);
- }
- return wrapper;
- }
-
- /**
- * Creates a `_.ceil`, `_.floor`, or `_.round` function.
- *
- * @private
- * @param {string} methodName The name of the `Math` method to use when rounding.
- * @returns {Function} Returns the new round function.
- */
- function createRound(methodName) {
- var func = Math[methodName];
- return function(number, precision) {
- precision = precision === undefined ? 0 : (+precision || 0);
- if (precision) {
- precision = pow(10, precision);
- return func(number * precision) / precision;
- }
- return func(number);
- };
- }
-
- /**
- * Creates a `_.sortedIndex` or `_.sortedLastIndex` function.
- *
- * @private
- * @param {boolean} [retHighest] Specify returning the highest qualified index.
- * @returns {Function} Returns the new index function.
- */
- function createSortedIndex(retHighest) {
- return function(array, value, iteratee, thisArg) {
- var callback = getCallback(iteratee);
- return (iteratee == null && callback === baseCallback)
- ? binaryIndex(array, value, retHighest)
- : binaryIndexBy(array, value, callback(iteratee, thisArg, 1), retHighest);
- };
- }
-
- /**
- * Creates a function that either curries or invokes `func` with optional
- * `this` binding and partially applied arguments.
- *
- * @private
- * @param {Function|string} func The function or method name to reference.
- * @param {number} bitmask The bitmask of flags.
- * The bitmask may be composed of the following flags:
- * 1 - `_.bind`
- * 2 - `_.bindKey`
- * 4 - `_.curry` or `_.curryRight` of a bound function
- * 8 - `_.curry`
- * 16 - `_.curryRight`
- * 32 - `_.partial`
- * 64 - `_.partialRight`
- * 128 - `_.rearg`
- * 256 - `_.ary`
- * @param {*} [thisArg] The `this` binding of `func`.
- * @param {Array} [partials] The arguments to be partially applied.
- * @param {Array} [holders] The `partials` placeholder indexes.
- * @param {Array} [argPos] The argument positions of the new function.
- * @param {number} [ary] The arity cap of `func`.
- * @param {number} [arity] The arity of `func`.
- * @returns {Function} Returns the new wrapped function.
- */
- function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
- var isBindKey = bitmask & BIND_KEY_FLAG;
- if (!isBindKey && typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- var length = partials ? partials.length : 0;
- if (!length) {
- bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG);
- partials = holders = undefined;
- }
- length -= (holders ? holders.length : 0);
- if (bitmask & PARTIAL_RIGHT_FLAG) {
- var partialsRight = partials,
- holdersRight = holders;
-
- partials = holders = undefined;
- }
- var data = isBindKey ? undefined : getData(func),
- newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity];
-
- if (data) {
- mergeData(newData, data);
- bitmask = newData[1];
- arity = newData[9];
- }
- newData[9] = arity == null
- ? (isBindKey ? 0 : func.length)
- : (nativeMax(arity - length, 0) || 0);
-
- if (bitmask == BIND_FLAG) {
- var result = createBindWrapper(newData[0], newData[2]);
- } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !newData[4].length) {
- result = createPartialWrapper.apply(undefined, newData);
- } else {
- result = createHybridWrapper.apply(undefined, newData);
- }
- var setter = data ? baseSetData : setData;
- return setter(result, newData);
- }
-
- /**
- * A specialized version of `baseIsEqualDeep` for arrays with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Array} array The array to compare.
- * @param {Array} other The other array to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} [customizer] The function to customize comparing arrays.
- * @param {boolean} [isLoose] Specify performing partial comparisons.
- * @param {Array} [stackA] Tracks traversed `value` objects.
- * @param {Array} [stackB] Tracks traversed `other` objects.
- * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
- */
- function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) {
- var index = -1,
- arrLength = array.length,
- othLength = other.length;
-
- if (arrLength != othLength && !(isLoose && othLength > arrLength)) {
- return false;
- }
- // Ignore non-index properties.
- while (++index < arrLength) {
- var arrValue = array[index],
- othValue = other[index],
- result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined;
-
- if (result !== undefined) {
- if (result) {
- continue;
- }
- return false;
- }
- // Recursively compare arrays (susceptible to call stack limits).
- if (isLoose) {
- if (!arraySome(other, function(othValue) {
- return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB);
- })) {
- return false;
- }
- } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * A specialized version of `baseIsEqualDeep` for comparing objects of
- * the same `toStringTag`.
- *
- * **Note:** This function only supports comparing values with tags of
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {string} tag The `toStringTag` of the objects to compare.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function equalByTag(object, other, tag) {
- switch (tag) {
- case boolTag:
- case dateTag:
- // Coerce dates and booleans to numbers, dates to milliseconds and booleans
- // to `1` or `0` treating invalid dates coerced to `NaN` as not equal.
- return +object == +other;
-
- case errorTag:
- return object.name == other.name && object.message == other.message;
-
- case numberTag:
- // Treat `NaN` vs. `NaN` as equal.
- return (object != +object)
- ? other != +other
- : object == +other;
-
- case regexpTag:
- case stringTag:
- // Coerce regexes to strings and treat strings primitives and string
- // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details.
- return object == (other + '');
- }
- return false;
- }
-
- /**
- * A specialized version of `baseIsEqualDeep` for objects with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} [customizer] The function to customize comparing values.
- * @param {boolean} [isLoose] Specify performing partial comparisons.
- * @param {Array} [stackA] Tracks traversed `value` objects.
- * @param {Array} [stackB] Tracks traversed `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
- var objProps = keys(object),
- objLength = objProps.length,
- othProps = keys(other),
- othLength = othProps.length;
-
- if (objLength != othLength && !isLoose) {
- return false;
- }
- var index = objLength;
- while (index--) {
- var key = objProps[index];
- if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) {
- return false;
- }
- }
- var skipCtor = isLoose;
- while (++index < objLength) {
- key = objProps[index];
- var objValue = object[key],
- othValue = other[key],
- result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined;
-
- // Recursively compare objects (susceptible to call stack limits).
- if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) {
- return false;
- }
- skipCtor || (skipCtor = key == 'constructor');
- }
- if (!skipCtor) {
- var objCtor = object.constructor,
- othCtor = other.constructor;
-
- // Non `Object` object instances with different constructors are not equal.
- if (objCtor != othCtor &&
- ('constructor' in object && 'constructor' in other) &&
- !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
- typeof othCtor == 'function' && othCtor instanceof othCtor)) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Gets the appropriate "callback" function. If the `_.callback` method is
- * customized this function returns the custom method, otherwise it returns
- * the `baseCallback` function. If arguments are provided the chosen function
- * is invoked with them and its result is returned.
- *
- * @private
- * @returns {Function} Returns the chosen function or its result.
- */
- function getCallback(func, thisArg, argCount) {
- var result = lodash.callback || callback;
- result = result === callback ? baseCallback : result;
- return argCount ? result(func, thisArg, argCount) : result;
- }
-
- /**
- * Gets metadata for `func`.
- *
- * @private
- * @param {Function} func The function to query.
- * @returns {*} Returns the metadata for `func`.
- */
- var getData = !metaMap ? noop : function(func) {
- return metaMap.get(func);
- };
-
- /**
- * Gets the name of `func`.
- *
- * @private
- * @param {Function} func The function to query.
- * @returns {string} Returns the function name.
- */
- function getFuncName(func) {
- var result = func.name,
- array = realNames[result],
- length = array ? array.length : 0;
-
- while (length--) {
- var data = array[length],
- otherFunc = data.func;
- if (otherFunc == null || otherFunc == func) {
- return data.name;
- }
- }
- return result;
- }
-
- /**
- * Gets the appropriate "indexOf" function. If the `_.indexOf` method is
- * customized this function returns the custom method, otherwise it returns
- * the `baseIndexOf` function. If arguments are provided the chosen function
- * is invoked with them and its result is returned.
- *
- * @private
- * @returns {Function|number} Returns the chosen function or its result.
- */
- function getIndexOf(collection, target, fromIndex) {
- var result = lodash.indexOf || indexOf;
- result = result === indexOf ? baseIndexOf : result;
- return collection ? result(collection, target, fromIndex) : result;
- }
-
- /**
- * Gets the "length" property value of `object`.
- *
- * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
- * that affects Safari on at least iOS 8.1-8.3 ARM64.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {*} Returns the "length" value.
- */
- var getLength = baseProperty('length');
-
- /**
- * Gets the propery names, values, and compare flags of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the match data of `object`.
- */
- function getMatchData(object) {
- var result = pairs(object),
- length = result.length;
-
- while (length--) {
- result[length][2] = isStrictComparable(result[length][1]);
- }
- return result;
- }
-
- /**
- * Gets the native function at `key` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the method to get.
- * @returns {*} Returns the function if it's native, else `undefined`.
- */
- function getNative(object, key) {
- var value = object == null ? undefined : object[key];
- return isNative(value) ? value : undefined;
- }
-
- /**
- * Gets the view, applying any `transforms` to the `start` and `end` positions.
- *
- * @private
- * @param {number} start The start of the view.
- * @param {number} end The end of the view.
- * @param {Array} transforms The transformations to apply to the view.
- * @returns {Object} Returns an object containing the `start` and `end`
- * positions of the view.
- */
- function getView(start, end, transforms) {
- var index = -1,
- length = transforms.length;
-
- while (++index < length) {
- var data = transforms[index],
- size = data.size;
-
- switch (data.type) {
- case 'drop': start += size; break;
- case 'dropRight': end -= size; break;
- case 'take': end = nativeMin(end, start + size); break;
- case 'takeRight': start = nativeMax(start, end - size); break;
- }
- }
- return { 'start': start, 'end': end };
- }
-
- /**
- * Initializes an array clone.
- *
- * @private
- * @param {Array} array The array to clone.
- * @returns {Array} Returns the initialized clone.
- */
- function initCloneArray(array) {
- var length = array.length,
- result = new array.constructor(length);
-
- // Add array properties assigned by `RegExp#exec`.
- if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
- result.index = array.index;
- result.input = array.input;
- }
- return result;
- }
-
- /**
- * Initializes an object clone.
- *
- * @private
- * @param {Object} object The object to clone.
- * @returns {Object} Returns the initialized clone.
- */
- function initCloneObject(object) {
- var Ctor = object.constructor;
- if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) {
- Ctor = Object;
- }
- return new Ctor;
- }
-
- /**
- * Initializes an object clone based on its `toStringTag`.
- *
- * **Note:** This function only supports cloning values with tags of
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
- *
- * @private
- * @param {Object} object The object to clone.
- * @param {string} tag The `toStringTag` of the object to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the initialized clone.
- */
- function initCloneByTag(object, tag, isDeep) {
- var Ctor = object.constructor;
- switch (tag) {
- case arrayBufferTag:
- return bufferClone(object);
-
- case boolTag:
- case dateTag:
- return new Ctor(+object);
-
- case float32Tag: case float64Tag:
- case int8Tag: case int16Tag: case int32Tag:
- case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
- var buffer = object.buffer;
- return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length);
-
- case numberTag:
- case stringTag:
- return new Ctor(object);
-
- case regexpTag:
- var result = new Ctor(object.source, reFlags.exec(object));
- result.lastIndex = object.lastIndex;
- }
- return result;
- }
-
- /**
- * Invokes the method at `path` on `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the method to invoke.
- * @param {Array} args The arguments to invoke the method with.
- * @returns {*} Returns the result of the invoked method.
- */
- function invokePath(object, path, args) {
- if (object != null && !isKey(path, object)) {
- path = toPath(path);
- object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
- path = last(path);
- }
- var func = object == null ? object : object[path];
- return func == null ? undefined : func.apply(object, args);
- }
-
- /**
- * Checks if `value` is array-like.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
- */
- function isArrayLike(value) {
- return value != null && isLength(getLength(value));
- }
-
- /**
- * Checks if `value` is a valid array-like index.
- *
- * @private
- * @param {*} value The value to check.
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
- */
- function isIndex(value, length) {
- value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
- length = length == null ? MAX_SAFE_INTEGER : length;
- return value > -1 && value % 1 == 0 && value < length;
- }
-
- /**
- * Checks if the provided arguments are from an iteratee call.
- *
- * @private
- * @param {*} value The potential iteratee value argument.
- * @param {*} index The potential iteratee index or key argument.
- * @param {*} object The potential iteratee object argument.
- * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.
- */
- function isIterateeCall(value, index, object) {
- if (!isObject(object)) {
- return false;
- }
- var type = typeof index;
- if (type == 'number'
- ? (isArrayLike(object) && isIndex(index, object.length))
- : (type == 'string' && index in object)) {
- var other = object[index];
- return value === value ? (value === other) : (other !== other);
- }
- return false;
- }
-
- /**
- * Checks if `value` is a property name and not a property path.
- *
- * @private
- * @param {*} value The value to check.
- * @param {Object} [object] The object to query keys on.
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
- */
- function isKey(value, object) {
- var type = typeof value;
- if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') {
- return true;
- }
- if (isArray(value)) {
- return false;
- }
- var result = !reIsDeepProp.test(value);
- return result || (object != null && value in toObject(object));
- }
-
- /**
- * Checks if `func` has a lazy counterpart.
- *
- * @private
- * @param {Function} func The function to check.
- * @returns {boolean} Returns `true` if `func` has a lazy counterpart, else `false`.
- */
- function isLaziable(func) {
- var funcName = getFuncName(func);
- if (!(funcName in LazyWrapper.prototype)) {
- return false;
- }
- var other = lodash[funcName];
- if (func === other) {
- return true;
- }
- var data = getData(other);
- return !!data && func === data[0];
- }
-
- /**
- * Checks if `value` is a valid array-like length.
- *
- * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
- */
- function isLength(value) {
- return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
- }
-
- /**
- * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` if suitable for strict
- * equality comparisons, else `false`.
- */
- function isStrictComparable(value) {
- return value === value && !isObject(value);
- }
-
- /**
- * Merges the function metadata of `source` into `data`.
- *
- * Merging metadata reduces the number of wrappers required to invoke a function.
- * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
- * may be applied regardless of execution order. Methods like `_.ary` and `_.rearg`
- * augment function arguments, making the order in which they are executed important,
- * preventing the merging of metadata. However, we make an exception for a safe
- * common case where curried functions have `_.ary` and or `_.rearg` applied.
- *
- * @private
- * @param {Array} data The destination metadata.
- * @param {Array} source The source metadata.
- * @returns {Array} Returns `data`.
- */
- function mergeData(data, source) {
- var bitmask = data[1],
- srcBitmask = source[1],
- newBitmask = bitmask | srcBitmask,
- isCommon = newBitmask < ARY_FLAG;
-
- var isCombo =
- (srcBitmask == ARY_FLAG && bitmask == CURRY_FLAG) ||
- (srcBitmask == ARY_FLAG && bitmask == REARG_FLAG && data[7].length <= source[8]) ||
- (srcBitmask == (ARY_FLAG | REARG_FLAG) && bitmask == CURRY_FLAG);
-
- // Exit early if metadata can't be merged.
- if (!(isCommon || isCombo)) {
- return data;
- }
- // Use source `thisArg` if available.
- if (srcBitmask & BIND_FLAG) {
- data[2] = source[2];
- // Set when currying a bound function.
- newBitmask |= (bitmask & BIND_FLAG) ? 0 : CURRY_BOUND_FLAG;
- }
- // Compose partial arguments.
- var value = source[3];
- if (value) {
- var partials = data[3];
- data[3] = partials ? composeArgs(partials, value, source[4]) : arrayCopy(value);
- data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : arrayCopy(source[4]);
- }
- // Compose partial right arguments.
- value = source[5];
- if (value) {
- partials = data[5];
- data[5] = partials ? composeArgsRight(partials, value, source[6]) : arrayCopy(value);
- data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : arrayCopy(source[6]);
- }
- // Use source `argPos` if available.
- value = source[7];
- if (value) {
- data[7] = arrayCopy(value);
- }
- // Use source `ary` if it's smaller.
- if (srcBitmask & ARY_FLAG) {
- data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
- }
- // Use source `arity` if one is not provided.
- if (data[9] == null) {
- data[9] = source[9];
- }
- // Use source `func` and merge bitmasks.
- data[0] = source[0];
- data[1] = newBitmask;
-
- return data;
- }
-
- /**
- * Used by `_.defaultsDeep` to customize its `_.merge` use.
- *
- * @private
- * @param {*} objectValue The destination object property value.
- * @param {*} sourceValue The source object property value.
- * @returns {*} Returns the value to assign to the destination object.
- */
- function mergeDefaults(objectValue, sourceValue) {
- return objectValue === undefined ? sourceValue : merge(objectValue, sourceValue, mergeDefaults);
- }
-
- /**
- * A specialized version of `_.pick` which picks `object` properties specified
- * by `props`.
- *
- * @private
- * @param {Object} object The source object.
- * @param {string[]} props The property names to pick.
- * @returns {Object} Returns the new object.
- */
- function pickByArray(object, props) {
- object = toObject(object);
-
- var index = -1,
- length = props.length,
- result = {};
-
- while (++index < length) {
- var key = props[index];
- if (key in object) {
- result[key] = object[key];
- }
- }
- return result;
- }
-
- /**
- * A specialized version of `_.pick` which picks `object` properties `predicate`
- * returns truthy for.
- *
- * @private
- * @param {Object} object The source object.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {Object} Returns the new object.
- */
- function pickByCallback(object, predicate) {
- var result = {};
- baseForIn(object, function(value, key, object) {
- if (predicate(value, key, object)) {
- result[key] = value;
- }
- });
- return result;
- }
-
- /**
- * Reorder `array` according to the specified indexes where the element at
- * the first index is assigned as the first element, the element at
- * the second index is assigned as the second element, and so on.
- *
- * @private
- * @param {Array} array The array to reorder.
- * @param {Array} indexes The arranged array indexes.
- * @returns {Array} Returns `array`.
- */
- function reorder(array, indexes) {
- var arrLength = array.length,
- length = nativeMin(indexes.length, arrLength),
- oldArray = arrayCopy(array);
-
- while (length--) {
- var index = indexes[length];
- array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
- }
- return array;
- }
-
- /**
- * Sets metadata for `func`.
- *
- * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
- * period of time, it will trip its breaker and transition to an identity function
- * to avoid garbage collection pauses in V8. See [V8 issue 2070](https://code.google.com/p/v8/issues/detail?id=2070)
- * for more details.
- *
- * @private
- * @param {Function} func The function to associate metadata with.
- * @param {*} data The metadata.
- * @returns {Function} Returns `func`.
- */
- var setData = (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);
- };
- }());
-
- /**
- * A fallback implementation of `Object.keys` which creates an array of the
- * own enumerable property names of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
- function shimKeys(object) {
- var props = keysIn(object),
- propsLength = props.length,
- length = propsLength && object.length;
-
- var allowIndexes = !!length && isLength(length) &&
- (isArray(object) || isArguments(object));
-
- var index = -1,
- result = [];
-
- while (++index < propsLength) {
- var key = props[index];
- if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {
- result.push(key);
- }
- }
- return result;
- }
-
- /**
- * Converts `value` to an array-like object if it's not one.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {Array|Object} Returns the array-like object.
- */
- function toIterable(value) {
- if (value == null) {
- return [];
- }
- if (!isArrayLike(value)) {
- return values(value);
- }
- return isObject(value) ? value : Object(value);
- }
-
- /**
- * Converts `value` to an object if it's not one.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {Object} Returns the object.
- */
- function toObject(value) {
- return isObject(value) ? value : Object(value);
- }
-
- /**
- * Converts `value` to property path array if it's not one.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {Array} Returns the property path array.
- */
- function toPath(value) {
- if (isArray(value)) {
- return value;
- }
- var result = [];
- baseToString(value).replace(rePropName, function(match, number, quote, string) {
- result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
- });
- return result;
- }
-
- /**
- * Creates a clone of `wrapper`.
- *
- * @private
- * @param {Object} wrapper The wrapper to clone.
- * @returns {Object} Returns the cloned wrapper.
- */
- function wrapperClone(wrapper) {
- return wrapper instanceof LazyWrapper
- ? wrapper.clone()
- : new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__, arrayCopy(wrapper.__actions__));
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates an array of elements split into groups the length of `size`.
- * If `collection` can't be split evenly, the final chunk will be the remaining
- * elements.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to process.
- * @param {number} [size=1] The length of each chunk.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Array} Returns the new array containing chunks.
- * @example
- *
- * _.chunk(['a', 'b', 'c', 'd'], 2);
- * // => [['a', 'b'], ['c', 'd']]
- *
- * _.chunk(['a', 'b', 'c', 'd'], 3);
- * // => [['a', 'b', 'c'], ['d']]
- */
- function chunk(array, size, guard) {
- if (guard ? isIterateeCall(array, size, guard) : size == null) {
- size = 1;
- } else {
- size = nativeMax(nativeFloor(size) || 1, 1);
- }
- var index = 0,
- length = array ? array.length : 0,
- resIndex = -1,
- result = Array(nativeCeil(length / size));
-
- while (index < length) {
- result[++resIndex] = baseSlice(array, index, (index += size));
- }
- return result;
- }
-
- /**
- * Creates an array with all falsey values removed. The values `false`, `null`,
- * `0`, `""`, `undefined`, and `NaN` are falsey.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to compact.
- * @returns {Array} Returns the new array of filtered values.
- * @example
- *
- * _.compact([0, 1, false, 2, '', 3]);
- * // => [1, 2, 3]
- */
- function compact(array) {
- var index = -1,
- length = array ? array.length : 0,
- resIndex = -1,
- result = [];
-
- while (++index < length) {
- var value = array[index];
- if (value) {
- result[++resIndex] = value;
- }
- }
- return result;
- }
-
- /**
- * Creates an array of unique `array` values not included in the other
- * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {...Array} [values] The arrays of values to exclude.
- * @returns {Array} Returns the new array of filtered values.
- * @example
- *
- * _.difference([1, 2, 3], [4, 2]);
- * // => [1, 3]
- */
- var difference = restParam(function(array, values) {
- return (isObjectLike(array) && isArrayLike(array))
- ? baseDifference(array, baseFlatten(values, false, true))
- : [];
- });
-
- /**
- * Creates a slice of `array` with `n` elements dropped from the beginning.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=1] The number of elements to drop.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.drop([1, 2, 3]);
- * // => [2, 3]
- *
- * _.drop([1, 2, 3], 2);
- * // => [3]
- *
- * _.drop([1, 2, 3], 5);
- * // => []
- *
- * _.drop([1, 2, 3], 0);
- * // => [1, 2, 3]
- */
- function drop(array, n, guard) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (guard ? isIterateeCall(array, n, guard) : n == null) {
- n = 1;
- }
- return baseSlice(array, n < 0 ? 0 : n);
- }
-
- /**
- * Creates a slice of `array` with `n` elements dropped from the end.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=1] The number of elements to drop.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.dropRight([1, 2, 3]);
- * // => [1, 2]
- *
- * _.dropRight([1, 2, 3], 2);
- * // => [1]
- *
- * _.dropRight([1, 2, 3], 5);
- * // => []
- *
- * _.dropRight([1, 2, 3], 0);
- * // => [1, 2, 3]
- */
- function dropRight(array, n, guard) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (guard ? isIterateeCall(array, n, guard) : n == null) {
- n = 1;
- }
- n = length - (+n || 0);
- return baseSlice(array, 0, n < 0 ? 0 : n);
- }
-
- /**
- * Creates a slice of `array` excluding elements dropped from the end.
- * Elements are dropped until `predicate` returns falsey. The predicate is
- * bound to `thisArg` and invoked with three arguments: (value, index, array).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that match the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.dropRightWhile([1, 2, 3], function(n) {
- * return n > 1;
- * });
- * // => [1]
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': false }
- * ];
- *
- * // using the `_.matches` callback shorthand
- * _.pluck(_.dropRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user');
- * // => ['barney', 'fred']
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.pluck(_.dropRightWhile(users, 'active', false), 'user');
- * // => ['barney']
- *
- * // using the `_.property` callback shorthand
- * _.pluck(_.dropRightWhile(users, 'active'), 'user');
- * // => ['barney', 'fred', 'pebbles']
- */
- function dropRightWhile(array, predicate, thisArg) {
- return (array && array.length)
- ? baseWhile(array, getCallback(predicate, thisArg, 3), true, true)
- : [];
- }
-
- /**
- * Creates a slice of `array` excluding elements dropped from the beginning.
- * Elements are dropped until `predicate` returns falsey. The predicate is
- * bound to `thisArg` and invoked with three arguments: (value, index, array).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.dropWhile([1, 2, 3], function(n) {
- * return n < 3;
- * });
- * // => [3]
- *
- * var users = [
- * { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': true }
- * ];
- *
- * // using the `_.matches` callback shorthand
- * _.pluck(_.dropWhile(users, { 'user': 'barney', 'active': false }), 'user');
- * // => ['fred', 'pebbles']
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.pluck(_.dropWhile(users, 'active', false), 'user');
- * // => ['pebbles']
- *
- * // using the `_.property` callback shorthand
- * _.pluck(_.dropWhile(users, 'active'), 'user');
- * // => ['barney', 'fred', 'pebbles']
- */
- function dropWhile(array, predicate, thisArg) {
- return (array && array.length)
- ? baseWhile(array, getCallback(predicate, thisArg, 3), true)
- : [];
- }
-
- /**
- * Fills elements of `array` with `value` from `start` up to, but not
- * including, `end`.
- *
- * **Note:** This method mutates `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to fill.
- * @param {*} value The value to fill `array` with.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns `array`.
- * @example
- *
- * var array = [1, 2, 3];
- *
- * _.fill(array, 'a');
- * console.log(array);
- * // => ['a', 'a', 'a']
- *
- * _.fill(Array(3), 2);
- * // => [2, 2, 2]
- *
- * _.fill([4, 6, 8], '*', 1, 2);
- * // => [4, '*', 8]
- */
- function fill(array, value, start, end) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
- start = 0;
- end = length;
- }
- return baseFill(array, value, start, end);
- }
-
- /**
- * This method is like `_.find` except that it returns the index of the first
- * element `predicate` returns truthy for instead of the element itself.
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to search.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {number} Returns the index of the found element, else `-1`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': true }
- * ];
- *
- * _.findIndex(users, function(chr) {
- * return chr.user == 'barney';
- * });
- * // => 0
- *
- * // using the `_.matches` callback shorthand
- * _.findIndex(users, { 'user': 'fred', 'active': false });
- * // => 1
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.findIndex(users, 'active', false);
- * // => 0
- *
- * // using the `_.property` callback shorthand
- * _.findIndex(users, 'active');
- * // => 2
- */
- var findIndex = createFindIndex();
-
- /**
- * This method is like `_.findIndex` except that it iterates over elements
- * of `collection` from right to left.
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to search.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {number} Returns the index of the found element, else `-1`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': false }
- * ];
- *
- * _.findLastIndex(users, function(chr) {
- * return chr.user == 'pebbles';
- * });
- * // => 2
- *
- * // using the `_.matches` callback shorthand
- * _.findLastIndex(users, { 'user': 'barney', 'active': true });
- * // => 0
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.findLastIndex(users, 'active', false);
- * // => 2
- *
- * // using the `_.property` callback shorthand
- * _.findLastIndex(users, 'active');
- * // => 0
- */
- var findLastIndex = createFindIndex(true);
-
- /**
- * Gets the first element of `array`.
- *
- * @static
- * @memberOf _
- * @alias head
- * @category Array
- * @param {Array} array The array to query.
- * @returns {*} Returns the first element of `array`.
- * @example
- *
- * _.first([1, 2, 3]);
- * // => 1
- *
- * _.first([]);
- * // => undefined
- */
- function first(array) {
- return array ? array[0] : undefined;
- }
-
- /**
- * Flattens a nested array. If `isDeep` is `true` the array is recursively
- * flattened, otherwise it is only flattened a single level.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to flatten.
- * @param {boolean} [isDeep] Specify a deep flatten.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * _.flatten([1, [2, 3, [4]]]);
- * // => [1, 2, 3, [4]]
- *
- * // using `isDeep`
- * _.flatten([1, [2, 3, [4]]], true);
- * // => [1, 2, 3, 4]
- */
- function flatten(array, isDeep, guard) {
- var length = array ? array.length : 0;
- if (guard && isIterateeCall(array, isDeep, guard)) {
- isDeep = false;
- }
- return length ? baseFlatten(array, isDeep) : [];
- }
-
- /**
- * Recursively flattens a nested array.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to recursively flatten.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * _.flattenDeep([1, [2, 3, [4]]]);
- * // => [1, 2, 3, 4]
- */
- function flattenDeep(array) {
- var length = array ? array.length : 0;
- return length ? baseFlatten(array, true) : [];
- }
-
- /**
- * Gets the index at which the first occurrence of `value` is found in `array`
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons. If `fromIndex` is negative, it is used as the offset
- * from the end of `array`. If `array` is sorted providing `true` for `fromIndex`
- * performs a faster binary search.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to search.
- * @param {*} value The value to search for.
- * @param {boolean|number} [fromIndex=0] The index to search from or `true`
- * to perform a binary search on a sorted array.
- * @returns {number} Returns the index of the matched value, else `-1`.
- * @example
- *
- * _.indexOf([1, 2, 1, 2], 2);
- * // => 1
- *
- * // using `fromIndex`
- * _.indexOf([1, 2, 1, 2], 2, 2);
- * // => 3
- *
- * // performing a binary search
- * _.indexOf([1, 1, 2, 2], 2, true);
- * // => 2
- */
- function indexOf(array, value, fromIndex) {
- var length = array ? array.length : 0;
- if (!length) {
- return -1;
- }
- if (typeof fromIndex == 'number') {
- fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex;
- } else if (fromIndex) {
- var index = binaryIndex(array, value);
- if (index < length &&
- (value === value ? (value === array[index]) : (array[index] !== array[index]))) {
- return index;
- }
- return -1;
- }
- return baseIndexOf(array, value, fromIndex || 0);
- }
-
- /**
- * Gets all but the last element of `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.initial([1, 2, 3]);
- * // => [1, 2]
- */
- function initial(array) {
- return dropRight(array, 1);
- }
-
- /**
- * Creates an array of unique values that are included in all of the provided
- * arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @returns {Array} Returns the new array of shared values.
- * @example
- * _.intersection([1, 2], [4, 2], [2, 1]);
- * // => [2]
- */
- var intersection = restParam(function(arrays) {
- var othLength = arrays.length,
- othIndex = othLength,
- caches = Array(length),
- indexOf = getIndexOf(),
- isCommon = indexOf == baseIndexOf,
- result = [];
-
- while (othIndex--) {
- var value = arrays[othIndex] = isArrayLike(value = arrays[othIndex]) ? value : [];
- caches[othIndex] = (isCommon && value.length >= 120) ? createCache(othIndex && value) : null;
- }
- var array = arrays[0],
- index = -1,
- length = array ? array.length : 0,
- seen = caches[0];
-
- outer:
- while (++index < length) {
- value = array[index];
- if ((seen ? cacheIndexOf(seen, value) : indexOf(result, value, 0)) < 0) {
- var othIndex = othLength;
- while (--othIndex) {
- var cache = caches[othIndex];
- if ((cache ? cacheIndexOf(cache, value) : indexOf(arrays[othIndex], value, 0)) < 0) {
- continue outer;
- }
- }
- if (seen) {
- seen.push(value);
- }
- result.push(value);
- }
- }
- return result;
- });
-
- /**
- * Gets the last element of `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @returns {*} Returns the last element of `array`.
- * @example
- *
- * _.last([1, 2, 3]);
- * // => 3
- */
- function last(array) {
- var length = array ? array.length : 0;
- return length ? array[length - 1] : undefined;
- }
-
- /**
- * This method is like `_.indexOf` except that it iterates over elements of
- * `array` from right to left.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to search.
- * @param {*} value The value to search for.
- * @param {boolean|number} [fromIndex=array.length-1] The index to search from
- * or `true` to perform a binary search on a sorted array.
- * @returns {number} Returns the index of the matched value, else `-1`.
- * @example
- *
- * _.lastIndexOf([1, 2, 1, 2], 2);
- * // => 3
- *
- * // using `fromIndex`
- * _.lastIndexOf([1, 2, 1, 2], 2, 2);
- * // => 1
- *
- * // performing a binary search
- * _.lastIndexOf([1, 1, 2, 2], 2, true);
- * // => 3
- */
- function lastIndexOf(array, value, fromIndex) {
- var length = array ? array.length : 0;
- if (!length) {
- return -1;
- }
- var index = length;
- if (typeof fromIndex == 'number') {
- index = (fromIndex < 0 ? nativeMax(length + fromIndex, 0) : nativeMin(fromIndex || 0, length - 1)) + 1;
- } else if (fromIndex) {
- index = binaryIndex(array, value, true) - 1;
- var other = array[index];
- if (value === value ? (value === other) : (other !== other)) {
- return index;
- }
- return -1;
- }
- if (value !== value) {
- return indexOfNaN(array, index, true);
- }
- while (index--) {
- if (array[index] === value) {
- return index;
- }
- }
- return -1;
- }
-
- /**
- * Removes all provided values from `array` using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * **Note:** Unlike `_.without`, this method mutates `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to modify.
- * @param {...*} [values] The values to remove.
- * @returns {Array} Returns `array`.
- * @example
- *
- * var array = [1, 2, 3, 1, 2, 3];
- *
- * _.pull(array, 2, 3);
- * console.log(array);
- * // => [1, 1]
- */
- function pull() {
- var args = arguments,
- array = args[0];
-
- if (!(array && array.length)) {
- return array;
- }
- var index = 0,
- indexOf = getIndexOf(),
- length = args.length;
-
- while (++index < length) {
- var fromIndex = 0,
- value = args[index];
-
- while ((fromIndex = indexOf(array, value, fromIndex)) > -1) {
- splice.call(array, fromIndex, 1);
- }
- }
- return array;
- }
-
- /**
- * Removes elements from `array` corresponding to the given indexes and returns
- * an array of the removed elements. Indexes may be specified as an array of
- * indexes or as individual arguments.
- *
- * **Note:** Unlike `_.at`, this method mutates `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to modify.
- * @param {...(number|number[])} [indexes] The indexes of elements to remove,
- * specified as individual indexes or arrays of indexes.
- * @returns {Array} Returns the new array of removed elements.
- * @example
- *
- * var array = [5, 10, 15, 20];
- * var evens = _.pullAt(array, 1, 3);
- *
- * console.log(array);
- * // => [5, 15]
- *
- * console.log(evens);
- * // => [10, 20]
- */
- var pullAt = restParam(function(array, indexes) {
- indexes = baseFlatten(indexes);
-
- var result = baseAt(array, indexes);
- basePullAt(array, indexes.sort(baseCompareAscending));
- return result;
- });
-
- /**
- * Removes all elements from `array` that `predicate` returns truthy for
- * and returns an array of the removed elements. The predicate is bound to
- * `thisArg` and invoked with three arguments: (value, index, array).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * **Note:** Unlike `_.filter`, this method mutates `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to modify.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Array} Returns the new array of removed elements.
- * @example
- *
- * var array = [1, 2, 3, 4];
- * var evens = _.remove(array, function(n) {
- * return n % 2 == 0;
- * });
- *
- * console.log(array);
- * // => [1, 3]
- *
- * console.log(evens);
- * // => [2, 4]
- */
- function remove(array, predicate, thisArg) {
- var result = [];
- if (!(array && array.length)) {
- return result;
- }
- var index = -1,
- indexes = [],
- length = array.length;
-
- predicate = getCallback(predicate, thisArg, 3);
- while (++index < length) {
- var value = array[index];
- if (predicate(value, index, array)) {
- result.push(value);
- indexes.push(index);
- }
- }
- basePullAt(array, indexes);
- return result;
- }
-
- /**
- * Gets all but the first element of `array`.
- *
- * @static
- * @memberOf _
- * @alias tail
- * @category Array
- * @param {Array} array The array to query.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.rest([1, 2, 3]);
- * // => [2, 3]
- */
- function rest(array) {
- return drop(array, 1);
- }
-
- /**
- * Creates a slice of `array` from `start` up to, but not including, `end`.
- *
- * **Note:** This method is used instead of `Array#slice` to support node
- * lists in IE < 9 and to ensure dense arrays are returned.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to slice.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns the slice of `array`.
- */
- function slice(array, start, end) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
- start = 0;
- end = length;
- }
- return baseSlice(array, start, end);
- }
-
- /**
- * Uses a binary search to determine the lowest index at which `value` should
- * be inserted into `array` in order to maintain its sort order. If an iteratee
- * function is provided it is invoked for `value` and each element of `array`
- * to compute their sort ranking. The iteratee is bound to `thisArg` and
- * invoked with one argument; (value).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- * @example
- *
- * _.sortedIndex([30, 50], 40);
- * // => 1
- *
- * _.sortedIndex([4, 4, 5, 5], 5);
- * // => 2
- *
- * var dict = { 'data': { 'thirty': 30, 'forty': 40, 'fifty': 50 } };
- *
- * // using an iteratee function
- * _.sortedIndex(['thirty', 'fifty'], 'forty', function(word) {
- * return this.data[word];
- * }, dict);
- * // => 1
- *
- * // using the `_.property` callback shorthand
- * _.sortedIndex([{ 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x');
- * // => 1
- */
- var sortedIndex = createSortedIndex();
-
- /**
- * This method is like `_.sortedIndex` except that it returns the highest
- * index at which `value` should be inserted into `array` in order to
- * maintain its sort order.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- * @example
- *
- * _.sortedLastIndex([4, 4, 5, 5], 5);
- * // => 4
- */
- var sortedLastIndex = createSortedIndex(true);
-
- /**
- * Creates a slice of `array` with `n` elements taken from the beginning.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=1] The number of elements to take.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.take([1, 2, 3]);
- * // => [1]
- *
- * _.take([1, 2, 3], 2);
- * // => [1, 2]
- *
- * _.take([1, 2, 3], 5);
- * // => [1, 2, 3]
- *
- * _.take([1, 2, 3], 0);
- * // => []
- */
- function take(array, n, guard) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (guard ? isIterateeCall(array, n, guard) : n == null) {
- n = 1;
- }
- return baseSlice(array, 0, n < 0 ? 0 : n);
- }
-
- /**
- * Creates a slice of `array` with `n` elements taken from the end.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=1] The number of elements to take.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.takeRight([1, 2, 3]);
- * // => [3]
- *
- * _.takeRight([1, 2, 3], 2);
- * // => [2, 3]
- *
- * _.takeRight([1, 2, 3], 5);
- * // => [1, 2, 3]
- *
- * _.takeRight([1, 2, 3], 0);
- * // => []
- */
- function takeRight(array, n, guard) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (guard ? isIterateeCall(array, n, guard) : n == null) {
- n = 1;
- }
- n = length - (+n || 0);
- return baseSlice(array, n < 0 ? 0 : n);
- }
-
- /**
- * Creates a slice of `array` with elements taken from the end. Elements are
- * taken until `predicate` returns falsey. The predicate is bound to `thisArg`
- * and invoked with three arguments: (value, index, array).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.takeRightWhile([1, 2, 3], function(n) {
- * return n > 1;
- * });
- * // => [2, 3]
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': false }
- * ];
- *
- * // using the `_.matches` callback shorthand
- * _.pluck(_.takeRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user');
- * // => ['pebbles']
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.pluck(_.takeRightWhile(users, 'active', false), 'user');
- * // => ['fred', 'pebbles']
- *
- * // using the `_.property` callback shorthand
- * _.pluck(_.takeRightWhile(users, 'active'), 'user');
- * // => []
- */
- function takeRightWhile(array, predicate, thisArg) {
- return (array && array.length)
- ? baseWhile(array, getCallback(predicate, thisArg, 3), false, true)
- : [];
- }
-
- /**
- * Creates a slice of `array` with elements taken from the beginning. Elements
- * are taken until `predicate` returns falsey. The predicate is bound to
- * `thisArg` and invoked with three arguments: (value, index, array).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.takeWhile([1, 2, 3], function(n) {
- * return n < 3;
- * });
- * // => [1, 2]
- *
- * var users = [
- * { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false},
- * { 'user': 'pebbles', 'active': true }
- * ];
- *
- * // using the `_.matches` callback shorthand
- * _.pluck(_.takeWhile(users, { 'user': 'barney', 'active': false }), 'user');
- * // => ['barney']
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.pluck(_.takeWhile(users, 'active', false), 'user');
- * // => ['barney', 'fred']
- *
- * // using the `_.property` callback shorthand
- * _.pluck(_.takeWhile(users, 'active'), 'user');
- * // => []
- */
- function takeWhile(array, predicate, thisArg) {
- return (array && array.length)
- ? baseWhile(array, getCallback(predicate, thisArg, 3))
- : [];
- }
-
- /**
- * Creates an array of unique values, in order, from all of the provided arrays
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @returns {Array} Returns the new array of combined values.
- * @example
- *
- * _.union([1, 2], [4, 2], [2, 1]);
- * // => [1, 2, 4]
- */
- var union = restParam(function(arrays) {
- return baseUniq(baseFlatten(arrays, false, true));
- });
-
- /**
- * Creates a duplicate-free version of an array, using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons, in which only the first occurence of each element
- * is kept. Providing `true` for `isSorted` performs a faster search algorithm
- * for sorted arrays. If an iteratee function is provided it is invoked for
- * each element in the array to generate the criterion by which uniqueness
- * is computed. The `iteratee` is bound to `thisArg` and invoked with three
- * arguments: (value, index, array).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @alias unique
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {boolean} [isSorted] Specify the array is sorted.
- * @param {Function|Object|string} [iteratee] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Array} Returns the new duplicate-value-free array.
- * @example
- *
- * _.uniq([2, 1, 2]);
- * // => [2, 1]
- *
- * // using `isSorted`
- * _.uniq([1, 1, 2], true);
- * // => [1, 2]
- *
- * // using an iteratee function
- * _.uniq([1, 2.5, 1.5, 2], function(n) {
- * return this.floor(n);
- * }, Math);
- * // => [1, 2.5]
- *
- * // using the `_.property` callback shorthand
- * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
- * // => [{ 'x': 1 }, { 'x': 2 }]
- */
- function uniq(array, isSorted, iteratee, thisArg) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (isSorted != null && typeof isSorted != 'boolean') {
- thisArg = iteratee;
- iteratee = isIterateeCall(array, isSorted, thisArg) ? undefined : isSorted;
- isSorted = false;
- }
- var callback = getCallback();
- if (!(iteratee == null && callback === baseCallback)) {
- iteratee = callback(iteratee, thisArg, 3);
- }
- return (isSorted && getIndexOf() == baseIndexOf)
- ? sortedUniq(array, iteratee)
- : baseUniq(array, iteratee);
- }
-
- /**
- * This method is like `_.zip` except that it accepts an array of grouped
- * elements and creates an array regrouping the elements to their pre-zip
- * configuration.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array of grouped elements to process.
- * @returns {Array} Returns the new array of regrouped elements.
- * @example
- *
- * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]);
- * // => [['fred', 30, true], ['barney', 40, false]]
- *
- * _.unzip(zipped);
- * // => [['fred', 'barney'], [30, 40], [true, false]]
- */
- function unzip(array) {
- if (!(array && array.length)) {
- return [];
- }
- var index = -1,
- length = 0;
-
- array = arrayFilter(array, function(group) {
- if (isArrayLike(group)) {
- length = nativeMax(group.length, length);
- return true;
- }
- });
- var result = Array(length);
- while (++index < length) {
- result[index] = arrayMap(array, baseProperty(index));
- }
- return result;
- }
-
- /**
- * This method is like `_.unzip` except that it accepts an iteratee to specify
- * how regrouped values should be combined. The `iteratee` is bound to `thisArg`
- * and invoked with four arguments: (accumulator, value, index, group).
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array of grouped elements to process.
- * @param {Function} [iteratee] The function to combine regrouped values.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Array} Returns the new array of regrouped elements.
- * @example
- *
- * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
- * // => [[1, 10, 100], [2, 20, 200]]
- *
- * _.unzipWith(zipped, _.add);
- * // => [3, 30, 300]
- */
- function unzipWith(array, iteratee, thisArg) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- var result = unzip(array);
- if (iteratee == null) {
- return result;
- }
- iteratee = bindCallback(iteratee, thisArg, 4);
- return arrayMap(result, function(group) {
- return arrayReduce(group, iteratee, undefined, true);
- });
- }
-
- /**
- * Creates an array excluding all provided values using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to filter.
- * @param {...*} [values] The values to exclude.
- * @returns {Array} Returns the new array of filtered values.
- * @example
- *
- * _.without([1, 2, 1, 3], 1, 2);
- * // => [3]
- */
- var without = restParam(function(array, values) {
- return isArrayLike(array)
- ? baseDifference(array, values)
- : [];
- });
-
- /**
- * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
- * of the provided arrays.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @returns {Array} Returns the new array of values.
- * @example
- *
- * _.xor([1, 2], [4, 2]);
- * // => [1, 4]
- */
- function xor() {
- var index = -1,
- length = arguments.length;
-
- while (++index < length) {
- var array = arguments[index];
- if (isArrayLike(array)) {
- var result = result
- ? arrayPush(baseDifference(result, array), baseDifference(array, result))
- : array;
- }
- }
- return result ? baseUniq(result) : [];
- }
-
- /**
- * Creates an array of grouped elements, the first of which contains the first
- * elements of the given arrays, the second of which contains the second elements
- * of the given arrays, and so on.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to process.
- * @returns {Array} Returns the new array of grouped elements.
- * @example
- *
- * _.zip(['fred', 'barney'], [30, 40], [true, false]);
- * // => [['fred', 30, true], ['barney', 40, false]]
- */
- var zip = restParam(unzip);
-
- /**
- * The inverse of `_.pairs`; this method returns an object composed from arrays
- * of property names and values. Provide either a single two dimensional array,
- * e.g. `[[key1, value1], [key2, value2]]` or two arrays, one of property names
- * and one of corresponding values.
- *
- * @static
- * @memberOf _
- * @alias object
- * @category Array
- * @param {Array} props The property names.
- * @param {Array} [values=[]] The property values.
- * @returns {Object} Returns the new object.
- * @example
- *
- * _.zipObject([['fred', 30], ['barney', 40]]);
- * // => { 'fred': 30, 'barney': 40 }
- *
- * _.zipObject(['fred', 'barney'], [30, 40]);
- * // => { 'fred': 30, 'barney': 40 }
- */
- function zipObject(props, values) {
- var index = -1,
- length = props ? props.length : 0,
- result = {};
-
- if (length && !values && !isArray(props[0])) {
- values = [];
- }
- while (++index < length) {
- var key = props[index];
- if (values) {
- result[key] = values[index];
- } else if (key) {
- result[key[0]] = key[1];
- }
- }
- return result;
- }
-
- /**
- * This method is like `_.zip` except that it accepts an iteratee to specify
- * how grouped values should be combined. The `iteratee` is bound to `thisArg`
- * and invoked with four arguments: (accumulator, value, index, group).
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to process.
- * @param {Function} [iteratee] The function to combine grouped values.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Array} Returns the new array of grouped elements.
- * @example
- *
- * _.zipWith([1, 2], [10, 20], [100, 200], _.add);
- * // => [111, 222]
- */
- var zipWith = restParam(function(arrays) {
- var length = arrays.length,
- iteratee = length > 2 ? arrays[length - 2] : undefined,
- thisArg = length > 1 ? arrays[length - 1] : undefined;
-
- if (length > 2 && typeof iteratee == 'function') {
- length -= 2;
- } else {
- iteratee = (length > 1 && typeof thisArg == 'function') ? (--length, thisArg) : undefined;
- thisArg = undefined;
- }
- arrays.length = length;
- return unzipWith(arrays, iteratee, thisArg);
- });
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a `lodash` object that wraps `value` with explicit method
- * chaining enabled.
- *
- * @static
- * @memberOf _
- * @category Chain
- * @param {*} value The value to wrap.
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 },
- * { 'user': 'pebbles', 'age': 1 }
- * ];
- *
- * var youngest = _.chain(users)
- * .sortBy('age')
- * .map(function(chr) {
- * return chr.user + ' is ' + chr.age;
- * })
- * .first()
- * .value();
- * // => 'pebbles is 1'
- */
- function chain(value) {
- var result = lodash(value);
- result.__chain__ = true;
- return result;
- }
-
- /**
- * This method invokes `interceptor` and returns `value`. The interceptor is
- * bound to `thisArg` and invoked with one argument; (value). The purpose of
- * this method is to "tap into" a method chain in order to perform operations
- * on intermediate results within the chain.
- *
- * @static
- * @memberOf _
- * @category Chain
- * @param {*} value The value to provide to `interceptor`.
- * @param {Function} interceptor The function to invoke.
- * @param {*} [thisArg] The `this` binding of `interceptor`.
- * @returns {*} Returns `value`.
- * @example
- *
- * _([1, 2, 3])
- * .tap(function(array) {
- * array.pop();
- * })
- * .reverse()
- * .value();
- * // => [2, 1]
- */
- function tap(value, interceptor, thisArg) {
- interceptor.call(thisArg, value);
- return value;
- }
-
- /**
- * This method is like `_.tap` except that it returns the result of `interceptor`.
- *
- * @static
- * @memberOf _
- * @category Chain
- * @param {*} value The value to provide to `interceptor`.
- * @param {Function} interceptor The function to invoke.
- * @param {*} [thisArg] The `this` binding of `interceptor`.
- * @returns {*} Returns the result of `interceptor`.
- * @example
- *
- * _(' abc ')
- * .chain()
- * .trim()
- * .thru(function(value) {
- * return [value];
- * })
- * .value();
- * // => ['abc']
- */
- function thru(value, interceptor, thisArg) {
- return interceptor.call(thisArg, value);
- }
-
- /**
- * Enables explicit method chaining on the wrapper object.
- *
- * @name chain
- * @memberOf _
- * @category Chain
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 }
- * ];
- *
- * // without explicit chaining
- * _(users).first();
- * // => { 'user': 'barney', 'age': 36 }
- *
- * // with explicit chaining
- * _(users).chain()
- * .first()
- * .pick('user')
- * .value();
- * // => { 'user': 'barney' }
- */
- function wrapperChain() {
- return chain(this);
- }
-
- /**
- * Executes the chained sequence and returns the wrapped result.
- *
- * @name commit
- * @memberOf _
- * @category Chain
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var array = [1, 2];
- * var wrapped = _(array).push(3);
- *
- * console.log(array);
- * // => [1, 2]
- *
- * wrapped = wrapped.commit();
- * console.log(array);
- * // => [1, 2, 3]
- *
- * wrapped.last();
- * // => 3
- *
- * console.log(array);
- * // => [1, 2, 3]
- */
- function wrapperCommit() {
- return new LodashWrapper(this.value(), this.__chain__);
- }
-
- /**
- * Creates a new array joining a wrapped array with any additional arrays
- * and/or values.
- *
- * @name concat
- * @memberOf _
- * @category Chain
- * @param {...*} [values] The values to concatenate.
- * @returns {Array} Returns the new concatenated array.
- * @example
- *
- * var array = [1];
- * var wrapped = _(array).concat(2, [3], [[4]]);
- *
- * console.log(wrapped.value());
- * // => [1, 2, 3, [4]]
- *
- * console.log(array);
- * // => [1]
- */
- var wrapperConcat = restParam(function(values) {
- values = baseFlatten(values);
- return this.thru(function(array) {
- return arrayConcat(isArray(array) ? array : [toObject(array)], values);
- });
- });
-
- /**
- * Creates a clone of the chained sequence planting `value` as the wrapped value.
- *
- * @name plant
- * @memberOf _
- * @category Chain
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var array = [1, 2];
- * var wrapped = _(array).map(function(value) {
- * return Math.pow(value, 2);
- * });
- *
- * var other = [3, 4];
- * var otherWrapped = wrapped.plant(other);
- *
- * otherWrapped.value();
- * // => [9, 16]
- *
- * wrapped.value();
- * // => [1, 4]
- */
- function wrapperPlant(value) {
- var result,
- parent = this;
-
- while (parent instanceof baseLodash) {
- var clone = wrapperClone(parent);
- if (result) {
- previous.__wrapped__ = clone;
- } else {
- result = clone;
- }
- var previous = clone;
- parent = parent.__wrapped__;
- }
- previous.__wrapped__ = value;
- return result;
- }
-
- /**
- * Reverses the wrapped array so the first element becomes the last, the
- * second element becomes the second to last, and so on.
- *
- * **Note:** This method mutates the wrapped array.
- *
- * @name reverse
- * @memberOf _
- * @category Chain
- * @returns {Object} Returns the new reversed `lodash` wrapper instance.
- * @example
- *
- * var array = [1, 2, 3];
- *
- * _(array).reverse().value()
- * // => [3, 2, 1]
- *
- * console.log(array);
- * // => [3, 2, 1]
- */
- function wrapperReverse() {
- var value = this.__wrapped__;
-
- var interceptor = function(value) {
- return (wrapped && wrapped.__dir__ < 0) ? value : value.reverse();
- };
- if (value instanceof LazyWrapper) {
- var wrapped = value;
- if (this.__actions__.length) {
- wrapped = new LazyWrapper(this);
- }
- wrapped = wrapped.reverse();
- wrapped.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
- return new LodashWrapper(wrapped, this.__chain__);
- }
- return this.thru(interceptor);
- }
-
- /**
- * Produces the result of coercing the unwrapped value to a string.
- *
- * @name toString
- * @memberOf _
- * @category Chain
- * @returns {string} Returns the coerced string value.
- * @example
- *
- * _([1, 2, 3]).toString();
- * // => '1,2,3'
- */
- function wrapperToString() {
- return (this.value() + '');
- }
-
- /**
- * Executes the chained sequence to extract the unwrapped value.
- *
- * @name value
- * @memberOf _
- * @alias run, toJSON, valueOf
- * @category Chain
- * @returns {*} Returns the resolved unwrapped value.
- * @example
- *
- * _([1, 2, 3]).value();
- * // => [1, 2, 3]
- */
- function wrapperValue() {
- return baseWrapperValue(this.__wrapped__, this.__actions__);
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates an array of elements corresponding to the given keys, or indexes,
- * of `collection`. Keys may be specified as individual arguments or as arrays
- * of keys.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {...(number|number[]|string|string[])} [props] The property names
- * or indexes of elements to pick, specified individually or in arrays.
- * @returns {Array} Returns the new array of picked elements.
- * @example
- *
- * _.at(['a', 'b', 'c'], [0, 2]);
- * // => ['a', 'c']
- *
- * _.at(['barney', 'fred', 'pebbles'], 0, 2);
- * // => ['barney', 'pebbles']
- */
- var at = restParam(function(collection, props) {
- return baseAt(collection, baseFlatten(props));
- });
-
- /**
- * Creates an object composed of keys generated from the results of running
- * each element of `collection` through `iteratee`. The corresponding value
- * of each key is the number of times the key was returned by `iteratee`.
- * The `iteratee` is bound to `thisArg` and invoked with three arguments:
- * (value, index|key, collection).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns the composed aggregate object.
- * @example
- *
- * _.countBy([4.3, 6.1, 6.4], function(n) {
- * return Math.floor(n);
- * });
- * // => { '4': 1, '6': 2 }
- *
- * _.countBy([4.3, 6.1, 6.4], function(n) {
- * return this.floor(n);
- * }, Math);
- * // => { '4': 1, '6': 2 }
- *
- * _.countBy(['one', 'two', 'three'], 'length');
- * // => { '3': 2, '5': 1 }
- */
- var countBy = createAggregator(function(result, value, key) {
- hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1);
- });
-
- /**
- * Checks if `predicate` returns truthy for **all** elements of `collection`.
- * The predicate is bound to `thisArg` and invoked with three arguments:
- * (value, index|key, collection).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @alias all
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {boolean} Returns `true` if all elements pass the predicate check,
- * else `false`.
- * @example
- *
- * _.every([true, 1, null, 'yes'], Boolean);
- * // => false
- *
- * var users = [
- * { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false }
- * ];
- *
- * // using the `_.matches` callback shorthand
- * _.every(users, { 'user': 'barney', 'active': false });
- * // => false
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.every(users, 'active', false);
- * // => true
- *
- * // using the `_.property` callback shorthand
- * _.every(users, 'active');
- * // => false
- */
- function every(collection, predicate, thisArg) {
- var func = isArray(collection) ? arrayEvery : baseEvery;
- if (thisArg && isIterateeCall(collection, predicate, thisArg)) {
- predicate = undefined;
- }
- if (typeof predicate != 'function' || thisArg !== undefined) {
- predicate = getCallback(predicate, thisArg, 3);
- }
- return func(collection, predicate);
- }
-
- /**
- * Iterates over elements of `collection`, returning an array of all elements
- * `predicate` returns truthy for. The predicate is bound to `thisArg` and
- * invoked with three arguments: (value, index|key, collection).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @alias select
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Array} Returns the new filtered array.
- * @example
- *
- * _.filter([4, 5, 6], function(n) {
- * return n % 2 == 0;
- * });
- * // => [4, 6]
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false }
- * ];
- *
- * // using the `_.matches` callback shorthand
- * _.pluck(_.filter(users, { 'age': 36, 'active': true }), 'user');
- * // => ['barney']
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.pluck(_.filter(users, 'active', false), 'user');
- * // => ['fred']
- *
- * // using the `_.property` callback shorthand
- * _.pluck(_.filter(users, 'active'), 'user');
- * // => ['barney']
- */
- function filter(collection, predicate, thisArg) {
- var func = isArray(collection) ? arrayFilter : baseFilter;
- predicate = getCallback(predicate, thisArg, 3);
- return func(collection, predicate);
- }
-
- /**
- * Iterates over elements of `collection`, returning the first element
- * `predicate` returns truthy for. The predicate is bound to `thisArg` and
- * invoked with three arguments: (value, index|key, collection).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @alias detect
- * @category Collection
- * @param {Array|Object|string} collection The collection to search.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {*} Returns the matched element, else `undefined`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false },
- * { 'user': 'pebbles', 'age': 1, 'active': true }
- * ];
- *
- * _.result(_.find(users, function(chr) {
- * return chr.age < 40;
- * }), 'user');
- * // => 'barney'
- *
- * // using the `_.matches` callback shorthand
- * _.result(_.find(users, { 'age': 1, 'active': true }), 'user');
- * // => 'pebbles'
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.result(_.find(users, 'active', false), 'user');
- * // => 'fred'
- *
- * // using the `_.property` callback shorthand
- * _.result(_.find(users, 'active'), 'user');
- * // => 'barney'
- */
- var find = createFind(baseEach);
-
- /**
- * This method is like `_.find` except that it iterates over elements of
- * `collection` from right to left.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to search.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {*} Returns the matched element, else `undefined`.
- * @example
- *
- * _.findLast([1, 2, 3, 4], function(n) {
- * return n % 2 == 1;
- * });
- * // => 3
- */
- var findLast = createFind(baseEachRight, true);
-
- /**
- * Performs a deep comparison between each element in `collection` and the
- * source object, returning the first element that has equivalent property
- * values.
- *
- * **Note:** This method supports comparing arrays, booleans, `Date` objects,
- * numbers, `Object` objects, regexes, and strings. Objects are compared by
- * their own, not inherited, enumerable properties. For comparing a single
- * own or inherited property value see `_.matchesProperty`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to search.
- * @param {Object} source The object of property values to match.
- * @returns {*} Returns the matched element, else `undefined`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false }
- * ];
- *
- * _.result(_.findWhere(users, { 'age': 36, 'active': true }), 'user');
- * // => 'barney'
- *
- * _.result(_.findWhere(users, { 'age': 40, 'active': false }), 'user');
- * // => 'fred'
- */
- function findWhere(collection, source) {
- return find(collection, baseMatches(source));
- }
-
- /**
- * Iterates over elements of `collection` invoking `iteratee` for each element.
- * The `iteratee` is bound to `thisArg` and invoked with three arguments:
- * (value, index|key, collection). Iteratee functions may exit iteration early
- * by explicitly returning `false`.
- *
- * **Note:** As with other "Collections" methods, objects with a "length" property
- * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn`
- * may be used for object iteration.
- *
- * @static
- * @memberOf _
- * @alias each
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Array|Object|string} Returns `collection`.
- * @example
- *
- * _([1, 2]).forEach(function(n) {
- * console.log(n);
- * }).value();
- * // => logs each value from left to right and returns the array
- *
- * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) {
- * console.log(n, key);
- * });
- * // => logs each value-key pair and returns the object (iteration order is not guaranteed)
- */
- var forEach = createForEach(arrayEach, baseEach);
-
- /**
- * This method is like `_.forEach` except that it iterates over elements of
- * `collection` from right to left.
- *
- * @static
- * @memberOf _
- * @alias eachRight
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Array|Object|string} Returns `collection`.
- * @example
- *
- * _([1, 2]).forEachRight(function(n) {
- * console.log(n);
- * }).value();
- * // => logs each value from right to left and returns the array
- */
- var forEachRight = createForEach(arrayEachRight, baseEachRight);
-
- /**
- * Creates an object composed of keys generated from the results of running
- * each element of `collection` through `iteratee`. The corresponding value
- * of each key is an array of the elements responsible for generating the key.
- * The `iteratee` is bound to `thisArg` and invoked with three arguments:
- * (value, index|key, collection).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns the composed aggregate object.
- * @example
- *
- * _.groupBy([4.2, 6.1, 6.4], function(n) {
- * return Math.floor(n);
- * });
- * // => { '4': [4.2], '6': [6.1, 6.4] }
- *
- * _.groupBy([4.2, 6.1, 6.4], function(n) {
- * return this.floor(n);
- * }, Math);
- * // => { '4': [4.2], '6': [6.1, 6.4] }
- *
- * // using the `_.property` callback shorthand
- * _.groupBy(['one', 'two', 'three'], 'length');
- * // => { '3': ['one', 'two'], '5': ['three'] }
- */
- var groupBy = createAggregator(function(result, value, key) {
- if (hasOwnProperty.call(result, key)) {
- result[key].push(value);
- } else {
- result[key] = [value];
- }
- });
-
- /**
- * Checks if `value` is in `collection` using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons. If `fromIndex` is negative, it is used as the offset
- * from the end of `collection`.
- *
- * @static
- * @memberOf _
- * @alias contains, include
- * @category Collection
- * @param {Array|Object|string} collection The collection to search.
- * @param {*} target The value to search for.
- * @param {number} [fromIndex=0] The index to search from.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`.
- * @returns {boolean} Returns `true` if a matching element is found, else `false`.
- * @example
- *
- * _.includes([1, 2, 3], 1);
- * // => true
- *
- * _.includes([1, 2, 3], 1, 2);
- * // => false
- *
- * _.includes({ 'user': 'fred', 'age': 40 }, 'fred');
- * // => true
- *
- * _.includes('pebbles', 'eb');
- * // => true
- */
- function includes(collection, target, fromIndex, guard) {
- var length = collection ? getLength(collection) : 0;
- if (!isLength(length)) {
- collection = values(collection);
- length = collection.length;
- }
- if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) {
- fromIndex = 0;
- } else {
- fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0);
- }
- return (typeof collection == 'string' || !isArray(collection) && isString(collection))
- ? (fromIndex <= length && collection.indexOf(target, fromIndex) > -1)
- : (!!length && getIndexOf(collection, target, fromIndex) > -1);
- }
-
- /**
- * Creates an object composed of keys generated from the results of running
- * each element of `collection` through `iteratee`. The corresponding value
- * of each key is the last element responsible for generating the key. The
- * iteratee function is bound to `thisArg` and invoked with three arguments:
- * (value, index|key, collection).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns the composed aggregate object.
- * @example
- *
- * var keyData = [
- * { 'dir': 'left', 'code': 97 },
- * { 'dir': 'right', 'code': 100 }
- * ];
- *
- * _.indexBy(keyData, 'dir');
- * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
- *
- * _.indexBy(keyData, function(object) {
- * return String.fromCharCode(object.code);
- * });
- * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
- *
- * _.indexBy(keyData, function(object) {
- * return this.fromCharCode(object.code);
- * }, String);
- * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
- */
- var indexBy = createAggregator(function(result, value, key) {
- result[key] = value;
- });
-
- /**
- * Invokes the method at `path` of each element in `collection`, returning
- * an array of the results of each invoked method. Any additional arguments
- * are provided to each invoked method. If `methodName` is a function it is
- * invoked for, and `this` bound to, each element in `collection`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Array|Function|string} path The path of the method to invoke or
- * the function invoked per iteration.
- * @param {...*} [args] The arguments to invoke the method with.
- * @returns {Array} Returns the array of results.
- * @example
- *
- * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort');
- * // => [[1, 5, 7], [1, 2, 3]]
- *
- * _.invoke([123, 456], String.prototype.split, '');
- * // => [['1', '2', '3'], ['4', '5', '6']]
- */
- var invoke = restParam(function(collection, path, args) {
- var index = -1,
- isFunc = typeof path == 'function',
- isProp = isKey(path),
- result = isArrayLike(collection) ? Array(collection.length) : [];
-
- baseEach(collection, function(value) {
- var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined);
- result[++index] = func ? func.apply(value, args) : invokePath(value, path, args);
- });
- return result;
- });
-
- /**
- * Creates an array of values by running each element in `collection` through
- * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three
- * arguments: (value, index|key, collection).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * Many lodash methods are guarded to work as iteratees for methods like
- * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
- *
- * The guarded methods are:
- * `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`,
- * `drop`, `dropRight`, `every`, `fill`, `flatten`, `invert`, `max`, `min`,
- * `parseInt`, `slice`, `sortBy`, `take`, `takeRight`, `template`, `trim`,
- * `trimLeft`, `trimRight`, `trunc`, `random`, `range`, `sample`, `some`,
- * `sum`, `uniq`, and `words`
- *
- * @static
- * @memberOf _
- * @alias collect
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Array} Returns the new mapped array.
- * @example
- *
- * function timesThree(n) {
- * return n * 3;
- * }
- *
- * _.map([1, 2], timesThree);
- * // => [3, 6]
- *
- * _.map({ 'a': 1, 'b': 2 }, timesThree);
- * // => [3, 6] (iteration order is not guaranteed)
- *
- * var users = [
- * { 'user': 'barney' },
- * { 'user': 'fred' }
- * ];
- *
- * // using the `_.property` callback shorthand
- * _.map(users, 'user');
- * // => ['barney', 'fred']
- */
- function map(collection, iteratee, thisArg) {
- var func = isArray(collection) ? arrayMap : baseMap;
- iteratee = getCallback(iteratee, thisArg, 3);
- return func(collection, iteratee);
- }
-
- /**
- * Creates an array of elements split into two groups, the first of which
- * contains elements `predicate` returns truthy for, while the second of which
- * contains elements `predicate` returns falsey for. The predicate is bound
- * to `thisArg` and invoked with three arguments: (value, index|key, collection).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Array} Returns the array of grouped elements.
- * @example
- *
- * _.partition([1, 2, 3], function(n) {
- * return n % 2;
- * });
- * // => [[1, 3], [2]]
- *
- * _.partition([1.2, 2.3, 3.4], function(n) {
- * return this.floor(n) % 2;
- * }, Math);
- * // => [[1.2, 3.4], [2.3]]
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': false },
- * { 'user': 'fred', 'age': 40, 'active': true },
- * { 'user': 'pebbles', 'age': 1, 'active': false }
- * ];
- *
- * var mapper = function(array) {
- * return _.pluck(array, 'user');
- * };
- *
- * // using the `_.matches` callback shorthand
- * _.map(_.partition(users, { 'age': 1, 'active': false }), mapper);
- * // => [['pebbles'], ['barney', 'fred']]
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.map(_.partition(users, 'active', false), mapper);
- * // => [['barney', 'pebbles'], ['fred']]
- *
- * // using the `_.property` callback shorthand
- * _.map(_.partition(users, 'active'), mapper);
- * // => [['fred'], ['barney', 'pebbles']]
- */
- var partition = createAggregator(function(result, value, key) {
- result[key ? 0 : 1].push(value);
- }, function() { return [[], []]; });
-
- /**
- * Gets the property value of `path` from all elements in `collection`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Array|string} path The path of the property to pluck.
- * @returns {Array} Returns the property values.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 }
- * ];
- *
- * _.pluck(users, 'user');
- * // => ['barney', 'fred']
- *
- * var userIndex = _.indexBy(users, 'user');
- * _.pluck(userIndex, 'age');
- * // => [36, 40] (iteration order is not guaranteed)
- */
- function pluck(collection, path) {
- return map(collection, property(path));
- }
-
- /**
- * Reduces `collection` to a value which is the accumulated result of running
- * each element in `collection` through `iteratee`, where each successive
- * invocation is supplied the return value of the previous. If `accumulator`
- * is not provided the first element of `collection` is used as the initial
- * value. The `iteratee` is bound to `thisArg` and invoked with four arguments:
- * (accumulator, value, index|key, collection).
- *
- * Many lodash methods are guarded to work as iteratees for methods like
- * `_.reduce`, `_.reduceRight`, and `_.transform`.
- *
- * The guarded methods are:
- * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `sortByAll`,
- * and `sortByOrder`
- *
- * @static
- * @memberOf _
- * @alias foldl, inject
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {*} Returns the accumulated value.
- * @example
- *
- * _.reduce([1, 2], function(total, n) {
- * return total + n;
- * });
- * // => 3
- *
- * _.reduce({ 'a': 1, 'b': 2 }, function(result, n, key) {
- * result[key] = n * 3;
- * return result;
- * }, {});
- * // => { 'a': 3, 'b': 6 } (iteration order is not guaranteed)
- */
- var reduce = createReduce(arrayReduce, baseEach);
-
- /**
- * This method is like `_.reduce` except that it iterates over elements of
- * `collection` from right to left.
- *
- * @static
- * @memberOf _
- * @alias foldr
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {*} Returns the accumulated value.
- * @example
- *
- * var array = [[0, 1], [2, 3], [4, 5]];
- *
- * _.reduceRight(array, function(flattened, other) {
- * return flattened.concat(other);
- * }, []);
- * // => [4, 5, 2, 3, 0, 1]
- */
- var reduceRight = createReduce(arrayReduceRight, baseEachRight);
-
- /**
- * The opposite of `_.filter`; this method returns the elements of `collection`
- * that `predicate` does **not** return truthy for.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Array} Returns the new filtered array.
- * @example
- *
- * _.reject([1, 2, 3, 4], function(n) {
- * return n % 2 == 0;
- * });
- * // => [1, 3]
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': false },
- * { 'user': 'fred', 'age': 40, 'active': true }
- * ];
- *
- * // using the `_.matches` callback shorthand
- * _.pluck(_.reject(users, { 'age': 40, 'active': true }), 'user');
- * // => ['barney']
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.pluck(_.reject(users, 'active', false), 'user');
- * // => ['fred']
- *
- * // using the `_.property` callback shorthand
- * _.pluck(_.reject(users, 'active'), 'user');
- * // => ['barney']
- */
- function reject(collection, predicate, thisArg) {
- var func = isArray(collection) ? arrayFilter : baseFilter;
- predicate = getCallback(predicate, thisArg, 3);
- return func(collection, function(value, index, collection) {
- return !predicate(value, index, collection);
- });
- }
-
- /**
- * Gets a random element or `n` random elements from a collection.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to sample.
- * @param {number} [n] The number of elements to sample.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {*} Returns the random sample(s).
- * @example
- *
- * _.sample([1, 2, 3, 4]);
- * // => 2
- *
- * _.sample([1, 2, 3, 4], 2);
- * // => [3, 1]
- */
- function sample(collection, n, guard) {
- if (guard ? isIterateeCall(collection, n, guard) : n == null) {
- collection = toIterable(collection);
- var length = collection.length;
- return length > 0 ? collection[baseRandom(0, length - 1)] : undefined;
- }
- var index = -1,
- result = toArray(collection),
- length = result.length,
- lastIndex = length - 1;
-
- n = nativeMin(n < 0 ? 0 : (+n || 0), length);
- while (++index < n) {
- var rand = baseRandom(index, lastIndex),
- value = result[rand];
-
- result[rand] = result[index];
- result[index] = value;
- }
- result.length = n;
- return result;
- }
-
- /**
- * Creates an array of shuffled values, using a version of the
- * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to shuffle.
- * @returns {Array} Returns the new shuffled array.
- * @example
- *
- * _.shuffle([1, 2, 3, 4]);
- * // => [4, 1, 3, 2]
- */
- function shuffle(collection) {
- return sample(collection, POSITIVE_INFINITY);
- }
-
- /**
- * Gets the size of `collection` by returning its length for array-like
- * values or the number of own enumerable properties for objects.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to inspect.
- * @returns {number} Returns the size of `collection`.
- * @example
- *
- * _.size([1, 2, 3]);
- * // => 3
- *
- * _.size({ 'a': 1, 'b': 2 });
- * // => 2
- *
- * _.size('pebbles');
- * // => 7
- */
- function size(collection) {
- var length = collection ? getLength(collection) : 0;
- return isLength(length) ? length : keys(collection).length;
- }
-
- /**
- * Checks if `predicate` returns truthy for **any** element of `collection`.
- * The function returns as soon as it finds a passing value and does not iterate
- * over the entire collection. The predicate is bound to `thisArg` and invoked
- * with three arguments: (value, index|key, collection).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @alias any
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- * else `false`.
- * @example
- *
- * _.some([null, 0, 'yes', false], Boolean);
- * // => true
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false }
- * ];
- *
- * // using the `_.matches` callback shorthand
- * _.some(users, { 'user': 'barney', 'active': false });
- * // => false
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.some(users, 'active', false);
- * // => true
- *
- * // using the `_.property` callback shorthand
- * _.some(users, 'active');
- * // => true
- */
- function some(collection, predicate, thisArg) {
- var func = isArray(collection) ? arraySome : baseSome;
- if (thisArg && isIterateeCall(collection, predicate, thisArg)) {
- predicate = undefined;
- }
- if (typeof predicate != 'function' || thisArg !== undefined) {
- predicate = getCallback(predicate, thisArg, 3);
- }
- return func(collection, predicate);
- }
-
- /**
- * Creates an array of elements, sorted in ascending order by the results of
- * running each element in a collection through `iteratee`. This method performs
- * a stable sort, that is, it preserves the original sort order of equal elements.
- * The `iteratee` is bound to `thisArg` and invoked with three arguments:
- * (value, index|key, collection).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Array} Returns the new sorted array.
- * @example
- *
- * _.sortBy([1, 2, 3], function(n) {
- * return Math.sin(n);
- * });
- * // => [3, 1, 2]
- *
- * _.sortBy([1, 2, 3], function(n) {
- * return this.sin(n);
- * }, Math);
- * // => [3, 1, 2]
- *
- * var users = [
- * { 'user': 'fred' },
- * { 'user': 'pebbles' },
- * { 'user': 'barney' }
- * ];
- *
- * // using the `_.property` callback shorthand
- * _.pluck(_.sortBy(users, 'user'), 'user');
- * // => ['barney', 'fred', 'pebbles']
- */
- function sortBy(collection, iteratee, thisArg) {
- if (collection == null) {
- return [];
- }
- if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
- iteratee = undefined;
- }
- var index = -1;
- iteratee = getCallback(iteratee, thisArg, 3);
-
- var result = baseMap(collection, function(value, key, collection) {
- return { 'criteria': iteratee(value, key, collection), 'index': ++index, 'value': value };
- });
- return baseSortBy(result, compareAscending);
- }
-
- /**
- * This method is like `_.sortBy` except that it can sort by multiple iteratees
- * or property names.
- *
- * If a property name is provided for an iteratee the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If an object is provided for an iteratee the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {...(Function|Function[]|Object|Object[]|string|string[])} iteratees
- * The iteratees to sort by, specified as individual values or arrays of values.
- * @returns {Array} Returns the new sorted array.
- * @example
- *
- * var users = [
- * { 'user': 'fred', 'age': 48 },
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 42 },
- * { 'user': 'barney', 'age': 34 }
- * ];
- *
- * _.map(_.sortByAll(users, ['user', 'age']), _.values);
- * // => [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]]
- *
- * _.map(_.sortByAll(users, 'user', function(chr) {
- * return Math.floor(chr.age / 10);
- * }), _.values);
- * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
- */
- var sortByAll = restParam(function(collection, iteratees) {
- if (collection == null) {
- return [];
- }
- var guard = iteratees[2];
- if (guard && isIterateeCall(iteratees[0], iteratees[1], guard)) {
- iteratees.length = 1;
- }
- return baseSortByOrder(collection, baseFlatten(iteratees), []);
- });
-
- /**
- * This method is like `_.sortByAll` except that it allows specifying the
- * sort orders of the iteratees to sort by. If `orders` is unspecified, all
- * values are sorted in ascending order. Otherwise, a value is sorted in
- * ascending order if its corresponding order is "asc", and descending if "desc".
- *
- * If a property name is provided for an iteratee the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If an object is provided for an iteratee the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
- * @param {boolean[]} [orders] The sort orders of `iteratees`.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`.
- * @returns {Array} Returns the new sorted array.
- * @example
- *
- * var users = [
- * { 'user': 'fred', 'age': 48 },
- * { 'user': 'barney', 'age': 34 },
- * { 'user': 'fred', 'age': 42 },
- * { 'user': 'barney', 'age': 36 }
- * ];
- *
- * // sort by `user` in ascending order and by `age` in descending order
- * _.map(_.sortByOrder(users, ['user', 'age'], ['asc', 'desc']), _.values);
- * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
- */
- function sortByOrder(collection, iteratees, orders, guard) {
- if (collection == null) {
- return [];
- }
- if (guard && isIterateeCall(iteratees, orders, guard)) {
- orders = undefined;
- }
- if (!isArray(iteratees)) {
- iteratees = iteratees == null ? [] : [iteratees];
- }
- if (!isArray(orders)) {
- orders = orders == null ? [] : [orders];
- }
- return baseSortByOrder(collection, iteratees, orders);
- }
-
- /**
- * Performs a deep comparison between each element in `collection` and the
- * source object, returning an array of all elements that have equivalent
- * property values.
- *
- * **Note:** This method supports comparing arrays, booleans, `Date` objects,
- * numbers, `Object` objects, regexes, and strings. Objects are compared by
- * their own, not inherited, enumerable properties. For comparing a single
- * own or inherited property value see `_.matchesProperty`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to search.
- * @param {Object} source The object of property values to match.
- * @returns {Array} Returns the new filtered array.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': false, 'pets': ['hoppy'] },
- * { 'user': 'fred', 'age': 40, 'active': true, 'pets': ['baby puss', 'dino'] }
- * ];
- *
- * _.pluck(_.where(users, { 'age': 36, 'active': false }), 'user');
- * // => ['barney']
- *
- * _.pluck(_.where(users, { 'pets': ['dino'] }), 'user');
- * // => ['fred']
- */
- function where(collection, source) {
- return filter(collection, baseMatches(source));
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Gets the number of milliseconds that have elapsed since the Unix epoch
- * (1 January 1970 00:00:00 UTC).
- *
- * @static
- * @memberOf _
- * @category Date
- * @example
- *
- * _.defer(function(stamp) {
- * console.log(_.now() - stamp);
- * }, _.now());
- * // => logs the number of milliseconds it took for the deferred function to be invoked
- */
- var now = nativeNow || function() {
- return new Date().getTime();
- };
-
- /*------------------------------------------------------------------------*/
-
- /**
- * The opposite of `_.before`; this method creates a function that invokes
- * `func` once it is called `n` or more times.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {number} n The number of calls before `func` is invoked.
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new restricted function.
- * @example
- *
- * var saves = ['profile', 'settings'];
- *
- * var done = _.after(saves.length, function() {
- * console.log('done saving!');
- * });
- *
- * _.forEach(saves, function(type) {
- * asyncSave({ 'type': type, 'complete': done });
- * });
- * // => logs 'done saving!' after the two async saves have completed
- */
- function after(n, func) {
- if (typeof func != 'function') {
- if (typeof n == 'function') {
- var temp = n;
- n = func;
- func = temp;
- } else {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- }
- n = nativeIsFinite(n = +n) ? n : 0;
- return function() {
- if (--n < 1) {
- return func.apply(this, arguments);
- }
- };
- }
-
- /**
- * Creates a function that accepts up to `n` arguments ignoring any
- * additional arguments.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to cap arguments for.
- * @param {number} [n=func.length] The arity cap.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Function} Returns the new function.
- * @example
- *
- * _.map(['6', '8', '10'], _.ary(parseInt, 1));
- * // => [6, 8, 10]
- */
- function ary(func, n, guard) {
- if (guard && isIterateeCall(func, n, guard)) {
- n = undefined;
- }
- n = (func && n == null) ? func.length : nativeMax(+n || 0, 0);
- return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n);
- }
-
- /**
- * Creates a function that invokes `func`, with the `this` binding and arguments
- * of the created function, while it is called less than `n` times. Subsequent
- * calls to the created function return the result of the last `func` invocation.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {number} n The number of calls at which `func` is no longer invoked.
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new restricted function.
- * @example
- *
- * jQuery('#add').on('click', _.before(5, addContactToList));
- * // => allows adding up to 4 contacts to the list
- */
- function before(n, func) {
- var result;
- if (typeof func != 'function') {
- if (typeof n == 'function') {
- var temp = n;
- n = func;
- func = temp;
- } else {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- }
- return function() {
- if (--n > 0) {
- result = func.apply(this, arguments);
- }
- if (n <= 1) {
- func = undefined;
- }
- return result;
- };
- }
-
- /**
- * Creates a function that invokes `func` with the `this` binding of `thisArg`
- * and prepends any additional `_.bind` arguments to those provided to the
- * bound function.
- *
- * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
- * may be used as a placeholder for partially applied arguments.
- *
- * **Note:** Unlike native `Function#bind` this method does not set the "length"
- * property of bound functions.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to bind.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new bound function.
- * @example
- *
- * var greet = function(greeting, punctuation) {
- * return greeting + ' ' + this.user + punctuation;
- * };
- *
- * var object = { 'user': 'fred' };
- *
- * var bound = _.bind(greet, object, 'hi');
- * bound('!');
- * // => 'hi fred!'
- *
- * // using placeholders
- * var bound = _.bind(greet, object, _, '!');
- * bound('hi');
- * // => 'hi fred!'
- */
- var bind = restParam(function(func, thisArg, partials) {
- var bitmask = BIND_FLAG;
- if (partials.length) {
- var holders = replaceHolders(partials, bind.placeholder);
- bitmask |= PARTIAL_FLAG;
- }
- return createWrapper(func, bitmask, thisArg, partials, holders);
- });
-
- /**
- * Binds methods of an object to the object itself, overwriting the existing
- * method. Method names may be specified as individual arguments or as arrays
- * of method names. If no method names are provided all enumerable function
- * properties, own and inherited, of `object` are bound.
- *
- * **Note:** This method does not set the "length" property of bound functions.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Object} object The object to bind and assign the bound methods to.
- * @param {...(string|string[])} [methodNames] The object method names to bind,
- * specified as individual method names or arrays of method names.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var view = {
- * 'label': 'docs',
- * 'onClick': function() {
- * console.log('clicked ' + this.label);
- * }
- * };
- *
- * _.bindAll(view);
- * jQuery('#docs').on('click', view.onClick);
- * // => logs 'clicked docs' when the element is clicked
- */
- var bindAll = restParam(function(object, methodNames) {
- methodNames = methodNames.length ? baseFlatten(methodNames) : functions(object);
-
- var index = -1,
- length = methodNames.length;
-
- while (++index < length) {
- var key = methodNames[index];
- object[key] = createWrapper(object[key], BIND_FLAG, object);
- }
- return object;
- });
-
- /**
- * Creates a function that invokes the method at `object[key]` and prepends
- * any additional `_.bindKey` arguments to those provided to the bound function.
- *
- * This method differs from `_.bind` by allowing bound functions to reference
- * methods that may be redefined or don't yet exist.
- * See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
- * for more details.
- *
- * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
- * builds, may be used as a placeholder for partially applied arguments.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Object} object The object the method belongs to.
- * @param {string} key The key of the method.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new bound function.
- * @example
- *
- * var object = {
- * 'user': 'fred',
- * 'greet': function(greeting, punctuation) {
- * return greeting + ' ' + this.user + punctuation;
- * }
- * };
- *
- * var bound = _.bindKey(object, 'greet', 'hi');
- * bound('!');
- * // => 'hi fred!'
- *
- * object.greet = function(greeting, punctuation) {
- * return greeting + 'ya ' + this.user + punctuation;
- * };
- *
- * bound('!');
- * // => 'hiya fred!'
- *
- * // using placeholders
- * var bound = _.bindKey(object, 'greet', _, '!');
- * bound('hi');
- * // => 'hiya fred!'
- */
- var bindKey = restParam(function(object, key, partials) {
- var bitmask = BIND_FLAG | BIND_KEY_FLAG;
- if (partials.length) {
- var holders = replaceHolders(partials, bindKey.placeholder);
- bitmask |= PARTIAL_FLAG;
- }
- return createWrapper(key, bitmask, object, partials, holders);
- });
-
- /**
- * Creates a function that accepts one or more arguments of `func` that when
- * called either invokes `func` returning its result, if all `func` arguments
- * have been provided, or returns a function that accepts one or more of the
- * remaining `func` arguments, and so on. The arity of `func` may be specified
- * if `func.length` is not sufficient.
- *
- * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
- * may be used as a placeholder for provided arguments.
- *
- * **Note:** This method does not set the "length" property of curried functions.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to curry.
- * @param {number} [arity=func.length] The arity of `func`.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Function} Returns the new curried function.
- * @example
- *
- * var abc = function(a, b, c) {
- * return [a, b, c];
- * };
- *
- * var curried = _.curry(abc);
- *
- * curried(1)(2)(3);
- * // => [1, 2, 3]
- *
- * curried(1, 2)(3);
- * // => [1, 2, 3]
- *
- * curried(1, 2, 3);
- * // => [1, 2, 3]
- *
- * // using placeholders
- * curried(1)(_, 3)(2);
- * // => [1, 2, 3]
- */
- var curry = createCurry(CURRY_FLAG);
-
- /**
- * This method is like `_.curry` except that arguments are applied to `func`
- * in the manner of `_.partialRight` instead of `_.partial`.
- *
- * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
- * builds, may be used as a placeholder for provided arguments.
- *
- * **Note:** This method does not set the "length" property of curried functions.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to curry.
- * @param {number} [arity=func.length] The arity of `func`.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Function} Returns the new curried function.
- * @example
- *
- * var abc = function(a, b, c) {
- * return [a, b, c];
- * };
- *
- * var curried = _.curryRight(abc);
- *
- * curried(3)(2)(1);
- * // => [1, 2, 3]
- *
- * curried(2, 3)(1);
- * // => [1, 2, 3]
- *
- * curried(1, 2, 3);
- * // => [1, 2, 3]
- *
- * // using placeholders
- * curried(3)(1, _)(2);
- * // => [1, 2, 3]
- */
- var curryRight = createCurry(CURRY_RIGHT_FLAG);
-
- /**
- * Creates a debounced function that delays invoking `func` until after `wait`
- * milliseconds have elapsed since the last time the debounced function was
- * invoked. The debounced function comes with a `cancel` method to cancel
- * delayed invocations. Provide an options object to indicate that `func`
- * should be invoked on the leading and/or trailing edge of the `wait` timeout.
- * Subsequent calls to the debounced function return the result of the last
- * `func` invocation.
- *
- * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
- * on the trailing edge of the timeout only if the the debounced function is
- * invoked more than once during the `wait` timeout.
- *
- * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)
- * for details over the differences between `_.debounce` and `_.throttle`.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to debounce.
- * @param {number} [wait=0] The number of milliseconds to delay.
- * @param {Object} [options] The options object.
- * @param {boolean} [options.leading=false] Specify invoking on the leading
- * edge of the timeout.
- * @param {number} [options.maxWait] The maximum time `func` is allowed to be
- * delayed before it is invoked.
- * @param {boolean} [options.trailing=true] Specify invoking on the trailing
- * edge of the timeout.
- * @returns {Function} Returns the new debounced function.
- * @example
- *
- * // avoid costly calculations while the window size is in flux
- * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
- *
- * // invoke `sendMail` when the click event is fired, debouncing subsequent calls
- * jQuery('#postbox').on('click', _.debounce(sendMail, 300, {
- * 'leading': true,
- * 'trailing': false
- * }));
- *
- * // ensure `batchLog` is invoked once after 1 second of debounced calls
- * var source = new EventSource('/stream');
- * jQuery(source).on('message', _.debounce(batchLog, 250, {
- * 'maxWait': 1000
- * }));
- *
- * // cancel a debounced call
- * var todoChanges = _.debounce(batchLog, 1000);
- * Object.observe(models.todo, todoChanges);
- *
- * Object.observe(models, function(changes) {
- * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) {
- * todoChanges.cancel();
- * }
- * }, ['delete']);
- *
- * // ...at some point `models.todo` is changed
- * models.todo.completed = true;
- *
- * // ...before 1 second has passed `models.todo` is deleted
- * // which cancels the debounced `todoChanges` call
- * delete models.todo;
- */
- function debounce(func, wait, options) {
- var args,
- maxTimeoutId,
- result,
- stamp,
- thisArg,
- timeoutId,
- trailingCall,
- lastCalled = 0,
- maxWait = false,
- trailing = true;
-
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- wait = wait < 0 ? 0 : (+wait || 0);
- if (options === true) {
- var leading = true;
- trailing = false;
- } else if (isObject(options)) {
- leading = !!options.leading;
- maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait);
- trailing = 'trailing' in options ? !!options.trailing : trailing;
- }
-
- function cancel() {
- if (timeoutId) {
- clearTimeout(timeoutId);
- }
- if (maxTimeoutId) {
- clearTimeout(maxTimeoutId);
- }
- lastCalled = 0;
- maxTimeoutId = timeoutId = trailingCall = undefined;
- }
-
- function complete(isCalled, id) {
- if (id) {
- clearTimeout(id);
- }
- maxTimeoutId = timeoutId = trailingCall = undefined;
- if (isCalled) {
- lastCalled = now();
- result = func.apply(thisArg, args);
- if (!timeoutId && !maxTimeoutId) {
- args = thisArg = undefined;
- }
- }
- }
-
- function delayed() {
- var remaining = wait - (now() - stamp);
- if (remaining <= 0 || remaining > wait) {
- complete(trailingCall, maxTimeoutId);
- } else {
- timeoutId = setTimeout(delayed, remaining);
- }
- }
-
- function maxDelayed() {
- complete(trailing, timeoutId);
- }
-
- function debounced() {
- args = arguments;
- stamp = now();
- thisArg = this;
- trailingCall = trailing && (timeoutId || !leading);
-
- if (maxWait === false) {
- var leadingCall = leading && !timeoutId;
- } else {
- if (!maxTimeoutId && !leading) {
- lastCalled = stamp;
- }
- var remaining = maxWait - (stamp - lastCalled),
- isCalled = remaining <= 0 || remaining > maxWait;
-
- if (isCalled) {
- if (maxTimeoutId) {
- maxTimeoutId = clearTimeout(maxTimeoutId);
- }
- lastCalled = stamp;
- result = func.apply(thisArg, args);
- }
- else if (!maxTimeoutId) {
- maxTimeoutId = setTimeout(maxDelayed, remaining);
- }
- }
- if (isCalled && timeoutId) {
- timeoutId = clearTimeout(timeoutId);
- }
- else if (!timeoutId && wait !== maxWait) {
- timeoutId = setTimeout(delayed, wait);
- }
- if (leadingCall) {
- isCalled = true;
- result = func.apply(thisArg, args);
- }
- if (isCalled && !timeoutId && !maxTimeoutId) {
- args = thisArg = undefined;
- }
- return result;
- }
- debounced.cancel = cancel;
- return debounced;
- }
-
- /**
- * Defers invoking the `func` until the current call stack has cleared. Any
- * additional arguments are provided to `func` when it is invoked.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to defer.
- * @param {...*} [args] The arguments to invoke the function with.
- * @returns {number} Returns the timer id.
- * @example
- *
- * _.defer(function(text) {
- * console.log(text);
- * }, 'deferred');
- * // logs 'deferred' after one or more milliseconds
- */
- var defer = restParam(function(func, args) {
- return baseDelay(func, 1, args);
- });
-
- /**
- * Invokes `func` after `wait` milliseconds. Any additional arguments are
- * provided to `func` when it is invoked.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to delay.
- * @param {number} wait The number of milliseconds to delay invocation.
- * @param {...*} [args] The arguments to invoke the function with.
- * @returns {number} Returns the timer id.
- * @example
- *
- * _.delay(function(text) {
- * console.log(text);
- * }, 1000, 'later');
- * // => logs 'later' after one second
- */
- var delay = restParam(function(func, wait, args) {
- return baseDelay(func, wait, args);
- });
-
- /**
- * Creates a function that returns the result of invoking the provided
- * functions with the `this` binding of the created function, where each
- * successive invocation is supplied the return value of the previous.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {...Function} [funcs] Functions to invoke.
- * @returns {Function} Returns the new function.
- * @example
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * var addSquare = _.flow(_.add, square);
- * addSquare(1, 2);
- * // => 9
- */
- var flow = createFlow();
-
- /**
- * This method is like `_.flow` except that it creates a function that
- * invokes the provided functions from right to left.
- *
- * @static
- * @memberOf _
- * @alias backflow, compose
- * @category Function
- * @param {...Function} [funcs] Functions to invoke.
- * @returns {Function} Returns the new function.
- * @example
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * var addSquare = _.flowRight(square, _.add);
- * addSquare(1, 2);
- * // => 9
- */
- var flowRight = createFlow(true);
-
- /**
- * Creates a function that memoizes the result of `func`. If `resolver` is
- * provided it determines the cache key for storing the result based on the
- * arguments provided to the memoized function. By default, the first argument
- * provided to the memoized function is coerced to a string and used as the
- * cache key. The `func` is invoked with the `this` binding of the memoized
- * function.
- *
- * **Note:** The cache is exposed as the `cache` property on the memoized
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
- * constructor with one whose instances implement the [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
- * method interface of `get`, `has`, and `set`.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to have its output memoized.
- * @param {Function} [resolver] The function to resolve the cache key.
- * @returns {Function} Returns the new memoizing function.
- * @example
- *
- * var upperCase = _.memoize(function(string) {
- * return string.toUpperCase();
- * });
- *
- * upperCase('fred');
- * // => 'FRED'
- *
- * // modifying the result cache
- * upperCase.cache.set('fred', 'BARNEY');
- * upperCase('fred');
- * // => 'BARNEY'
- *
- * // replacing `_.memoize.Cache`
- * var object = { 'user': 'fred' };
- * var other = { 'user': 'barney' };
- * var identity = _.memoize(_.identity);
- *
- * identity(object);
- * // => { 'user': 'fred' }
- * identity(other);
- * // => { 'user': 'fred' }
- *
- * _.memoize.Cache = WeakMap;
- * var identity = _.memoize(_.identity);
- *
- * identity(object);
- * // => { 'user': 'fred' }
- * identity(other);
- * // => { 'user': 'barney' }
- */
- function memoize(func, resolver) {
- if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- var memoized = function() {
- var args = arguments,
- key = resolver ? resolver.apply(this, args) : args[0],
- cache = memoized.cache;
-
- if (cache.has(key)) {
- return cache.get(key);
- }
- var result = func.apply(this, args);
- memoized.cache = cache.set(key, result);
- return result;
- };
- memoized.cache = new memoize.Cache;
- return memoized;
- }
-
- /**
- * Creates a function that runs each argument through a corresponding
- * transform function.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to wrap.
- * @param {...(Function|Function[])} [transforms] The functions to transform
- * arguments, specified as individual functions or arrays of functions.
- * @returns {Function} Returns the new function.
- * @example
- *
- * function doubled(n) {
- * return n * 2;
- * }
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * var modded = _.modArgs(function(x, y) {
- * return [x, y];
- * }, square, doubled);
- *
- * modded(1, 2);
- * // => [1, 4]
- *
- * modded(5, 10);
- * // => [25, 20]
- */
- var modArgs = restParam(function(func, transforms) {
- transforms = baseFlatten(transforms);
- if (typeof func != 'function' || !arrayEvery(transforms, baseIsFunction)) {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- var length = transforms.length;
- return restParam(function(args) {
- var index = nativeMin(args.length, length);
- while (index--) {
- args[index] = transforms[index](args[index]);
- }
- return func.apply(this, args);
- });
- });
-
- /**
- * Creates a function that negates the result of the predicate `func`. The
- * `func` predicate is invoked with the `this` binding and arguments of the
- * created function.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} predicate The predicate to negate.
- * @returns {Function} Returns the new function.
- * @example
- *
- * function isEven(n) {
- * return n % 2 == 0;
- * }
- *
- * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
- * // => [1, 3, 5]
- */
- function negate(predicate) {
- if (typeof predicate != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- return function() {
- return !predicate.apply(this, arguments);
- };
- }
-
- /**
- * Creates a function that is restricted to invoking `func` once. Repeat calls
- * to the function return the value of the first call. The `func` is invoked
- * with the `this` binding and arguments of the created function.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new restricted function.
- * @example
- *
- * var initialize = _.once(createApplication);
- * initialize();
- * initialize();
- * // `initialize` invokes `createApplication` once
- */
- function once(func) {
- return before(2, func);
- }
-
- /**
- * Creates a function that invokes `func` with `partial` arguments prepended
- * to those provided to the new function. This method is like `_.bind` except
- * it does **not** alter the `this` binding.
- *
- * The `_.partial.placeholder` value, which defaults to `_` in monolithic
- * builds, may be used as a placeholder for partially applied arguments.
- *
- * **Note:** This method does not set the "length" property of partially
- * applied functions.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to partially apply arguments to.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new partially applied function.
- * @example
- *
- * var greet = function(greeting, name) {
- * return greeting + ' ' + name;
- * };
- *
- * var sayHelloTo = _.partial(greet, 'hello');
- * sayHelloTo('fred');
- * // => 'hello fred'
- *
- * // using placeholders
- * var greetFred = _.partial(greet, _, 'fred');
- * greetFred('hi');
- * // => 'hi fred'
- */
- var partial = createPartial(PARTIAL_FLAG);
-
- /**
- * This method is like `_.partial` except that partially applied arguments
- * are appended to those provided to the new function.
- *
- * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
- * builds, may be used as a placeholder for partially applied arguments.
- *
- * **Note:** This method does not set the "length" property of partially
- * applied functions.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to partially apply arguments to.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new partially applied function.
- * @example
- *
- * var greet = function(greeting, name) {
- * return greeting + ' ' + name;
- * };
- *
- * var greetFred = _.partialRight(greet, 'fred');
- * greetFred('hi');
- * // => 'hi fred'
- *
- * // using placeholders
- * var sayHelloTo = _.partialRight(greet, 'hello', _);
- * sayHelloTo('fred');
- * // => 'hello fred'
- */
- var partialRight = createPartial(PARTIAL_RIGHT_FLAG);
-
- /**
- * Creates a function that invokes `func` with arguments arranged according
- * to the specified indexes where the argument value at the first index is
- * provided as the first argument, the argument value at the second index is
- * provided as the second argument, and so on.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to rearrange arguments for.
- * @param {...(number|number[])} indexes The arranged argument indexes,
- * specified as individual indexes or arrays of indexes.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var rearged = _.rearg(function(a, b, c) {
- * return [a, b, c];
- * }, 2, 0, 1);
- *
- * rearged('b', 'c', 'a')
- * // => ['a', 'b', 'c']
- *
- * var map = _.rearg(_.map, [1, 0]);
- * map(function(n) {
- * return n * 3;
- * }, [1, 2, 3]);
- * // => [3, 6, 9]
- */
- var rearg = restParam(function(func, indexes) {
- return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes));
- });
-
- /**
- * Creates a function that invokes `func` with the `this` binding of the
- * created function and arguments from `start` and beyond provided as an array.
- *
- * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters).
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to apply a rest parameter to.
- * @param {number} [start=func.length-1] The start position of the rest parameter.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var say = _.restParam(function(what, names) {
- * return what + ' ' + _.initial(names).join(', ') +
- * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
- * });
- *
- * say('hello', 'fred', 'barney', 'pebbles');
- * // => 'hello fred, barney, & pebbles'
- */
- function restParam(func, start) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);
- return function() {
- var args = arguments,
- index = -1,
- length = nativeMax(args.length - start, 0),
- rest = Array(length);
-
- while (++index < length) {
- rest[index] = args[start + index];
- }
- switch (start) {
- case 0: return func.call(this, rest);
- case 1: return func.call(this, args[0], rest);
- case 2: return func.call(this, args[0], args[1], rest);
- }
- var otherArgs = Array(start + 1);
- index = -1;
- while (++index < start) {
- otherArgs[index] = args[index];
- }
- otherArgs[start] = rest;
- return func.apply(this, otherArgs);
- };
- }
-
- /**
- * Creates a function that invokes `func` with the `this` binding of the created
- * function and an array of arguments much like [`Function#apply`](https://es5.github.io/#x15.3.4.3).
- *
- * **Note:** This method is based on the [spread operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator).
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to spread arguments over.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var say = _.spread(function(who, what) {
- * return who + ' says ' + what;
- * });
- *
- * say(['fred', 'hello']);
- * // => 'fred says hello'
- *
- * // with a Promise
- * var numbers = Promise.all([
- * Promise.resolve(40),
- * Promise.resolve(36)
- * ]);
- *
- * numbers.then(_.spread(function(x, y) {
- * return x + y;
- * }));
- * // => a Promise of 76
- */
- function spread(func) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- return function(array) {
- return func.apply(this, array);
- };
- }
-
- /**
- * Creates a throttled function that only invokes `func` at most once per
- * every `wait` milliseconds. The throttled function comes with a `cancel`
- * method to cancel delayed invocations. Provide an options object to indicate
- * that `func` should be invoked on the leading and/or trailing edge of the
- * `wait` timeout. Subsequent calls to the throttled function return the
- * result of the last `func` call.
- *
- * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
- * on the trailing edge of the timeout only if the the throttled function is
- * invoked more than once during the `wait` timeout.
- *
- * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)
- * for details over the differences between `_.throttle` and `_.debounce`.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to throttle.
- * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
- * @param {Object} [options] The options object.
- * @param {boolean} [options.leading=true] Specify invoking on the leading
- * edge of the timeout.
- * @param {boolean} [options.trailing=true] Specify invoking on the trailing
- * edge of the timeout.
- * @returns {Function} Returns the new throttled function.
- * @example
- *
- * // avoid excessively updating the position while scrolling
- * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
- *
- * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes
- * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, {
- * 'trailing': false
- * }));
- *
- * // cancel a trailing throttled call
- * jQuery(window).on('popstate', throttled.cancel);
- */
- function throttle(func, wait, options) {
- var leading = true,
- trailing = true;
-
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- if (options === false) {
- leading = false;
- } else if (isObject(options)) {
- leading = 'leading' in options ? !!options.leading : leading;
- trailing = 'trailing' in options ? !!options.trailing : trailing;
- }
- return debounce(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing });
- }
-
- /**
- * Creates a function that provides `value` to the wrapper function as its
- * first argument. Any additional arguments provided to the function are
- * appended to those provided to the wrapper function. The wrapper is invoked
- * with the `this` binding of the created function.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {*} value The value to wrap.
- * @param {Function} wrapper The wrapper function.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var p = _.wrap(_.escape, function(func, text) {
- * return '<p>' + func(text) + '</p>';
- * });
- *
- * p('fred, barney, & pebbles');
- * // => '<p>fred, barney, &amp; pebbles</p>'
- */
- function wrap(value, wrapper) {
- wrapper = wrapper == null ? identity : wrapper;
- return createWrapper(wrapper, PARTIAL_FLAG, undefined, [value], []);
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a clone of `value`. If `isDeep` is `true` nested objects are cloned,
- * otherwise they are assigned by reference. If `customizer` is provided it is
- * invoked to produce the cloned values. If `customizer` returns `undefined`
- * cloning is handled by the method instead. The `customizer` is bound to
- * `thisArg` and invoked with two argument; (value [, index|key, object]).
- *
- * **Note:** This method is loosely based on the
- * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).
- * The enumerable properties of `arguments` objects and objects created by
- * constructors other than `Object` are cloned to plain `Object` objects. An
- * empty object is returned for uncloneable values such as functions, DOM nodes,
- * Maps, Sets, and WeakMaps.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @param {Function} [customizer] The function to customize cloning values.
- * @param {*} [thisArg] The `this` binding of `customizer`.
- * @returns {*} Returns the cloned value.
- * @example
- *
- * var users = [
- * { 'user': 'barney' },
- * { 'user': 'fred' }
- * ];
- *
- * var shallow = _.clone(users);
- * shallow[0] === users[0];
- * // => true
- *
- * var deep = _.clone(users, true);
- * deep[0] === users[0];
- * // => false
- *
- * // using a customizer callback
- * var el = _.clone(document.body, function(value) {
- * if (_.isElement(value)) {
- * return value.cloneNode(false);
- * }
- * });
- *
- * el === document.body
- * // => false
- * el.nodeName
- * // => BODY
- * el.childNodes.length;
- * // => 0
- */
- function clone(value, isDeep, customizer, thisArg) {
- if (isDeep && typeof isDeep != 'boolean' && isIterateeCall(value, isDeep, customizer)) {
- isDeep = false;
- }
- else if (typeof isDeep == 'function') {
- thisArg = customizer;
- customizer = isDeep;
- isDeep = false;
- }
- return typeof customizer == 'function'
- ? baseClone(value, isDeep, bindCallback(customizer, thisArg, 1))
- : baseClone(value, isDeep);
- }
-
- /**
- * Creates a deep clone of `value`. If `customizer` is provided it is invoked
- * to produce the cloned values. If `customizer` returns `undefined` cloning
- * is handled by the method instead. The `customizer` is bound to `thisArg`
- * and invoked with two argument; (value [, index|key, object]).
- *
- * **Note:** This method is loosely based on the
- * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).
- * The enumerable properties of `arguments` objects and objects created by
- * constructors other than `Object` are cloned to plain `Object` objects. An
- * empty object is returned for uncloneable values such as functions, DOM nodes,
- * Maps, Sets, and WeakMaps.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to deep clone.
- * @param {Function} [customizer] The function to customize cloning values.
- * @param {*} [thisArg] The `this` binding of `customizer`.
- * @returns {*} Returns the deep cloned value.
- * @example
- *
- * var users = [
- * { 'user': 'barney' },
- * { 'user': 'fred' }
- * ];
- *
- * var deep = _.cloneDeep(users);
- * deep[0] === users[0];
- * // => false
- *
- * // using a customizer callback
- * var el = _.cloneDeep(document.body, function(value) {
- * if (_.isElement(value)) {
- * return value.cloneNode(true);
- * }
- * });
- *
- * el === document.body
- * // => false
- * el.nodeName
- * // => BODY
- * el.childNodes.length;
- * // => 20
- */
- function cloneDeep(value, customizer, thisArg) {
- return typeof customizer == 'function'
- ? baseClone(value, true, bindCallback(customizer, thisArg, 1))
- : baseClone(value, true);
- }
-
- /**
- * Checks if `value` is greater than `other`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is greater than `other`, else `false`.
- * @example
- *
- * _.gt(3, 1);
- * // => true
- *
- * _.gt(3, 3);
- * // => false
- *
- * _.gt(1, 3);
- * // => false
- */
- function gt(value, other) {
- return value > other;
- }
-
- /**
- * Checks if `value` is greater than or equal to `other`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is greater than or equal to `other`, else `false`.
- * @example
- *
- * _.gte(3, 1);
- * // => true
- *
- * _.gte(3, 3);
- * // => true
- *
- * _.gte(1, 3);
- * // => false
- */
- function gte(value, other) {
- return value >= other;
- }
-
- /**
- * Checks if `value` is classified as an `arguments` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isArguments(function() { return arguments; }());
- * // => true
- *
- * _.isArguments([1, 2, 3]);
- * // => false
- */
- function isArguments(value) {
- return isObjectLike(value) && isArrayLike(value) &&
- hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
- }
-
- /**
- * Checks if `value` is classified as an `Array` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isArray([1, 2, 3]);
- * // => true
- *
- * _.isArray(function() { return arguments; }());
- * // => false
- */
- var isArray = nativeIsArray || function(value) {
- return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;
- };
-
- /**
- * Checks if `value` is classified as a boolean primitive or object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isBoolean(false);
- * // => true
- *
- * _.isBoolean(null);
- * // => false
- */
- function isBoolean(value) {
- return value === true || value === false || (isObjectLike(value) && objToString.call(value) == boolTag);
- }
-
- /**
- * Checks if `value` is classified as a `Date` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isDate(new Date);
- * // => true
- *
- * _.isDate('Mon April 23 2012');
- * // => false
- */
- function isDate(value) {
- return isObjectLike(value) && objToString.call(value) == dateTag;
- }
-
- /**
- * Checks if `value` is a DOM element.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
- * @example
- *
- * _.isElement(document.body);
- * // => true
- *
- * _.isElement('<body>');
- * // => false
- */
- function isElement(value) {
- return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value);
- }
-
- /**
- * Checks if `value` is empty. A value is considered empty unless it is an
- * `arguments` object, array, string, or jQuery-like collection with a length
- * greater than `0` or an object with own enumerable properties.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {Array|Object|string} value The value to inspect.
- * @returns {boolean} Returns `true` if `value` is empty, else `false`.
- * @example
- *
- * _.isEmpty(null);
- * // => true
- *
- * _.isEmpty(true);
- * // => true
- *
- * _.isEmpty(1);
- * // => true
- *
- * _.isEmpty([1, 2, 3]);
- * // => false
- *
- * _.isEmpty({ 'a': 1 });
- * // => false
- */
- function isEmpty(value) {
- if (value == null) {
- return true;
- }
- if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) ||
- (isObjectLike(value) && isFunction(value.splice)))) {
- return !value.length;
- }
- return !keys(value).length;
- }
-
- /**
- * Performs a deep comparison between two values to determine if they are
- * equivalent. If `customizer` is provided it is invoked to compare values.
- * If `customizer` returns `undefined` comparisons are handled by the method
- * instead. The `customizer` is bound to `thisArg` and invoked with three
- * arguments: (value, other [, index|key]).
- *
- * **Note:** This method supports comparing arrays, booleans, `Date` objects,
- * numbers, `Object` objects, regexes, and strings. Objects are compared by
- * their own, not inherited, enumerable properties. Functions and DOM nodes
- * are **not** supported. Provide a customizer function to extend support
- * for comparing other values.
- *
- * @static
- * @memberOf _
- * @alias eq
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @param {Function} [customizer] The function to customize value comparisons.
- * @param {*} [thisArg] The `this` binding of `customizer`.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'user': 'fred' };
- * var other = { 'user': 'fred' };
- *
- * object == other;
- * // => false
- *
- * _.isEqual(object, other);
- * // => true
- *
- * // using a customizer callback
- * var array = ['hello', 'goodbye'];
- * var other = ['hi', 'goodbye'];
- *
- * _.isEqual(array, other, function(value, other) {
- * if (_.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/)) {
- * return true;
- * }
- * });
- * // => true
- */
- function isEqual(value, other, customizer, thisArg) {
- customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined;
- var result = customizer ? customizer(value, other) : undefined;
- return result === undefined ? baseIsEqual(value, other, customizer) : !!result;
- }
-
- /**
- * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
- * `SyntaxError`, `TypeError`, or `URIError` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
- * @example
- *
- * _.isError(new Error);
- * // => true
- *
- * _.isError(Error);
- * // => false
- */
- function isError(value) {
- return isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag;
- }
-
- /**
- * Checks if `value` is a finite primitive number.
- *
- * **Note:** This method is based on [`Number.isFinite`](http://ecma-international.org/ecma-262/6.0/#sec-number.isfinite).
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
- * @example
- *
- * _.isFinite(10);
- * // => true
- *
- * _.isFinite('10');
- * // => false
- *
- * _.isFinite(true);
- * // => false
- *
- * _.isFinite(Object(10));
- * // => false
- *
- * _.isFinite(Infinity);
- * // => false
- */
- function isFinite(value) {
- return typeof value == 'number' && nativeIsFinite(value);
- }
-
- /**
- * Checks if `value` is classified as a `Function` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
- *
- * _.isFunction(/abc/);
- * // => false
- */
- function isFunction(value) {
- // The use of `Object#toString` avoids issues with the `typeof` operator
- // in older versions of Chrome and Safari which return 'function' for regexes
- // and Safari 8 equivalents which return 'object' for typed array constructors.
- return isObject(value) && objToString.call(value) == funcTag;
- }
-
- /**
- * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(1);
- * // => false
- */
- function isObject(value) {
- // Avoid a V8 JIT bug in Chrome 19-20.
- // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
- var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
- }
-
- /**
- * Performs a deep comparison between `object` and `source` to determine if
- * `object` contains equivalent property values. If `customizer` is provided
- * it is invoked to compare values. If `customizer` returns `undefined`
- * comparisons are handled by the method instead. The `customizer` is bound
- * to `thisArg` and invoked with three arguments: (value, other, index|key).
- *
- * **Note:** This method supports comparing properties of arrays, booleans,
- * `Date` objects, numbers, `Object` objects, regexes, and strings. Functions
- * and DOM nodes are **not** supported. Provide a customizer function to extend
- * support for comparing other values.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {Object} object The object to inspect.
- * @param {Object} source The object of property values to match.
- * @param {Function} [customizer] The function to customize value comparisons.
- * @param {*} [thisArg] The `this` binding of `customizer`.
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
- * @example
- *
- * var object = { 'user': 'fred', 'age': 40 };
- *
- * _.isMatch(object, { 'age': 40 });
- * // => true
- *
- * _.isMatch(object, { 'age': 36 });
- * // => false
- *
- * // using a customizer callback
- * var object = { 'greeting': 'hello' };
- * var source = { 'greeting': 'hi' };
- *
- * _.isMatch(object, source, function(value, other) {
- * return _.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/) || undefined;
- * });
- * // => true
- */
- function isMatch(object, source, customizer, thisArg) {
- customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined;
- return baseIsMatch(object, getMatchData(source), customizer);
- }
-
- /**
- * Checks if `value` is `NaN`.
- *
- * **Note:** This method is not the same as [`isNaN`](https://es5.github.io/#x15.1.2.4)
- * which returns `true` for `undefined` and other non-numeric values.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
- * @example
- *
- * _.isNaN(NaN);
- * // => true
- *
- * _.isNaN(new Number(NaN));
- * // => true
- *
- * isNaN(undefined);
- * // => true
- *
- * _.isNaN(undefined);
- * // => false
- */
- function isNaN(value) {
- // An `NaN` primitive is the only value that is not equal to itself.
- // Perform the `toStringTag` check first to avoid errors with some host objects in IE.
- return isNumber(value) && value != +value;
- }
-
- /**
- * Checks if `value` is a native function.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
- * @example
- *
- * _.isNative(Array.prototype.push);
- * // => true
- *
- * _.isNative(_);
- * // => false
- */
- function isNative(value) {
- if (value == null) {
- return false;
- }
- if (isFunction(value)) {
- return reIsNative.test(fnToString.call(value));
- }
- return isObjectLike(value) && reIsHostCtor.test(value);
- }
-
- /**
- * Checks if `value` is `null`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
- * @example
- *
- * _.isNull(null);
- * // => true
- *
- * _.isNull(void 0);
- * // => false
- */
- function isNull(value) {
- return value === null;
- }
-
- /**
- * Checks if `value` is classified as a `Number` primitive or object.
- *
- * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified
- * as numbers, use the `_.isFinite` method.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isNumber(8.4);
- * // => true
- *
- * _.isNumber(NaN);
- * // => true
- *
- * _.isNumber('8.4');
- * // => false
- */
- function isNumber(value) {
- return typeof value == 'number' || (isObjectLike(value) && objToString.call(value) == numberTag);
- }
-
- /**
- * Checks if `value` is a plain object, that is, an object created by the
- * `Object` constructor or one with a `[[Prototype]]` of `null`.
- *
- * **Note:** This method assumes objects created by the `Object` constructor
- * have no inherited enumerable properties.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * }
- *
- * _.isPlainObject(new Foo);
- * // => false
- *
- * _.isPlainObject([1, 2, 3]);
- * // => false
- *
- * _.isPlainObject({ 'x': 0, 'y': 0 });
- * // => true
- *
- * _.isPlainObject(Object.create(null));
- * // => true
- */
- function isPlainObject(value) {
- var Ctor;
-
- // Exit early for non `Object` objects.
- if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isArguments(value)) ||
- (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) {
- return false;
- }
- // IE < 9 iterates inherited properties before own properties. If the first
- // iterated property is an object's own property then there are no inherited
- // enumerable properties.
- var result;
- // In most environments an object's own properties are iterated before
- // its inherited properties. If the last iterated property is an object's
- // own property then there are no inherited enumerable properties.
- baseForIn(value, function(subValue, key) {
- result = key;
- });
- return result === undefined || hasOwnProperty.call(value, result);
- }
-
- /**
- * Checks if `value` is classified as a `RegExp` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isRegExp(/abc/);
- * // => true
- *
- * _.isRegExp('/abc/');
- * // => false
- */
- function isRegExp(value) {
- return isObject(value) && objToString.call(value) == regexpTag;
- }
-
- /**
- * Checks if `value` is classified as a `String` primitive or object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isString('abc');
- * // => true
- *
- * _.isString(1);
- * // => false
- */
- function isString(value) {
- return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag);
- }
-
- /**
- * Checks if `value` is classified as a typed array.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isTypedArray(new Uint8Array);
- * // => true
- *
- * _.isTypedArray([]);
- * // => false
- */
- function isTypedArray(value) {
- return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)];
- }
-
- /**
- * Checks if `value` is `undefined`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
- * @example
- *
- * _.isUndefined(void 0);
- * // => true
- *
- * _.isUndefined(null);
- * // => false
- */
- function isUndefined(value) {
- return value === undefined;
- }
-
- /**
- * Checks if `value` is less than `other`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is less than `other`, else `false`.
- * @example
- *
- * _.lt(1, 3);
- * // => true
- *
- * _.lt(3, 3);
- * // => false
- *
- * _.lt(3, 1);
- * // => false
- */
- function lt(value, other) {
- return value < other;
- }
-
- /**
- * Checks if `value` is less than or equal to `other`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is less than or equal to `other`, else `false`.
- * @example
- *
- * _.lte(1, 3);
- * // => true
- *
- * _.lte(3, 3);
- * // => true
- *
- * _.lte(3, 1);
- * // => false
- */
- function lte(value, other) {
- return value <= other;
- }
-
- /**
- * Converts `value` to an array.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {Array} Returns the converted array.
- * @example
- *
- * (function() {
- * return _.toArray(arguments).slice(1);
- * }(1, 2, 3));
- * // => [2, 3]
- */
- function toArray(value) {
- var length = value ? getLength(value) : 0;
- if (!isLength(length)) {
- return values(value);
- }
- if (!length) {
- return [];
- }
- return arrayCopy(value);
- }
-
- /**
- * Converts `value` to a plain object flattening inherited enumerable
- * properties of `value` to own properties of the plain object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {Object} Returns the converted plain object.
- * @example
- *
- * function Foo() {
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.assign({ 'a': 1 }, new Foo);
- * // => { 'a': 1, 'b': 2 }
- *
- * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
- * // => { 'a': 1, 'b': 2, 'c': 3 }
- */
- function toPlainObject(value) {
- return baseCopy(value, keysIn(value));
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Recursively merges own enumerable properties of the source object(s), that
- * don't resolve to `undefined` into the destination object. Subsequent sources
- * overwrite property assignments of previous sources. If `customizer` is
- * provided it 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 bound to `thisArg` and invoked
- * with five arguments: (objectValue, sourceValue, key, object, source).
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @param {Function} [customizer] The function to customize assigned values.
- * @param {*} [thisArg] The `this` binding of `customizer`.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var users = {
- * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
- * };
- *
- * var ages = {
- * 'data': [{ 'age': 36 }, { 'age': 40 }]
- * };
- *
- * _.merge(users, ages);
- * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
- *
- * // using a customizer callback
- * var object = {
- * 'fruits': ['apple'],
- * 'vegetables': ['beet']
- * };
- *
- * var other = {
- * 'fruits': ['banana'],
- * 'vegetables': ['carrot']
- * };
- *
- * _.merge(object, other, function(a, b) {
- * if (_.isArray(a)) {
- * return a.concat(b);
- * }
- * });
- * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
- */
- var merge = createAssigner(baseMerge);
-
- /**
- * Assigns own enumerable properties of source object(s) to the destination
- * object. Subsequent sources overwrite property assignments of previous sources.
- * If `customizer` is provided it is invoked to produce the assigned values.
- * The `customizer` is bound to `thisArg` and invoked with five arguments:
- * (objectValue, sourceValue, key, object, source).
- *
- * **Note:** This method mutates `object` and is based on
- * [`Object.assign`](http://ecma-international.org/ecma-262/6.0/#sec-object.assign).
- *
- * @static
- * @memberOf _
- * @alias extend
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @param {Function} [customizer] The function to customize assigned values.
- * @param {*} [thisArg] The `this` binding of `customizer`.
- * @returns {Object} Returns `object`.
- * @example
- *
- * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' });
- * // => { 'user': 'fred', 'age': 40 }
- *
- * // using a customizer callback
- * var defaults = _.partialRight(_.assign, function(value, other) {
- * return _.isUndefined(value) ? other : value;
- * });
- *
- * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
- * // => { 'user': 'barney', 'age': 36 }
- */
- var assign = createAssigner(function(object, source, customizer) {
- return customizer
- ? assignWith(object, source, customizer)
- : baseAssign(object, source);
- });
-
- /**
- * Creates an object that inherits from the given `prototype` object. If a
- * `properties` object is provided its own enumerable properties are assigned
- * to the created object.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} prototype The object to inherit from.
- * @param {Object} [properties] The properties to assign to the object.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Object} Returns the new object.
- * @example
- *
- * function Shape() {
- * this.x = 0;
- * this.y = 0;
- * }
- *
- * function Circle() {
- * Shape.call(this);
- * }
- *
- * Circle.prototype = _.create(Shape.prototype, {
- * 'constructor': Circle
- * });
- *
- * var circle = new Circle;
- * circle instanceof Circle;
- * // => true
- *
- * circle instanceof Shape;
- * // => true
- */
- function create(prototype, properties, guard) {
- var result = baseCreate(prototype);
- if (guard && isIterateeCall(prototype, properties, guard)) {
- properties = undefined;
- }
- return properties ? baseAssign(result, properties) : result;
- }
-
- /**
- * Assigns own enumerable properties of source object(s) to the destination
- * object for all destination properties that resolve to `undefined`. Once a
- * property is set, additional values of the same property are ignored.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @example
- *
- * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
- * // => { 'user': 'barney', 'age': 36 }
- */
- var defaults = createDefaults(assign, assignDefaults);
-
- /**
- * This method is like `_.defaults` except that it recursively assigns
- * default properties.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @example
- *
- * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } });
- * // => { 'user': { 'name': 'barney', 'age': 36 } }
- *
- */
- var defaultsDeep = createDefaults(merge, mergeDefaults);
-
- /**
- * This method is like `_.find` except that it returns the key of the first
- * element `predicate` returns truthy for instead of the element itself.
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to search.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {string|undefined} Returns the key of the matched element, else `undefined`.
- * @example
- *
- * var users = {
- * 'barney': { 'age': 36, 'active': true },
- * 'fred': { 'age': 40, 'active': false },
- * 'pebbles': { 'age': 1, 'active': true }
- * };
- *
- * _.findKey(users, function(chr) {
- * return chr.age < 40;
- * });
- * // => 'barney' (iteration order is not guaranteed)
- *
- * // using the `_.matches` callback shorthand
- * _.findKey(users, { 'age': 1, 'active': true });
- * // => 'pebbles'
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.findKey(users, 'active', false);
- * // => 'fred'
- *
- * // using the `_.property` callback shorthand
- * _.findKey(users, 'active');
- * // => 'barney'
- */
- var findKey = createFindKey(baseForOwn);
-
- /**
- * This method is like `_.findKey` except that it iterates over elements of
- * a collection in the opposite order.
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to search.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {string|undefined} Returns the key of the matched element, else `undefined`.
- * @example
- *
- * var users = {
- * 'barney': { 'age': 36, 'active': true },
- * 'fred': { 'age': 40, 'active': false },
- * 'pebbles': { 'age': 1, 'active': true }
- * };
- *
- * _.findLastKey(users, function(chr) {
- * return chr.age < 40;
- * });
- * // => returns `pebbles` assuming `_.findKey` returns `barney`
- *
- * // using the `_.matches` callback shorthand
- * _.findLastKey(users, { 'age': 36, 'active': true });
- * // => 'barney'
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.findLastKey(users, 'active', false);
- * // => 'fred'
- *
- * // using the `_.property` callback shorthand
- * _.findLastKey(users, 'active');
- * // => 'pebbles'
- */
- var findLastKey = createFindKey(baseForOwnRight);
-
- /**
- * Iterates over own and inherited enumerable properties of an object invoking
- * `iteratee` for each property. The `iteratee` is bound to `thisArg` and invoked
- * with three arguments: (value, key, object). Iteratee functions may exit
- * iteration early by explicitly returning `false`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns `object`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.forIn(new Foo, function(value, key) {
- * console.log(key);
- * });
- * // => logs 'a', 'b', and 'c' (iteration order is not guaranteed)
- */
- var forIn = createForIn(baseFor);
-
- /**
- * This method is like `_.forIn` except that it iterates over properties of
- * `object` in the opposite order.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns `object`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.forInRight(new Foo, function(value, key) {
- * console.log(key);
- * });
- * // => logs 'c', 'b', and 'a' assuming `_.forIn ` logs 'a', 'b', and 'c'
- */
- var forInRight = createForIn(baseForRight);
-
- /**
- * Iterates over own enumerable properties of an object invoking `iteratee`
- * for each property. The `iteratee` is bound to `thisArg` and invoked with
- * three arguments: (value, key, object). Iteratee functions may exit iteration
- * early by explicitly returning `false`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns `object`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.forOwn(new Foo, function(value, key) {
- * console.log(key);
- * });
- * // => logs 'a' and 'b' (iteration order is not guaranteed)
- */
- var forOwn = createForOwn(baseForOwn);
-
- /**
- * This method is like `_.forOwn` except that it iterates over properties of
- * `object` in the opposite order.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns `object`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.forOwnRight(new Foo, function(value, key) {
- * console.log(key);
- * });
- * // => logs 'b' and 'a' assuming `_.forOwn` logs 'a' and 'b'
- */
- var forOwnRight = createForOwn(baseForOwnRight);
-
- /**
- * Creates an array of function property names from all enumerable properties,
- * own and inherited, of `object`.
- *
- * @static
- * @memberOf _
- * @alias methods
- * @category Object
- * @param {Object} object The object to inspect.
- * @returns {Array} Returns the new array of property names.
- * @example
- *
- * _.functions(_);
- * // => ['after', 'ary', 'assign', ...]
- */
- function functions(object) {
- return baseFunctions(object, keysIn(object));
- }
-
- /**
- * Gets the property value at `path` of `object`. If the resolved value is
- * `undefined` the `defaultValue` is used in its place.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to get.
- * @param {*} [defaultValue] The value returned if the resolved value is `undefined`.
- * @returns {*} Returns the resolved value.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
- *
- * _.get(object, 'a[0].b.c');
- * // => 3
- *
- * _.get(object, ['a', '0', 'b', 'c']);
- * // => 3
- *
- * _.get(object, 'a.b.c', 'default');
- * // => 'default'
- */
- function get(object, path, defaultValue) {
- var result = object == null ? undefined : baseGet(object, toPath(path), path + '');
- return result === undefined ? defaultValue : result;
- }
-
- /**
- * Checks if `path` is a direct property.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path to check.
- * @returns {boolean} Returns `true` if `path` is a direct property, else `false`.
- * @example
- *
- * var object = { 'a': { 'b': { 'c': 3 } } };
- *
- * _.has(object, 'a');
- * // => true
- *
- * _.has(object, 'a.b.c');
- * // => true
- *
- * _.has(object, ['a', 'b', 'c']);
- * // => true
- */
- function has(object, path) {
- if (object == null) {
- return false;
- }
- var result = hasOwnProperty.call(object, path);
- if (!result && !isKey(path)) {
- path = toPath(path);
- object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
- if (object == null) {
- return false;
- }
- path = last(path);
- result = hasOwnProperty.call(object, path);
- }
- return result || (isLength(object.length) && isIndex(path, object.length) &&
- (isArray(object) || isArguments(object)));
- }
-
- /**
- * Creates an object composed of the inverted keys and values of `object`.
- * If `object` contains duplicate values, subsequent values overwrite property
- * assignments of previous values unless `multiValue` is `true`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to invert.
- * @param {boolean} [multiValue] Allow multiple values per key.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Object} Returns the new inverted object.
- * @example
- *
- * var object = { 'a': 1, 'b': 2, 'c': 1 };
- *
- * _.invert(object);
- * // => { '1': 'c', '2': 'b' }
- *
- * // with `multiValue`
- * _.invert(object, true);
- * // => { '1': ['a', 'c'], '2': ['b'] }
- */
- function invert(object, multiValue, guard) {
- if (guard && isIterateeCall(object, multiValue, guard)) {
- multiValue = undefined;
- }
- var index = -1,
- props = keys(object),
- length = props.length,
- result = {};
-
- while (++index < length) {
- var key = props[index],
- value = object[key];
-
- if (multiValue) {
- if (hasOwnProperty.call(result, value)) {
- result[value].push(key);
- } else {
- result[value] = [key];
- }
- }
- else {
- result[value] = key;
- }
- }
- return result;
- }
-
- /**
- * Creates an array of the own enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects. See the
- * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
- * for more details.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keys(new Foo);
- * // => ['a', 'b'] (iteration order is not guaranteed)
- *
- * _.keys('hi');
- * // => ['0', '1']
- */
- var keys = !nativeKeys ? shimKeys : function(object) {
- var Ctor = object == null ? undefined : object.constructor;
- if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
- (typeof object != 'function' && isArrayLike(object))) {
- return shimKeys(object);
- }
- return isObject(object) ? nativeKeys(object) : [];
- };
-
- /**
- * Creates an array of the own and inherited enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keysIn(new Foo);
- * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
- */
- function keysIn(object) {
- if (object == null) {
- return [];
- }
- if (!isObject(object)) {
- object = Object(object);
- }
- var length = object.length;
- length = (length && isLength(length) &&
- (isArray(object) || isArguments(object)) && length) || 0;
-
- var Ctor = object.constructor,
- index = -1,
- isProto = typeof Ctor == 'function' && Ctor.prototype === object,
- result = Array(length),
- skipIndexes = length > 0;
-
- while (++index < length) {
- result[index] = (index + '');
- }
- for (var key in object) {
- if (!(skipIndexes && isIndex(key, length)) &&
- !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
- result.push(key);
- }
- }
- return result;
- }
-
- /**
- * The opposite of `_.mapValues`; this method creates an object with the
- * same values as `object` and keys generated by running each own enumerable
- * property of `object` through `iteratee`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns the new mapped object.
- * @example
- *
- * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
- * return key + value;
- * });
- * // => { 'a1': 1, 'b2': 2 }
- */
- var mapKeys = createObjectMapper(true);
-
- /**
- * Creates an object with the same keys as `object` and values generated by
- * running each own enumerable property of `object` through `iteratee`. The
- * iteratee function is bound to `thisArg` and invoked with three arguments:
- * (value, key, object).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns the new mapped object.
- * @example
- *
- * _.mapValues({ 'a': 1, 'b': 2 }, function(n) {
- * return n * 3;
- * });
- * // => { 'a': 3, 'b': 6 }
- *
- * var users = {
- * 'fred': { 'user': 'fred', 'age': 40 },
- * 'pebbles': { 'user': 'pebbles', 'age': 1 }
- * };
- *
- * // using the `_.property` callback shorthand
- * _.mapValues(users, 'age');
- * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
- */
- var mapValues = createObjectMapper();
-
- /**
- * The opposite of `_.pick`; this method creates an object composed of the
- * own and inherited enumerable properties of `object` that are not omitted.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The source object.
- * @param {Function|...(string|string[])} [predicate] The function invoked per
- * iteration or property names to omit, specified as individual property
- * names or arrays of property names.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Object} Returns the new object.
- * @example
- *
- * var object = { 'user': 'fred', 'age': 40 };
- *
- * _.omit(object, 'age');
- * // => { 'user': 'fred' }
- *
- * _.omit(object, _.isNumber);
- * // => { 'user': 'fred' }
- */
- var omit = restParam(function(object, props) {
- if (object == null) {
- return {};
- }
- if (typeof props[0] != 'function') {
- var props = arrayMap(baseFlatten(props), String);
- return pickByArray(object, baseDifference(keysIn(object), props));
- }
- var predicate = bindCallback(props[0], props[1], 3);
- return pickByCallback(object, function(value, key, object) {
- return !predicate(value, key, object);
- });
- });
-
- /**
- * Creates a two dimensional array of the key-value pairs for `object`,
- * e.g. `[[key1, value1], [key2, value2]]`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the new array of key-value pairs.
- * @example
- *
- * _.pairs({ 'barney': 36, 'fred': 40 });
- * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed)
- */
- function pairs(object) {
- object = toObject(object);
-
- var index = -1,
- props = keys(object),
- length = props.length,
- result = Array(length);
-
- while (++index < length) {
- var key = props[index];
- result[index] = [key, object[key]];
- }
- return result;
- }
-
- /**
- * Creates an object composed of the picked `object` properties. Property
- * names may be specified as individual arguments or as arrays of property
- * names. If `predicate` is provided it is invoked for each property of `object`
- * picking the properties `predicate` returns truthy for. The predicate is
- * bound to `thisArg` and invoked with three arguments: (value, key, object).
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The source object.
- * @param {Function|...(string|string[])} [predicate] The function invoked per
- * iteration or property names to pick, specified as individual property
- * names or arrays of property names.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Object} Returns the new object.
- * @example
- *
- * var object = { 'user': 'fred', 'age': 40 };
- *
- * _.pick(object, 'user');
- * // => { 'user': 'fred' }
- *
- * _.pick(object, _.isString);
- * // => { 'user': 'fred' }
- */
- var pick = restParam(function(object, props) {
- if (object == null) {
- return {};
- }
- return typeof props[0] == 'function'
- ? pickByCallback(object, bindCallback(props[0], props[1], 3))
- : pickByArray(object, baseFlatten(props));
- });
-
- /**
- * This method is like `_.get` except that if the resolved value is a function
- * it is invoked with the `this` binding of its parent object and its result
- * is returned.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to resolve.
- * @param {*} [defaultValue] The value returned if the resolved value is `undefined`.
- * @returns {*} Returns the resolved value.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
- *
- * _.result(object, 'a[0].b.c1');
- * // => 3
- *
- * _.result(object, 'a[0].b.c2');
- * // => 4
- *
- * _.result(object, 'a.b.c', 'default');
- * // => 'default'
- *
- * _.result(object, 'a.b.c', _.constant('default'));
- * // => 'default'
- */
- function result(object, path, defaultValue) {
- var result = object == null ? undefined : object[path];
- if (result === undefined) {
- if (object != null && !isKey(path, object)) {
- path = toPath(path);
- object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
- result = object == null ? undefined : object[last(path)];
- }
- result = result === undefined ? defaultValue : result;
- }
- return isFunction(result) ? result.call(object) : result;
- }
-
- /**
- * Sets the property value of `path` on `object`. If a portion of `path`
- * does not exist it is created.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to augment.
- * @param {Array|string} path The path of the property to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
- *
- * _.set(object, 'a[0].b.c', 4);
- * console.log(object.a[0].b.c);
- * // => 4
- *
- * _.set(object, 'x[0].y.z', 5);
- * console.log(object.x[0].y.z);
- * // => 5
- */
- function set(object, path, value) {
- if (object == null) {
- return object;
- }
- var pathKey = (path + '');
- path = (object[pathKey] != null || isKey(path, object)) ? [pathKey] : toPath(path);
-
- var index = -1,
- length = path.length,
- lastIndex = length - 1,
- nested = object;
-
- while (nested != null && ++index < length) {
- var key = path[index];
- if (isObject(nested)) {
- if (index == lastIndex) {
- nested[key] = value;
- } else if (nested[key] == null) {
- nested[key] = isIndex(path[index + 1]) ? [] : {};
- }
- }
- nested = nested[key];
- }
- return object;
- }
-
- /**
- * An alternative to `_.reduce`; this method transforms `object` to a new
- * `accumulator` object which is the result of running each of its own enumerable
- * properties through `iteratee`, with each invocation potentially mutating
- * the `accumulator` object. The `iteratee` is bound to `thisArg` and invoked
- * with four arguments: (accumulator, value, key, object). Iteratee functions
- * may exit iteration early by explicitly returning `false`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Array|Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [accumulator] The custom accumulator value.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {*} Returns the accumulated value.
- * @example
- *
- * _.transform([2, 3, 4], function(result, n) {
- * result.push(n *= n);
- * return n % 2 == 0;
- * });
- * // => [4, 9]
- *
- * _.transform({ 'a': 1, 'b': 2 }, function(result, n, key) {
- * result[key] = n * 3;
- * });
- * // => { 'a': 3, 'b': 6 }
- */
- function transform(object, iteratee, accumulator, thisArg) {
- var isArr = isArray(object) || isTypedArray(object);
- iteratee = getCallback(iteratee, thisArg, 4);
-
- if (accumulator == null) {
- if (isArr || isObject(object)) {
- var Ctor = object.constructor;
- if (isArr) {
- accumulator = isArray(object) ? new Ctor : [];
- } else {
- accumulator = baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
- }
- } else {
- accumulator = {};
- }
- }
- (isArr ? arrayEach : baseForOwn)(object, function(value, index, object) {
- return iteratee(accumulator, value, index, object);
- });
- return accumulator;
- }
-
- /**
- * Creates an array of the own enumerable property values of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property values.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.values(new Foo);
- * // => [1, 2] (iteration order is not guaranteed)
- *
- * _.values('hi');
- * // => ['h', 'i']
- */
- function values(object) {
- return baseValues(object, keys(object));
- }
-
- /**
- * Creates an array of the own and inherited enumerable property values
- * of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property values.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.valuesIn(new Foo);
- * // => [1, 2, 3] (iteration order is not guaranteed)
- */
- function valuesIn(object) {
- return baseValues(object, keysIn(object));
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Checks if `n` is between `start` and up to but not including, `end`. If
- * `end` is not specified it is set to `start` with `start` then set to `0`.
- *
- * @static
- * @memberOf _
- * @category Number
- * @param {number} n The number to check.
- * @param {number} [start=0] The start of the range.
- * @param {number} end The end of the range.
- * @returns {boolean} Returns `true` if `n` is in the range, else `false`.
- * @example
- *
- * _.inRange(3, 2, 4);
- * // => true
- *
- * _.inRange(4, 8);
- * // => true
- *
- * _.inRange(4, 2);
- * // => false
- *
- * _.inRange(2, 2);
- * // => false
- *
- * _.inRange(1.2, 2);
- * // => true
- *
- * _.inRange(5.2, 4);
- * // => false
- */
- function inRange(value, start, end) {
- start = +start || 0;
- if (end === undefined) {
- end = start;
- start = 0;
- } else {
- end = +end || 0;
- }
- return value >= nativeMin(start, end) && value < nativeMax(start, end);
- }
-
- /**
- * Produces a random number between `min` and `max` (inclusive). If only one
- * argument is provided a number between `0` and the given number is returned.
- * If `floating` is `true`, or either `min` or `max` are floats, a floating-point
- * number is returned instead of an integer.
- *
- * @static
- * @memberOf _
- * @category Number
- * @param {number} [min=0] The minimum possible value.
- * @param {number} [max=1] The maximum possible value.
- * @param {boolean} [floating] Specify returning a floating-point number.
- * @returns {number} Returns the random number.
- * @example
- *
- * _.random(0, 5);
- * // => an integer between 0 and 5
- *
- * _.random(5);
- * // => also an integer between 0 and 5
- *
- * _.random(5, true);
- * // => a floating-point number between 0 and 5
- *
- * _.random(1.2, 5.2);
- * // => a floating-point number between 1.2 and 5.2
- */
- function random(min, max, floating) {
- if (floating && isIterateeCall(min, max, floating)) {
- max = floating = undefined;
- }
- var noMin = min == null,
- noMax = max == null;
-
- if (floating == null) {
- if (noMax && typeof min == 'boolean') {
- floating = min;
- min = 1;
- }
- else if (typeof max == 'boolean') {
- floating = max;
- noMax = true;
- }
- }
- if (noMin && noMax) {
- max = 1;
- noMax = false;
- }
- min = +min || 0;
- if (noMax) {
- max = min;
- min = 0;
- } else {
- max = +max || 0;
- }
- if (floating || min % 1 || max % 1) {
- var rand = nativeRandom();
- return nativeMin(min + (rand * (max - min + parseFloat('1e-' + ((rand + '').length - 1)))), max);
- }
- return baseRandom(min, max);
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the camel cased string.
- * @example
- *
- * _.camelCase('Foo Bar');
- * // => 'fooBar'
- *
- * _.camelCase('--foo-bar');
- * // => 'fooBar'
- *
- * _.camelCase('__foo_bar__');
- * // => 'fooBar'
- */
- var camelCase = createCompounder(function(result, word, index) {
- word = word.toLowerCase();
- return result + (index ? (word.charAt(0).toUpperCase() + word.slice(1)) : word);
- });
-
- /**
- * Capitalizes the first character of `string`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to capitalize.
- * @returns {string} Returns the capitalized string.
- * @example
- *
- * _.capitalize('fred');
- * // => 'Fred'
- */
- function capitalize(string) {
- string = baseToString(string);
- return string && (string.charAt(0).toUpperCase() + string.slice(1));
- }
-
- /**
- * Deburrs `string` by converting [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
- * to basic latin letters and removing [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to deburr.
- * @returns {string} Returns the deburred string.
- * @example
- *
- * _.deburr('déjà vu');
- * // => 'deja vu'
- */
- function deburr(string) {
- string = baseToString(string);
- return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, '');
- }
-
- /**
- * Checks if `string` ends with the given target string.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to search.
- * @param {string} [target] The string to search for.
- * @param {number} [position=string.length] The position to search from.
- * @returns {boolean} Returns `true` if `string` ends with `target`, else `false`.
- * @example
- *
- * _.endsWith('abc', 'c');
- * // => true
- *
- * _.endsWith('abc', 'b');
- * // => false
- *
- * _.endsWith('abc', 'b', 2);
- * // => true
- */
- function endsWith(string, target, position) {
- string = baseToString(string);
- target = (target + '');
-
- var length = string.length;
- position = position === undefined
- ? length
- : nativeMin(position < 0 ? 0 : (+position || 0), length);
-
- position -= target.length;
- return position >= 0 && string.indexOf(target, position) == position;
- }
-
- /**
- * Converts the characters "&", "<", ">", '"', "'", and "\`", in `string` to
- * their corresponding HTML entities.
- *
- * **Note:** No other characters are escaped. To escape additional characters
- * use a third-party library like [_he_](https://mths.be/he).
- *
- * Though the ">" character is escaped for symmetry, characters like
- * ">" and "/" don't need escaping in HTML and have no special meaning
- * unless they're part of a tag or unquoted attribute value.
- * See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
- * (under "semi-related fun fact") for more details.
- *
- * Backticks are escaped because in Internet Explorer < 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.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to escape.
- * @returns {string} Returns the escaped string.
- * @example
- *
- * _.escape('fred, barney, & pebbles');
- * // => 'fred, barney, &amp; pebbles'
- */
- function escape(string) {
- // Reset `lastIndex` because in IE < 9 `String#replace` does not.
- string = baseToString(string);
- return (string && reHasUnescapedHtml.test(string))
- ? string.replace(reUnescapedHtml, escapeHtmlChar)
- : string;
- }
-
- /**
- * Escapes the `RegExp` special characters "\", "/", "^", "$", ".", "|", "?",
- * "*", "+", "(", ")", "[", "]", "{" and "}" in `string`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to escape.
- * @returns {string} Returns the escaped string.
- * @example
- *
- * _.escapeRegExp('[lodash](https://lodash.com/)');
- * // => '\[lodash\]\(https:\/\/lodash\.com\/\)'
- */
- function escapeRegExp(string) {
- string = baseToString(string);
- return (string && reHasRegExpChars.test(string))
- ? string.replace(reRegExpChars, escapeRegExpChar)
- : (string || '(?:)');
- }
-
- /**
- * Converts `string` to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the kebab cased string.
- * @example
- *
- * _.kebabCase('Foo Bar');
- * // => 'foo-bar'
- *
- * _.kebabCase('fooBar');
- * // => 'foo-bar'
- *
- * _.kebabCase('__foo_bar__');
- * // => 'foo-bar'
- */
- var kebabCase = createCompounder(function(result, word, index) {
- return result + (index ? '-' : '') + word.toLowerCase();
- });
-
- /**
- * Pads `string` on the left and right sides if it's shorter than `length`.
- * Padding characters are truncated if they can't be evenly divided by `length`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to pad.
- * @param {number} [length=0] The padding length.
- * @param {string} [chars=' '] The string used as padding.
- * @returns {string} Returns the padded string.
- * @example
- *
- * _.pad('abc', 8);
- * // => ' abc '
- *
- * _.pad('abc', 8, '_-');
- * // => '_-abc_-_'
- *
- * _.pad('abc', 3);
- * // => 'abc'
- */
- function pad(string, length, chars) {
- string = baseToString(string);
- length = +length;
-
- var strLength = string.length;
- if (strLength >= length || !nativeIsFinite(length)) {
- return string;
- }
- var mid = (length - strLength) / 2,
- leftLength = nativeFloor(mid),
- rightLength = nativeCeil(mid);
-
- chars = createPadding('', rightLength, chars);
- return chars.slice(0, leftLength) + string + chars;
- }
-
- /**
- * Pads `string` on the left side if it's shorter than `length`. Padding
- * characters are truncated if they exceed `length`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to pad.
- * @param {number} [length=0] The padding length.
- * @param {string} [chars=' '] The string used as padding.
- * @returns {string} Returns the padded string.
- * @example
- *
- * _.padLeft('abc', 6);
- * // => ' abc'
- *
- * _.padLeft('abc', 6, '_-');
- * // => '_-_abc'
- *
- * _.padLeft('abc', 3);
- * // => 'abc'
- */
- var padLeft = createPadDir();
-
- /**
- * Pads `string` on the right side if it's shorter than `length`. Padding
- * characters are truncated if they exceed `length`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to pad.
- * @param {number} [length=0] The padding length.
- * @param {string} [chars=' '] The string used as padding.
- * @returns {string} Returns the padded string.
- * @example
- *
- * _.padRight('abc', 6);
- * // => 'abc '
- *
- * _.padRight('abc', 6, '_-');
- * // => 'abc_-_'
- *
- * _.padRight('abc', 3);
- * // => 'abc'
- */
- var padRight = createPadDir(true);
-
- /**
- * Converts `string` to an integer of the specified radix. If `radix` is
- * `undefined` or `0`, a `radix` of `10` is used unless `value` is a hexadecimal,
- * in which case a `radix` of `16` is used.
- *
- * **Note:** This method aligns with the [ES5 implementation](https://es5.github.io/#E)
- * of `parseInt`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} string The string to convert.
- * @param {number} [radix] The radix to interpret `value` by.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {number} Returns the converted integer.
- * @example
- *
- * _.parseInt('08');
- * // => 8
- *
- * _.map(['6', '08', '10'], _.parseInt);
- * // => [6, 8, 10]
- */
- function parseInt(string, radix, guard) {
- // Firefox < 21 and Opera < 15 follow ES3 for `parseInt`.
- // Chrome fails to trim leading <BOM> whitespace characters.
- // See https://code.google.com/p/v8/issues/detail?id=3109 for more details.
- if (guard ? isIterateeCall(string, radix, guard) : radix == null) {
- radix = 0;
- } else if (radix) {
- radix = +radix;
- }
- string = trim(string);
- return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10));
- }
-
- /**
- * Repeats the given string `n` times.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to repeat.
- * @param {number} [n=0] The number of times to repeat the string.
- * @returns {string} Returns the repeated string.
- * @example
- *
- * _.repeat('*', 3);
- * // => '***'
- *
- * _.repeat('abc', 2);
- * // => 'abcabc'
- *
- * _.repeat('abc', 0);
- * // => ''
- */
- function repeat(string, n) {
- var result = '';
- string = baseToString(string);
- n = +n;
- if (n < 1 || !string || !nativeIsFinite(n)) {
- return result;
- }
- // Leverage the exponentiation by squaring algorithm for a faster repeat.
- // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
- do {
- if (n % 2) {
- result += string;
- }
- n = nativeFloor(n / 2);
- string += string;
- } while (n);
-
- return result;
- }
-
- /**
- * Converts `string` to [snake case](https://en.wikipedia.org/wiki/Snake_case).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the snake cased string.
- * @example
- *
- * _.snakeCase('Foo Bar');
- * // => 'foo_bar'
- *
- * _.snakeCase('fooBar');
- * // => 'foo_bar'
- *
- * _.snakeCase('--foo-bar');
- * // => 'foo_bar'
- */
- var snakeCase = createCompounder(function(result, word, index) {
- return result + (index ? '_' : '') + word.toLowerCase();
- });
-
- /**
- * Converts `string` to [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the start cased string.
- * @example
- *
- * _.startCase('--foo-bar');
- * // => 'Foo Bar'
- *
- * _.startCase('fooBar');
- * // => 'Foo Bar'
- *
- * _.startCase('__foo_bar__');
- * // => 'Foo Bar'
- */
- var startCase = createCompounder(function(result, word, index) {
- return result + (index ? ' ' : '') + (word.charAt(0).toUpperCase() + word.slice(1));
- });
-
- /**
- * Checks if `string` starts with the given target string.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to search.
- * @param {string} [target] The string to search for.
- * @param {number} [position=0] The position to search from.
- * @returns {boolean} Returns `true` if `string` starts with `target`, else `false`.
- * @example
- *
- * _.startsWith('abc', 'a');
- * // => true
- *
- * _.startsWith('abc', 'b');
- * // => false
- *
- * _.startsWith('abc', 'b', 1);
- * // => true
- */
- function startsWith(string, target, position) {
- string = baseToString(string);
- position = position == null
- ? 0
- : nativeMin(position < 0 ? 0 : (+position || 0), string.length);
-
- return string.lastIndexOf(target, position) == position;
- }
-
- /**
- * Creates a compiled template function that can interpolate data properties
- * in "interpolate" delimiters, HTML-escape interpolated data properties in
- * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
- * properties may be accessed as free variables in the template. If a setting
- * object is provided it takes precedence over `_.templateSettings` values.
- *
- * **Note:** In the development build `_.template` utilizes
- * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
- * for easier debugging.
- *
- * For more information on precompiling templates see
- * [lodash's custom builds documentation](https://lodash.com/custom-builds).
- *
- * For more information on Chrome extension sandboxes see
- * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The template string.
- * @param {Object} [options] The options object.
- * @param {RegExp} [options.escape] The HTML "escape" delimiter.
- * @param {RegExp} [options.evaluate] The "evaluate" delimiter.
- * @param {Object} [options.imports] An object to import into the template as free variables.
- * @param {RegExp} [options.interpolate] The "interpolate" delimiter.
- * @param {string} [options.sourceURL] The sourceURL of the template's compiled source.
- * @param {string} [options.variable] The data object variable name.
- * @param- {Object} [otherOptions] Enables the legacy `options` param signature.
- * @returns {Function} Returns the compiled template function.
- * @example
- *
- * // using the "interpolate" delimiter to create a compiled template
- * var compiled = _.template('hello <%= user %>!');
- * compiled({ 'user': 'fred' });
- * // => 'hello fred!'
- *
- * // using the HTML "escape" delimiter to escape data property values
- * var compiled = _.template('<b><%- value %></b>');
- * compiled({ 'value': '<script>' });
- * // => '<b>&lt;script&gt;</b>'
- *
- * // using the "evaluate" delimiter to execute JavaScript and generate HTML
- * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
- * compiled({ 'users': ['fred', 'barney'] });
- * // => '<li>fred</li><li>barney</li>'
- *
- * // using the internal `print` function in "evaluate" delimiters
- * var compiled = _.template('<% print("hello " + user); %>!');
- * compiled({ 'user': 'barney' });
- * // => 'hello barney!'
- *
- * // using the ES delimiter as an alternative to the default "interpolate" delimiter
- * var compiled = _.template('hello ${ user }!');
- * compiled({ 'user': 'pebbles' });
- * // => 'hello pebbles!'
- *
- * // using custom template delimiters
- * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
- * var compiled = _.template('hello {{ user }}!');
- * compiled({ 'user': 'mustache' });
- * // => 'hello mustache!'
- *
- * // using backslashes to treat delimiters as plain text
- * var compiled = _.template('<%= "\\<%- value %\\>" %>');
- * compiled({ 'value': 'ignored' });
- * // => '<%- value %>'
- *
- * // using the `imports` option to import `jQuery` as `jq`
- * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
- * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
- * compiled({ 'users': ['fred', 'barney'] });
- * // => '<li>fred</li><li>barney</li>'
- *
- * // using the `sourceURL` option to specify a custom sourceURL for the template
- * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
- * compiled(data);
- * // => find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector
- *
- * // using the `variable` option to ensure a with-statement isn't used in the compiled template
- * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
- * compiled.source;
- * // => function(data) {
- * // var __t, __p = '';
- * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
- * // return __p;
- * // }
- *
- * // using the `source` property to inline compiled templates for meaningful
- * // line numbers in error messages and a stack trace
- * fs.writeFileSync(path.join(cwd, 'jst.js'), '\
- * var JST = {\
- * "main": ' + _.template(mainText).source + '\
- * };\
- * ');
- */
- function template(string, options, otherOptions) {
- // Based on John Resig's `tmpl` implementation (http://ejohn.org/blog/javascript-micro-templating/)
- // and Laura Doktorova's doT.js (https://github.com/olado/doT).
- var settings = lodash.templateSettings;
-
- if (otherOptions && isIterateeCall(string, options, otherOptions)) {
- options = otherOptions = undefined;
- }
- string = baseToString(string);
- options = assignWith(baseAssign({}, otherOptions || options), settings, assignOwnDefaults);
-
- var imports = assignWith(baseAssign({}, options.imports), settings.imports, assignOwnDefaults),
- importsKeys = keys(imports),
- importsValues = baseValues(imports, importsKeys);
-
- var isEscaping,
- isEvaluating,
- index = 0,
- interpolate = options.interpolate || reNoMatch,
- source = "__p += '";
-
- // Compile the regexp to match each delimiter.
- var reDelimiters = RegExp(
- (options.escape || reNoMatch).source + '|' +
- interpolate.source + '|' +
- (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
- (options.evaluate || reNoMatch).source + '|$'
- , 'g');
-
- // Use a sourceURL for easier debugging.
- var sourceURL = '//# sourceURL=' +
- ('sourceURL' in options
- ? options.sourceURL
- : ('lodash.templateSources[' + (++templateCounter) + ']')
- ) + '\n';
-
- string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
- interpolateValue || (interpolateValue = esTemplateValue);
-
- // Escape characters that can't be included in string literals.
- source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
-
- // Replace delimiters with snippets.
- if (escapeValue) {
- isEscaping = true;
- source += "' +\n__e(" + escapeValue + ") +\n'";
- }
- if (evaluateValue) {
- isEvaluating = true;
- source += "';\n" + evaluateValue + ";\n__p += '";
- }
- if (interpolateValue) {
- source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
- }
- index = offset + match.length;
-
- // The JS engine embedded in Adobe products requires returning the `match`
- // string in order to produce the correct `offset` value.
- return match;
- });
-
- source += "';\n";
-
- // If `variable` is not specified wrap a with-statement around the generated
- // code to add the data object to the top of the scope chain.
- var variable = options.variable;
- if (!variable) {
- source = 'with (obj) {\n' + source + '\n}\n';
- }
- // Cleanup code by stripping empty strings.
- source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
- .replace(reEmptyStringMiddle, '$1')
- .replace(reEmptyStringTrailing, '$1;');
-
- // Frame code as the function body.
- source = 'function(' + (variable || 'obj') + ') {\n' +
- (variable
- ? ''
- : 'obj || (obj = {});\n'
- ) +
- "var __t, __p = ''" +
- (isEscaping
- ? ', __e = _.escape'
- : ''
- ) +
- (isEvaluating
- ? ', __j = Array.prototype.join;\n' +
- "function print() { __p += __j.call(arguments, '') }\n"
- : ';\n'
- ) +
- source +
- 'return __p\n}';
-
- var result = attempt(function() {
- return Function(importsKeys, sourceURL + 'return ' + source).apply(undefined, importsValues);
- });
-
- // Provide the compiled function's source by its `toString` method or
- // the `source` property as a convenience for inlining compiled templates.
- result.source = source;
- if (isError(result)) {
- throw result;
- }
- return result;
- }
-
- /**
- * Removes leading and trailing whitespace or specified characters from `string`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to trim.
- * @param {string} [chars=whitespace] The characters to trim.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {string} Returns the trimmed string.
- * @example
- *
- * _.trim(' abc ');
- * // => 'abc'
- *
- * _.trim('-_-abc-_-', '_-');
- * // => 'abc'
- *
- * _.map([' foo ', ' bar '], _.trim);
- * // => ['foo', 'bar']
- */
- function trim(string, chars, guard) {
- var value = string;
- string = baseToString(string);
- if (!string) {
- return string;
- }
- if (guard ? isIterateeCall(value, chars, guard) : chars == null) {
- return string.slice(trimmedLeftIndex(string), trimmedRightIndex(string) + 1);
- }
- chars = (chars + '');
- return string.slice(charsLeftIndex(string, chars), charsRightIndex(string, chars) + 1);
- }
-
- /**
- * Removes leading whitespace or specified characters from `string`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to trim.
- * @param {string} [chars=whitespace] The characters to trim.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {string} Returns the trimmed string.
- * @example
- *
- * _.trimLeft(' abc ');
- * // => 'abc '
- *
- * _.trimLeft('-_-abc-_-', '_-');
- * // => 'abc-_-'
- */
- function trimLeft(string, chars, guard) {
- var value = string;
- string = baseToString(string);
- if (!string) {
- return string;
- }
- if (guard ? isIterateeCall(value, chars, guard) : chars == null) {
- return string.slice(trimmedLeftIndex(string));
- }
- return string.slice(charsLeftIndex(string, (chars + '')));
- }
-
- /**
- * Removes trailing whitespace or specified characters from `string`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to trim.
- * @param {string} [chars=whitespace] The characters to trim.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {string} Returns the trimmed string.
- * @example
- *
- * _.trimRight(' abc ');
- * // => ' abc'
- *
- * _.trimRight('-_-abc-_-', '_-');
- * // => '-_-abc'
- */
- function trimRight(string, chars, guard) {
- var value = string;
- string = baseToString(string);
- if (!string) {
- return string;
- }
- if (guard ? isIterateeCall(value, chars, guard) : chars == null) {
- return string.slice(0, trimmedRightIndex(string) + 1);
- }
- return string.slice(0, charsRightIndex(string, (chars + '')) + 1);
- }
-
- /**
- * Truncates `string` if it's longer than the given maximum string length.
- * The last characters of the truncated string are replaced with the omission
- * string which defaults to "...".
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to truncate.
- * @param {Object|number} [options] The options object or maximum string length.
- * @param {number} [options.length=30] The maximum string length.
- * @param {string} [options.omission='...'] The string to indicate text is omitted.
- * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {string} Returns the truncated string.
- * @example
- *
- * _.trunc('hi-diddly-ho there, neighborino');
- * // => 'hi-diddly-ho there, neighbo...'
- *
- * _.trunc('hi-diddly-ho there, neighborino', 24);
- * // => 'hi-diddly-ho there, n...'
- *
- * _.trunc('hi-diddly-ho there, neighborino', {
- * 'length': 24,
- * 'separator': ' '
- * });
- * // => 'hi-diddly-ho there,...'
- *
- * _.trunc('hi-diddly-ho there, neighborino', {
- * 'length': 24,
- * 'separator': /,? +/
- * });
- * // => 'hi-diddly-ho there...'
- *
- * _.trunc('hi-diddly-ho there, neighborino', {
- * 'omission': ' [...]'
- * });
- * // => 'hi-diddly-ho there, neig [...]'
- */
- function trunc(string, options, guard) {
- if (guard && isIterateeCall(string, options, guard)) {
- options = undefined;
- }
- var length = DEFAULT_TRUNC_LENGTH,
- omission = DEFAULT_TRUNC_OMISSION;
-
- if (options != null) {
- if (isObject(options)) {
- var separator = 'separator' in options ? options.separator : separator;
- length = 'length' in options ? (+options.length || 0) : length;
- omission = 'omission' in options ? baseToString(options.omission) : omission;
- } else {
- length = +options || 0;
- }
- }
- string = baseToString(string);
- if (length >= string.length) {
- return string;
- }
- var end = length - omission.length;
- if (end < 1) {
- return omission;
- }
- var result = string.slice(0, end);
- if (separator == null) {
- return result + omission;
- }
- if (isRegExp(separator)) {
- if (string.slice(end).search(separator)) {
- var match,
- newEnd,
- substring = string.slice(0, end);
-
- if (!separator.global) {
- separator = RegExp(separator.source, (reFlags.exec(separator) || '') + 'g');
- }
- separator.lastIndex = 0;
- while ((match = separator.exec(substring))) {
- newEnd = match.index;
- }
- result = result.slice(0, newEnd == null ? end : newEnd);
- }
- } else if (string.indexOf(separator, end) != end) {
- var index = result.lastIndexOf(separator);
- if (index > -1) {
- result = result.slice(0, index);
- }
- }
- return result + omission;
- }
-
- /**
- * The inverse of `_.escape`; this method converts the HTML entities
- * `&amp;`, `&lt;`, `&gt;`, `&quot;`, `&#39;`, and `&#96;` in `string` to their
- * corresponding characters.
- *
- * **Note:** No other HTML entities are unescaped. To unescape additional HTML
- * entities use a third-party library like [_he_](https://mths.be/he).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to unescape.
- * @returns {string} Returns the unescaped string.
- * @example
- *
- * _.unescape('fred, barney, &amp; pebbles');
- * // => 'fred, barney, & pebbles'
- */
- function unescape(string) {
- string = baseToString(string);
- return (string && reHasEscapedHtml.test(string))
- ? string.replace(reEscapedHtml, unescapeHtmlChar)
- : string;
- }
-
- /**
- * Splits `string` into an array of its words.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to inspect.
- * @param {RegExp|string} [pattern] The pattern to match words.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Array} Returns the words of `string`.
- * @example
- *
- * _.words('fred, barney, & pebbles');
- * // => ['fred', 'barney', 'pebbles']
- *
- * _.words('fred, barney, & pebbles', /[^, ]+/g);
- * // => ['fred', 'barney', '&', 'pebbles']
- */
- function words(string, pattern, guard) {
- if (guard && isIterateeCall(string, pattern, guard)) {
- pattern = undefined;
- }
- string = baseToString(string);
- return string.match(pattern || reWords) || [];
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Attempts to invoke `func`, returning either the result or the caught error
- * object. Any additional arguments are provided to `func` when it is invoked.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Function} func The function to attempt.
- * @returns {*} Returns the `func` result or error object.
- * @example
- *
- * // avoid throwing errors for invalid selectors
- * var elements = _.attempt(function(selector) {
- * return document.querySelectorAll(selector);
- * }, '>_>');
- *
- * if (_.isError(elements)) {
- * elements = [];
- * }
- */
- var attempt = restParam(function(func, args) {
- try {
- return func.apply(undefined, args);
- } catch(e) {
- return isError(e) ? e : new Error(e);
- }
- });
-
- /**
- * Creates a function that invokes `func` with the `this` binding of `thisArg`
- * and arguments of the created function. If `func` is a property name the
- * created callback returns the property value for a given element. If `func`
- * is an object the created callback returns `true` for elements that contain
- * the equivalent object properties, otherwise it returns `false`.
- *
- * @static
- * @memberOf _
- * @alias iteratee
- * @category Utility
- * @param {*} [func=_.identity] The value to convert to a callback.
- * @param {*} [thisArg] The `this` binding of `func`.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Function} Returns the callback.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 }
- * ];
- *
- * // wrap to create custom callback shorthands
- * _.callback = _.wrap(_.callback, function(callback, func, thisArg) {
- * var match = /^(.+?)__([gl]t)(.+)$/.exec(func);
- * if (!match) {
- * return callback(func, thisArg);
- * }
- * return function(object) {
- * return match[2] == 'gt'
- * ? object[match[1]] > match[3]
- * : object[match[1]] < match[3];
- * };
- * });
- *
- * _.filter(users, 'age__gt36');
- * // => [{ 'user': 'fred', 'age': 40 }]
- */
- function callback(func, thisArg, guard) {
- if (guard && isIterateeCall(func, thisArg, guard)) {
- thisArg = undefined;
- }
- return isObjectLike(func)
- ? matches(func)
- : baseCallback(func, thisArg);
- }
-
- /**
- * Creates a function that returns `value`.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {*} value The value to return from the new function.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var object = { 'user': 'fred' };
- * var getter = _.constant(object);
- *
- * getter() === object;
- * // => true
- */
- function constant(value) {
- return function() {
- return value;
- };
- }
-
- /**
- * This method returns the first argument provided to it.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {*} value Any value.
- * @returns {*} Returns `value`.
- * @example
- *
- * var object = { 'user': 'fred' };
- *
- * _.identity(object) === object;
- * // => true
- */
- function identity(value) {
- return value;
- }
-
- /**
- * Creates a function that performs a deep comparison between a given object
- * and `source`, returning `true` if the given object has equivalent property
- * values, else `false`.
- *
- * **Note:** This method supports comparing arrays, booleans, `Date` objects,
- * numbers, `Object` objects, regexes, and strings. Objects are compared by
- * their own, not inherited, enumerable properties. For comparing a single
- * own or inherited property value see `_.matchesProperty`.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Object} source The object of property values to match.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false }
- * ];
- *
- * _.filter(users, _.matches({ 'age': 40, 'active': false }));
- * // => [{ 'user': 'fred', 'age': 40, 'active': false }]
- */
- function matches(source) {
- return baseMatches(baseClone(source, true));
- }
-
- /**
- * Creates a function that compares the property value of `path` on a given
- * object to `value`.
- *
- * **Note:** This method supports comparing arrays, booleans, `Date` objects,
- * numbers, `Object` objects, regexes, and strings. Objects are compared by
- * their own, not inherited, enumerable properties.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Array|string} path The path of the property to get.
- * @param {*} srcValue The value to match.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var users = [
- * { 'user': 'barney' },
- * { 'user': 'fred' }
- * ];
- *
- * _.find(users, _.matchesProperty('user', 'fred'));
- * // => { 'user': 'fred' }
- */
- function matchesProperty(path, srcValue) {
- return baseMatchesProperty(path, baseClone(srcValue, true));
- }
-
- /**
- * Creates a function that invokes the method at `path` on a given object.
- * Any additional arguments are provided to the invoked method.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Array|string} path The path of the method to invoke.
- * @param {...*} [args] The arguments to invoke the method with.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var objects = [
- * { 'a': { 'b': { 'c': _.constant(2) } } },
- * { 'a': { 'b': { 'c': _.constant(1) } } }
- * ];
- *
- * _.map(objects, _.method('a.b.c'));
- * // => [2, 1]
- *
- * _.invoke(_.sortBy(objects, _.method(['a', 'b', 'c'])), 'a.b.c');
- * // => [1, 2]
- */
- var method = restParam(function(path, args) {
- return function(object) {
- return invokePath(object, path, args);
- };
- });
-
- /**
- * The opposite of `_.method`; this method creates a function that invokes
- * the method at a given path on `object`. Any additional arguments are
- * provided to the invoked method.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Object} object The object to query.
- * @param {...*} [args] The arguments to invoke the method with.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var array = _.times(3, _.constant),
- * object = { 'a': array, 'b': array, 'c': array };
- *
- * _.map(['a[2]', 'c[0]'], _.methodOf(object));
- * // => [2, 0]
- *
- * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
- * // => [2, 0]
- */
- var methodOf = restParam(function(object, args) {
- return function(path) {
- return invokePath(object, path, args);
- };
- });
-
- /**
- * Adds all own enumerable function properties of a source object to the
- * destination object. If `object` is a function then methods are added to
- * its prototype as well.
- *
- * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
- * avoid conflicts caused by modifying the original.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Function|Object} [object=lodash] The destination object.
- * @param {Object} source The object of functions to add.
- * @param {Object} [options] The options object.
- * @param {boolean} [options.chain=true] Specify whether the functions added
- * are chainable.
- * @returns {Function|Object} Returns `object`.
- * @example
- *
- * function vowels(string) {
- * return _.filter(string, function(v) {
- * return /[aeiou]/i.test(v);
- * });
- * }
- *
- * _.mixin({ 'vowels': vowels });
- * _.vowels('fred');
- * // => ['e']
- *
- * _('fred').vowels().value();
- * // => ['e']
- *
- * _.mixin({ 'vowels': vowels }, { 'chain': false });
- * _('fred').vowels();
- * // => ['e']
- */
- function mixin(object, source, options) {
- if (options == null) {
- var isObj = isObject(source),
- props = isObj ? keys(source) : undefined,
- methodNames = (props && props.length) ? baseFunctions(source, props) : undefined;
-
- if (!(methodNames ? methodNames.length : isObj)) {
- methodNames = false;
- options = source;
- source = object;
- object = this;
- }
- }
- if (!methodNames) {
- methodNames = baseFunctions(source, keys(source));
- }
- var chain = true,
- index = -1,
- isFunc = isFunction(object),
- length = methodNames.length;
-
- if (options === false) {
- chain = false;
- } else if (isObject(options) && 'chain' in options) {
- chain = options.chain;
- }
- while (++index < length) {
- var methodName = methodNames[index],
- func = source[methodName];
-
- object[methodName] = func;
- if (isFunc) {
- object.prototype[methodName] = (function(func) {
- return function() {
- var chainAll = this.__chain__;
- if (chain || chainAll) {
- var result = object(this.__wrapped__),
- actions = result.__actions__ = arrayCopy(this.__actions__);
-
- actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
- result.__chain__ = chainAll;
- return result;
- }
- return func.apply(object, arrayPush([this.value()], arguments));
- };
- }(func));
- }
- }
- return object;
- }
-
- /**
- * Reverts the `_` variable to its previous value and returns a reference to
- * the `lodash` function.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @returns {Function} Returns the `lodash` function.
- * @example
- *
- * var lodash = _.noConflict();
- */
- function noConflict() {
- root._ = oldDash;
- return this;
- }
-
- /**
- * A no-operation function that returns `undefined` regardless of the
- * arguments it receives.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @example
- *
- * var object = { 'user': 'fred' };
- *
- * _.noop(object) === undefined;
- * // => true
- */
- function noop() {
- // No operation performed.
- }
-
- /**
- * Creates a function that returns the property value at `path` on a
- * given object.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Array|string} path The path of the property to get.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var objects = [
- * { 'a': { 'b': { 'c': 2 } } },
- * { 'a': { 'b': { 'c': 1 } } }
- * ];
- *
- * _.map(objects, _.property('a.b.c'));
- * // => [2, 1]
- *
- * _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c');
- * // => [1, 2]
- */
- function property(path) {
- return isKey(path) ? baseProperty(path) : basePropertyDeep(path);
- }
-
- /**
- * The opposite of `_.property`; this method creates a function that returns
- * the property value at a given path on `object`.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Object} object The object to query.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var array = [0, 1, 2],
- * object = { 'a': array, 'b': array, 'c': array };
- *
- * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
- * // => [2, 0]
- *
- * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
- * // => [2, 0]
- */
- function propertyOf(object) {
- return function(path) {
- return baseGet(object, toPath(path), path + '');
- };
- }
-
- /**
- * Creates an array of numbers (positive and/or negative) progressing from
- * `start` up to, but not including, `end`. If `end` is not specified it is
- * set to `start` with `start` then set to `0`. If `end` is less than `start`
- * a zero-length range is created unless a negative `step` is specified.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {number} [start=0] The start of the range.
- * @param {number} end The end of the range.
- * @param {number} [step=1] The value to increment or decrement by.
- * @returns {Array} Returns the new array of numbers.
- * @example
- *
- * _.range(4);
- * // => [0, 1, 2, 3]
- *
- * _.range(1, 5);
- * // => [1, 2, 3, 4]
- *
- * _.range(0, 20, 5);
- * // => [0, 5, 10, 15]
- *
- * _.range(0, -4, -1);
- * // => [0, -1, -2, -3]
- *
- * _.range(1, 4, 0);
- * // => [1, 1, 1]
- *
- * _.range(0);
- * // => []
- */
- function range(start, end, step) {
- if (step && isIterateeCall(start, end, step)) {
- end = step = undefined;
- }
- start = +start || 0;
- step = step == null ? 1 : (+step || 0);
-
- if (end == null) {
- end = start;
- start = 0;
- } else {
- end = +end || 0;
- }
- // Use `Array(length)` so engines like Chakra and V8 avoid slower modes.
- // See https://youtu.be/XAqIpGU8ZZk#t=17m25s for more details.
- var index = -1,
- length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
- result = Array(length);
-
- while (++index < length) {
- result[index] = start;
- start += step;
- }
- return result;
- }
-
- /**
- * Invokes the iteratee function `n` times, returning an array of the results
- * of each invocation. The `iteratee` is bound to `thisArg` and invoked with
- * one argument; (index).
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {number} n The number of times to invoke `iteratee`.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Array} Returns the array of results.
- * @example
- *
- * var diceRolls = _.times(3, _.partial(_.random, 1, 6, false));
- * // => [3, 6, 4]
- *
- * _.times(3, function(n) {
- * mage.castSpell(n);
- * });
- * // => invokes `mage.castSpell(n)` three times with `n` of `0`, `1`, and `2`
- *
- * _.times(3, function(n) {
- * this.cast(n);
- * }, mage);
- * // => also invokes `mage.castSpell(n)` three times
- */
- function times(n, iteratee, thisArg) {
- n = nativeFloor(n);
-
- // Exit early to avoid a JSC JIT bug in Safari 8
- // where `Array(0)` is treated as `Array(1)`.
- if (n < 1 || !nativeIsFinite(n)) {
- return [];
- }
- var index = -1,
- result = Array(nativeMin(n, MAX_ARRAY_LENGTH));
-
- iteratee = bindCallback(iteratee, thisArg, 1);
- while (++index < n) {
- if (index < MAX_ARRAY_LENGTH) {
- result[index] = iteratee(index);
- } else {
- iteratee(index);
- }
- }
- return result;
- }
-
- /**
- * Generates a unique ID. If `prefix` is provided the ID is appended to it.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {string} [prefix] The value to prefix the ID with.
- * @returns {string} Returns the unique ID.
- * @example
- *
- * _.uniqueId('contact_');
- * // => 'contact_104'
- *
- * _.uniqueId();
- * // => '105'
- */
- function uniqueId(prefix) {
- var id = ++idCounter;
- return baseToString(prefix) + id;
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Adds two numbers.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {number} augend The first number to add.
- * @param {number} addend The second number to add.
- * @returns {number} Returns the sum.
- * @example
- *
- * _.add(6, 4);
- * // => 10
- */
- function add(augend, addend) {
- return (+augend || 0) + (+addend || 0);
- }
-
- /**
- * Calculates `n` rounded up to `precision`.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {number} n The number to round up.
- * @param {number} [precision=0] The precision to round up to.
- * @returns {number} Returns the rounded up number.
- * @example
- *
- * _.ceil(4.006);
- * // => 5
- *
- * _.ceil(6.004, 2);
- * // => 6.01
- *
- * _.ceil(6040, -2);
- * // => 6100
- */
- var ceil = createRound('ceil');
-
- /**
- * Calculates `n` rounded down to `precision`.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {number} n The number to round down.
- * @param {number} [precision=0] The precision to round down to.
- * @returns {number} Returns the rounded down number.
- * @example
- *
- * _.floor(4.006);
- * // => 4
- *
- * _.floor(0.046, 2);
- * // => 0.04
- *
- * _.floor(4060, -2);
- * // => 4000
- */
- var floor = createRound('floor');
-
- /**
- * Gets the maximum value of `collection`. If `collection` is empty or falsey
- * `-Infinity` is returned. If an iteratee function is provided it is invoked
- * for each value in `collection` to generate the criterion by which the value
- * is ranked. The `iteratee` is bound to `thisArg` and invoked with three
- * arguments: (value, index, collection).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {*} Returns the maximum value.
- * @example
- *
- * _.max([4, 2, 8, 6]);
- * // => 8
- *
- * _.max([]);
- * // => -Infinity
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 }
- * ];
- *
- * _.max(users, function(chr) {
- * return chr.age;
- * });
- * // => { 'user': 'fred', 'age': 40 }
- *
- * // using the `_.property` callback shorthand
- * _.max(users, 'age');
- * // => { 'user': 'fred', 'age': 40 }
- */
- var max = createExtremum(gt, NEGATIVE_INFINITY);
-
- /**
- * Gets the minimum value of `collection`. If `collection` is empty or falsey
- * `Infinity` is returned. If an iteratee function is provided it is invoked
- * for each value in `collection` to generate the criterion by which the value
- * is ranked. The `iteratee` is bound to `thisArg` and invoked with three
- * arguments: (value, index, collection).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {*} Returns the minimum value.
- * @example
- *
- * _.min([4, 2, 8, 6]);
- * // => 2
- *
- * _.min([]);
- * // => Infinity
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 }
- * ];
- *
- * _.min(users, function(chr) {
- * return chr.age;
- * });
- * // => { 'user': 'barney', 'age': 36 }
- *
- * // using the `_.property` callback shorthand
- * _.min(users, 'age');
- * // => { 'user': 'barney', 'age': 36 }
- */
- var min = createExtremum(lt, POSITIVE_INFINITY);
-
- /**
- * Calculates `n` rounded to `precision`.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {number} n The number to round.
- * @param {number} [precision=0] The precision to round to.
- * @returns {number} Returns the rounded number.
- * @example
- *
- * _.round(4.006);
- * // => 4
- *
- * _.round(4.006, 2);
- * // => 4.01
- *
- * _.round(4060, -2);
- * // => 4100
- */
- var round = createRound('round');
-
- /**
- * Gets the sum of the values in `collection`.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {number} Returns the sum.
- * @example
- *
- * _.sum([4, 6]);
- * // => 10
- *
- * _.sum({ 'a': 4, 'b': 6 });
- * // => 10
- *
- * var objects = [
- * { 'n': 4 },
- * { 'n': 6 }
- * ];
- *
- * _.sum(objects, function(object) {
- * return object.n;
- * });
- * // => 10
- *
- * // using the `_.property` callback shorthand
- * _.sum(objects, 'n');
- * // => 10
- */
- function sum(collection, iteratee, thisArg) {
- if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
- iteratee = undefined;
- }
- iteratee = getCallback(iteratee, thisArg, 3);
- return iteratee.length == 1
- ? arraySum(isArray(collection) ? collection : toIterable(collection), iteratee)
- : baseSum(collection, iteratee);
- }
-
- /*------------------------------------------------------------------------*/
-
- // Ensure wrappers are instances of `baseLodash`.
- lodash.prototype = baseLodash.prototype;
-
- LodashWrapper.prototype = baseCreate(baseLodash.prototype);
- LodashWrapper.prototype.constructor = LodashWrapper;
-
- LazyWrapper.prototype = baseCreate(baseLodash.prototype);
- LazyWrapper.prototype.constructor = LazyWrapper;
-
- // Add functions to the `Map` cache.
- MapCache.prototype['delete'] = mapDelete;
- MapCache.prototype.get = mapGet;
- MapCache.prototype.has = mapHas;
- MapCache.prototype.set = mapSet;
-
- // Add functions to the `Set` cache.
- SetCache.prototype.push = cachePush;
-
- // Assign cache to `_.memoize`.
- memoize.Cache = MapCache;
-
- // Add functions that return wrapped values when chaining.
- lodash.after = after;
- lodash.ary = ary;
- lodash.assign = assign;
- lodash.at = at;
- lodash.before = before;
- lodash.bind = bind;
- lodash.bindAll = bindAll;
- lodash.bindKey = bindKey;
- lodash.callback = callback;
- lodash.chain = chain;
- lodash.chunk = chunk;
- lodash.compact = compact;
- lodash.constant = constant;
- lodash.countBy = countBy;
- lodash.create = create;
- lodash.curry = curry;
- lodash.curryRight = curryRight;
- lodash.debounce = debounce;
- lodash.defaults = defaults;
- lodash.defaultsDeep = defaultsDeep;
- lodash.defer = defer;
- lodash.delay = delay;
- lodash.difference = difference;
- lodash.drop = drop;
- lodash.dropRight = dropRight;
- lodash.dropRightWhile = dropRightWhile;
- lodash.dropWhile = dropWhile;
- lodash.fill = fill;
- lodash.filter = filter;
- lodash.flatten = flatten;
- lodash.flattenDeep = flattenDeep;
- lodash.flow = flow;
- lodash.flowRight = flowRight;
- lodash.forEach = forEach;
- lodash.forEachRight = forEachRight;
- lodash.forIn = forIn;
- lodash.forInRight = forInRight;
- lodash.forOwn = forOwn;
- lodash.forOwnRight = forOwnRight;
- lodash.functions = functions;
- lodash.groupBy = groupBy;
- lodash.indexBy = indexBy;
- lodash.initial = initial;
- lodash.intersection = intersection;
- lodash.invert = invert;
- lodash.invoke = invoke;
- lodash.keys = keys;
- lodash.keysIn = keysIn;
- lodash.map = map;
- lodash.mapKeys = mapKeys;
- lodash.mapValues = mapValues;
- lodash.matches = matches;
- lodash.matchesProperty = matchesProperty;
- lodash.memoize = memoize;
- lodash.merge = merge;
- lodash.method = method;
- lodash.methodOf = methodOf;
- lodash.mixin = mixin;
- lodash.modArgs = modArgs;
- lodash.negate = negate;
- lodash.omit = omit;
- lodash.once = once;
- lodash.pairs = pairs;
- lodash.partial = partial;
- lodash.partialRight = partialRight;
- lodash.partition = partition;
- lodash.pick = pick;
- lodash.pluck = pluck;
- lodash.property = property;
- lodash.propertyOf = propertyOf;
- lodash.pull = pull;
- lodash.pullAt = pullAt;
- lodash.range = range;
- lodash.rearg = rearg;
- lodash.reject = reject;
- lodash.remove = remove;
- lodash.rest = rest;
- lodash.restParam = restParam;
- lodash.set = set;
- lodash.shuffle = shuffle;
- lodash.slice = slice;
- lodash.sortBy = sortBy;
- lodash.sortByAll = sortByAll;
- lodash.sortByOrder = sortByOrder;
- lodash.spread = spread;
- lodash.take = take;
- lodash.takeRight = takeRight;
- lodash.takeRightWhile = takeRightWhile;
- lodash.takeWhile = takeWhile;
- lodash.tap = tap;
- lodash.throttle = throttle;
- lodash.thru = thru;
- lodash.times = times;
- lodash.toArray = toArray;
- lodash.toPlainObject = toPlainObject;
- lodash.transform = transform;
- lodash.union = union;
- lodash.uniq = uniq;
- lodash.unzip = unzip;
- lodash.unzipWith = unzipWith;
- lodash.values = values;
- lodash.valuesIn = valuesIn;
- lodash.where = where;
- lodash.without = without;
- lodash.wrap = wrap;
- lodash.xor = xor;
- lodash.zip = zip;
- lodash.zipObject = zipObject;
- lodash.zipWith = zipWith;
-
- // Add aliases.
- lodash.backflow = flowRight;
- lodash.collect = map;
- lodash.compose = flowRight;
- lodash.each = forEach;
- lodash.eachRight = forEachRight;
- lodash.extend = assign;
- lodash.iteratee = callback;
- lodash.methods = functions;
- lodash.object = zipObject;
- lodash.select = filter;
- lodash.tail = rest;
- lodash.unique = uniq;
-
- // Add functions to `lodash.prototype`.
- mixin(lodash, lodash);
-
- /*------------------------------------------------------------------------*/
-
- // Add functions that return unwrapped values when chaining.
- lodash.add = add;
- lodash.attempt = attempt;
- lodash.camelCase = camelCase;
- lodash.capitalize = capitalize;
- lodash.ceil = ceil;
- lodash.clone = clone;
- lodash.cloneDeep = cloneDeep;
- lodash.deburr = deburr;
- lodash.endsWith = endsWith;
- lodash.escape = escape;
- lodash.escapeRegExp = escapeRegExp;
- lodash.every = every;
- lodash.find = find;
- lodash.findIndex = findIndex;
- lodash.findKey = findKey;
- lodash.findLast = findLast;
- lodash.findLastIndex = findLastIndex;
- lodash.findLastKey = findLastKey;
- lodash.findWhere = findWhere;
- lodash.first = first;
- lodash.floor = floor;
- lodash.get = get;
- lodash.gt = gt;
- lodash.gte = gte;
- lodash.has = has;
- lodash.identity = identity;
- lodash.includes = includes;
- lodash.indexOf = indexOf;
- lodash.inRange = inRange;
- lodash.isArguments = isArguments;
- lodash.isArray = isArray;
- lodash.isBoolean = isBoolean;
- lodash.isDate = isDate;
- lodash.isElement = isElement;
- lodash.isEmpty = isEmpty;
- lodash.isEqual = isEqual;
- lodash.isError = isError;
- lodash.isFinite = isFinite;
- lodash.isFunction = isFunction;
- lodash.isMatch = isMatch;
- lodash.isNaN = isNaN;
- lodash.isNative = isNative;
- lodash.isNull = isNull;
- lodash.isNumber = isNumber;
- lodash.isObject = isObject;
- lodash.isPlainObject = isPlainObject;
- lodash.isRegExp = isRegExp;
- lodash.isString = isString;
- lodash.isTypedArray = isTypedArray;
- lodash.isUndefined = isUndefined;
- lodash.kebabCase = kebabCase;
- lodash.last = last;
- lodash.lastIndexOf = lastIndexOf;
- lodash.lt = lt;
- lodash.lte = lte;
- lodash.max = max;
- lodash.min = min;
- lodash.noConflict = noConflict;
- lodash.noop = noop;
- lodash.now = now;
- lodash.pad = pad;
- lodash.padLeft = padLeft;
- lodash.padRight = padRight;
- lodash.parseInt = parseInt;
- lodash.random = random;
- lodash.reduce = reduce;
- lodash.reduceRight = reduceRight;
- lodash.repeat = repeat;
- lodash.result = result;
- lodash.round = round;
- lodash.runInContext = runInContext;
- lodash.size = size;
- lodash.snakeCase = snakeCase;
- lodash.some = some;
- lodash.sortedIndex = sortedIndex;
- lodash.sortedLastIndex = sortedLastIndex;
- lodash.startCase = startCase;
- lodash.startsWith = startsWith;
- lodash.sum = sum;
- lodash.template = template;
- lodash.trim = trim;
- lodash.trimLeft = trimLeft;
- lodash.trimRight = trimRight;
- lodash.trunc = trunc;
- lodash.unescape = unescape;
- lodash.uniqueId = uniqueId;
- lodash.words = words;
-
- // Add aliases.
- lodash.all = every;
- lodash.any = some;
- lodash.contains = includes;
- lodash.eq = isEqual;
- lodash.detect = find;
- lodash.foldl = reduce;
- lodash.foldr = reduceRight;
- lodash.head = first;
- lodash.include = includes;
- lodash.inject = reduce;
-
- mixin(lodash, (function() {
- var source = {};
- baseForOwn(lodash, function(func, methodName) {
- if (!lodash.prototype[methodName]) {
- source[methodName] = func;
- }
- });
- return source;
- }()), false);
-
- /*------------------------------------------------------------------------*/
-
- // Add functions capable of returning wrapped and unwrapped values when chaining.
- lodash.sample = sample;
-
- lodash.prototype.sample = function(n) {
- if (!this.__chain__ && n == null) {
- return sample(this.value());
- }
- return this.thru(function(value) {
- return sample(value, n);
- });
- };
-
- /*------------------------------------------------------------------------*/
-
- /**
- * The semantic version number.
- *
- * @static
- * @memberOf _
- * @type string
- */
- lodash.VERSION = VERSION;
-
- // Assign default placeholders.
- arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
- lodash[methodName].placeholder = lodash;
- });
-
- // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
- arrayEach(['drop', 'take'], function(methodName, index) {
- LazyWrapper.prototype[methodName] = function(n) {
- var filtered = this.__filtered__;
- if (filtered && !index) {
- return new LazyWrapper(this);
- }
- n = n == null ? 1 : nativeMax(nativeFloor(n) || 0, 0);
-
- var result = this.clone();
- if (filtered) {
- result.__takeCount__ = nativeMin(result.__takeCount__, n);
- } else {
- result.__views__.push({ 'size': n, 'type': methodName + (result.__dir__ < 0 ? 'Right' : '') });
- }
- return result;
- };
-
- LazyWrapper.prototype[methodName + 'Right'] = function(n) {
- return this.reverse()[methodName](n).reverse();
- };
- });
-
- // Add `LazyWrapper` methods that accept an `iteratee` value.
- arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
- var type = index + 1,
- isFilter = type != LAZY_MAP_FLAG;
-
- LazyWrapper.prototype[methodName] = function(iteratee, thisArg) {
- var result = this.clone();
- result.__iteratees__.push({ 'iteratee': getCallback(iteratee, thisArg, 1), 'type': type });
- result.__filtered__ = result.__filtered__ || isFilter;
- return result;
- };
- });
-
- // Add `LazyWrapper` methods for `_.first` and `_.last`.
- arrayEach(['first', 'last'], function(methodName, index) {
- var takeName = 'take' + (index ? 'Right' : '');
-
- LazyWrapper.prototype[methodName] = function() {
- return this[takeName](1).value()[0];
- };
- });
-
- // Add `LazyWrapper` methods for `_.initial` and `_.rest`.
- arrayEach(['initial', 'rest'], function(methodName, index) {
- var dropName = 'drop' + (index ? '' : 'Right');
-
- LazyWrapper.prototype[methodName] = function() {
- return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
- };
- });
-
- // Add `LazyWrapper` methods for `_.pluck` and `_.where`.
- arrayEach(['pluck', 'where'], function(methodName, index) {
- var operationName = index ? 'filter' : 'map',
- createCallback = index ? baseMatches : property;
-
- LazyWrapper.prototype[methodName] = function(value) {
- return this[operationName](createCallback(value));
- };
- });
-
- LazyWrapper.prototype.compact = function() {
- return this.filter(identity);
- };
-
- LazyWrapper.prototype.reject = function(predicate, thisArg) {
- predicate = getCallback(predicate, thisArg, 1);
- return this.filter(function(value) {
- return !predicate(value);
- });
- };
-
- LazyWrapper.prototype.slice = function(start, end) {
- start = start == null ? 0 : (+start || 0);
-
- var result = this;
- if (result.__filtered__ && (start > 0 || end < 0)) {
- return new LazyWrapper(result);
- }
- if (start < 0) {
- result = result.takeRight(-start);
- } else if (start) {
- result = result.drop(start);
- }
- if (end !== undefined) {
- end = (+end || 0);
- result = end < 0 ? result.dropRight(-end) : result.take(end - start);
- }
- return result;
- };
-
- LazyWrapper.prototype.takeRightWhile = function(predicate, thisArg) {
- return this.reverse().takeWhile(predicate, thisArg).reverse();
- };
-
- LazyWrapper.prototype.toArray = function() {
- return this.take(POSITIVE_INFINITY);
- };
-
- // Add `LazyWrapper` methods to `lodash.prototype`.
- baseForOwn(LazyWrapper.prototype, function(func, methodName) {
- var checkIteratee = /^(?:filter|map|reject)|While$/.test(methodName),
- retUnwrapped = /^(?:first|last)$/.test(methodName),
- lodashFunc = lodash[retUnwrapped ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName];
-
- if (!lodashFunc) {
- return;
- }
- lodash.prototype[methodName] = function() {
- var args = retUnwrapped ? [1] : arguments,
- chainAll = this.__chain__,
- value = this.__wrapped__,
- isHybrid = !!this.__actions__.length,
- isLazy = value instanceof LazyWrapper,
- iteratee = args[0],
- useLazy = isLazy || isArray(value);
-
- if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
- // Avoid lazy use if the iteratee has a "length" value other than `1`.
- isLazy = useLazy = false;
- }
- var interceptor = function(value) {
- return (retUnwrapped && chainAll)
- ? lodashFunc(value, 1)[0]
- : lodashFunc.apply(undefined, arrayPush([value], args));
- };
-
- var action = { 'func': thru, 'args': [interceptor], 'thisArg': undefined },
- onlyLazy = isLazy && !isHybrid;
-
- if (retUnwrapped && !chainAll) {
- if (onlyLazy) {
- value = value.clone();
- value.__actions__.push(action);
- return func.call(value);
- }
- return lodashFunc.call(undefined, this.value())[0];
- }
- if (!retUnwrapped && useLazy) {
- value = onlyLazy ? value : new LazyWrapper(this);
- var result = func.apply(value, args);
- result.__actions__.push(action);
- return new LodashWrapper(result, chainAll);
- }
- return this.thru(interceptor);
- };
- });
-
- // Add `Array` and `String` methods to `lodash.prototype`.
- arrayEach(['join', 'pop', 'push', 'replace', 'shift', 'sort', 'splice', 'split', 'unshift'], function(methodName) {
- var func = (/^(?:replace|split)$/.test(methodName) ? stringProto : arrayProto)[methodName],
- chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
- retUnwrapped = /^(?:join|pop|replace|shift)$/.test(methodName);
-
- lodash.prototype[methodName] = function() {
- var args = arguments;
- if (retUnwrapped && !this.__chain__) {
- return func.apply(this.value(), args);
- }
- return this[chainName](function(value) {
- return func.apply(value, args);
- });
- };
- });
-
- // Map minified function names to their real names.
- baseForOwn(LazyWrapper.prototype, function(func, methodName) {
- var lodashFunc = lodash[methodName];
- if (lodashFunc) {
- var key = lodashFunc.name,
- names = realNames[key] || (realNames[key] = []);
-
- names.push({ 'name': methodName, 'func': lodashFunc });
- }
- });
-
- realNames[createHybridWrapper(undefined, BIND_KEY_FLAG).name] = [{ 'name': 'wrapper', 'func': undefined }];
-
- // Add functions to the lazy wrapper.
- LazyWrapper.prototype.clone = lazyClone;
- LazyWrapper.prototype.reverse = lazyReverse;
- LazyWrapper.prototype.value = lazyValue;
-
- // Add chaining functions to the `lodash` wrapper.
- lodash.prototype.chain = wrapperChain;
- lodash.prototype.commit = wrapperCommit;
- lodash.prototype.concat = wrapperConcat;
- lodash.prototype.plant = wrapperPlant;
- lodash.prototype.reverse = wrapperReverse;
- lodash.prototype.toString = wrapperToString;
- lodash.prototype.run = lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
-
- // Add function aliases to the `lodash` wrapper.
- lodash.prototype.collect = lodash.prototype.map;
- lodash.prototype.head = lodash.prototype.first;
- lodash.prototype.select = lodash.prototype.filter;
- lodash.prototype.tail = lodash.prototype.rest;
-
- return lodash;
- }
-
- /*--------------------------------------------------------------------------*/
-
- // Export lodash.
- var _ = runInContext();
-
- // Some AMD build optimizers like r.js check for condition patterns like the following:
- if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
- // Expose lodash to the global object when an AMD loader is present to avoid
- // errors in cases where lodash is loaded by a script tag and not intended
- // as an AMD module. See http://requirejs.org/docs/errors.html#mismatch for
- // more details.
- root._ = _;
-
- // Define as an anonymous module so, through path mapping, it can be
- // referenced as the "underscore" module.
- define(function() {
- return _;
- });
- }
- // Check for `exports` after `define` in case a build optimizer adds an `exports` object.
- else if (freeExports && freeModule) {
- // Export for Node.js or RingoJS.
- if (moduleExports) {
- (freeModule.exports = _)._ = _;
- }
- // Export for Rhino with CommonJS support.
- else {
- freeExports._ = _;
- }
- }
- else {
- // Export for a browser or Rhino.
- root._ = _;
- }
-}.call(this));
diff --git a/deps/npm/node_modules/lodash/internal/LazyWrapper.js b/deps/npm/node_modules/lodash/internal/LazyWrapper.js
deleted file mode 100644
index d9c8080495..0000000000
--- a/deps/npm/node_modules/lodash/internal/LazyWrapper.js
+++ /dev/null
@@ -1,26 +0,0 @@
-var baseCreate = require('./baseCreate'),
- baseLodash = require('./baseLodash');
-
-/** Used as references for `-Infinity` and `Infinity`. */
-var POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
-
-/**
- * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
- *
- * @private
- * @param {*} value The value to wrap.
- */
-function LazyWrapper(value) {
- this.__wrapped__ = value;
- this.__actions__ = [];
- this.__dir__ = 1;
- this.__filtered__ = false;
- this.__iteratees__ = [];
- this.__takeCount__ = POSITIVE_INFINITY;
- this.__views__ = [];
-}
-
-LazyWrapper.prototype = baseCreate(baseLodash.prototype);
-LazyWrapper.prototype.constructor = LazyWrapper;
-
-module.exports = LazyWrapper;
diff --git a/deps/npm/node_modules/lodash/internal/LodashWrapper.js b/deps/npm/node_modules/lodash/internal/LodashWrapper.js
deleted file mode 100644
index ab06bc7614..0000000000
--- a/deps/npm/node_modules/lodash/internal/LodashWrapper.js
+++ /dev/null
@@ -1,21 +0,0 @@
-var baseCreate = require('./baseCreate'),
- baseLodash = require('./baseLodash');
-
-/**
- * The base constructor for creating `lodash` wrapper objects.
- *
- * @private
- * @param {*} value The value to wrap.
- * @param {boolean} [chainAll] Enable chaining for all wrapper methods.
- * @param {Array} [actions=[]] Actions to peform to resolve the unwrapped value.
- */
-function LodashWrapper(value, chainAll, actions) {
- this.__wrapped__ = value;
- this.__actions__ = actions || [];
- this.__chain__ = !!chainAll;
-}
-
-LodashWrapper.prototype = baseCreate(baseLodash.prototype);
-LodashWrapper.prototype.constructor = LodashWrapper;
-
-module.exports = LodashWrapper;
diff --git a/deps/npm/node_modules/lodash/internal/MapCache.js b/deps/npm/node_modules/lodash/internal/MapCache.js
deleted file mode 100644
index 1d7ab98171..0000000000
--- a/deps/npm/node_modules/lodash/internal/MapCache.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var mapDelete = require('./mapDelete'),
- mapGet = require('./mapGet'),
- mapHas = require('./mapHas'),
- mapSet = require('./mapSet');
-
-/**
- * Creates a cache object to store key/value pairs.
- *
- * @private
- * @static
- * @name Cache
- * @memberOf _.memoize
- */
-function MapCache() {
- this.__data__ = {};
-}
-
-// Add functions to the `Map` cache.
-MapCache.prototype['delete'] = mapDelete;
-MapCache.prototype.get = mapGet;
-MapCache.prototype.has = mapHas;
-MapCache.prototype.set = mapSet;
-
-module.exports = MapCache;
diff --git a/deps/npm/node_modules/lodash/internal/SetCache.js b/deps/npm/node_modules/lodash/internal/SetCache.js
deleted file mode 100644
index ae29c55bf3..0000000000
--- a/deps/npm/node_modules/lodash/internal/SetCache.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var cachePush = require('./cachePush'),
- getNative = require('./getNative');
-
-/** Native method references. */
-var Set = getNative(global, 'Set');
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeCreate = getNative(Object, 'create');
-
-/**
- *
- * Creates a cache object to store unique values.
- *
- * @private
- * @param {Array} [values] The values to cache.
- */
-function SetCache(values) {
- var length = values ? values.length : 0;
-
- this.data = { 'hash': nativeCreate(null), 'set': new Set };
- while (length--) {
- this.push(values[length]);
- }
-}
-
-// Add functions to the `Set` cache.
-SetCache.prototype.push = cachePush;
-
-module.exports = SetCache;
diff --git a/deps/npm/node_modules/lodash/internal/arrayConcat.js b/deps/npm/node_modules/lodash/internal/arrayConcat.js
deleted file mode 100644
index 0d131e3999..0000000000
--- a/deps/npm/node_modules/lodash/internal/arrayConcat.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Creates a new array joining `array` with `other`.
- *
- * @private
- * @param {Array} array The array to join.
- * @param {Array} other The other array to join.
- * @returns {Array} Returns the new concatenated array.
- */
-function arrayConcat(array, other) {
- var index = -1,
- length = array.length,
- othIndex = -1,
- othLength = other.length,
- result = Array(length + othLength);
-
- while (++index < length) {
- result[index] = array[index];
- }
- while (++othIndex < othLength) {
- result[index++] = other[othIndex];
- }
- return result;
-}
-
-module.exports = arrayConcat;
diff --git a/deps/npm/node_modules/lodash/internal/arrayCopy.js b/deps/npm/node_modules/lodash/internal/arrayCopy.js
deleted file mode 100644
index fa7067f9fa..0000000000
--- a/deps/npm/node_modules/lodash/internal/arrayCopy.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * Copies the values of `source` to `array`.
- *
- * @private
- * @param {Array} source The array to copy values from.
- * @param {Array} [array=[]] The array to copy values to.
- * @returns {Array} Returns `array`.
- */
-function arrayCopy(source, array) {
- var index = -1,
- length = source.length;
-
- array || (array = Array(length));
- while (++index < length) {
- array[index] = source[index];
- }
- return array;
-}
-
-module.exports = arrayCopy;
diff --git a/deps/npm/node_modules/lodash/internal/arrayEach.js b/deps/npm/node_modules/lodash/internal/arrayEach.js
deleted file mode 100644
index 0f51382424..0000000000
--- a/deps/npm/node_modules/lodash/internal/arrayEach.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * A specialized version of `_.forEach` for arrays without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns `array`.
- */
-function arrayEach(array, iteratee) {
- var index = -1,
- length = array.length;
-
- while (++index < length) {
- if (iteratee(array[index], index, array) === false) {
- break;
- }
- }
- return array;
-}
-
-module.exports = arrayEach;
diff --git a/deps/npm/node_modules/lodash/internal/arrayEachRight.js b/deps/npm/node_modules/lodash/internal/arrayEachRight.js
deleted file mode 100644
index 367e066d80..0000000000
--- a/deps/npm/node_modules/lodash/internal/arrayEachRight.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * A specialized version of `_.forEachRight` for arrays without support for
- * callback shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns `array`.
- */
-function arrayEachRight(array, iteratee) {
- var length = array.length;
-
- while (length--) {
- if (iteratee(array[length], length, array) === false) {
- break;
- }
- }
- return array;
-}
-
-module.exports = arrayEachRight;
diff --git a/deps/npm/node_modules/lodash/internal/arrayEvery.js b/deps/npm/node_modules/lodash/internal/arrayEvery.js
deleted file mode 100644
index 3fe6ed2771..0000000000
--- a/deps/npm/node_modules/lodash/internal/arrayEvery.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * A specialized version of `_.every` for arrays without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if all elements pass the predicate check,
- * else `false`.
- */
-function arrayEvery(array, predicate) {
- var index = -1,
- length = array.length;
-
- while (++index < length) {
- if (!predicate(array[index], index, array)) {
- return false;
- }
- }
- return true;
-}
-
-module.exports = arrayEvery;
diff --git a/deps/npm/node_modules/lodash/internal/arrayExtremum.js b/deps/npm/node_modules/lodash/internal/arrayExtremum.js
deleted file mode 100644
index e45badbda1..0000000000
--- a/deps/npm/node_modules/lodash/internal/arrayExtremum.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * A specialized version of `baseExtremum` for arrays which invokes `iteratee`
- * with one argument: (value).
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} comparator The function used to compare values.
- * @param {*} exValue The initial extremum value.
- * @returns {*} Returns the extremum value.
- */
-function arrayExtremum(array, iteratee, comparator, exValue) {
- var index = -1,
- length = array.length,
- computed = exValue,
- result = computed;
-
- while (++index < length) {
- var value = array[index],
- current = +iteratee(value);
-
- if (comparator(current, computed)) {
- computed = current;
- result = value;
- }
- }
- return result;
-}
-
-module.exports = arrayExtremum;
diff --git a/deps/npm/node_modules/lodash/internal/arrayFilter.js b/deps/npm/node_modules/lodash/internal/arrayFilter.js
deleted file mode 100644
index e14fe06900..0000000000
--- a/deps/npm/node_modules/lodash/internal/arrayFilter.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * A specialized version of `_.filter` for arrays without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- */
-function arrayFilter(array, predicate) {
- var index = -1,
- length = array.length,
- resIndex = -1,
- result = [];
-
- while (++index < length) {
- var value = array[index];
- if (predicate(value, index, array)) {
- result[++resIndex] = value;
- }
- }
- return result;
-}
-
-module.exports = arrayFilter;
diff --git a/deps/npm/node_modules/lodash/internal/arrayMap.js b/deps/npm/node_modules/lodash/internal/arrayMap.js
deleted file mode 100644
index 777c7c9f35..0000000000
--- a/deps/npm/node_modules/lodash/internal/arrayMap.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * A specialized version of `_.map` for arrays without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- */
-function arrayMap(array, iteratee) {
- var index = -1,
- length = array.length,
- result = Array(length);
-
- while (++index < length) {
- result[index] = iteratee(array[index], index, array);
- }
- return result;
-}
-
-module.exports = arrayMap;
diff --git a/deps/npm/node_modules/lodash/internal/arrayPush.js b/deps/npm/node_modules/lodash/internal/arrayPush.js
deleted file mode 100644
index 7d742b383e..0000000000
--- a/deps/npm/node_modules/lodash/internal/arrayPush.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * Appends the elements of `values` to `array`.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {Array} values The values to append.
- * @returns {Array} Returns `array`.
- */
-function arrayPush(array, values) {
- var index = -1,
- length = values.length,
- offset = array.length;
-
- while (++index < length) {
- array[offset + index] = values[index];
- }
- return array;
-}
-
-module.exports = arrayPush;
diff --git a/deps/npm/node_modules/lodash/internal/arrayReduce.js b/deps/npm/node_modules/lodash/internal/arrayReduce.js
deleted file mode 100644
index f948c8e528..0000000000
--- a/deps/npm/node_modules/lodash/internal/arrayReduce.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * A specialized version of `_.reduce` for arrays without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {boolean} [initFromArray] Specify using the first element of `array`
- * as the initial value.
- * @returns {*} Returns the accumulated value.
- */
-function arrayReduce(array, iteratee, accumulator, initFromArray) {
- var index = -1,
- length = array.length;
-
- if (initFromArray && length) {
- accumulator = array[++index];
- }
- while (++index < length) {
- accumulator = iteratee(accumulator, array[index], index, array);
- }
- return accumulator;
-}
-
-module.exports = arrayReduce;
diff --git a/deps/npm/node_modules/lodash/internal/arrayReduceRight.js b/deps/npm/node_modules/lodash/internal/arrayReduceRight.js
deleted file mode 100644
index d4d68dff01..0000000000
--- a/deps/npm/node_modules/lodash/internal/arrayReduceRight.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * A specialized version of `_.reduceRight` for arrays without support for
- * callback shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {boolean} [initFromArray] Specify using the last element of `array`
- * as the initial value.
- * @returns {*} Returns the accumulated value.
- */
-function arrayReduceRight(array, iteratee, accumulator, initFromArray) {
- var length = array.length;
- if (initFromArray && length) {
- accumulator = array[--length];
- }
- while (length--) {
- accumulator = iteratee(accumulator, array[length], length, array);
- }
- return accumulator;
-}
-
-module.exports = arrayReduceRight;
diff --git a/deps/npm/node_modules/lodash/internal/arraySome.js b/deps/npm/node_modules/lodash/internal/arraySome.js
deleted file mode 100644
index f7a0bb58ef..0000000000
--- a/deps/npm/node_modules/lodash/internal/arraySome.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * A specialized version of `_.some` for arrays without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- * else `false`.
- */
-function arraySome(array, predicate) {
- var index = -1,
- length = array.length;
-
- while (++index < length) {
- if (predicate(array[index], index, array)) {
- return true;
- }
- }
- return false;
-}
-
-module.exports = arraySome;
diff --git a/deps/npm/node_modules/lodash/internal/arraySum.js b/deps/npm/node_modules/lodash/internal/arraySum.js
deleted file mode 100644
index 0e40c917e8..0000000000
--- a/deps/npm/node_modules/lodash/internal/arraySum.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * A specialized version of `_.sum` for arrays without support for callback
- * shorthands and `this` binding..
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {number} Returns the sum.
- */
-function arraySum(array, iteratee) {
- var length = array.length,
- result = 0;
-
- while (length--) {
- result += +iteratee(array[length]) || 0;
- }
- return result;
-}
-
-module.exports = arraySum;
diff --git a/deps/npm/node_modules/lodash/internal/assignDefaults.js b/deps/npm/node_modules/lodash/internal/assignDefaults.js
deleted file mode 100644
index affd993ad1..0000000000
--- a/deps/npm/node_modules/lodash/internal/assignDefaults.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * Used by `_.defaults` to customize its `_.assign` use.
- *
- * @private
- * @param {*} objectValue The destination object property value.
- * @param {*} sourceValue The source object property value.
- * @returns {*} Returns the value to assign to the destination object.
- */
-function assignDefaults(objectValue, sourceValue) {
- return objectValue === undefined ? sourceValue : objectValue;
-}
-
-module.exports = assignDefaults;
diff --git a/deps/npm/node_modules/lodash/internal/assignOwnDefaults.js b/deps/npm/node_modules/lodash/internal/assignOwnDefaults.js
deleted file mode 100644
index 682c460d72..0000000000
--- a/deps/npm/node_modules/lodash/internal/assignOwnDefaults.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Used by `_.template` to customize its `_.assign` use.
- *
- * **Note:** This function is like `assignDefaults` except that it ignores
- * inherited property values when checking if a property is `undefined`.
- *
- * @private
- * @param {*} objectValue The destination object property value.
- * @param {*} sourceValue The source object property value.
- * @param {string} key The key associated with the object and source values.
- * @param {Object} object The destination object.
- * @returns {*} Returns the value to assign to the destination object.
- */
-function assignOwnDefaults(objectValue, sourceValue, key, object) {
- return (objectValue === undefined || !hasOwnProperty.call(object, key))
- ? sourceValue
- : objectValue;
-}
-
-module.exports = assignOwnDefaults;
diff --git a/deps/npm/node_modules/lodash/internal/assignWith.js b/deps/npm/node_modules/lodash/internal/assignWith.js
deleted file mode 100644
index d2b261ad2b..0000000000
--- a/deps/npm/node_modules/lodash/internal/assignWith.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var keys = require('../object/keys');
-
-/**
- * A specialized version of `_.assign` for customizing assigned values without
- * support for argument juggling, multiple sources, and `this` binding `customizer`
- * functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {Function} customizer The function to customize assigned values.
- * @returns {Object} Returns `object`.
- */
-function assignWith(object, source, customizer) {
- var index = -1,
- props = keys(source),
- length = props.length;
-
- while (++index < length) {
- var key = props[index],
- value = object[key],
- result = customizer(value, source[key], key, object, source);
-
- if ((result === result ? (result !== value) : (value === value)) ||
- (value === undefined && !(key in object))) {
- object[key] = result;
- }
- }
- return object;
-}
-
-module.exports = assignWith;
diff --git a/deps/npm/node_modules/lodash/internal/baseAssign.js b/deps/npm/node_modules/lodash/internal/baseAssign.js
deleted file mode 100644
index cfad6e0c30..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseAssign.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var baseCopy = require('./baseCopy'),
- keys = require('../object/keys');
-
-/**
- * The base implementation of `_.assign` without support for argument juggling,
- * multiple sources, and `customizer` functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @returns {Object} Returns `object`.
- */
-function baseAssign(object, source) {
- return source == null
- ? object
- : baseCopy(source, keys(source), object);
-}
-
-module.exports = baseAssign;
diff --git a/deps/npm/node_modules/lodash/internal/baseAt.js b/deps/npm/node_modules/lodash/internal/baseAt.js
deleted file mode 100644
index bbafd1d5ad..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseAt.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var isArrayLike = require('./isArrayLike'),
- isIndex = require('./isIndex');
-
-/**
- * The base implementation of `_.at` without support for string collections
- * and individual key arguments.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {number[]|string[]} props The property names or indexes of elements to pick.
- * @returns {Array} Returns the new array of picked elements.
- */
-function baseAt(collection, props) {
- var index = -1,
- isNil = collection == null,
- isArr = !isNil && isArrayLike(collection),
- length = isArr ? collection.length : 0,
- propsLength = props.length,
- result = Array(propsLength);
-
- while(++index < propsLength) {
- var key = props[index];
- if (isArr) {
- result[index] = isIndex(key, length) ? collection[key] : undefined;
- } else {
- result[index] = isNil ? undefined : collection[key];
- }
- }
- return result;
-}
-
-module.exports = baseAt;
diff --git a/deps/npm/node_modules/lodash/internal/baseCallback.js b/deps/npm/node_modules/lodash/internal/baseCallback.js
deleted file mode 100644
index 67fe087c4a..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseCallback.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var baseMatches = require('./baseMatches'),
- baseMatchesProperty = require('./baseMatchesProperty'),
- bindCallback = require('./bindCallback'),
- identity = require('../utility/identity'),
- property = require('../utility/property');
-
-/**
- * The base implementation of `_.callback` which supports specifying the
- * number of arguments to provide to `func`.
- *
- * @private
- * @param {*} [func=_.identity] The value to convert to a callback.
- * @param {*} [thisArg] The `this` binding of `func`.
- * @param {number} [argCount] The number of arguments to provide to `func`.
- * @returns {Function} Returns the callback.
- */
-function baseCallback(func, thisArg, argCount) {
- var type = typeof func;
- if (type == 'function') {
- return thisArg === undefined
- ? func
- : bindCallback(func, thisArg, argCount);
- }
- if (func == null) {
- return identity;
- }
- if (type == 'object') {
- return baseMatches(func);
- }
- return thisArg === undefined
- ? property(func)
- : baseMatchesProperty(func, thisArg);
-}
-
-module.exports = baseCallback;
diff --git a/deps/npm/node_modules/lodash/internal/baseClone.js b/deps/npm/node_modules/lodash/internal/baseClone.js
deleted file mode 100644
index ebd6649f9e..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseClone.js
+++ /dev/null
@@ -1,128 +0,0 @@
-var arrayCopy = require('./arrayCopy'),
- arrayEach = require('./arrayEach'),
- baseAssign = require('./baseAssign'),
- baseForOwn = require('./baseForOwn'),
- initCloneArray = require('./initCloneArray'),
- initCloneByTag = require('./initCloneByTag'),
- initCloneObject = require('./initCloneObject'),
- isArray = require('../lang/isArray'),
- isObject = require('../lang/isObject');
-
-/** `Object#toString` result references. */
-var argsTag = '[object Arguments]',
- arrayTag = '[object Array]',
- boolTag = '[object Boolean]',
- dateTag = '[object Date]',
- errorTag = '[object Error]',
- funcTag = '[object Function]',
- mapTag = '[object Map]',
- numberTag = '[object Number]',
- objectTag = '[object Object]',
- regexpTag = '[object RegExp]',
- setTag = '[object Set]',
- stringTag = '[object String]',
- weakMapTag = '[object WeakMap]';
-
-var arrayBufferTag = '[object ArrayBuffer]',
- float32Tag = '[object Float32Array]',
- float64Tag = '[object Float64Array]',
- int8Tag = '[object Int8Array]',
- int16Tag = '[object Int16Array]',
- int32Tag = '[object Int32Array]',
- uint8Tag = '[object Uint8Array]',
- uint8ClampedTag = '[object Uint8ClampedArray]',
- uint16Tag = '[object Uint16Array]',
- uint32Tag = '[object Uint32Array]';
-
-/** Used to identify `toStringTag` values supported by `_.clone`. */
-var cloneableTags = {};
-cloneableTags[argsTag] = cloneableTags[arrayTag] =
-cloneableTags[arrayBufferTag] = cloneableTags[boolTag] =
-cloneableTags[dateTag] = cloneableTags[float32Tag] =
-cloneableTags[float64Tag] = cloneableTags[int8Tag] =
-cloneableTags[int16Tag] = cloneableTags[int32Tag] =
-cloneableTags[numberTag] = cloneableTags[objectTag] =
-cloneableTags[regexpTag] = cloneableTags[stringTag] =
-cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
-cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
-cloneableTags[errorTag] = cloneableTags[funcTag] =
-cloneableTags[mapTag] = cloneableTags[setTag] =
-cloneableTags[weakMapTag] = false;
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objToString = objectProto.toString;
-
-/**
- * The base implementation of `_.clone` without support for argument juggling
- * and `this` binding `customizer` functions.
- *
- * @private
- * @param {*} value The value to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @param {Function} [customizer] The function to customize cloning values.
- * @param {string} [key] The key of `value`.
- * @param {Object} [object] The object `value` belongs to.
- * @param {Array} [stackA=[]] Tracks traversed source objects.
- * @param {Array} [stackB=[]] Associates clones with source counterparts.
- * @returns {*} Returns the cloned value.
- */
-function baseClone(value, isDeep, customizer, key, object, stackA, stackB) {
- var result;
- if (customizer) {
- result = object ? customizer(value, key, object) : customizer(value);
- }
- if (result !== undefined) {
- return result;
- }
- if (!isObject(value)) {
- return value;
- }
- var isArr = isArray(value);
- if (isArr) {
- result = initCloneArray(value);
- if (!isDeep) {
- return arrayCopy(value, result);
- }
- } else {
- var tag = objToString.call(value),
- isFunc = tag == funcTag;
-
- if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
- result = initCloneObject(isFunc ? {} : value);
- if (!isDeep) {
- return baseAssign(result, value);
- }
- } else {
- return cloneableTags[tag]
- ? initCloneByTag(value, tag, isDeep)
- : (object ? value : {});
- }
- }
- // Check for circular references and return its corresponding clone.
- stackA || (stackA = []);
- stackB || (stackB = []);
-
- var length = stackA.length;
- while (length--) {
- if (stackA[length] == value) {
- return stackB[length];
- }
- }
- // Add the source value to the stack of traversed objects and associate it with its clone.
- stackA.push(value);
- stackB.push(result);
-
- // Recursively populate clone (susceptible to call stack limits).
- (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) {
- result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB);
- });
- return result;
-}
-
-module.exports = baseClone;
diff --git a/deps/npm/node_modules/lodash/internal/baseCompareAscending.js b/deps/npm/node_modules/lodash/internal/baseCompareAscending.js
deleted file mode 100644
index c8259c72dc..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseCompareAscending.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * The base implementation of `compareAscending` which compares values and
- * sorts them in ascending order without guaranteeing a stable sort.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {number} Returns the sort order indicator for `value`.
- */
-function baseCompareAscending(value, other) {
- if (value !== other) {
- var valIsNull = value === null,
- valIsUndef = value === undefined,
- valIsReflexive = value === value;
-
- var othIsNull = other === null,
- othIsUndef = other === undefined,
- othIsReflexive = other === other;
-
- if ((value > other && !othIsNull) || !valIsReflexive ||
- (valIsNull && !othIsUndef && othIsReflexive) ||
- (valIsUndef && othIsReflexive)) {
- return 1;
- }
- if ((value < other && !valIsNull) || !othIsReflexive ||
- (othIsNull && !valIsUndef && valIsReflexive) ||
- (othIsUndef && valIsReflexive)) {
- return -1;
- }
- }
- return 0;
-}
-
-module.exports = baseCompareAscending;
diff --git a/deps/npm/node_modules/lodash/internal/baseCopy.js b/deps/npm/node_modules/lodash/internal/baseCopy.js
deleted file mode 100644
index 15059f312a..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseCopy.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Copies properties of `source` to `object`.
- *
- * @private
- * @param {Object} source The object to copy properties from.
- * @param {Array} props The property names to copy.
- * @param {Object} [object={}] The object to copy properties to.
- * @returns {Object} Returns `object`.
- */
-function baseCopy(source, props, object) {
- object || (object = {});
-
- var index = -1,
- length = props.length;
-
- while (++index < length) {
- var key = props[index];
- object[key] = source[key];
- }
- return object;
-}
-
-module.exports = baseCopy;
diff --git a/deps/npm/node_modules/lodash/internal/baseCreate.js b/deps/npm/node_modules/lodash/internal/baseCreate.js
deleted file mode 100644
index be5e1d9d48..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseCreate.js
+++ /dev/null
@@ -1,23 +0,0 @@
-var isObject = require('../lang/isObject');
-
-/**
- * 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.
- */
-var baseCreate = (function() {
- function object() {}
- return function(prototype) {
- if (isObject(prototype)) {
- object.prototype = prototype;
- var result = new object;
- object.prototype = undefined;
- }
- return result || {};
- };
-}());
-
-module.exports = baseCreate;
diff --git a/deps/npm/node_modules/lodash/internal/baseDelay.js b/deps/npm/node_modules/lodash/internal/baseDelay.js
deleted file mode 100644
index c405c37b69..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseDelay.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/** Used as the `TypeError` message for "Functions" methods. */
-var FUNC_ERROR_TEXT = 'Expected a function';
-
-/**
- * The base implementation of `_.delay` and `_.defer` which accepts an index
- * of where to slice the arguments to provide to `func`.
- *
- * @private
- * @param {Function} func The function to delay.
- * @param {number} wait The number of milliseconds to delay invocation.
- * @param {Object} args The arguments provide to `func`.
- * @returns {number} Returns the timer id.
- */
-function baseDelay(func, wait, args) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- return setTimeout(function() { func.apply(undefined, args); }, wait);
-}
-
-module.exports = baseDelay;
diff --git a/deps/npm/node_modules/lodash/internal/baseDifference.js b/deps/npm/node_modules/lodash/internal/baseDifference.js
deleted file mode 100644
index 40da1b62ad..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseDifference.js
+++ /dev/null
@@ -1,55 +0,0 @@
-var baseIndexOf = require('./baseIndexOf'),
- cacheIndexOf = require('./cacheIndexOf'),
- createCache = require('./createCache');
-
-/** Used as the size to enable large array optimizations. */
-var LARGE_ARRAY_SIZE = 200;
-
-/**
- * The base implementation of `_.difference` which accepts a single array
- * of values to exclude.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Array} values The values to exclude.
- * @returns {Array} Returns the new array of filtered values.
- */
-function baseDifference(array, values) {
- var length = array ? array.length : 0,
- result = [];
-
- if (!length) {
- return result;
- }
- var index = -1,
- indexOf = baseIndexOf,
- isCommon = true,
- cache = (isCommon && values.length >= LARGE_ARRAY_SIZE) ? createCache(values) : null,
- valuesLength = values.length;
-
- if (cache) {
- indexOf = cacheIndexOf;
- isCommon = false;
- values = cache;
- }
- outer:
- while (++index < length) {
- var value = array[index];
-
- if (isCommon && value === value) {
- var valuesIndex = valuesLength;
- while (valuesIndex--) {
- if (values[valuesIndex] === value) {
- continue outer;
- }
- }
- result.push(value);
- }
- else if (indexOf(values, value, 0) < 0) {
- result.push(value);
- }
- }
- return result;
-}
-
-module.exports = baseDifference;
diff --git a/deps/npm/node_modules/lodash/internal/baseEach.js b/deps/npm/node_modules/lodash/internal/baseEach.js
deleted file mode 100644
index 09ef5a3a4c..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseEach.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var baseForOwn = require('./baseForOwn'),
- createBaseEach = require('./createBaseEach');
-
-/**
- * The base implementation of `_.forEach` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array|Object|string} Returns `collection`.
- */
-var baseEach = createBaseEach(baseForOwn);
-
-module.exports = baseEach;
diff --git a/deps/npm/node_modules/lodash/internal/baseEachRight.js b/deps/npm/node_modules/lodash/internal/baseEachRight.js
deleted file mode 100644
index f0520a8b4f..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseEachRight.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var baseForOwnRight = require('./baseForOwnRight'),
- createBaseEach = require('./createBaseEach');
-
-/**
- * The base implementation of `_.forEachRight` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array|Object|string} Returns `collection`.
- */
-var baseEachRight = createBaseEach(baseForOwnRight, true);
-
-module.exports = baseEachRight;
diff --git a/deps/npm/node_modules/lodash/internal/baseEvery.js b/deps/npm/node_modules/lodash/internal/baseEvery.js
deleted file mode 100644
index a1fc1f3512..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseEvery.js
+++ /dev/null
@@ -1,22 +0,0 @@
-var baseEach = require('./baseEach');
-
-/**
- * The base implementation of `_.every` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if all elements pass the predicate check,
- * else `false`
- */
-function baseEvery(collection, predicate) {
- var result = true;
- baseEach(collection, function(value, index, collection) {
- result = !!predicate(value, index, collection);
- return result;
- });
- return result;
-}
-
-module.exports = baseEvery;
diff --git a/deps/npm/node_modules/lodash/internal/baseExtremum.js b/deps/npm/node_modules/lodash/internal/baseExtremum.js
deleted file mode 100644
index b0efff6f9c..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseExtremum.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var baseEach = require('./baseEach');
-
-/**
- * Gets the extremum value of `collection` invoking `iteratee` for each value
- * in `collection` to generate the criterion by which the value is ranked.
- * The `iteratee` is invoked with three arguments: (value, index|key, collection).
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} comparator The function used to compare values.
- * @param {*} exValue The initial extremum value.
- * @returns {*} Returns the extremum value.
- */
-function baseExtremum(collection, iteratee, comparator, exValue) {
- var computed = exValue,
- result = computed;
-
- baseEach(collection, function(value, index, collection) {
- var current = +iteratee(value, index, collection);
- if (comparator(current, computed) || (current === exValue && current === result)) {
- computed = current;
- result = value;
- }
- });
- return result;
-}
-
-module.exports = baseExtremum;
diff --git a/deps/npm/node_modules/lodash/internal/baseFill.js b/deps/npm/node_modules/lodash/internal/baseFill.js
deleted file mode 100644
index ef1a2fa162..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseFill.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * The base implementation of `_.fill` without an iteratee call guard.
- *
- * @private
- * @param {Array} array The array to fill.
- * @param {*} value The value to fill `array` with.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns `array`.
- */
-function baseFill(array, value, start, end) {
- var length = array.length;
-
- start = start == null ? 0 : (+start || 0);
- if (start < 0) {
- start = -start > length ? 0 : (length + start);
- }
- end = (end === undefined || end > length) ? length : (+end || 0);
- if (end < 0) {
- end += length;
- }
- length = start > end ? 0 : (end >>> 0);
- start >>>= 0;
-
- while (start < length) {
- array[start++] = value;
- }
- return array;
-}
-
-module.exports = baseFill;
diff --git a/deps/npm/node_modules/lodash/internal/baseFilter.js b/deps/npm/node_modules/lodash/internal/baseFilter.js
deleted file mode 100644
index 27773a47e1..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseFilter.js
+++ /dev/null
@@ -1,22 +0,0 @@
-var baseEach = require('./baseEach');
-
-/**
- * The base implementation of `_.filter` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- */
-function baseFilter(collection, predicate) {
- var result = [];
- baseEach(collection, function(value, index, collection) {
- if (predicate(value, index, collection)) {
- result.push(value);
- }
- });
- return result;
-}
-
-module.exports = baseFilter;
diff --git a/deps/npm/node_modules/lodash/internal/baseFind.js b/deps/npm/node_modules/lodash/internal/baseFind.js
deleted file mode 100644
index be5848fbf1..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseFind.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * The base implementation of `_.find`, `_.findLast`, `_.findKey`, and `_.findLastKey`,
- * without support for callback shorthands and `this` binding, which iterates
- * over `collection` using the provided `eachFunc`.
- *
- * @private
- * @param {Array|Object|string} collection The collection to search.
- * @param {Function} predicate The function invoked per iteration.
- * @param {Function} eachFunc The function to iterate over `collection`.
- * @param {boolean} [retKey] Specify returning the key of the found element
- * instead of the element itself.
- * @returns {*} Returns the found element or its key, else `undefined`.
- */
-function baseFind(collection, predicate, eachFunc, retKey) {
- var result;
- eachFunc(collection, function(value, key, collection) {
- if (predicate(value, key, collection)) {
- result = retKey ? key : value;
- return false;
- }
- });
- return result;
-}
-
-module.exports = baseFind;
diff --git a/deps/npm/node_modules/lodash/internal/baseFindIndex.js b/deps/npm/node_modules/lodash/internal/baseFindIndex.js
deleted file mode 100644
index 7d4b502485..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseFindIndex.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * The base implementation of `_.findIndex` and `_.findLastIndex` without
- * support for callback shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to search.
- * @param {Function} predicate The function invoked per iteration.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
-function baseFindIndex(array, predicate, fromRight) {
- var length = array.length,
- index = fromRight ? length : -1;
-
- while ((fromRight ? index-- : ++index < length)) {
- if (predicate(array[index], index, array)) {
- return index;
- }
- }
- return -1;
-}
-
-module.exports = baseFindIndex;
diff --git a/deps/npm/node_modules/lodash/internal/baseFlatten.js b/deps/npm/node_modules/lodash/internal/baseFlatten.js
deleted file mode 100644
index 7443233220..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseFlatten.js
+++ /dev/null
@@ -1,41 +0,0 @@
-var arrayPush = require('./arrayPush'),
- isArguments = require('../lang/isArguments'),
- isArray = require('../lang/isArray'),
- isArrayLike = require('./isArrayLike'),
- isObjectLike = require('./isObjectLike');
-
-/**
- * The base implementation of `_.flatten` with added support for restricting
- * flattening and specifying the start index.
- *
- * @private
- * @param {Array} array The array to flatten.
- * @param {boolean} [isDeep] Specify a deep flatten.
- * @param {boolean} [isStrict] Restrict flattening to arrays-like objects.
- * @param {Array} [result=[]] The initial result value.
- * @returns {Array} Returns the new flattened array.
- */
-function baseFlatten(array, isDeep, isStrict, result) {
- result || (result = []);
-
- var index = -1,
- length = array.length;
-
- while (++index < length) {
- var value = array[index];
- if (isObjectLike(value) && isArrayLike(value) &&
- (isStrict || isArray(value) || isArguments(value))) {
- if (isDeep) {
- // Recursively flatten arrays (susceptible to call stack limits).
- baseFlatten(value, isDeep, isStrict, result);
- } else {
- arrayPush(result, value);
- }
- } else if (!isStrict) {
- result[result.length] = value;
- }
- }
- return result;
-}
-
-module.exports = baseFlatten;
diff --git a/deps/npm/node_modules/lodash/internal/baseFor.js b/deps/npm/node_modules/lodash/internal/baseFor.js
deleted file mode 100644
index 94ee03f925..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseFor.js
+++ /dev/null
@@ -1,17 +0,0 @@
-var createBaseFor = require('./createBaseFor');
-
-/**
- * The base implementation of `baseForIn` and `baseForOwn` which iterates
- * over `object` properties returned by `keysFunc` invoking `iteratee` for
- * each property. Iteratee functions may exit iteration early by explicitly
- * returning `false`.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @returns {Object} Returns `object`.
- */
-var baseFor = createBaseFor();
-
-module.exports = baseFor;
diff --git a/deps/npm/node_modules/lodash/internal/baseForIn.js b/deps/npm/node_modules/lodash/internal/baseForIn.js
deleted file mode 100644
index 47d622c384..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseForIn.js
+++ /dev/null
@@ -1,17 +0,0 @@
-var baseFor = require('./baseFor'),
- keysIn = require('../object/keysIn');
-
-/**
- * The base implementation of `_.forIn` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Object} Returns `object`.
- */
-function baseForIn(object, iteratee) {
- return baseFor(object, iteratee, keysIn);
-}
-
-module.exports = baseForIn;
diff --git a/deps/npm/node_modules/lodash/internal/baseForOwn.js b/deps/npm/node_modules/lodash/internal/baseForOwn.js
deleted file mode 100644
index bef4d4c35f..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseForOwn.js
+++ /dev/null
@@ -1,17 +0,0 @@
-var baseFor = require('./baseFor'),
- keys = require('../object/keys');
-
-/**
- * The base implementation of `_.forOwn` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Object} Returns `object`.
- */
-function baseForOwn(object, iteratee) {
- return baseFor(object, iteratee, keys);
-}
-
-module.exports = baseForOwn;
diff --git a/deps/npm/node_modules/lodash/internal/baseForOwnRight.js b/deps/npm/node_modules/lodash/internal/baseForOwnRight.js
deleted file mode 100644
index bb916bc75a..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseForOwnRight.js
+++ /dev/null
@@ -1,17 +0,0 @@
-var baseForRight = require('./baseForRight'),
- keys = require('../object/keys');
-
-/**
- * The base implementation of `_.forOwnRight` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Object} Returns `object`.
- */
-function baseForOwnRight(object, iteratee) {
- return baseForRight(object, iteratee, keys);
-}
-
-module.exports = baseForOwnRight;
diff --git a/deps/npm/node_modules/lodash/internal/baseForRight.js b/deps/npm/node_modules/lodash/internal/baseForRight.js
deleted file mode 100644
index 5ddd191325..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseForRight.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var createBaseFor = require('./createBaseFor');
-
-/**
- * This function is like `baseFor` except that it iterates over properties
- * in the opposite order.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @returns {Object} Returns `object`.
- */
-var baseForRight = createBaseFor(true);
-
-module.exports = baseForRight;
diff --git a/deps/npm/node_modules/lodash/internal/baseFunctions.js b/deps/npm/node_modules/lodash/internal/baseFunctions.js
deleted file mode 100644
index d56ea9c5dc..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseFunctions.js
+++ /dev/null
@@ -1,27 +0,0 @@
-var isFunction = require('../lang/isFunction');
-
-/**
- * The base implementation of `_.functions` which creates an array of
- * `object` function property names filtered from those provided.
- *
- * @private
- * @param {Object} object The object to inspect.
- * @param {Array} props The property names to filter.
- * @returns {Array} Returns the new array of filtered property names.
- */
-function baseFunctions(object, props) {
- var index = -1,
- length = props.length,
- resIndex = -1,
- result = [];
-
- while (++index < length) {
- var key = props[index];
- if (isFunction(object[key])) {
- result[++resIndex] = key;
- }
- }
- return result;
-}
-
-module.exports = baseFunctions;
diff --git a/deps/npm/node_modules/lodash/internal/baseGet.js b/deps/npm/node_modules/lodash/internal/baseGet.js
deleted file mode 100644
index ad9b1ee11b..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseGet.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var toObject = require('./toObject');
-
-/**
- * The base implementation of `get` without support for string paths
- * and default values.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array} path The path of the property to get.
- * @param {string} [pathKey] The key representation of path.
- * @returns {*} Returns the resolved value.
- */
-function baseGet(object, path, pathKey) {
- if (object == null) {
- return;
- }
- if (pathKey !== undefined && pathKey in toObject(object)) {
- path = [pathKey];
- }
- var index = 0,
- length = path.length;
-
- while (object != null && index < length) {
- object = object[path[index++]];
- }
- return (index && index == length) ? object : undefined;
-}
-
-module.exports = baseGet;
diff --git a/deps/npm/node_modules/lodash/internal/baseIndexOf.js b/deps/npm/node_modules/lodash/internal/baseIndexOf.js
deleted file mode 100644
index 6b479bce1e..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseIndexOf.js
+++ /dev/null
@@ -1,27 +0,0 @@
-var indexOfNaN = require('./indexOfNaN');
-
-/**
- * The base implementation of `_.indexOf` without support for binary searches.
- *
- * @private
- * @param {Array} array The array to search.
- * @param {*} value The value to search for.
- * @param {number} fromIndex The index to search from.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
-function baseIndexOf(array, value, fromIndex) {
- if (value !== value) {
- return indexOfNaN(array, fromIndex);
- }
- var index = fromIndex - 1,
- length = array.length;
-
- while (++index < length) {
- if (array[index] === value) {
- return index;
- }
- }
- return -1;
-}
-
-module.exports = baseIndexOf;
diff --git a/deps/npm/node_modules/lodash/internal/baseIsEqual.js b/deps/npm/node_modules/lodash/internal/baseIsEqual.js
deleted file mode 100644
index 87e14ac556..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseIsEqual.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var baseIsEqualDeep = require('./baseIsEqualDeep'),
- isObject = require('../lang/isObject'),
- isObjectLike = require('./isObjectLike');
-
-/**
- * The base implementation of `_.isEqual` without support for `this` binding
- * `customizer` functions.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @param {Function} [customizer] The function to customize comparing values.
- * @param {boolean} [isLoose] Specify performing partial comparisons.
- * @param {Array} [stackA] Tracks traversed `value` objects.
- * @param {Array} [stackB] Tracks traversed `other` objects.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- */
-function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) {
- if (value === other) {
- return true;
- }
- if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
- return value !== value && other !== other;
- }
- return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB);
-}
-
-module.exports = baseIsEqual;
diff --git a/deps/npm/node_modules/lodash/internal/baseIsEqualDeep.js b/deps/npm/node_modules/lodash/internal/baseIsEqualDeep.js
deleted file mode 100644
index f1dbffe891..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseIsEqualDeep.js
+++ /dev/null
@@ -1,102 +0,0 @@
-var equalArrays = require('./equalArrays'),
- equalByTag = require('./equalByTag'),
- equalObjects = require('./equalObjects'),
- isArray = require('../lang/isArray'),
- isTypedArray = require('../lang/isTypedArray');
-
-/** `Object#toString` result references. */
-var argsTag = '[object Arguments]',
- arrayTag = '[object Array]',
- objectTag = '[object Object]';
-
-/** Used for native method references. */
-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/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objToString = objectProto.toString;
-
-/**
- * A specialized version of `baseIsEqual` for arrays and objects which performs
- * deep comparisons and tracks traversed objects enabling objects with circular
- * references to be compared.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} [customizer] The function to customize comparing objects.
- * @param {boolean} [isLoose] Specify performing partial comparisons.
- * @param {Array} [stackA=[]] Tracks traversed `value` objects.
- * @param {Array} [stackB=[]] Tracks traversed `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
-function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
- var objIsArr = isArray(object),
- othIsArr = isArray(other),
- objTag = arrayTag,
- othTag = arrayTag;
-
- if (!objIsArr) {
- objTag = objToString.call(object);
- if (objTag == argsTag) {
- objTag = objectTag;
- } else if (objTag != objectTag) {
- objIsArr = isTypedArray(object);
- }
- }
- if (!othIsArr) {
- othTag = objToString.call(other);
- if (othTag == argsTag) {
- othTag = objectTag;
- } else if (othTag != objectTag) {
- othIsArr = isTypedArray(other);
- }
- }
- var objIsObj = objTag == objectTag,
- othIsObj = othTag == objectTag,
- isSameTag = objTag == othTag;
-
- if (isSameTag && !(objIsArr || objIsObj)) {
- return equalByTag(object, other, objTag);
- }
- if (!isLoose) {
- var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
- othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
-
- if (objIsWrapped || othIsWrapped) {
- return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB);
- }
- }
- if (!isSameTag) {
- return false;
- }
- // Assume cyclic values are equal.
- // For more information on detecting circular references see https://es5.github.io/#JO.
- stackA || (stackA = []);
- stackB || (stackB = []);
-
- var length = stackA.length;
- while (length--) {
- if (stackA[length] == object) {
- return stackB[length] == other;
- }
- }
- // Add `object` and `other` to the stack of traversed objects.
- stackA.push(object);
- stackB.push(other);
-
- var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB);
-
- stackA.pop();
- stackB.pop();
-
- return result;
-}
-
-module.exports = baseIsEqualDeep;
diff --git a/deps/npm/node_modules/lodash/internal/baseIsFunction.js b/deps/npm/node_modules/lodash/internal/baseIsFunction.js
deleted file mode 100644
index cd92db30f3..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseIsFunction.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * The base implementation of `_.isFunction` without support for environments
- * with incorrect `typeof` results.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- */
-function baseIsFunction(value) {
- // Avoid a Chakra JIT bug in compatibility modes of IE 11.
- // See https://github.com/jashkenas/underscore/issues/1621 for more details.
- return typeof value == 'function' || false;
-}
-
-module.exports = baseIsFunction;
diff --git a/deps/npm/node_modules/lodash/internal/baseIsMatch.js b/deps/npm/node_modules/lodash/internal/baseIsMatch.js
deleted file mode 100644
index ea48bb6567..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseIsMatch.js
+++ /dev/null
@@ -1,52 +0,0 @@
-var baseIsEqual = require('./baseIsEqual'),
- toObject = require('./toObject');
-
-/**
- * The base implementation of `_.isMatch` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Object} object The object to inspect.
- * @param {Array} matchData The propery names, values, and compare flags to match.
- * @param {Function} [customizer] The function to customize comparing objects.
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
- */
-function baseIsMatch(object, matchData, customizer) {
- var index = matchData.length,
- length = index,
- noCustomizer = !customizer;
-
- if (object == null) {
- return !length;
- }
- object = toObject(object);
- while (index--) {
- var data = matchData[index];
- if ((noCustomizer && data[2])
- ? data[1] !== object[data[0]]
- : !(data[0] in object)
- ) {
- return false;
- }
- }
- while (++index < length) {
- data = matchData[index];
- var key = data[0],
- objValue = object[key],
- srcValue = data[1];
-
- if (noCustomizer && data[2]) {
- if (objValue === undefined && !(key in object)) {
- return false;
- }
- } else {
- var result = customizer ? customizer(objValue, srcValue, key) : undefined;
- if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) {
- return false;
- }
- }
- }
- return true;
-}
-
-module.exports = baseIsMatch;
diff --git a/deps/npm/node_modules/lodash/internal/baseLodash.js b/deps/npm/node_modules/lodash/internal/baseLodash.js
deleted file mode 100644
index 15b79d3f7b..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseLodash.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/**
- * The function whose prototype all chaining wrappers inherit from.
- *
- * @private
- */
-function baseLodash() {
- // No operation performed.
-}
-
-module.exports = baseLodash;
diff --git a/deps/npm/node_modules/lodash/internal/baseMap.js b/deps/npm/node_modules/lodash/internal/baseMap.js
deleted file mode 100644
index 2906b518f9..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseMap.js
+++ /dev/null
@@ -1,23 +0,0 @@
-var baseEach = require('./baseEach'),
- isArrayLike = require('./isArrayLike');
-
-/**
- * The base implementation of `_.map` without support for callback shorthands
- * and `this` binding.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- */
-function baseMap(collection, iteratee) {
- var index = -1,
- result = isArrayLike(collection) ? Array(collection.length) : [];
-
- baseEach(collection, function(value, key, collection) {
- result[++index] = iteratee(value, key, collection);
- });
- return result;
-}
-
-module.exports = baseMap;
diff --git a/deps/npm/node_modules/lodash/internal/baseMatches.js b/deps/npm/node_modules/lodash/internal/baseMatches.js
deleted file mode 100644
index 5f76c67dcd..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseMatches.js
+++ /dev/null
@@ -1,30 +0,0 @@
-var baseIsMatch = require('./baseIsMatch'),
- getMatchData = require('./getMatchData'),
- toObject = require('./toObject');
-
-/**
- * The base implementation of `_.matches` which does not clone `source`.
- *
- * @private
- * @param {Object} source The object of property values to match.
- * @returns {Function} Returns the new function.
- */
-function baseMatches(source) {
- var matchData = getMatchData(source);
- if (matchData.length == 1 && matchData[0][2]) {
- var key = matchData[0][0],
- value = matchData[0][1];
-
- return function(object) {
- if (object == null) {
- return false;
- }
- return object[key] === value && (value !== undefined || (key in toObject(object)));
- };
- }
- return function(object) {
- return baseIsMatch(object, matchData);
- };
-}
-
-module.exports = baseMatches;
diff --git a/deps/npm/node_modules/lodash/internal/baseMatchesProperty.js b/deps/npm/node_modules/lodash/internal/baseMatchesProperty.js
deleted file mode 100644
index 8f9005ce0f..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseMatchesProperty.js
+++ /dev/null
@@ -1,45 +0,0 @@
-var baseGet = require('./baseGet'),
- baseIsEqual = require('./baseIsEqual'),
- baseSlice = require('./baseSlice'),
- isArray = require('../lang/isArray'),
- isKey = require('./isKey'),
- isStrictComparable = require('./isStrictComparable'),
- last = require('../array/last'),
- toObject = require('./toObject'),
- toPath = require('./toPath');
-
-/**
- * The base implementation of `_.matchesProperty` which does not clone `srcValue`.
- *
- * @private
- * @param {string} path The path of the property to get.
- * @param {*} srcValue The value to compare.
- * @returns {Function} Returns the new function.
- */
-function baseMatchesProperty(path, srcValue) {
- var isArr = isArray(path),
- isCommon = isKey(path) && isStrictComparable(srcValue),
- pathKey = (path + '');
-
- path = toPath(path);
- return function(object) {
- if (object == null) {
- return false;
- }
- var key = pathKey;
- object = toObject(object);
- if ((isArr || !isCommon) && !(key in object)) {
- object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
- if (object == null) {
- return false;
- }
- key = last(path);
- object = toObject(object);
- }
- return object[key] === srcValue
- ? (srcValue !== undefined || (key in object))
- : baseIsEqual(srcValue, object[key], undefined, true);
- };
-}
-
-module.exports = baseMatchesProperty;
diff --git a/deps/npm/node_modules/lodash/internal/baseMerge.js b/deps/npm/node_modules/lodash/internal/baseMerge.js
deleted file mode 100644
index ab81900869..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseMerge.js
+++ /dev/null
@@ -1,56 +0,0 @@
-var arrayEach = require('./arrayEach'),
- baseMergeDeep = require('./baseMergeDeep'),
- isArray = require('../lang/isArray'),
- isArrayLike = require('./isArrayLike'),
- isObject = require('../lang/isObject'),
- isObjectLike = require('./isObjectLike'),
- isTypedArray = require('../lang/isTypedArray'),
- keys = require('../object/keys');
-
-/**
- * The base implementation of `_.merge` without support for argument juggling,
- * multiple sources, and `this` binding `customizer` functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {Function} [customizer] The function to customize merged values.
- * @param {Array} [stackA=[]] Tracks traversed source objects.
- * @param {Array} [stackB=[]] Associates values with source counterparts.
- * @returns {Object} Returns `object`.
- */
-function baseMerge(object, source, customizer, stackA, stackB) {
- if (!isObject(object)) {
- return object;
- }
- var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)),
- props = isSrcArr ? undefined : keys(source);
-
- arrayEach(props || source, function(srcValue, key) {
- if (props) {
- key = srcValue;
- srcValue = source[key];
- }
- if (isObjectLike(srcValue)) {
- stackA || (stackA = []);
- stackB || (stackB = []);
- baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB);
- }
- else {
- var value = object[key],
- result = customizer ? customizer(value, srcValue, key, object, source) : undefined,
- isCommon = result === undefined;
-
- if (isCommon) {
- result = srcValue;
- }
- if ((result !== undefined || (isSrcArr && !(key in object))) &&
- (isCommon || (result === result ? (result !== value) : (value === value)))) {
- object[key] = result;
- }
- }
- });
- return object;
-}
-
-module.exports = baseMerge;
diff --git a/deps/npm/node_modules/lodash/internal/baseMergeDeep.js b/deps/npm/node_modules/lodash/internal/baseMergeDeep.js
deleted file mode 100644
index f8aeac5916..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseMergeDeep.js
+++ /dev/null
@@ -1,67 +0,0 @@
-var arrayCopy = require('./arrayCopy'),
- isArguments = require('../lang/isArguments'),
- isArray = require('../lang/isArray'),
- isArrayLike = require('./isArrayLike'),
- isPlainObject = require('../lang/isPlainObject'),
- isTypedArray = require('../lang/isTypedArray'),
- toPlainObject = require('../lang/toPlainObject');
-
-/**
- * A specialized version of `baseMerge` for arrays and objects which performs
- * deep merges and tracks traversed objects enabling objects with circular
- * references to be merged.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {string} key The key of the value to merge.
- * @param {Function} mergeFunc The function to merge values.
- * @param {Function} [customizer] The function to customize merged values.
- * @param {Array} [stackA=[]] Tracks traversed source objects.
- * @param {Array} [stackB=[]] Associates values with source counterparts.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
-function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) {
- var length = stackA.length,
- srcValue = source[key];
-
- while (length--) {
- if (stackA[length] == srcValue) {
- object[key] = stackB[length];
- return;
- }
- }
- var value = object[key],
- result = customizer ? customizer(value, srcValue, key, object, source) : undefined,
- isCommon = result === undefined;
-
- if (isCommon) {
- result = srcValue;
- if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) {
- result = isArray(value)
- ? value
- : (isArrayLike(value) ? arrayCopy(value) : []);
- }
- else if (isPlainObject(srcValue) || isArguments(srcValue)) {
- result = isArguments(value)
- ? toPlainObject(value)
- : (isPlainObject(value) ? value : {});
- }
- else {
- isCommon = false;
- }
- }
- // Add the source value to the stack of traversed objects and associate
- // it with its merged value.
- stackA.push(srcValue);
- stackB.push(result);
-
- if (isCommon) {
- // Recursively merge objects and arrays (susceptible to call stack limits).
- object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB);
- } else if (result === result ? (result !== value) : (value === value)) {
- object[key] = result;
- }
-}
-
-module.exports = baseMergeDeep;
diff --git a/deps/npm/node_modules/lodash/internal/baseProperty.js b/deps/npm/node_modules/lodash/internal/baseProperty.js
deleted file mode 100644
index e515941c16..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseProperty.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/**
- * The base implementation of `_.property` without support for deep paths.
- *
- * @private
- * @param {string} key The key of the property to get.
- * @returns {Function} Returns the new function.
- */
-function baseProperty(key) {
- return function(object) {
- return object == null ? undefined : object[key];
- };
-}
-
-module.exports = baseProperty;
diff --git a/deps/npm/node_modules/lodash/internal/basePropertyDeep.js b/deps/npm/node_modules/lodash/internal/basePropertyDeep.js
deleted file mode 100644
index 1b6ce40a17..0000000000
--- a/deps/npm/node_modules/lodash/internal/basePropertyDeep.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var baseGet = require('./baseGet'),
- toPath = require('./toPath');
-
-/**
- * A specialized version of `baseProperty` which supports deep paths.
- *
- * @private
- * @param {Array|string} path The path of the property to get.
- * @returns {Function} Returns the new function.
- */
-function basePropertyDeep(path) {
- var pathKey = (path + '');
- path = toPath(path);
- return function(object) {
- return baseGet(object, path, pathKey);
- };
-}
-
-module.exports = basePropertyDeep;
diff --git a/deps/npm/node_modules/lodash/internal/basePullAt.js b/deps/npm/node_modules/lodash/internal/basePullAt.js
deleted file mode 100644
index 6c4ff84200..0000000000
--- a/deps/npm/node_modules/lodash/internal/basePullAt.js
+++ /dev/null
@@ -1,30 +0,0 @@
-var isIndex = require('./isIndex');
-
-/** Used for native method references. */
-var arrayProto = Array.prototype;
-
-/** Native method references. */
-var splice = arrayProto.splice;
-
-/**
- * The base implementation of `_.pullAt` without support for individual
- * index arguments and capturing the removed elements.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {number[]} indexes The indexes of elements to remove.
- * @returns {Array} Returns `array`.
- */
-function basePullAt(array, indexes) {
- var length = array ? indexes.length : 0;
- while (length--) {
- var index = indexes[length];
- if (index != previous && isIndex(index)) {
- var previous = index;
- splice.call(array, index, 1);
- }
- }
- return array;
-}
-
-module.exports = basePullAt;
diff --git a/deps/npm/node_modules/lodash/internal/baseRandom.js b/deps/npm/node_modules/lodash/internal/baseRandom.js
deleted file mode 100644
index fa3326cd17..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseRandom.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeFloor = Math.floor,
- nativeRandom = Math.random;
-
-/**
- * The base implementation of `_.random` without support for argument juggling
- * and returning floating-point numbers.
- *
- * @private
- * @param {number} min The minimum possible value.
- * @param {number} max The maximum possible value.
- * @returns {number} Returns the random number.
- */
-function baseRandom(min, max) {
- return min + nativeFloor(nativeRandom() * (max - min + 1));
-}
-
-module.exports = baseRandom;
diff --git a/deps/npm/node_modules/lodash/internal/baseReduce.js b/deps/npm/node_modules/lodash/internal/baseReduce.js
deleted file mode 100644
index 5e6ae555f9..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseReduce.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * The base implementation of `_.reduce` and `_.reduceRight` without support
- * for callback shorthands and `this` binding, which iterates over `collection`
- * using the provided `eachFunc`.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} accumulator The initial value.
- * @param {boolean} initFromCollection Specify using the first or last element
- * of `collection` as the initial value.
- * @param {Function} eachFunc The function to iterate over `collection`.
- * @returns {*} Returns the accumulated value.
- */
-function baseReduce(collection, iteratee, accumulator, initFromCollection, eachFunc) {
- eachFunc(collection, function(value, index, collection) {
- accumulator = initFromCollection
- ? (initFromCollection = false, value)
- : iteratee(accumulator, value, index, collection);
- });
- return accumulator;
-}
-
-module.exports = baseReduce;
diff --git a/deps/npm/node_modules/lodash/internal/baseSetData.js b/deps/npm/node_modules/lodash/internal/baseSetData.js
deleted file mode 100644
index 5c98622d8d..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseSetData.js
+++ /dev/null
@@ -1,17 +0,0 @@
-var identity = require('../utility/identity'),
- metaMap = require('./metaMap');
-
-/**
- * The base implementation of `setData` without support for hot loop detection.
- *
- * @private
- * @param {Function} func The function to associate metadata with.
- * @param {*} data The metadata.
- * @returns {Function} Returns `func`.
- */
-var baseSetData = !metaMap ? identity : function(func, data) {
- metaMap.set(func, data);
- return func;
-};
-
-module.exports = baseSetData;
diff --git a/deps/npm/node_modules/lodash/internal/baseSlice.js b/deps/npm/node_modules/lodash/internal/baseSlice.js
deleted file mode 100644
index 9d1012efa8..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseSlice.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * The base implementation of `_.slice` without an iteratee call guard.
- *
- * @private
- * @param {Array} array The array to slice.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns the slice of `array`.
- */
-function baseSlice(array, start, end) {
- var index = -1,
- length = array.length;
-
- start = start == null ? 0 : (+start || 0);
- if (start < 0) {
- start = -start > length ? 0 : (length + start);
- }
- end = (end === undefined || end > length) ? length : (+end || 0);
- if (end < 0) {
- end += length;
- }
- length = start > end ? 0 : ((end - start) >>> 0);
- start >>>= 0;
-
- var result = Array(length);
- while (++index < length) {
- result[index] = array[index + start];
- }
- return result;
-}
-
-module.exports = baseSlice;
diff --git a/deps/npm/node_modules/lodash/internal/baseSome.js b/deps/npm/node_modules/lodash/internal/baseSome.js
deleted file mode 100644
index 39a005880d..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseSome.js
+++ /dev/null
@@ -1,23 +0,0 @@
-var baseEach = require('./baseEach');
-
-/**
- * The base implementation of `_.some` without support for callback shorthands
- * and `this` binding.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- * else `false`.
- */
-function baseSome(collection, predicate) {
- var result;
-
- baseEach(collection, function(value, index, collection) {
- result = predicate(value, index, collection);
- return !result;
- });
- return !!result;
-}
-
-module.exports = baseSome;
diff --git a/deps/npm/node_modules/lodash/internal/baseSortBy.js b/deps/npm/node_modules/lodash/internal/baseSortBy.js
deleted file mode 100644
index fec0afeb78..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseSortBy.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * The base implementation of `_.sortBy` which uses `comparer` to define
- * the sort order of `array` and replaces criteria objects with their
- * corresponding values.
- *
- * @private
- * @param {Array} array The array to sort.
- * @param {Function} comparer The function to define sort order.
- * @returns {Array} Returns `array`.
- */
-function baseSortBy(array, comparer) {
- var length = array.length;
-
- array.sort(comparer);
- while (length--) {
- array[length] = array[length].value;
- }
- return array;
-}
-
-module.exports = baseSortBy;
diff --git a/deps/npm/node_modules/lodash/internal/baseSortByOrder.js b/deps/npm/node_modules/lodash/internal/baseSortByOrder.js
deleted file mode 100644
index 0a9ef20796..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseSortByOrder.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var arrayMap = require('./arrayMap'),
- baseCallback = require('./baseCallback'),
- baseMap = require('./baseMap'),
- baseSortBy = require('./baseSortBy'),
- compareMultiple = require('./compareMultiple');
-
-/**
- * The base implementation of `_.sortByOrder` without param guards.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
- * @param {boolean[]} orders The sort orders of `iteratees`.
- * @returns {Array} Returns the new sorted array.
- */
-function baseSortByOrder(collection, iteratees, orders) {
- var index = -1;
-
- iteratees = arrayMap(iteratees, function(iteratee) { return baseCallback(iteratee); });
-
- var result = baseMap(collection, function(value) {
- var criteria = arrayMap(iteratees, function(iteratee) { return iteratee(value); });
- return { 'criteria': criteria, 'index': ++index, 'value': value };
- });
-
- return baseSortBy(result, function(object, other) {
- return compareMultiple(object, other, orders);
- });
-}
-
-module.exports = baseSortByOrder;
diff --git a/deps/npm/node_modules/lodash/internal/baseSum.js b/deps/npm/node_modules/lodash/internal/baseSum.js
deleted file mode 100644
index 019e5ae6ee..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseSum.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var baseEach = require('./baseEach');
-
-/**
- * The base implementation of `_.sum` without support for callback shorthands
- * and `this` binding.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {number} Returns the sum.
- */
-function baseSum(collection, iteratee) {
- var result = 0;
- baseEach(collection, function(value, index, collection) {
- result += +iteratee(value, index, collection) || 0;
- });
- return result;
-}
-
-module.exports = baseSum;
diff --git a/deps/npm/node_modules/lodash/internal/baseToString.js b/deps/npm/node_modules/lodash/internal/baseToString.js
deleted file mode 100644
index b802640b5d..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseToString.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * Converts `value` to a string if it's not one. An empty string is returned
- * for `null` or `undefined` values.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
- */
-function baseToString(value) {
- return value == null ? '' : (value + '');
-}
-
-module.exports = baseToString;
diff --git a/deps/npm/node_modules/lodash/internal/baseUniq.js b/deps/npm/node_modules/lodash/internal/baseUniq.js
deleted file mode 100644
index a043443f2e..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseUniq.js
+++ /dev/null
@@ -1,60 +0,0 @@
-var baseIndexOf = require('./baseIndexOf'),
- cacheIndexOf = require('./cacheIndexOf'),
- createCache = require('./createCache');
-
-/** Used as the size to enable large array optimizations. */
-var LARGE_ARRAY_SIZE = 200;
-
-/**
- * The base implementation of `_.uniq` without support for callback shorthands
- * and `this` binding.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Function} [iteratee] The function invoked per iteration.
- * @returns {Array} Returns the new duplicate free array.
- */
-function baseUniq(array, iteratee) {
- var index = -1,
- indexOf = baseIndexOf,
- length = array.length,
- isCommon = true,
- isLarge = isCommon && length >= LARGE_ARRAY_SIZE,
- seen = isLarge ? createCache() : null,
- result = [];
-
- if (seen) {
- indexOf = cacheIndexOf;
- isCommon = false;
- } else {
- isLarge = false;
- seen = iteratee ? [] : result;
- }
- outer:
- while (++index < length) {
- var value = array[index],
- computed = iteratee ? iteratee(value, index, array) : value;
-
- if (isCommon && value === value) {
- var seenIndex = seen.length;
- while (seenIndex--) {
- if (seen[seenIndex] === computed) {
- continue outer;
- }
- }
- if (iteratee) {
- seen.push(computed);
- }
- result.push(value);
- }
- else if (indexOf(seen, computed, 0) < 0) {
- if (iteratee || isLarge) {
- seen.push(computed);
- }
- result.push(value);
- }
- }
- return result;
-}
-
-module.exports = baseUniq;
diff --git a/deps/npm/node_modules/lodash/internal/baseValues.js b/deps/npm/node_modules/lodash/internal/baseValues.js
deleted file mode 100644
index e8d3ac72fe..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseValues.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * The base implementation of `_.values` and `_.valuesIn` which creates an
- * array of `object` property values corresponding to the property names
- * of `props`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array} props The property names to get values for.
- * @returns {Object} Returns the array of property values.
- */
-function baseValues(object, props) {
- var index = -1,
- length = props.length,
- result = Array(length);
-
- while (++index < length) {
- result[index] = object[props[index]];
- }
- return result;
-}
-
-module.exports = baseValues;
diff --git a/deps/npm/node_modules/lodash/internal/baseWhile.js b/deps/npm/node_modules/lodash/internal/baseWhile.js
deleted file mode 100644
index c24e9bd9d9..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseWhile.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var baseSlice = require('./baseSlice');
-
-/**
- * The base implementation of `_.dropRightWhile`, `_.dropWhile`, `_.takeRightWhile`,
- * and `_.takeWhile` without support for callback shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to query.
- * @param {Function} predicate The function invoked per iteration.
- * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Array} Returns the slice of `array`.
- */
-function baseWhile(array, predicate, isDrop, fromRight) {
- var length = array.length,
- index = fromRight ? length : -1;
-
- while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {}
- return isDrop
- ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
- : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
-}
-
-module.exports = baseWhile;
diff --git a/deps/npm/node_modules/lodash/internal/baseWrapperValue.js b/deps/npm/node_modules/lodash/internal/baseWrapperValue.js
deleted file mode 100644
index 629c01fd14..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseWrapperValue.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var LazyWrapper = require('./LazyWrapper'),
- arrayPush = require('./arrayPush');
-
-/**
- * The base implementation of `wrapperValue` which returns the result of
- * performing a sequence of actions on the unwrapped `value`, where each
- * successive action is supplied the return value of the previous.
- *
- * @private
- * @param {*} value The unwrapped value.
- * @param {Array} actions Actions to peform to resolve the unwrapped value.
- * @returns {*} Returns the resolved value.
- */
-function baseWrapperValue(value, actions) {
- var result = value;
- if (result instanceof LazyWrapper) {
- result = result.value();
- }
- var index = -1,
- length = actions.length;
-
- while (++index < length) {
- var action = actions[index];
- result = action.func.apply(action.thisArg, arrayPush([result], action.args));
- }
- return result;
-}
-
-module.exports = baseWrapperValue;
diff --git a/deps/npm/node_modules/lodash/internal/binaryIndex.js b/deps/npm/node_modules/lodash/internal/binaryIndex.js
deleted file mode 100644
index af419a26f2..0000000000
--- a/deps/npm/node_modules/lodash/internal/binaryIndex.js
+++ /dev/null
@@ -1,39 +0,0 @@
-var binaryIndexBy = require('./binaryIndexBy'),
- identity = require('../utility/identity');
-
-/** Used as references for the maximum length and index of an array. */
-var MAX_ARRAY_LENGTH = 4294967295,
- HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
-
-/**
- * Performs a binary search of `array` to determine the index at which `value`
- * should be inserted into `array` in order to maintain its sort order.
- *
- * @private
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {boolean} [retHighest] Specify returning the highest qualified index.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- */
-function binaryIndex(array, value, retHighest) {
- var low = 0,
- high = array ? array.length : low;
-
- if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
- while (low < high) {
- var mid = (low + high) >>> 1,
- computed = array[mid];
-
- if ((retHighest ? (computed <= value) : (computed < value)) && computed !== null) {
- low = mid + 1;
- } else {
- high = mid;
- }
- }
- return high;
- }
- return binaryIndexBy(array, value, identity, retHighest);
-}
-
-module.exports = binaryIndex;
diff --git a/deps/npm/node_modules/lodash/internal/binaryIndexBy.js b/deps/npm/node_modules/lodash/internal/binaryIndexBy.js
deleted file mode 100644
index 767cbd216e..0000000000
--- a/deps/npm/node_modules/lodash/internal/binaryIndexBy.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeFloor = Math.floor,
- nativeMin = Math.min;
-
-/** Used as references for the maximum length and index of an array. */
-var MAX_ARRAY_LENGTH = 4294967295,
- MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1;
-
-/**
- * This function is like `binaryIndex` except that it invokes `iteratee` for
- * `value` and each element of `array` to compute their sort ranking. The
- * iteratee is invoked with one argument; (value).
- *
- * @private
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {boolean} [retHighest] Specify returning the highest qualified index.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- */
-function binaryIndexBy(array, value, iteratee, retHighest) {
- value = iteratee(value);
-
- var low = 0,
- high = array ? array.length : 0,
- valIsNaN = value !== value,
- valIsNull = value === null,
- valIsUndef = value === undefined;
-
- while (low < high) {
- var mid = nativeFloor((low + high) / 2),
- computed = iteratee(array[mid]),
- isDef = computed !== undefined,
- isReflexive = computed === computed;
-
- if (valIsNaN) {
- var setLow = isReflexive || retHighest;
- } else if (valIsNull) {
- setLow = isReflexive && isDef && (retHighest || computed != null);
- } else if (valIsUndef) {
- setLow = isReflexive && (retHighest || isDef);
- } else if (computed == null) {
- setLow = false;
- } else {
- setLow = retHighest ? (computed <= value) : (computed < value);
- }
- if (setLow) {
- low = mid + 1;
- } else {
- high = mid;
- }
- }
- return nativeMin(high, MAX_ARRAY_INDEX);
-}
-
-module.exports = binaryIndexBy;
diff --git a/deps/npm/node_modules/lodash/internal/bindCallback.js b/deps/npm/node_modules/lodash/internal/bindCallback.js
deleted file mode 100644
index cdc7f49aea..0000000000
--- a/deps/npm/node_modules/lodash/internal/bindCallback.js
+++ /dev/null
@@ -1,39 +0,0 @@
-var identity = require('../utility/identity');
-
-/**
- * A specialized version of `baseCallback` which only supports `this` binding
- * and specifying the number of arguments to provide to `func`.
- *
- * @private
- * @param {Function} func The function to bind.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {number} [argCount] The number of arguments to provide to `func`.
- * @returns {Function} Returns the callback.
- */
-function bindCallback(func, thisArg, argCount) {
- if (typeof func != 'function') {
- return identity;
- }
- if (thisArg === undefined) {
- return func;
- }
- switch (argCount) {
- case 1: return function(value) {
- return func.call(thisArg, value);
- };
- case 3: return function(value, index, collection) {
- return func.call(thisArg, value, index, collection);
- };
- case 4: return function(accumulator, value, index, collection) {
- return func.call(thisArg, accumulator, value, index, collection);
- };
- case 5: return function(value, other, key, object, source) {
- return func.call(thisArg, value, other, key, object, source);
- };
- }
- return function() {
- return func.apply(thisArg, arguments);
- };
-}
-
-module.exports = bindCallback;
diff --git a/deps/npm/node_modules/lodash/internal/bufferClone.js b/deps/npm/node_modules/lodash/internal/bufferClone.js
deleted file mode 100644
index f3c12b8c12..0000000000
--- a/deps/npm/node_modules/lodash/internal/bufferClone.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/** Native method references. */
-var ArrayBuffer = global.ArrayBuffer,
- Uint8Array = global.Uint8Array;
-
-/**
- * Creates a clone of the given array buffer.
- *
- * @private
- * @param {ArrayBuffer} buffer The array buffer to clone.
- * @returns {ArrayBuffer} Returns the cloned array buffer.
- */
-function bufferClone(buffer) {
- var result = new ArrayBuffer(buffer.byteLength),
- view = new Uint8Array(result);
-
- view.set(new Uint8Array(buffer));
- return result;
-}
-
-module.exports = bufferClone;
diff --git a/deps/npm/node_modules/lodash/internal/cacheIndexOf.js b/deps/npm/node_modules/lodash/internal/cacheIndexOf.js
deleted file mode 100644
index 09f698ab8b..0000000000
--- a/deps/npm/node_modules/lodash/internal/cacheIndexOf.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var isObject = require('../lang/isObject');
-
-/**
- * Checks if `value` is in `cache` mimicking the return signature of
- * `_.indexOf` by returning `0` if the value is found, else `-1`.
- *
- * @private
- * @param {Object} cache The cache to search.
- * @param {*} value The value to search for.
- * @returns {number} Returns `0` if `value` is found, else `-1`.
- */
-function cacheIndexOf(cache, value) {
- var data = cache.data,
- result = (typeof value == 'string' || isObject(value)) ? data.set.has(value) : data.hash[value];
-
- return result ? 0 : -1;
-}
-
-module.exports = cacheIndexOf;
diff --git a/deps/npm/node_modules/lodash/internal/cachePush.js b/deps/npm/node_modules/lodash/internal/cachePush.js
deleted file mode 100644
index ba03a1528a..0000000000
--- a/deps/npm/node_modules/lodash/internal/cachePush.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var isObject = require('../lang/isObject');
-
-/**
- * Adds `value` to the cache.
- *
- * @private
- * @name push
- * @memberOf SetCache
- * @param {*} value The value to cache.
- */
-function cachePush(value) {
- var data = this.data;
- if (typeof value == 'string' || isObject(value)) {
- data.set.add(value);
- } else {
- data.hash[value] = true;
- }
-}
-
-module.exports = cachePush;
diff --git a/deps/npm/node_modules/lodash/internal/charsLeftIndex.js b/deps/npm/node_modules/lodash/internal/charsLeftIndex.js
deleted file mode 100644
index a6d1d81c03..0000000000
--- a/deps/npm/node_modules/lodash/internal/charsLeftIndex.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * Used by `_.trim` and `_.trimLeft` to get the index of the first character
- * of `string` that is not found in `chars`.
- *
- * @private
- * @param {string} string The string to inspect.
- * @param {string} chars The characters to find.
- * @returns {number} Returns the index of the first character not found in `chars`.
- */
-function charsLeftIndex(string, chars) {
- var index = -1,
- length = string.length;
-
- while (++index < length && chars.indexOf(string.charAt(index)) > -1) {}
- return index;
-}
-
-module.exports = charsLeftIndex;
diff --git a/deps/npm/node_modules/lodash/internal/charsRightIndex.js b/deps/npm/node_modules/lodash/internal/charsRightIndex.js
deleted file mode 100644
index 1251dcb2a2..0000000000
--- a/deps/npm/node_modules/lodash/internal/charsRightIndex.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Used by `_.trim` and `_.trimRight` to get the index of the last character
- * of `string` that is not found in `chars`.
- *
- * @private
- * @param {string} string The string to inspect.
- * @param {string} chars The characters to find.
- * @returns {number} Returns the index of the last character not found in `chars`.
- */
-function charsRightIndex(string, chars) {
- var index = string.length;
-
- while (index-- && chars.indexOf(string.charAt(index)) > -1) {}
- return index;
-}
-
-module.exports = charsRightIndex;
diff --git a/deps/npm/node_modules/lodash/internal/compareAscending.js b/deps/npm/node_modules/lodash/internal/compareAscending.js
deleted file mode 100644
index f17b11750e..0000000000
--- a/deps/npm/node_modules/lodash/internal/compareAscending.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var baseCompareAscending = require('./baseCompareAscending');
-
-/**
- * Used by `_.sortBy` to compare transformed elements of a collection and stable
- * sort them in ascending order.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @returns {number} Returns the sort order indicator for `object`.
- */
-function compareAscending(object, other) {
- return baseCompareAscending(object.criteria, other.criteria) || (object.index - other.index);
-}
-
-module.exports = compareAscending;
diff --git a/deps/npm/node_modules/lodash/internal/compareMultiple.js b/deps/npm/node_modules/lodash/internal/compareMultiple.js
deleted file mode 100644
index b2139f778d..0000000000
--- a/deps/npm/node_modules/lodash/internal/compareMultiple.js
+++ /dev/null
@@ -1,44 +0,0 @@
-var baseCompareAscending = require('./baseCompareAscending');
-
-/**
- * Used by `_.sortByOrder` to compare multiple properties of a value to another
- * and stable sort them.
- *
- * If `orders` is unspecified, all valuess are sorted in ascending order. Otherwise,
- * a value is sorted in ascending order if its corresponding order is "asc", and
- * descending if "desc".
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {boolean[]} orders The order to sort by for each property.
- * @returns {number} Returns the sort order indicator for `object`.
- */
-function compareMultiple(object, other, orders) {
- var index = -1,
- objCriteria = object.criteria,
- othCriteria = other.criteria,
- length = objCriteria.length,
- ordersLength = orders.length;
-
- while (++index < length) {
- var result = baseCompareAscending(objCriteria[index], othCriteria[index]);
- if (result) {
- if (index >= ordersLength) {
- return result;
- }
- var order = orders[index];
- return result * ((order === 'asc' || order === true) ? 1 : -1);
- }
- }
- // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
- // that causes it, under certain circumstances, to provide the same value for
- // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
- // for more details.
- //
- // This also ensures a stable sort in V8 and other engines.
- // See https://code.google.com/p/v8/issues/detail?id=90 for more details.
- return object.index - other.index;
-}
-
-module.exports = compareMultiple;
diff --git a/deps/npm/node_modules/lodash/internal/composeArgs.js b/deps/npm/node_modules/lodash/internal/composeArgs.js
deleted file mode 100644
index cd5a2fedd3..0000000000
--- a/deps/npm/node_modules/lodash/internal/composeArgs.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeMax = Math.max;
-
-/**
- * Creates an array that is the composition of partially applied arguments,
- * placeholders, and provided arguments into a single array of arguments.
- *
- * @private
- * @param {Array|Object} args The provided arguments.
- * @param {Array} partials The arguments to prepend to those provided.
- * @param {Array} holders The `partials` placeholder indexes.
- * @returns {Array} Returns the new array of composed arguments.
- */
-function composeArgs(args, partials, holders) {
- var holdersLength = holders.length,
- argsIndex = -1,
- argsLength = nativeMax(args.length - holdersLength, 0),
- leftIndex = -1,
- leftLength = partials.length,
- result = Array(leftLength + argsLength);
-
- while (++leftIndex < leftLength) {
- result[leftIndex] = partials[leftIndex];
- }
- while (++argsIndex < holdersLength) {
- result[holders[argsIndex]] = args[argsIndex];
- }
- while (argsLength--) {
- result[leftIndex++] = args[argsIndex++];
- }
- return result;
-}
-
-module.exports = composeArgs;
diff --git a/deps/npm/node_modules/lodash/internal/composeArgsRight.js b/deps/npm/node_modules/lodash/internal/composeArgsRight.js
deleted file mode 100644
index 38ab1392b2..0000000000
--- a/deps/npm/node_modules/lodash/internal/composeArgsRight.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeMax = Math.max;
-
-/**
- * This function is like `composeArgs` except that the arguments composition
- * is tailored for `_.partialRight`.
- *
- * @private
- * @param {Array|Object} args The provided arguments.
- * @param {Array} partials The arguments to append to those provided.
- * @param {Array} holders The `partials` placeholder indexes.
- * @returns {Array} Returns the new array of composed arguments.
- */
-function composeArgsRight(args, partials, holders) {
- var holdersIndex = -1,
- holdersLength = holders.length,
- argsIndex = -1,
- argsLength = nativeMax(args.length - holdersLength, 0),
- rightIndex = -1,
- rightLength = partials.length,
- result = Array(argsLength + rightLength);
-
- while (++argsIndex < argsLength) {
- result[argsIndex] = args[argsIndex];
- }
- var offset = argsIndex;
- while (++rightIndex < rightLength) {
- result[offset + rightIndex] = partials[rightIndex];
- }
- while (++holdersIndex < holdersLength) {
- result[offset + holders[holdersIndex]] = args[argsIndex++];
- }
- return result;
-}
-
-module.exports = composeArgsRight;
diff --git a/deps/npm/node_modules/lodash/internal/createAggregator.js b/deps/npm/node_modules/lodash/internal/createAggregator.js
deleted file mode 100644
index c3d3cec6e1..0000000000
--- a/deps/npm/node_modules/lodash/internal/createAggregator.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var baseCallback = require('./baseCallback'),
- baseEach = require('./baseEach'),
- isArray = require('../lang/isArray');
-
-/**
- * Creates a `_.countBy`, `_.groupBy`, `_.indexBy`, or `_.partition` function.
- *
- * @private
- * @param {Function} setter The function to set keys and values of the accumulator object.
- * @param {Function} [initializer] The function to initialize the accumulator object.
- * @returns {Function} Returns the new aggregator function.
- */
-function createAggregator(setter, initializer) {
- return function(collection, iteratee, thisArg) {
- var result = initializer ? initializer() : {};
- iteratee = baseCallback(iteratee, thisArg, 3);
-
- if (isArray(collection)) {
- var index = -1,
- length = collection.length;
-
- while (++index < length) {
- var value = collection[index];
- setter(result, value, iteratee(value, index, collection), collection);
- }
- } else {
- baseEach(collection, function(value, key, collection) {
- setter(result, value, iteratee(value, key, collection), collection);
- });
- }
- return result;
- };
-}
-
-module.exports = createAggregator;
diff --git a/deps/npm/node_modules/lodash/internal/createAssigner.js b/deps/npm/node_modules/lodash/internal/createAssigner.js
deleted file mode 100644
index ea5a5a495f..0000000000
--- a/deps/npm/node_modules/lodash/internal/createAssigner.js
+++ /dev/null
@@ -1,41 +0,0 @@
-var bindCallback = require('./bindCallback'),
- isIterateeCall = require('./isIterateeCall'),
- restParam = require('../function/restParam');
-
-/**
- * Creates a `_.assign`, `_.defaults`, or `_.merge` function.
- *
- * @private
- * @param {Function} assigner The function to assign values.
- * @returns {Function} Returns the new assigner function.
- */
-function createAssigner(assigner) {
- return restParam(function(object, sources) {
- var index = -1,
- length = object == null ? 0 : sources.length,
- customizer = length > 2 ? sources[length - 2] : undefined,
- guard = length > 2 ? sources[2] : undefined,
- thisArg = length > 1 ? sources[length - 1] : undefined;
-
- if (typeof customizer == 'function') {
- customizer = bindCallback(customizer, thisArg, 5);
- length -= 2;
- } else {
- customizer = typeof thisArg == 'function' ? thisArg : undefined;
- length -= (customizer ? 1 : 0);
- }
- if (guard && isIterateeCall(sources[0], sources[1], guard)) {
- customizer = length < 3 ? undefined : customizer;
- length = 1;
- }
- while (++index < length) {
- var source = sources[index];
- if (source) {
- assigner(object, source, customizer);
- }
- }
- return object;
- });
-}
-
-module.exports = createAssigner;
diff --git a/deps/npm/node_modules/lodash/internal/createBaseEach.js b/deps/npm/node_modules/lodash/internal/createBaseEach.js
deleted file mode 100644
index b55c39ba1c..0000000000
--- a/deps/npm/node_modules/lodash/internal/createBaseEach.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var getLength = require('./getLength'),
- isLength = require('./isLength'),
- toObject = require('./toObject');
-
-/**
- * Creates a `baseEach` or `baseEachRight` function.
- *
- * @private
- * @param {Function} eachFunc The function to iterate over a collection.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
- */
-function createBaseEach(eachFunc, fromRight) {
- return function(collection, iteratee) {
- var length = collection ? getLength(collection) : 0;
- if (!isLength(length)) {
- return eachFunc(collection, iteratee);
- }
- var index = fromRight ? length : -1,
- iterable = toObject(collection);
-
- while ((fromRight ? index-- : ++index < length)) {
- if (iteratee(iterable[index], index, iterable) === false) {
- break;
- }
- }
- return collection;
- };
-}
-
-module.exports = createBaseEach;
diff --git a/deps/npm/node_modules/lodash/internal/createBaseFor.js b/deps/npm/node_modules/lodash/internal/createBaseFor.js
deleted file mode 100644
index 3c2cac510e..0000000000
--- a/deps/npm/node_modules/lodash/internal/createBaseFor.js
+++ /dev/null
@@ -1,27 +0,0 @@
-var toObject = require('./toObject');
-
-/**
- * Creates a base function for `_.forIn` or `_.forInRight`.
- *
- * @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
- */
-function createBaseFor(fromRight) {
- return function(object, iteratee, keysFunc) {
- var iterable = toObject(object),
- props = keysFunc(object),
- length = props.length,
- index = fromRight ? length : -1;
-
- while ((fromRight ? index-- : ++index < length)) {
- var key = props[index];
- if (iteratee(iterable[key], key, iterable) === false) {
- break;
- }
- }
- return object;
- };
-}
-
-module.exports = createBaseFor;
diff --git a/deps/npm/node_modules/lodash/internal/createBindWrapper.js b/deps/npm/node_modules/lodash/internal/createBindWrapper.js
deleted file mode 100644
index 54086ee88c..0000000000
--- a/deps/npm/node_modules/lodash/internal/createBindWrapper.js
+++ /dev/null
@@ -1,22 +0,0 @@
-var createCtorWrapper = require('./createCtorWrapper');
-
-/**
- * Creates a function that wraps `func` and invokes it with the `this`
- * binding of `thisArg`.
- *
- * @private
- * @param {Function} func The function to bind.
- * @param {*} [thisArg] The `this` binding of `func`.
- * @returns {Function} Returns the new bound function.
- */
-function createBindWrapper(func, thisArg) {
- var Ctor = createCtorWrapper(func);
-
- function wrapper() {
- var fn = (this && this !== global && this instanceof wrapper) ? Ctor : func;
- return fn.apply(thisArg, arguments);
- }
- return wrapper;
-}
-
-module.exports = createBindWrapper;
diff --git a/deps/npm/node_modules/lodash/internal/createCache.js b/deps/npm/node_modules/lodash/internal/createCache.js
deleted file mode 100644
index 025e5662ab..0000000000
--- a/deps/npm/node_modules/lodash/internal/createCache.js
+++ /dev/null
@@ -1,21 +0,0 @@
-var SetCache = require('./SetCache'),
- getNative = require('./getNative');
-
-/** Native method references. */
-var Set = getNative(global, 'Set');
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeCreate = getNative(Object, 'create');
-
-/**
- * Creates a `Set` cache object to optimize linear searches of large arrays.
- *
- * @private
- * @param {Array} [values] The values to cache.
- * @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`.
- */
-function createCache(values) {
- return (nativeCreate && Set) ? new SetCache(values) : null;
-}
-
-module.exports = createCache;
diff --git a/deps/npm/node_modules/lodash/internal/createCompounder.js b/deps/npm/node_modules/lodash/internal/createCompounder.js
deleted file mode 100644
index 4c755120c6..0000000000
--- a/deps/npm/node_modules/lodash/internal/createCompounder.js
+++ /dev/null
@@ -1,26 +0,0 @@
-var deburr = require('../string/deburr'),
- words = require('../string/words');
-
-/**
- * Creates a function that produces compound words out of the words in a
- * given string.
- *
- * @private
- * @param {Function} callback The function to combine each word.
- * @returns {Function} Returns the new compounder function.
- */
-function createCompounder(callback) {
- return function(string) {
- var index = -1,
- array = words(deburr(string)),
- length = array.length,
- result = '';
-
- while (++index < length) {
- result = callback(result, array[index], index);
- }
- return result;
- };
-}
-
-module.exports = createCompounder;
diff --git a/deps/npm/node_modules/lodash/internal/createCtorWrapper.js b/deps/npm/node_modules/lodash/internal/createCtorWrapper.js
deleted file mode 100644
index ffbee80358..0000000000
--- a/deps/npm/node_modules/lodash/internal/createCtorWrapper.js
+++ /dev/null
@@ -1,37 +0,0 @@
-var baseCreate = require('./baseCreate'),
- isObject = require('../lang/isObject');
-
-/**
- * Creates a function that produces an instance of `Ctor` regardless of
- * whether it was invoked as part of a `new` expression or by `call` or `apply`.
- *
- * @private
- * @param {Function} Ctor The constructor to wrap.
- * @returns {Function} Returns the new wrapped function.
- */
-function createCtorWrapper(Ctor) {
- return function() {
- // Use a `switch` statement to work with class constructors.
- // See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
- // for more details.
- var args = arguments;
- switch (args.length) {
- case 0: return new Ctor;
- case 1: return new Ctor(args[0]);
- case 2: return new Ctor(args[0], args[1]);
- case 3: return new Ctor(args[0], args[1], args[2]);
- case 4: return new Ctor(args[0], args[1], args[2], args[3]);
- case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
- case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
- case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
- }
- var thisBinding = baseCreate(Ctor.prototype),
- result = Ctor.apply(thisBinding, args);
-
- // Mimic the constructor's `return` behavior.
- // See https://es5.github.io/#x13.2.2 for more details.
- return isObject(result) ? result : thisBinding;
- };
-}
-
-module.exports = createCtorWrapper;
diff --git a/deps/npm/node_modules/lodash/internal/createCurry.js b/deps/npm/node_modules/lodash/internal/createCurry.js
deleted file mode 100644
index e5ced0e28e..0000000000
--- a/deps/npm/node_modules/lodash/internal/createCurry.js
+++ /dev/null
@@ -1,23 +0,0 @@
-var createWrapper = require('./createWrapper'),
- isIterateeCall = require('./isIterateeCall');
-
-/**
- * Creates a `_.curry` or `_.curryRight` function.
- *
- * @private
- * @param {boolean} flag The curry bit flag.
- * @returns {Function} Returns the new curry function.
- */
-function createCurry(flag) {
- function curryFunc(func, arity, guard) {
- if (guard && isIterateeCall(func, arity, guard)) {
- arity = undefined;
- }
- var result = createWrapper(func, flag, undefined, undefined, undefined, undefined, undefined, arity);
- result.placeholder = curryFunc.placeholder;
- return result;
- }
- return curryFunc;
-}
-
-module.exports = createCurry;
diff --git a/deps/npm/node_modules/lodash/internal/createDefaults.js b/deps/npm/node_modules/lodash/internal/createDefaults.js
deleted file mode 100644
index 5663bcb4a7..0000000000
--- a/deps/npm/node_modules/lodash/internal/createDefaults.js
+++ /dev/null
@@ -1,22 +0,0 @@
-var restParam = require('../function/restParam');
-
-/**
- * Creates a `_.defaults` or `_.defaultsDeep` function.
- *
- * @private
- * @param {Function} assigner The function to assign values.
- * @param {Function} customizer The function to customize assigned values.
- * @returns {Function} Returns the new defaults function.
- */
-function createDefaults(assigner, customizer) {
- return restParam(function(args) {
- var object = args[0];
- if (object == null) {
- return object;
- }
- args.push(customizer);
- return assigner.apply(undefined, args);
- });
-}
-
-module.exports = createDefaults;
diff --git a/deps/npm/node_modules/lodash/internal/createExtremum.js b/deps/npm/node_modules/lodash/internal/createExtremum.js
deleted file mode 100644
index 5c4003e52f..0000000000
--- a/deps/npm/node_modules/lodash/internal/createExtremum.js
+++ /dev/null
@@ -1,33 +0,0 @@
-var arrayExtremum = require('./arrayExtremum'),
- baseCallback = require('./baseCallback'),
- baseExtremum = require('./baseExtremum'),
- isArray = require('../lang/isArray'),
- isIterateeCall = require('./isIterateeCall'),
- toIterable = require('./toIterable');
-
-/**
- * Creates a `_.max` or `_.min` function.
- *
- * @private
- * @param {Function} comparator The function used to compare values.
- * @param {*} exValue The initial extremum value.
- * @returns {Function} Returns the new extremum function.
- */
-function createExtremum(comparator, exValue) {
- return function(collection, iteratee, thisArg) {
- if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
- iteratee = undefined;
- }
- iteratee = baseCallback(iteratee, thisArg, 3);
- if (iteratee.length == 1) {
- collection = isArray(collection) ? collection : toIterable(collection);
- var result = arrayExtremum(collection, iteratee, comparator, exValue);
- if (!(collection.length && result === exValue)) {
- return result;
- }
- }
- return baseExtremum(collection, iteratee, comparator, exValue);
- };
-}
-
-module.exports = createExtremum;
diff --git a/deps/npm/node_modules/lodash/internal/createFind.js b/deps/npm/node_modules/lodash/internal/createFind.js
deleted file mode 100644
index 29bf580fb5..0000000000
--- a/deps/npm/node_modules/lodash/internal/createFind.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var baseCallback = require('./baseCallback'),
- baseFind = require('./baseFind'),
- baseFindIndex = require('./baseFindIndex'),
- isArray = require('../lang/isArray');
-
-/**
- * Creates a `_.find` or `_.findLast` function.
- *
- * @private
- * @param {Function} eachFunc The function to iterate over a collection.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new find function.
- */
-function createFind(eachFunc, fromRight) {
- return function(collection, predicate, thisArg) {
- predicate = baseCallback(predicate, thisArg, 3);
- if (isArray(collection)) {
- var index = baseFindIndex(collection, predicate, fromRight);
- return index > -1 ? collection[index] : undefined;
- }
- return baseFind(collection, predicate, eachFunc);
- };
-}
-
-module.exports = createFind;
diff --git a/deps/npm/node_modules/lodash/internal/createFindIndex.js b/deps/npm/node_modules/lodash/internal/createFindIndex.js
deleted file mode 100644
index 3947bea9ae..0000000000
--- a/deps/npm/node_modules/lodash/internal/createFindIndex.js
+++ /dev/null
@@ -1,21 +0,0 @@
-var baseCallback = require('./baseCallback'),
- baseFindIndex = require('./baseFindIndex');
-
-/**
- * Creates a `_.findIndex` or `_.findLastIndex` function.
- *
- * @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new find function.
- */
-function createFindIndex(fromRight) {
- return function(array, predicate, thisArg) {
- if (!(array && array.length)) {
- return -1;
- }
- predicate = baseCallback(predicate, thisArg, 3);
- return baseFindIndex(array, predicate, fromRight);
- };
-}
-
-module.exports = createFindIndex;
diff --git a/deps/npm/node_modules/lodash/internal/createFindKey.js b/deps/npm/node_modules/lodash/internal/createFindKey.js
deleted file mode 100644
index 0ce85e4cbb..0000000000
--- a/deps/npm/node_modules/lodash/internal/createFindKey.js
+++ /dev/null
@@ -1,18 +0,0 @@
-var baseCallback = require('./baseCallback'),
- baseFind = require('./baseFind');
-
-/**
- * Creates a `_.findKey` or `_.findLastKey` function.
- *
- * @private
- * @param {Function} objectFunc The function to iterate over an object.
- * @returns {Function} Returns the new find function.
- */
-function createFindKey(objectFunc) {
- return function(object, predicate, thisArg) {
- predicate = baseCallback(predicate, thisArg, 3);
- return baseFind(object, predicate, objectFunc, true);
- };
-}
-
-module.exports = createFindKey;
diff --git a/deps/npm/node_modules/lodash/internal/createFlow.js b/deps/npm/node_modules/lodash/internal/createFlow.js
deleted file mode 100644
index 52ab38822e..0000000000
--- a/deps/npm/node_modules/lodash/internal/createFlow.js
+++ /dev/null
@@ -1,74 +0,0 @@
-var LodashWrapper = require('./LodashWrapper'),
- getData = require('./getData'),
- getFuncName = require('./getFuncName'),
- isArray = require('../lang/isArray'),
- isLaziable = require('./isLaziable');
-
-/** Used to compose bitmasks for wrapper metadata. */
-var CURRY_FLAG = 8,
- PARTIAL_FLAG = 32,
- ARY_FLAG = 128,
- REARG_FLAG = 256;
-
-/** 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';
-
-/**
- * Creates a `_.flow` or `_.flowRight` function.
- *
- * @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new flow function.
- */
-function createFlow(fromRight) {
- return function() {
- var wrapper,
- length = arguments.length,
- index = fromRight ? length : -1,
- leftIndex = 0,
- funcs = Array(length);
-
- while ((fromRight ? index-- : ++index < length)) {
- var func = funcs[leftIndex++] = arguments[index];
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- if (!wrapper && LodashWrapper.prototype.thru && getFuncName(func) == 'wrapper') {
- wrapper = new LodashWrapper([], true);
- }
- }
- index = wrapper ? -1 : length;
- while (++index < length) {
- func = funcs[index];
-
- var funcName = getFuncName(func),
- data = funcName == 'wrapper' ? getData(func) : undefined;
-
- if (data && isLaziable(data[0]) && data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) && !data[4].length && data[9] == 1) {
- wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
- } else {
- wrapper = (func.length == 1 && isLaziable(func)) ? wrapper[funcName]() : wrapper.thru(func);
- }
- }
- return function() {
- var args = arguments,
- value = args[0];
-
- if (wrapper && args.length == 1 && isArray(value) && value.length >= LARGE_ARRAY_SIZE) {
- return wrapper.plant(value).value();
- }
- var index = 0,
- result = length ? funcs[index].apply(this, args) : value;
-
- while (++index < length) {
- result = funcs[index].call(this, result);
- }
- return result;
- };
- };
-}
-
-module.exports = createFlow;
diff --git a/deps/npm/node_modules/lodash/internal/createForEach.js b/deps/npm/node_modules/lodash/internal/createForEach.js
deleted file mode 100644
index 2aad11c5f7..0000000000
--- a/deps/npm/node_modules/lodash/internal/createForEach.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var bindCallback = require('./bindCallback'),
- isArray = require('../lang/isArray');
-
-/**
- * Creates a function for `_.forEach` or `_.forEachRight`.
- *
- * @private
- * @param {Function} arrayFunc The function to iterate over an array.
- * @param {Function} eachFunc The function to iterate over a collection.
- * @returns {Function} Returns the new each function.
- */
-function createForEach(arrayFunc, eachFunc) {
- return function(collection, iteratee, thisArg) {
- return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection))
- ? arrayFunc(collection, iteratee)
- : eachFunc(collection, bindCallback(iteratee, thisArg, 3));
- };
-}
-
-module.exports = createForEach;
diff --git a/deps/npm/node_modules/lodash/internal/createForIn.js b/deps/npm/node_modules/lodash/internal/createForIn.js
deleted file mode 100644
index f63ffa0baf..0000000000
--- a/deps/npm/node_modules/lodash/internal/createForIn.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var bindCallback = require('./bindCallback'),
- keysIn = require('../object/keysIn');
-
-/**
- * Creates a function for `_.forIn` or `_.forInRight`.
- *
- * @private
- * @param {Function} objectFunc The function to iterate over an object.
- * @returns {Function} Returns the new each function.
- */
-function createForIn(objectFunc) {
- return function(object, iteratee, thisArg) {
- if (typeof iteratee != 'function' || thisArg !== undefined) {
- iteratee = bindCallback(iteratee, thisArg, 3);
- }
- return objectFunc(object, iteratee, keysIn);
- };
-}
-
-module.exports = createForIn;
diff --git a/deps/npm/node_modules/lodash/internal/createForOwn.js b/deps/npm/node_modules/lodash/internal/createForOwn.js
deleted file mode 100644
index b9a83c3b52..0000000000
--- a/deps/npm/node_modules/lodash/internal/createForOwn.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var bindCallback = require('./bindCallback');
-
-/**
- * Creates a function for `_.forOwn` or `_.forOwnRight`.
- *
- * @private
- * @param {Function} objectFunc The function to iterate over an object.
- * @returns {Function} Returns the new each function.
- */
-function createForOwn(objectFunc) {
- return function(object, iteratee, thisArg) {
- if (typeof iteratee != 'function' || thisArg !== undefined) {
- iteratee = bindCallback(iteratee, thisArg, 3);
- }
- return objectFunc(object, iteratee);
- };
-}
-
-module.exports = createForOwn;
diff --git a/deps/npm/node_modules/lodash/internal/createHybridWrapper.js b/deps/npm/node_modules/lodash/internal/createHybridWrapper.js
deleted file mode 100644
index 5382fa0219..0000000000
--- a/deps/npm/node_modules/lodash/internal/createHybridWrapper.js
+++ /dev/null
@@ -1,111 +0,0 @@
-var arrayCopy = require('./arrayCopy'),
- composeArgs = require('./composeArgs'),
- composeArgsRight = require('./composeArgsRight'),
- createCtorWrapper = require('./createCtorWrapper'),
- isLaziable = require('./isLaziable'),
- reorder = require('./reorder'),
- replaceHolders = require('./replaceHolders'),
- setData = require('./setData');
-
-/** Used to compose bitmasks for wrapper metadata. */
-var BIND_FLAG = 1,
- BIND_KEY_FLAG = 2,
- CURRY_BOUND_FLAG = 4,
- CURRY_FLAG = 8,
- CURRY_RIGHT_FLAG = 16,
- PARTIAL_FLAG = 32,
- PARTIAL_RIGHT_FLAG = 64,
- ARY_FLAG = 128;
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeMax = Math.max;
-
-/**
- * Creates a function that wraps `func` and invokes it with optional `this`
- * binding of, partial application, and currying.
- *
- * @private
- * @param {Function|string} func The function or method name to reference.
- * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details.
- * @param {*} [thisArg] The `this` binding of `func`.
- * @param {Array} [partials] The arguments to prepend to those provided to the new function.
- * @param {Array} [holders] The `partials` placeholder indexes.
- * @param {Array} [partialsRight] The arguments to append to those provided to the new function.
- * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
- * @param {Array} [argPos] The argument positions of the new function.
- * @param {number} [ary] The arity cap of `func`.
- * @param {number} [arity] The arity of `func`.
- * @returns {Function} Returns the new wrapped function.
- */
-function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
- var isAry = bitmask & ARY_FLAG,
- isBind = bitmask & BIND_FLAG,
- isBindKey = bitmask & BIND_KEY_FLAG,
- isCurry = bitmask & CURRY_FLAG,
- isCurryBound = bitmask & CURRY_BOUND_FLAG,
- isCurryRight = bitmask & CURRY_RIGHT_FLAG,
- Ctor = isBindKey ? undefined : createCtorWrapper(func);
-
- function wrapper() {
- // Avoid `arguments` object use disqualifying optimizations by
- // converting it to an array before providing it to other functions.
- var length = arguments.length,
- index = length,
- args = Array(length);
-
- while (index--) {
- args[index] = arguments[index];
- }
- if (partials) {
- args = composeArgs(args, partials, holders);
- }
- if (partialsRight) {
- args = composeArgsRight(args, partialsRight, holdersRight);
- }
- if (isCurry || isCurryRight) {
- var placeholder = wrapper.placeholder,
- argsHolders = replaceHolders(args, placeholder);
-
- length -= argsHolders.length;
- if (length < arity) {
- var newArgPos = argPos ? arrayCopy(argPos) : undefined,
- newArity = nativeMax(arity - length, 0),
- newsHolders = isCurry ? argsHolders : undefined,
- newHoldersRight = isCurry ? undefined : argsHolders,
- newPartials = isCurry ? args : undefined,
- newPartialsRight = isCurry ? undefined : args;
-
- bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG);
- bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);
-
- if (!isCurryBound) {
- bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);
- }
- var newData = [func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, newArity],
- result = createHybridWrapper.apply(undefined, newData);
-
- if (isLaziable(func)) {
- setData(result, newData);
- }
- result.placeholder = placeholder;
- return result;
- }
- }
- var thisBinding = isBind ? thisArg : this,
- fn = isBindKey ? thisBinding[func] : func;
-
- if (argPos) {
- args = reorder(args, argPos);
- }
- if (isAry && ary < args.length) {
- args.length = ary;
- }
- if (this && this !== global && this instanceof wrapper) {
- fn = Ctor || createCtorWrapper(func);
- }
- return fn.apply(thisBinding, args);
- }
- return wrapper;
-}
-
-module.exports = createHybridWrapper;
diff --git a/deps/npm/node_modules/lodash/internal/createObjectMapper.js b/deps/npm/node_modules/lodash/internal/createObjectMapper.js
deleted file mode 100644
index 06d6a87399..0000000000
--- a/deps/npm/node_modules/lodash/internal/createObjectMapper.js
+++ /dev/null
@@ -1,26 +0,0 @@
-var baseCallback = require('./baseCallback'),
- baseForOwn = require('./baseForOwn');
-
-/**
- * Creates a function for `_.mapKeys` or `_.mapValues`.
- *
- * @private
- * @param {boolean} [isMapKeys] Specify mapping keys instead of values.
- * @returns {Function} Returns the new map function.
- */
-function createObjectMapper(isMapKeys) {
- return function(object, iteratee, thisArg) {
- var result = {};
- iteratee = baseCallback(iteratee, thisArg, 3);
-
- baseForOwn(object, function(value, key, object) {
- var mapped = iteratee(value, key, object);
- key = isMapKeys ? mapped : key;
- value = isMapKeys ? value : mapped;
- result[key] = value;
- });
- return result;
- };
-}
-
-module.exports = createObjectMapper;
diff --git a/deps/npm/node_modules/lodash/internal/createPadDir.js b/deps/npm/node_modules/lodash/internal/createPadDir.js
deleted file mode 100644
index da0ebf1dd9..0000000000
--- a/deps/npm/node_modules/lodash/internal/createPadDir.js
+++ /dev/null
@@ -1,18 +0,0 @@
-var baseToString = require('./baseToString'),
- createPadding = require('./createPadding');
-
-/**
- * Creates a function for `_.padLeft` or `_.padRight`.
- *
- * @private
- * @param {boolean} [fromRight] Specify padding from the right.
- * @returns {Function} Returns the new pad function.
- */
-function createPadDir(fromRight) {
- return function(string, length, chars) {
- string = baseToString(string);
- return (fromRight ? string : '') + createPadding(string, length, chars) + (fromRight ? '' : string);
- };
-}
-
-module.exports = createPadDir;
diff --git a/deps/npm/node_modules/lodash/internal/createPadding.js b/deps/npm/node_modules/lodash/internal/createPadding.js
deleted file mode 100644
index 810dc24ca3..0000000000
--- a/deps/npm/node_modules/lodash/internal/createPadding.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var repeat = require('../string/repeat');
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeCeil = Math.ceil,
- nativeIsFinite = global.isFinite;
-
-/**
- * Creates the padding required for `string` based on the given `length`.
- * The `chars` string is truncated if the number of characters exceeds `length`.
- *
- * @private
- * @param {string} string The string to create padding for.
- * @param {number} [length=0] The padding length.
- * @param {string} [chars=' '] The string used as padding.
- * @returns {string} Returns the pad for `string`.
- */
-function createPadding(string, length, chars) {
- var strLength = string.length;
- length = +length;
-
- if (strLength >= length || !nativeIsFinite(length)) {
- return '';
- }
- var padLength = length - strLength;
- chars = chars == null ? ' ' : (chars + '');
- return repeat(chars, nativeCeil(padLength / chars.length)).slice(0, padLength);
-}
-
-module.exports = createPadding;
diff --git a/deps/npm/node_modules/lodash/internal/createPartial.js b/deps/npm/node_modules/lodash/internal/createPartial.js
deleted file mode 100644
index 753327539c..0000000000
--- a/deps/npm/node_modules/lodash/internal/createPartial.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var createWrapper = require('./createWrapper'),
- replaceHolders = require('./replaceHolders'),
- restParam = require('../function/restParam');
-
-/**
- * Creates a `_.partial` or `_.partialRight` function.
- *
- * @private
- * @param {boolean} flag The partial bit flag.
- * @returns {Function} Returns the new partial function.
- */
-function createPartial(flag) {
- var partialFunc = restParam(function(func, partials) {
- var holders = replaceHolders(partials, partialFunc.placeholder);
- return createWrapper(func, flag, undefined, partials, holders);
- });
- return partialFunc;
-}
-
-module.exports = createPartial;
diff --git a/deps/npm/node_modules/lodash/internal/createPartialWrapper.js b/deps/npm/node_modules/lodash/internal/createPartialWrapper.js
deleted file mode 100644
index b19f9f0ec1..0000000000
--- a/deps/npm/node_modules/lodash/internal/createPartialWrapper.js
+++ /dev/null
@@ -1,43 +0,0 @@
-var createCtorWrapper = require('./createCtorWrapper');
-
-/** Used to compose bitmasks for wrapper metadata. */
-var BIND_FLAG = 1;
-
-/**
- * Creates a function that wraps `func` and invokes it with the optional `this`
- * binding of `thisArg` and the `partials` prepended to those provided to
- * the wrapper.
- *
- * @private
- * @param {Function} func The function to partially apply arguments to.
- * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {Array} partials The arguments to prepend to those provided to the new function.
- * @returns {Function} Returns the new bound function.
- */
-function createPartialWrapper(func, bitmask, thisArg, partials) {
- var isBind = bitmask & BIND_FLAG,
- Ctor = createCtorWrapper(func);
-
- function wrapper() {
- // Avoid `arguments` object use disqualifying optimizations by
- // converting it to an array before providing it `func`.
- var argsIndex = -1,
- argsLength = arguments.length,
- leftIndex = -1,
- leftLength = partials.length,
- args = Array(leftLength + argsLength);
-
- while (++leftIndex < leftLength) {
- args[leftIndex] = partials[leftIndex];
- }
- while (argsLength--) {
- args[leftIndex++] = arguments[++argsIndex];
- }
- var fn = (this && this !== global && this instanceof wrapper) ? Ctor : func;
- return fn.apply(isBind ? thisArg : this, args);
- }
- return wrapper;
-}
-
-module.exports = createPartialWrapper;
diff --git a/deps/npm/node_modules/lodash/internal/createReduce.js b/deps/npm/node_modules/lodash/internal/createReduce.js
deleted file mode 100644
index 816f4ce71b..0000000000
--- a/deps/npm/node_modules/lodash/internal/createReduce.js
+++ /dev/null
@@ -1,22 +0,0 @@
-var baseCallback = require('./baseCallback'),
- baseReduce = require('./baseReduce'),
- isArray = require('../lang/isArray');
-
-/**
- * Creates a function for `_.reduce` or `_.reduceRight`.
- *
- * @private
- * @param {Function} arrayFunc The function to iterate over an array.
- * @param {Function} eachFunc The function to iterate over a collection.
- * @returns {Function} Returns the new each function.
- */
-function createReduce(arrayFunc, eachFunc) {
- return function(collection, iteratee, accumulator, thisArg) {
- var initFromArray = arguments.length < 3;
- return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection))
- ? arrayFunc(collection, iteratee, accumulator, initFromArray)
- : baseReduce(collection, baseCallback(iteratee, thisArg, 4), accumulator, initFromArray, eachFunc);
- };
-}
-
-module.exports = createReduce;
diff --git a/deps/npm/node_modules/lodash/internal/createRound.js b/deps/npm/node_modules/lodash/internal/createRound.js
deleted file mode 100644
index 21240efb62..0000000000
--- a/deps/npm/node_modules/lodash/internal/createRound.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/** Native method references. */
-var pow = Math.pow;
-
-/**
- * Creates a `_.ceil`, `_.floor`, or `_.round` function.
- *
- * @private
- * @param {string} methodName The name of the `Math` method to use when rounding.
- * @returns {Function} Returns the new round function.
- */
-function createRound(methodName) {
- var func = Math[methodName];
- return function(number, precision) {
- precision = precision === undefined ? 0 : (+precision || 0);
- if (precision) {
- precision = pow(10, precision);
- return func(number * precision) / precision;
- }
- return func(number);
- };
-}
-
-module.exports = createRound;
diff --git a/deps/npm/node_modules/lodash/internal/createSortedIndex.js b/deps/npm/node_modules/lodash/internal/createSortedIndex.js
deleted file mode 100644
index 86c78520c9..0000000000
--- a/deps/npm/node_modules/lodash/internal/createSortedIndex.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var baseCallback = require('./baseCallback'),
- binaryIndex = require('./binaryIndex'),
- binaryIndexBy = require('./binaryIndexBy');
-
-/**
- * Creates a `_.sortedIndex` or `_.sortedLastIndex` function.
- *
- * @private
- * @param {boolean} [retHighest] Specify returning the highest qualified index.
- * @returns {Function} Returns the new index function.
- */
-function createSortedIndex(retHighest) {
- return function(array, value, iteratee, thisArg) {
- return iteratee == null
- ? binaryIndex(array, value, retHighest)
- : binaryIndexBy(array, value, baseCallback(iteratee, thisArg, 1), retHighest);
- };
-}
-
-module.exports = createSortedIndex;
diff --git a/deps/npm/node_modules/lodash/internal/createWrapper.js b/deps/npm/node_modules/lodash/internal/createWrapper.js
deleted file mode 100644
index ea7a9b1905..0000000000
--- a/deps/npm/node_modules/lodash/internal/createWrapper.js
+++ /dev/null
@@ -1,86 +0,0 @@
-var baseSetData = require('./baseSetData'),
- createBindWrapper = require('./createBindWrapper'),
- createHybridWrapper = require('./createHybridWrapper'),
- createPartialWrapper = require('./createPartialWrapper'),
- getData = require('./getData'),
- mergeData = require('./mergeData'),
- setData = require('./setData');
-
-/** Used to compose bitmasks for wrapper metadata. */
-var BIND_FLAG = 1,
- BIND_KEY_FLAG = 2,
- PARTIAL_FLAG = 32,
- PARTIAL_RIGHT_FLAG = 64;
-
-/** Used as the `TypeError` message for "Functions" methods. */
-var FUNC_ERROR_TEXT = 'Expected a function';
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeMax = Math.max;
-
-/**
- * Creates a function that either curries or invokes `func` with optional
- * `this` binding and partially applied arguments.
- *
- * @private
- * @param {Function|string} func The function or method name to reference.
- * @param {number} bitmask The bitmask of flags.
- * The bitmask may be composed of the following flags:
- * 1 - `_.bind`
- * 2 - `_.bindKey`
- * 4 - `_.curry` or `_.curryRight` of a bound function
- * 8 - `_.curry`
- * 16 - `_.curryRight`
- * 32 - `_.partial`
- * 64 - `_.partialRight`
- * 128 - `_.rearg`
- * 256 - `_.ary`
- * @param {*} [thisArg] The `this` binding of `func`.
- * @param {Array} [partials] The arguments to be partially applied.
- * @param {Array} [holders] The `partials` placeholder indexes.
- * @param {Array} [argPos] The argument positions of the new function.
- * @param {number} [ary] The arity cap of `func`.
- * @param {number} [arity] The arity of `func`.
- * @returns {Function} Returns the new wrapped function.
- */
-function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
- var isBindKey = bitmask & BIND_KEY_FLAG;
- if (!isBindKey && typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- var length = partials ? partials.length : 0;
- if (!length) {
- bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG);
- partials = holders = undefined;
- }
- length -= (holders ? holders.length : 0);
- if (bitmask & PARTIAL_RIGHT_FLAG) {
- var partialsRight = partials,
- holdersRight = holders;
-
- partials = holders = undefined;
- }
- var data = isBindKey ? undefined : getData(func),
- newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity];
-
- if (data) {
- mergeData(newData, data);
- bitmask = newData[1];
- arity = newData[9];
- }
- newData[9] = arity == null
- ? (isBindKey ? 0 : func.length)
- : (nativeMax(arity - length, 0) || 0);
-
- if (bitmask == BIND_FLAG) {
- var result = createBindWrapper(newData[0], newData[2]);
- } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !newData[4].length) {
- result = createPartialWrapper.apply(undefined, newData);
- } else {
- result = createHybridWrapper.apply(undefined, newData);
- }
- var setter = data ? baseSetData : setData;
- return setter(result, newData);
-}
-
-module.exports = createWrapper;
diff --git a/deps/npm/node_modules/lodash/internal/deburrLetter.js b/deps/npm/node_modules/lodash/internal/deburrLetter.js
deleted file mode 100644
index e559dbea7a..0000000000
--- a/deps/npm/node_modules/lodash/internal/deburrLetter.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/** Used to map latin-1 supplementary letters to basic latin letters. */
-var deburredLetters = {
- '\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'
-};
-
-/**
- * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters.
- *
- * @private
- * @param {string} letter The matched letter to deburr.
- * @returns {string} Returns the deburred letter.
- */
-function deburrLetter(letter) {
- return deburredLetters[letter];
-}
-
-module.exports = deburrLetter;
diff --git a/deps/npm/node_modules/lodash/internal/equalArrays.js b/deps/npm/node_modules/lodash/internal/equalArrays.js
deleted file mode 100644
index e0bb2d32a8..0000000000
--- a/deps/npm/node_modules/lodash/internal/equalArrays.js
+++ /dev/null
@@ -1,51 +0,0 @@
-var arraySome = require('./arraySome');
-
-/**
- * A specialized version of `baseIsEqualDeep` for arrays with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Array} array The array to compare.
- * @param {Array} other The other array to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} [customizer] The function to customize comparing arrays.
- * @param {boolean} [isLoose] Specify performing partial comparisons.
- * @param {Array} [stackA] Tracks traversed `value` objects.
- * @param {Array} [stackB] Tracks traversed `other` objects.
- * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
- */
-function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) {
- var index = -1,
- arrLength = array.length,
- othLength = other.length;
-
- if (arrLength != othLength && !(isLoose && othLength > arrLength)) {
- return false;
- }
- // Ignore non-index properties.
- while (++index < arrLength) {
- var arrValue = array[index],
- othValue = other[index],
- result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined;
-
- if (result !== undefined) {
- if (result) {
- continue;
- }
- return false;
- }
- // Recursively compare arrays (susceptible to call stack limits).
- if (isLoose) {
- if (!arraySome(other, function(othValue) {
- return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB);
- })) {
- return false;
- }
- } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) {
- return false;
- }
- }
- return true;
-}
-
-module.exports = equalArrays;
diff --git a/deps/npm/node_modules/lodash/internal/equalByTag.js b/deps/npm/node_modules/lodash/internal/equalByTag.js
deleted file mode 100644
index d25c8e1eae..0000000000
--- a/deps/npm/node_modules/lodash/internal/equalByTag.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/** `Object#toString` result references. */
-var boolTag = '[object Boolean]',
- dateTag = '[object Date]',
- errorTag = '[object Error]',
- numberTag = '[object Number]',
- regexpTag = '[object RegExp]',
- stringTag = '[object String]';
-
-/**
- * A specialized version of `baseIsEqualDeep` for comparing objects of
- * the same `toStringTag`.
- *
- * **Note:** This function only supports comparing values with tags of
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {string} tag The `toStringTag` of the objects to compare.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
-function equalByTag(object, other, tag) {
- switch (tag) {
- case boolTag:
- case dateTag:
- // Coerce dates and booleans to numbers, dates to milliseconds and booleans
- // to `1` or `0` treating invalid dates coerced to `NaN` as not equal.
- return +object == +other;
-
- case errorTag:
- return object.name == other.name && object.message == other.message;
-
- case numberTag:
- // Treat `NaN` vs. `NaN` as equal.
- return (object != +object)
- ? other != +other
- : object == +other;
-
- case regexpTag:
- case stringTag:
- // Coerce regexes to strings and treat strings primitives and string
- // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details.
- return object == (other + '');
- }
- return false;
-}
-
-module.exports = equalByTag;
diff --git a/deps/npm/node_modules/lodash/internal/equalObjects.js b/deps/npm/node_modules/lodash/internal/equalObjects.js
deleted file mode 100644
index 1297a3b2af..0000000000
--- a/deps/npm/node_modules/lodash/internal/equalObjects.js
+++ /dev/null
@@ -1,67 +0,0 @@
-var keys = require('../object/keys');
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * A specialized version of `baseIsEqualDeep` for objects with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} [customizer] The function to customize comparing values.
- * @param {boolean} [isLoose] Specify performing partial comparisons.
- * @param {Array} [stackA] Tracks traversed `value` objects.
- * @param {Array} [stackB] Tracks traversed `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
-function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
- var objProps = keys(object),
- objLength = objProps.length,
- othProps = keys(other),
- othLength = othProps.length;
-
- if (objLength != othLength && !isLoose) {
- return false;
- }
- var index = objLength;
- while (index--) {
- var key = objProps[index];
- if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) {
- return false;
- }
- }
- var skipCtor = isLoose;
- while (++index < objLength) {
- key = objProps[index];
- var objValue = object[key],
- othValue = other[key],
- result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined;
-
- // Recursively compare objects (susceptible to call stack limits).
- if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) {
- return false;
- }
- skipCtor || (skipCtor = key == 'constructor');
- }
- if (!skipCtor) {
- var objCtor = object.constructor,
- othCtor = other.constructor;
-
- // Non `Object` object instances with different constructors are not equal.
- if (objCtor != othCtor &&
- ('constructor' in object && 'constructor' in other) &&
- !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
- typeof othCtor == 'function' && othCtor instanceof othCtor)) {
- return false;
- }
- }
- return true;
-}
-
-module.exports = equalObjects;
diff --git a/deps/npm/node_modules/lodash/internal/escapeHtmlChar.js b/deps/npm/node_modules/lodash/internal/escapeHtmlChar.js
deleted file mode 100644
index b21e452b5b..0000000000
--- a/deps/npm/node_modules/lodash/internal/escapeHtmlChar.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/** Used to map characters to HTML entities. */
-var htmlEscapes = {
- '&': '&amp;',
- '<': '&lt;',
- '>': '&gt;',
- '"': '&quot;',
- "'": '&#39;',
- '`': '&#96;'
-};
-
-/**
- * Used by `_.escape` to convert characters to HTML entities.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @returns {string} Returns the escaped character.
- */
-function escapeHtmlChar(chr) {
- return htmlEscapes[chr];
-}
-
-module.exports = escapeHtmlChar;
diff --git a/deps/npm/node_modules/lodash/internal/escapeRegExpChar.js b/deps/npm/node_modules/lodash/internal/escapeRegExpChar.js
deleted file mode 100644
index 8427de0ec9..0000000000
--- a/deps/npm/node_modules/lodash/internal/escapeRegExpChar.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/** Used to escape characters for inclusion in compiled regexes. */
-var regexpEscapes = {
- '0': 'x30', '1': 'x31', '2': 'x32', '3': 'x33', '4': 'x34',
- '5': 'x35', '6': 'x36', '7': 'x37', '8': 'x38', '9': 'x39',
- 'A': 'x41', 'B': 'x42', 'C': 'x43', 'D': 'x44', 'E': 'x45', 'F': 'x46',
- 'a': 'x61', 'b': 'x62', 'c': 'x63', 'd': 'x64', 'e': 'x65', 'f': 'x66',
- 'n': 'x6e', 'r': 'x72', 't': 'x74', 'u': 'x75', 'v': 'x76', 'x': 'x78'
-};
-
-/** Used to escape characters for inclusion in compiled string literals. */
-var stringEscapes = {
- '\\': '\\',
- "'": "'",
- '\n': 'n',
- '\r': 'r',
- '\u2028': 'u2028',
- '\u2029': 'u2029'
-};
-
-/**
- * Used by `_.escapeRegExp` to escape characters for inclusion in compiled regexes.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @param {string} leadingChar The capture group for a leading character.
- * @param {string} whitespaceChar The capture group for a whitespace character.
- * @returns {string} Returns the escaped character.
- */
-function escapeRegExpChar(chr, leadingChar, whitespaceChar) {
- if (leadingChar) {
- chr = regexpEscapes[chr];
- } else if (whitespaceChar) {
- chr = stringEscapes[chr];
- }
- return '\\' + chr;
-}
-
-module.exports = escapeRegExpChar;
diff --git a/deps/npm/node_modules/lodash/internal/escapeStringChar.js b/deps/npm/node_modules/lodash/internal/escapeStringChar.js
deleted file mode 100644
index 44eca96ca8..0000000000
--- a/deps/npm/node_modules/lodash/internal/escapeStringChar.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/** Used to escape characters for inclusion in compiled string literals. */
-var stringEscapes = {
- '\\': '\\',
- "'": "'",
- '\n': 'n',
- '\r': 'r',
- '\u2028': 'u2028',
- '\u2029': 'u2029'
-};
-
-/**
- * Used by `_.template` to escape characters for inclusion in compiled string literals.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @returns {string} Returns the escaped character.
- */
-function escapeStringChar(chr) {
- return '\\' + stringEscapes[chr];
-}
-
-module.exports = escapeStringChar;
diff --git a/deps/npm/node_modules/lodash/internal/getData.js b/deps/npm/node_modules/lodash/internal/getData.js
deleted file mode 100644
index 5bb4f466e7..0000000000
--- a/deps/npm/node_modules/lodash/internal/getData.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var metaMap = require('./metaMap'),
- noop = require('../utility/noop');
-
-/**
- * Gets metadata for `func`.
- *
- * @private
- * @param {Function} func The function to query.
- * @returns {*} Returns the metadata for `func`.
- */
-var getData = !metaMap ? noop : function(func) {
- return metaMap.get(func);
-};
-
-module.exports = getData;
diff --git a/deps/npm/node_modules/lodash/internal/getFuncName.js b/deps/npm/node_modules/lodash/internal/getFuncName.js
deleted file mode 100644
index ed92867d63..0000000000
--- a/deps/npm/node_modules/lodash/internal/getFuncName.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var realNames = require('./realNames');
-
-/**
- * Gets the name of `func`.
- *
- * @private
- * @param {Function} func The function to query.
- * @returns {string} Returns the function name.
- */
-function getFuncName(func) {
- var result = (func.name + ''),
- array = realNames[result],
- length = array ? array.length : 0;
-
- while (length--) {
- var data = array[length],
- otherFunc = data.func;
- if (otherFunc == null || otherFunc == func) {
- return data.name;
- }
- }
- return result;
-}
-
-module.exports = getFuncName;
diff --git a/deps/npm/node_modules/lodash/internal/getLength.js b/deps/npm/node_modules/lodash/internal/getLength.js
deleted file mode 100644
index 48d75ae135..0000000000
--- a/deps/npm/node_modules/lodash/internal/getLength.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var baseProperty = require('./baseProperty');
-
-/**
- * Gets the "length" property value of `object`.
- *
- * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
- * that affects Safari on at least iOS 8.1-8.3 ARM64.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {*} Returns the "length" value.
- */
-var getLength = baseProperty('length');
-
-module.exports = getLength;
diff --git a/deps/npm/node_modules/lodash/internal/getMatchData.js b/deps/npm/node_modules/lodash/internal/getMatchData.js
deleted file mode 100644
index 6d235b9167..0000000000
--- a/deps/npm/node_modules/lodash/internal/getMatchData.js
+++ /dev/null
@@ -1,21 +0,0 @@
-var isStrictComparable = require('./isStrictComparable'),
- pairs = require('../object/pairs');
-
-/**
- * Gets the propery names, values, and compare flags of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the match data of `object`.
- */
-function getMatchData(object) {
- var result = pairs(object),
- length = result.length;
-
- while (length--) {
- result[length][2] = isStrictComparable(result[length][1]);
- }
- return result;
-}
-
-module.exports = getMatchData;
diff --git a/deps/npm/node_modules/lodash/internal/getNative.js b/deps/npm/node_modules/lodash/internal/getNative.js
deleted file mode 100644
index bceb317fd7..0000000000
--- a/deps/npm/node_modules/lodash/internal/getNative.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var isNative = require('../lang/isNative');
-
-/**
- * Gets the native function at `key` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the method to get.
- * @returns {*} Returns the function if it's native, else `undefined`.
- */
-function getNative(object, key) {
- var value = object == null ? undefined : object[key];
- return isNative(value) ? value : undefined;
-}
-
-module.exports = getNative;
diff --git a/deps/npm/node_modules/lodash/internal/getView.js b/deps/npm/node_modules/lodash/internal/getView.js
deleted file mode 100644
index f49ec6d06c..0000000000
--- a/deps/npm/node_modules/lodash/internal/getView.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeMax = Math.max,
- nativeMin = Math.min;
-
-/**
- * Gets the view, applying any `transforms` to the `start` and `end` positions.
- *
- * @private
- * @param {number} start The start of the view.
- * @param {number} end The end of the view.
- * @param {Array} transforms The transformations to apply to the view.
- * @returns {Object} Returns an object containing the `start` and `end`
- * positions of the view.
- */
-function getView(start, end, transforms) {
- var index = -1,
- length = transforms.length;
-
- while (++index < length) {
- var data = transforms[index],
- size = data.size;
-
- switch (data.type) {
- case 'drop': start += size; break;
- case 'dropRight': end -= size; break;
- case 'take': end = nativeMin(end, start + size); break;
- case 'takeRight': start = nativeMax(start, end - size); break;
- }
- }
- return { 'start': start, 'end': end };
-}
-
-module.exports = getView;
diff --git a/deps/npm/node_modules/lodash/internal/indexOfNaN.js b/deps/npm/node_modules/lodash/internal/indexOfNaN.js
deleted file mode 100644
index 05b8207d7c..0000000000
--- a/deps/npm/node_modules/lodash/internal/indexOfNaN.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Gets the index at which the first occurrence of `NaN` is found in `array`.
- *
- * @private
- * @param {Array} array The array to search.
- * @param {number} fromIndex The index to search from.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {number} Returns the index of the matched `NaN`, else `-1`.
- */
-function indexOfNaN(array, fromIndex, fromRight) {
- var length = array.length,
- index = fromIndex + (fromRight ? 0 : -1);
-
- while ((fromRight ? index-- : ++index < length)) {
- var other = array[index];
- if (other !== other) {
- return index;
- }
- }
- return -1;
-}
-
-module.exports = indexOfNaN;
diff --git a/deps/npm/node_modules/lodash/internal/initCloneArray.js b/deps/npm/node_modules/lodash/internal/initCloneArray.js
deleted file mode 100644
index c92dfa2407..0000000000
--- a/deps/npm/node_modules/lodash/internal/initCloneArray.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Initializes an array clone.
- *
- * @private
- * @param {Array} array The array to clone.
- * @returns {Array} Returns the initialized clone.
- */
-function initCloneArray(array) {
- var length = array.length,
- result = new array.constructor(length);
-
- // Add array properties assigned by `RegExp#exec`.
- if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
- result.index = array.index;
- result.input = array.input;
- }
- return result;
-}
-
-module.exports = initCloneArray;
diff --git a/deps/npm/node_modules/lodash/internal/initCloneByTag.js b/deps/npm/node_modules/lodash/internal/initCloneByTag.js
deleted file mode 100644
index 8e3afc63f4..0000000000
--- a/deps/npm/node_modules/lodash/internal/initCloneByTag.js
+++ /dev/null
@@ -1,63 +0,0 @@
-var bufferClone = require('./bufferClone');
-
-/** `Object#toString` result references. */
-var boolTag = '[object Boolean]',
- dateTag = '[object Date]',
- numberTag = '[object Number]',
- regexpTag = '[object RegExp]',
- stringTag = '[object String]';
-
-var arrayBufferTag = '[object ArrayBuffer]',
- float32Tag = '[object Float32Array]',
- float64Tag = '[object Float64Array]',
- int8Tag = '[object Int8Array]',
- int16Tag = '[object Int16Array]',
- int32Tag = '[object Int32Array]',
- uint8Tag = '[object Uint8Array]',
- uint8ClampedTag = '[object Uint8ClampedArray]',
- uint16Tag = '[object Uint16Array]',
- uint32Tag = '[object Uint32Array]';
-
-/** Used to match `RegExp` flags from their coerced string values. */
-var reFlags = /\w*$/;
-
-/**
- * Initializes an object clone based on its `toStringTag`.
- *
- * **Note:** This function only supports cloning values with tags of
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
- *
- * @private
- * @param {Object} object The object to clone.
- * @param {string} tag The `toStringTag` of the object to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the initialized clone.
- */
-function initCloneByTag(object, tag, isDeep) {
- var Ctor = object.constructor;
- switch (tag) {
- case arrayBufferTag:
- return bufferClone(object);
-
- case boolTag:
- case dateTag:
- return new Ctor(+object);
-
- case float32Tag: case float64Tag:
- case int8Tag: case int16Tag: case int32Tag:
- case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
- var buffer = object.buffer;
- return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length);
-
- case numberTag:
- case stringTag:
- return new Ctor(object);
-
- case regexpTag:
- var result = new Ctor(object.source, reFlags.exec(object));
- result.lastIndex = object.lastIndex;
- }
- return result;
-}
-
-module.exports = initCloneByTag;
diff --git a/deps/npm/node_modules/lodash/internal/initCloneObject.js b/deps/npm/node_modules/lodash/internal/initCloneObject.js
deleted file mode 100644
index 48c4a23d1c..0000000000
--- a/deps/npm/node_modules/lodash/internal/initCloneObject.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
- * Initializes an object clone.
- *
- * @private
- * @param {Object} object The object to clone.
- * @returns {Object} Returns the initialized clone.
- */
-function initCloneObject(object) {
- var Ctor = object.constructor;
- if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) {
- Ctor = Object;
- }
- return new Ctor;
-}
-
-module.exports = initCloneObject;
diff --git a/deps/npm/node_modules/lodash/internal/invokePath.js b/deps/npm/node_modules/lodash/internal/invokePath.js
deleted file mode 100644
index 935110fd12..0000000000
--- a/deps/npm/node_modules/lodash/internal/invokePath.js
+++ /dev/null
@@ -1,26 +0,0 @@
-var baseGet = require('./baseGet'),
- baseSlice = require('./baseSlice'),
- isKey = require('./isKey'),
- last = require('../array/last'),
- toPath = require('./toPath');
-
-/**
- * Invokes the method at `path` on `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the method to invoke.
- * @param {Array} args The arguments to invoke the method with.
- * @returns {*} Returns the result of the invoked method.
- */
-function invokePath(object, path, args) {
- if (object != null && !isKey(path, object)) {
- path = toPath(path);
- object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
- path = last(path);
- }
- var func = object == null ? object : object[path];
- return func == null ? undefined : func.apply(object, args);
-}
-
-module.exports = invokePath;
diff --git a/deps/npm/node_modules/lodash/internal/isArrayLike.js b/deps/npm/node_modules/lodash/internal/isArrayLike.js
deleted file mode 100644
index 72443cde10..0000000000
--- a/deps/npm/node_modules/lodash/internal/isArrayLike.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var getLength = require('./getLength'),
- isLength = require('./isLength');
-
-/**
- * Checks if `value` is array-like.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
- */
-function isArrayLike(value) {
- return value != null && isLength(getLength(value));
-}
-
-module.exports = isArrayLike;
diff --git a/deps/npm/node_modules/lodash/internal/isIndex.js b/deps/npm/node_modules/lodash/internal/isIndex.js
deleted file mode 100644
index 469164bfde..0000000000
--- a/deps/npm/node_modules/lodash/internal/isIndex.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/** Used to detect unsigned integer values. */
-var reIsUint = /^\d+$/;
-
-/**
- * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
- * of an array-like value.
- */
-var MAX_SAFE_INTEGER = 9007199254740991;
-
-/**
- * Checks if `value` is a valid array-like index.
- *
- * @private
- * @param {*} value The value to check.
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
- */
-function isIndex(value, length) {
- value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
- length = length == null ? MAX_SAFE_INTEGER : length;
- return value > -1 && value % 1 == 0 && value < length;
-}
-
-module.exports = isIndex;
diff --git a/deps/npm/node_modules/lodash/internal/isIterateeCall.js b/deps/npm/node_modules/lodash/internal/isIterateeCall.js
deleted file mode 100644
index 07490f2e42..0000000000
--- a/deps/npm/node_modules/lodash/internal/isIterateeCall.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var isArrayLike = require('./isArrayLike'),
- isIndex = require('./isIndex'),
- isObject = require('../lang/isObject');
-
-/**
- * Checks if the provided arguments are from an iteratee call.
- *
- * @private
- * @param {*} value The potential iteratee value argument.
- * @param {*} index The potential iteratee index or key argument.
- * @param {*} object The potential iteratee object argument.
- * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.
- */
-function isIterateeCall(value, index, object) {
- if (!isObject(object)) {
- return false;
- }
- var type = typeof index;
- if (type == 'number'
- ? (isArrayLike(object) && isIndex(index, object.length))
- : (type == 'string' && index in object)) {
- var other = object[index];
- return value === value ? (value === other) : (other !== other);
- }
- return false;
-}
-
-module.exports = isIterateeCall;
diff --git a/deps/npm/node_modules/lodash/internal/isKey.js b/deps/npm/node_modules/lodash/internal/isKey.js
deleted file mode 100644
index 44ccfd4894..0000000000
--- a/deps/npm/node_modules/lodash/internal/isKey.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var isArray = require('../lang/isArray'),
- toObject = require('./toObject');
-
-/** Used to match property names within property paths. */
-var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,
- reIsPlainProp = /^\w*$/;
-
-/**
- * Checks if `value` is a property name and not a property path.
- *
- * @private
- * @param {*} value The value to check.
- * @param {Object} [object] The object to query keys on.
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
- */
-function isKey(value, object) {
- var type = typeof value;
- if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') {
- return true;
- }
- if (isArray(value)) {
- return false;
- }
- var result = !reIsDeepProp.test(value);
- return result || (object != null && value in toObject(object));
-}
-
-module.exports = isKey;
diff --git a/deps/npm/node_modules/lodash/internal/isLaziable.js b/deps/npm/node_modules/lodash/internal/isLaziable.js
deleted file mode 100644
index 475fab1be5..0000000000
--- a/deps/npm/node_modules/lodash/internal/isLaziable.js
+++ /dev/null
@@ -1,27 +0,0 @@
-var LazyWrapper = require('./LazyWrapper'),
- getData = require('./getData'),
- getFuncName = require('./getFuncName'),
- lodash = require('../chain/lodash');
-
-/**
- * Checks if `func` has a lazy counterpart.
- *
- * @private
- * @param {Function} func The function to check.
- * @returns {boolean} Returns `true` if `func` has a lazy counterpart, else `false`.
- */
-function isLaziable(func) {
- var funcName = getFuncName(func),
- other = lodash[funcName];
-
- if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
- return false;
- }
- if (func === other) {
- return true;
- }
- var data = getData(other);
- return !!data && func === data[0];
-}
-
-module.exports = isLaziable;
diff --git a/deps/npm/node_modules/lodash/internal/isLength.js b/deps/npm/node_modules/lodash/internal/isLength.js
deleted file mode 100644
index 2092987989..0000000000
--- a/deps/npm/node_modules/lodash/internal/isLength.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
- * of an array-like value.
- */
-var MAX_SAFE_INTEGER = 9007199254740991;
-
-/**
- * Checks if `value` is a valid array-like length.
- *
- * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
- */
-function isLength(value) {
- return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
-}
-
-module.exports = isLength;
diff --git a/deps/npm/node_modules/lodash/internal/isObjectLike.js b/deps/npm/node_modules/lodash/internal/isObjectLike.js
deleted file mode 100644
index 8ca0585b7b..0000000000
--- a/deps/npm/node_modules/lodash/internal/isObjectLike.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/**
- * Checks if `value` is object-like.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- */
-function isObjectLike(value) {
- return !!value && typeof value == 'object';
-}
-
-module.exports = isObjectLike;
diff --git a/deps/npm/node_modules/lodash/internal/isSpace.js b/deps/npm/node_modules/lodash/internal/isSpace.js
deleted file mode 100644
index 16ea6f3d43..0000000000
--- a/deps/npm/node_modules/lodash/internal/isSpace.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/**
- * Used by `trimmedLeftIndex` and `trimmedRightIndex` to determine if a
- * character code is whitespace.
- *
- * @private
- * @param {number} charCode The character code to inspect.
- * @returns {boolean} Returns `true` if `charCode` is whitespace, else `false`.
- */
-function isSpace(charCode) {
- return ((charCode <= 160 && (charCode >= 9 && charCode <= 13) || charCode == 32 || charCode == 160) || charCode == 5760 || charCode == 6158 ||
- (charCode >= 8192 && (charCode <= 8202 || charCode == 8232 || charCode == 8233 || charCode == 8239 || charCode == 8287 || charCode == 12288 || charCode == 65279)));
-}
-
-module.exports = isSpace;
diff --git a/deps/npm/node_modules/lodash/internal/isStrictComparable.js b/deps/npm/node_modules/lodash/internal/isStrictComparable.js
deleted file mode 100644
index 0a53eba5ee..0000000000
--- a/deps/npm/node_modules/lodash/internal/isStrictComparable.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var isObject = require('../lang/isObject');
-
-/**
- * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` if suitable for strict
- * equality comparisons, else `false`.
- */
-function isStrictComparable(value) {
- return value === value && !isObject(value);
-}
-
-module.exports = isStrictComparable;
diff --git a/deps/npm/node_modules/lodash/internal/lazyClone.js b/deps/npm/node_modules/lodash/internal/lazyClone.js
deleted file mode 100644
index 04c222b20e..0000000000
--- a/deps/npm/node_modules/lodash/internal/lazyClone.js
+++ /dev/null
@@ -1,23 +0,0 @@
-var LazyWrapper = require('./LazyWrapper'),
- arrayCopy = require('./arrayCopy');
-
-/**
- * Creates a clone of the lazy wrapper object.
- *
- * @private
- * @name clone
- * @memberOf LazyWrapper
- * @returns {Object} Returns the cloned `LazyWrapper` object.
- */
-function lazyClone() {
- var result = new LazyWrapper(this.__wrapped__);
- result.__actions__ = arrayCopy(this.__actions__);
- result.__dir__ = this.__dir__;
- result.__filtered__ = this.__filtered__;
- result.__iteratees__ = arrayCopy(this.__iteratees__);
- result.__takeCount__ = this.__takeCount__;
- result.__views__ = arrayCopy(this.__views__);
- return result;
-}
-
-module.exports = lazyClone;
diff --git a/deps/npm/node_modules/lodash/internal/lazyReverse.js b/deps/npm/node_modules/lodash/internal/lazyReverse.js
deleted file mode 100644
index c658402f94..0000000000
--- a/deps/npm/node_modules/lodash/internal/lazyReverse.js
+++ /dev/null
@@ -1,23 +0,0 @@
-var LazyWrapper = require('./LazyWrapper');
-
-/**
- * Reverses the direction of lazy iteration.
- *
- * @private
- * @name reverse
- * @memberOf LazyWrapper
- * @returns {Object} Returns the new reversed `LazyWrapper` object.
- */
-function lazyReverse() {
- if (this.__filtered__) {
- var result = new LazyWrapper(this);
- result.__dir__ = -1;
- result.__filtered__ = true;
- } else {
- result = this.clone();
- result.__dir__ *= -1;
- }
- return result;
-}
-
-module.exports = lazyReverse;
diff --git a/deps/npm/node_modules/lodash/internal/lazyValue.js b/deps/npm/node_modules/lodash/internal/lazyValue.js
deleted file mode 100644
index 8de68e6722..0000000000
--- a/deps/npm/node_modules/lodash/internal/lazyValue.js
+++ /dev/null
@@ -1,72 +0,0 @@
-var baseWrapperValue = require('./baseWrapperValue'),
- getView = require('./getView'),
- isArray = require('../lang/isArray');
-
-/** Used as the size to enable large array optimizations. */
-var LARGE_ARRAY_SIZE = 200;
-
-/** Used to indicate the type of lazy iteratees. */
-var LAZY_FILTER_FLAG = 1,
- LAZY_MAP_FLAG = 2;
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeMin = Math.min;
-
-/**
- * Extracts the unwrapped value from its lazy wrapper.
- *
- * @private
- * @name value
- * @memberOf LazyWrapper
- * @returns {*} Returns the unwrapped value.
- */
-function lazyValue() {
- var array = this.__wrapped__.value(),
- dir = this.__dir__,
- isArr = isArray(array),
- isRight = dir < 0,
- arrLength = isArr ? array.length : 0,
- view = getView(0, arrLength, this.__views__),
- start = view.start,
- end = view.end,
- length = end - start,
- index = isRight ? end : (start - 1),
- iteratees = this.__iteratees__,
- iterLength = iteratees.length,
- resIndex = 0,
- takeCount = nativeMin(length, this.__takeCount__);
-
- if (!isArr || arrLength < LARGE_ARRAY_SIZE || (arrLength == length && takeCount == length)) {
- return baseWrapperValue(array, this.__actions__);
- }
- var result = [];
-
- outer:
- while (length-- && resIndex < takeCount) {
- index += dir;
-
- var iterIndex = -1,
- value = array[index];
-
- while (++iterIndex < iterLength) {
- var data = iteratees[iterIndex],
- iteratee = data.iteratee,
- type = data.type,
- computed = iteratee(value);
-
- if (type == LAZY_MAP_FLAG) {
- value = computed;
- } else if (!computed) {
- if (type == LAZY_FILTER_FLAG) {
- continue outer;
- } else {
- break outer;
- }
- }
- }
- result[resIndex++] = value;
- }
- return result;
-}
-
-module.exports = lazyValue;
diff --git a/deps/npm/node_modules/lodash/internal/mapDelete.js b/deps/npm/node_modules/lodash/internal/mapDelete.js
deleted file mode 100644
index 8b7fd53531..0000000000
--- a/deps/npm/node_modules/lodash/internal/mapDelete.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/**
- * Removes `key` and its value from the cache.
- *
- * @private
- * @name delete
- * @memberOf _.memoize.Cache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed successfully, else `false`.
- */
-function mapDelete(key) {
- return this.has(key) && delete this.__data__[key];
-}
-
-module.exports = mapDelete;
diff --git a/deps/npm/node_modules/lodash/internal/mapGet.js b/deps/npm/node_modules/lodash/internal/mapGet.js
deleted file mode 100644
index 1f22295723..0000000000
--- a/deps/npm/node_modules/lodash/internal/mapGet.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/**
- * Gets the cached value for `key`.
- *
- * @private
- * @name get
- * @memberOf _.memoize.Cache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the cached value.
- */
-function mapGet(key) {
- return key == '__proto__' ? undefined : this.__data__[key];
-}
-
-module.exports = mapGet;
diff --git a/deps/npm/node_modules/lodash/internal/mapHas.js b/deps/npm/node_modules/lodash/internal/mapHas.js
deleted file mode 100644
index 6d94ce441d..0000000000
--- a/deps/npm/node_modules/lodash/internal/mapHas.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Checks if a cached value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf _.memoize.Cache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
-function mapHas(key) {
- return key != '__proto__' && hasOwnProperty.call(this.__data__, key);
-}
-
-module.exports = mapHas;
diff --git a/deps/npm/node_modules/lodash/internal/mapSet.js b/deps/npm/node_modules/lodash/internal/mapSet.js
deleted file mode 100644
index 0434c3f307..0000000000
--- a/deps/npm/node_modules/lodash/internal/mapSet.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * Sets `value` to `key` of the cache.
- *
- * @private
- * @name set
- * @memberOf _.memoize.Cache
- * @param {string} key The key of the value to cache.
- * @param {*} value The value to cache.
- * @returns {Object} Returns the cache object.
- */
-function mapSet(key, value) {
- if (key != '__proto__') {
- this.__data__[key] = value;
- }
- return this;
-}
-
-module.exports = mapSet;
diff --git a/deps/npm/node_modules/lodash/internal/mergeData.js b/deps/npm/node_modules/lodash/internal/mergeData.js
deleted file mode 100644
index 29297c78aa..0000000000
--- a/deps/npm/node_modules/lodash/internal/mergeData.js
+++ /dev/null
@@ -1,89 +0,0 @@
-var arrayCopy = require('./arrayCopy'),
- composeArgs = require('./composeArgs'),
- composeArgsRight = require('./composeArgsRight'),
- replaceHolders = require('./replaceHolders');
-
-/** Used to compose bitmasks for wrapper metadata. */
-var BIND_FLAG = 1,
- CURRY_BOUND_FLAG = 4,
- CURRY_FLAG = 8,
- ARY_FLAG = 128,
- REARG_FLAG = 256;
-
-/** Used as the internal argument placeholder. */
-var PLACEHOLDER = '__lodash_placeholder__';
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeMin = Math.min;
-
-/**
- * Merges the function metadata of `source` into `data`.
- *
- * Merging metadata reduces the number of wrappers required to invoke a function.
- * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
- * may be applied regardless of execution order. Methods like `_.ary` and `_.rearg`
- * augment function arguments, making the order in which they are executed important,
- * preventing the merging of metadata. However, we make an exception for a safe
- * common case where curried functions have `_.ary` and or `_.rearg` applied.
- *
- * @private
- * @param {Array} data The destination metadata.
- * @param {Array} source The source metadata.
- * @returns {Array} Returns `data`.
- */
-function mergeData(data, source) {
- var bitmask = data[1],
- srcBitmask = source[1],
- newBitmask = bitmask | srcBitmask,
- isCommon = newBitmask < ARY_FLAG;
-
- var isCombo =
- (srcBitmask == ARY_FLAG && bitmask == CURRY_FLAG) ||
- (srcBitmask == ARY_FLAG && bitmask == REARG_FLAG && data[7].length <= source[8]) ||
- (srcBitmask == (ARY_FLAG | REARG_FLAG) && bitmask == CURRY_FLAG);
-
- // Exit early if metadata can't be merged.
- if (!(isCommon || isCombo)) {
- return data;
- }
- // Use source `thisArg` if available.
- if (srcBitmask & BIND_FLAG) {
- data[2] = source[2];
- // Set when currying a bound function.
- newBitmask |= (bitmask & BIND_FLAG) ? 0 : CURRY_BOUND_FLAG;
- }
- // Compose partial arguments.
- var value = source[3];
- if (value) {
- var partials = data[3];
- data[3] = partials ? composeArgs(partials, value, source[4]) : arrayCopy(value);
- data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : arrayCopy(source[4]);
- }
- // Compose partial right arguments.
- value = source[5];
- if (value) {
- partials = data[5];
- data[5] = partials ? composeArgsRight(partials, value, source[6]) : arrayCopy(value);
- data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : arrayCopy(source[6]);
- }
- // Use source `argPos` if available.
- value = source[7];
- if (value) {
- data[7] = arrayCopy(value);
- }
- // Use source `ary` if it's smaller.
- if (srcBitmask & ARY_FLAG) {
- data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
- }
- // Use source `arity` if one is not provided.
- if (data[9] == null) {
- data[9] = source[9];
- }
- // Use source `func` and merge bitmasks.
- data[0] = source[0];
- data[1] = newBitmask;
-
- return data;
-}
-
-module.exports = mergeData;
diff --git a/deps/npm/node_modules/lodash/internal/mergeDefaults.js b/deps/npm/node_modules/lodash/internal/mergeDefaults.js
deleted file mode 100644
index dcd967e9fa..0000000000
--- a/deps/npm/node_modules/lodash/internal/mergeDefaults.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var merge = require('../object/merge');
-
-/**
- * Used by `_.defaultsDeep` to customize its `_.merge` use.
- *
- * @private
- * @param {*} objectValue The destination object property value.
- * @param {*} sourceValue The source object property value.
- * @returns {*} Returns the value to assign to the destination object.
- */
-function mergeDefaults(objectValue, sourceValue) {
- return objectValue === undefined ? sourceValue : merge(objectValue, sourceValue, mergeDefaults);
-}
-
-module.exports = mergeDefaults;
diff --git a/deps/npm/node_modules/lodash/internal/metaMap.js b/deps/npm/node_modules/lodash/internal/metaMap.js
deleted file mode 100644
index 59bfd5f96e..0000000000
--- a/deps/npm/node_modules/lodash/internal/metaMap.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var getNative = require('./getNative');
-
-/** Native method references. */
-var WeakMap = getNative(global, 'WeakMap');
-
-/** Used to store function metadata. */
-var metaMap = WeakMap && new WeakMap;
-
-module.exports = metaMap;
diff --git a/deps/npm/node_modules/lodash/internal/pickByArray.js b/deps/npm/node_modules/lodash/internal/pickByArray.js
deleted file mode 100644
index 0999d90af4..0000000000
--- a/deps/npm/node_modules/lodash/internal/pickByArray.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var toObject = require('./toObject');
-
-/**
- * A specialized version of `_.pick` which picks `object` properties specified
- * by `props`.
- *
- * @private
- * @param {Object} object The source object.
- * @param {string[]} props The property names to pick.
- * @returns {Object} Returns the new object.
- */
-function pickByArray(object, props) {
- object = toObject(object);
-
- var index = -1,
- length = props.length,
- result = {};
-
- while (++index < length) {
- var key = props[index];
- if (key in object) {
- result[key] = object[key];
- }
- }
- return result;
-}
-
-module.exports = pickByArray;
diff --git a/deps/npm/node_modules/lodash/internal/pickByCallback.js b/deps/npm/node_modules/lodash/internal/pickByCallback.js
deleted file mode 100644
index 79d3cdc837..0000000000
--- a/deps/npm/node_modules/lodash/internal/pickByCallback.js
+++ /dev/null
@@ -1,22 +0,0 @@
-var baseForIn = require('./baseForIn');
-
-/**
- * A specialized version of `_.pick` which picks `object` properties `predicate`
- * returns truthy for.
- *
- * @private
- * @param {Object} object The source object.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {Object} Returns the new object.
- */
-function pickByCallback(object, predicate) {
- var result = {};
- baseForIn(object, function(value, key, object) {
- if (predicate(value, key, object)) {
- result[key] = value;
- }
- });
- return result;
-}
-
-module.exports = pickByCallback;
diff --git a/deps/npm/node_modules/lodash/internal/reEscape.js b/deps/npm/node_modules/lodash/internal/reEscape.js
deleted file mode 100644
index 7f47eda68f..0000000000
--- a/deps/npm/node_modules/lodash/internal/reEscape.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/** Used to match template delimiters. */
-var reEscape = /<%-([\s\S]+?)%>/g;
-
-module.exports = reEscape;
diff --git a/deps/npm/node_modules/lodash/internal/reEvaluate.js b/deps/npm/node_modules/lodash/internal/reEvaluate.js
deleted file mode 100644
index 6adfc312c8..0000000000
--- a/deps/npm/node_modules/lodash/internal/reEvaluate.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/** Used to match template delimiters. */
-var reEvaluate = /<%([\s\S]+?)%>/g;
-
-module.exports = reEvaluate;
diff --git a/deps/npm/node_modules/lodash/internal/reInterpolate.js b/deps/npm/node_modules/lodash/internal/reInterpolate.js
deleted file mode 100644
index d02ff0b29a..0000000000
--- a/deps/npm/node_modules/lodash/internal/reInterpolate.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/** Used to match template delimiters. */
-var reInterpolate = /<%=([\s\S]+?)%>/g;
-
-module.exports = reInterpolate;
diff --git a/deps/npm/node_modules/lodash/internal/realNames.js b/deps/npm/node_modules/lodash/internal/realNames.js
deleted file mode 100644
index aa0d529261..0000000000
--- a/deps/npm/node_modules/lodash/internal/realNames.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/** Used to lookup unminified function names. */
-var realNames = {};
-
-module.exports = realNames;
diff --git a/deps/npm/node_modules/lodash/internal/reorder.js b/deps/npm/node_modules/lodash/internal/reorder.js
deleted file mode 100644
index 9424927db7..0000000000
--- a/deps/npm/node_modules/lodash/internal/reorder.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var arrayCopy = require('./arrayCopy'),
- isIndex = require('./isIndex');
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeMin = Math.min;
-
-/**
- * Reorder `array` according to the specified indexes where the element at
- * the first index is assigned as the first element, the element at
- * the second index is assigned as the second element, and so on.
- *
- * @private
- * @param {Array} array The array to reorder.
- * @param {Array} indexes The arranged array indexes.
- * @returns {Array} Returns `array`.
- */
-function reorder(array, indexes) {
- var arrLength = array.length,
- length = nativeMin(indexes.length, arrLength),
- oldArray = arrayCopy(array);
-
- while (length--) {
- var index = indexes[length];
- array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
- }
- return array;
-}
-
-module.exports = reorder;
diff --git a/deps/npm/node_modules/lodash/internal/replaceHolders.js b/deps/npm/node_modules/lodash/internal/replaceHolders.js
deleted file mode 100644
index 3089e75e94..0000000000
--- a/deps/npm/node_modules/lodash/internal/replaceHolders.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/** Used as the internal argument placeholder. */
-var PLACEHOLDER = '__lodash_placeholder__';
-
-/**
- * Replaces all `placeholder` elements in `array` with an internal placeholder
- * and returns an array of their indexes.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {*} placeholder The placeholder to replace.
- * @returns {Array} Returns the new array of placeholder indexes.
- */
-function replaceHolders(array, placeholder) {
- var index = -1,
- length = array.length,
- resIndex = -1,
- result = [];
-
- while (++index < length) {
- if (array[index] === placeholder) {
- array[index] = PLACEHOLDER;
- result[++resIndex] = index;
- }
- }
- return result;
-}
-
-module.exports = replaceHolders;
diff --git a/deps/npm/node_modules/lodash/internal/setData.js b/deps/npm/node_modules/lodash/internal/setData.js
deleted file mode 100644
index 7eb3f40b83..0000000000
--- a/deps/npm/node_modules/lodash/internal/setData.js
+++ /dev/null
@@ -1,41 +0,0 @@
-var baseSetData = require('./baseSetData'),
- now = require('../date/now');
-
-/** Used to detect when a function becomes hot. */
-var HOT_COUNT = 150,
- HOT_SPAN = 16;
-
-/**
- * Sets metadata for `func`.
- *
- * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
- * period of time, it will trip its breaker and transition to an identity function
- * to avoid garbage collection pauses in V8. See [V8 issue 2070](https://code.google.com/p/v8/issues/detail?id=2070)
- * for more details.
- *
- * @private
- * @param {Function} func The function to associate metadata with.
- * @param {*} data The metadata.
- * @returns {Function} Returns `func`.
- */
-var setData = (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);
- };
-}());
-
-module.exports = setData;
diff --git a/deps/npm/node_modules/lodash/internal/shimKeys.js b/deps/npm/node_modules/lodash/internal/shimKeys.js
deleted file mode 100644
index 189e492b76..0000000000
--- a/deps/npm/node_modules/lodash/internal/shimKeys.js
+++ /dev/null
@@ -1,41 +0,0 @@
-var isArguments = require('../lang/isArguments'),
- isArray = require('../lang/isArray'),
- isIndex = require('./isIndex'),
- isLength = require('./isLength'),
- keysIn = require('../object/keysIn');
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * A fallback implementation of `Object.keys` which creates an array of the
- * own enumerable property names of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
-function shimKeys(object) {
- var props = keysIn(object),
- propsLength = props.length,
- length = propsLength && object.length;
-
- var allowIndexes = !!length && isLength(length) &&
- (isArray(object) || isArguments(object));
-
- var index = -1,
- result = [];
-
- while (++index < propsLength) {
- var key = props[index];
- if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {
- result.push(key);
- }
- }
- return result;
-}
-
-module.exports = shimKeys;
diff --git a/deps/npm/node_modules/lodash/internal/sortedUniq.js b/deps/npm/node_modules/lodash/internal/sortedUniq.js
deleted file mode 100644
index 3ede46a193..0000000000
--- a/deps/npm/node_modules/lodash/internal/sortedUniq.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * An implementation of `_.uniq` optimized for sorted arrays without support
- * for callback shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Function} [iteratee] The function invoked per iteration.
- * @returns {Array} Returns the new duplicate free array.
- */
-function sortedUniq(array, iteratee) {
- var seen,
- index = -1,
- length = array.length,
- resIndex = -1,
- result = [];
-
- while (++index < length) {
- var value = array[index],
- computed = iteratee ? iteratee(value, index, array) : value;
-
- if (!index || seen !== computed) {
- seen = computed;
- result[++resIndex] = value;
- }
- }
- return result;
-}
-
-module.exports = sortedUniq;
diff --git a/deps/npm/node_modules/lodash/internal/toIterable.js b/deps/npm/node_modules/lodash/internal/toIterable.js
deleted file mode 100644
index c0a5b2885f..0000000000
--- a/deps/npm/node_modules/lodash/internal/toIterable.js
+++ /dev/null
@@ -1,22 +0,0 @@
-var isArrayLike = require('./isArrayLike'),
- isObject = require('../lang/isObject'),
- values = require('../object/values');
-
-/**
- * Converts `value` to an array-like object if it's not one.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {Array|Object} Returns the array-like object.
- */
-function toIterable(value) {
- if (value == null) {
- return [];
- }
- if (!isArrayLike(value)) {
- return values(value);
- }
- return isObject(value) ? value : Object(value);
-}
-
-module.exports = toIterable;
diff --git a/deps/npm/node_modules/lodash/internal/toObject.js b/deps/npm/node_modules/lodash/internal/toObject.js
deleted file mode 100644
index da4a008d7b..0000000000
--- a/deps/npm/node_modules/lodash/internal/toObject.js
+++ /dev/null
@@ -1,14 +0,0 @@
-var isObject = require('../lang/isObject');
-
-/**
- * Converts `value` to an object if it's not one.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {Object} Returns the object.
- */
-function toObject(value) {
- return isObject(value) ? value : Object(value);
-}
-
-module.exports = toObject;
diff --git a/deps/npm/node_modules/lodash/internal/toPath.js b/deps/npm/node_modules/lodash/internal/toPath.js
deleted file mode 100644
index d29f1eb528..0000000000
--- a/deps/npm/node_modules/lodash/internal/toPath.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var baseToString = require('./baseToString'),
- isArray = require('../lang/isArray');
-
-/** Used to match property names within property paths. */
-var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;
-
-/** Used to match backslashes in property paths. */
-var reEscapeChar = /\\(\\)?/g;
-
-/**
- * Converts `value` to property path array if it's not one.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {Array} Returns the property path array.
- */
-function toPath(value) {
- if (isArray(value)) {
- return value;
- }
- var result = [];
- baseToString(value).replace(rePropName, function(match, number, quote, string) {
- result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
- });
- return result;
-}
-
-module.exports = toPath;
diff --git a/deps/npm/node_modules/lodash/internal/trimmedLeftIndex.js b/deps/npm/node_modules/lodash/internal/trimmedLeftIndex.js
deleted file mode 100644
index 08aeb13607..0000000000
--- a/deps/npm/node_modules/lodash/internal/trimmedLeftIndex.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var isSpace = require('./isSpace');
-
-/**
- * Used by `_.trim` and `_.trimLeft` to get the index of the first non-whitespace
- * character of `string`.
- *
- * @private
- * @param {string} string The string to inspect.
- * @returns {number} Returns the index of the first non-whitespace character.
- */
-function trimmedLeftIndex(string) {
- var index = -1,
- length = string.length;
-
- while (++index < length && isSpace(string.charCodeAt(index))) {}
- return index;
-}
-
-module.exports = trimmedLeftIndex;
diff --git a/deps/npm/node_modules/lodash/internal/trimmedRightIndex.js b/deps/npm/node_modules/lodash/internal/trimmedRightIndex.js
deleted file mode 100644
index 71b9e38a62..0000000000
--- a/deps/npm/node_modules/lodash/internal/trimmedRightIndex.js
+++ /dev/null
@@ -1,18 +0,0 @@
-var isSpace = require('./isSpace');
-
-/**
- * Used by `_.trim` and `_.trimRight` to get the index of the last non-whitespace
- * character of `string`.
- *
- * @private
- * @param {string} string The string to inspect.
- * @returns {number} Returns the index of the last non-whitespace character.
- */
-function trimmedRightIndex(string) {
- var index = string.length;
-
- while (index-- && isSpace(string.charCodeAt(index))) {}
- return index;
-}
-
-module.exports = trimmedRightIndex;
diff --git a/deps/npm/node_modules/lodash/internal/unescapeHtmlChar.js b/deps/npm/node_modules/lodash/internal/unescapeHtmlChar.js
deleted file mode 100644
index 28b345498d..0000000000
--- a/deps/npm/node_modules/lodash/internal/unescapeHtmlChar.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/** Used to map HTML entities to characters. */
-var htmlUnescapes = {
- '&amp;': '&',
- '&lt;': '<',
- '&gt;': '>',
- '&quot;': '"',
- '&#39;': "'",
- '&#96;': '`'
-};
-
-/**
- * Used by `_.unescape` to convert HTML entities to characters.
- *
- * @private
- * @param {string} chr The matched character to unescape.
- * @returns {string} Returns the unescaped character.
- */
-function unescapeHtmlChar(chr) {
- return htmlUnescapes[chr];
-}
-
-module.exports = unescapeHtmlChar;
diff --git a/deps/npm/node_modules/lodash/internal/wrapperClone.js b/deps/npm/node_modules/lodash/internal/wrapperClone.js
deleted file mode 100644
index e5e10dac65..0000000000
--- a/deps/npm/node_modules/lodash/internal/wrapperClone.js
+++ /dev/null
@@ -1,18 +0,0 @@
-var LazyWrapper = require('./LazyWrapper'),
- LodashWrapper = require('./LodashWrapper'),
- arrayCopy = require('./arrayCopy');
-
-/**
- * Creates a clone of `wrapper`.
- *
- * @private
- * @param {Object} wrapper The wrapper to clone.
- * @returns {Object} Returns the cloned wrapper.
- */
-function wrapperClone(wrapper) {
- return wrapper instanceof LazyWrapper
- ? wrapper.clone()
- : new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__, arrayCopy(wrapper.__actions__));
-}
-
-module.exports = wrapperClone;
diff --git a/deps/npm/node_modules/lodash/lang.js b/deps/npm/node_modules/lodash/lang.js
deleted file mode 100644
index 8f0a364322..0000000000
--- a/deps/npm/node_modules/lodash/lang.js
+++ /dev/null
@@ -1,32 +0,0 @@
-module.exports = {
- 'clone': require('./lang/clone'),
- 'cloneDeep': require('./lang/cloneDeep'),
- 'eq': require('./lang/eq'),
- 'gt': require('./lang/gt'),
- 'gte': require('./lang/gte'),
- 'isArguments': require('./lang/isArguments'),
- 'isArray': require('./lang/isArray'),
- 'isBoolean': require('./lang/isBoolean'),
- 'isDate': require('./lang/isDate'),
- 'isElement': require('./lang/isElement'),
- 'isEmpty': require('./lang/isEmpty'),
- 'isEqual': require('./lang/isEqual'),
- 'isError': require('./lang/isError'),
- 'isFinite': require('./lang/isFinite'),
- 'isFunction': require('./lang/isFunction'),
- 'isMatch': require('./lang/isMatch'),
- 'isNaN': require('./lang/isNaN'),
- 'isNative': require('./lang/isNative'),
- 'isNull': require('./lang/isNull'),
- 'isNumber': require('./lang/isNumber'),
- 'isObject': require('./lang/isObject'),
- 'isPlainObject': require('./lang/isPlainObject'),
- 'isRegExp': require('./lang/isRegExp'),
- 'isString': require('./lang/isString'),
- 'isTypedArray': require('./lang/isTypedArray'),
- 'isUndefined': require('./lang/isUndefined'),
- 'lt': require('./lang/lt'),
- 'lte': require('./lang/lte'),
- 'toArray': require('./lang/toArray'),
- 'toPlainObject': require('./lang/toPlainObject')
-};
diff --git a/deps/npm/node_modules/lodash/lang/clone.js b/deps/npm/node_modules/lodash/lang/clone.js
deleted file mode 100644
index 85ee8fe003..0000000000
--- a/deps/npm/node_modules/lodash/lang/clone.js
+++ /dev/null
@@ -1,70 +0,0 @@
-var baseClone = require('../internal/baseClone'),
- bindCallback = require('../internal/bindCallback'),
- isIterateeCall = require('../internal/isIterateeCall');
-
-/**
- * Creates a clone of `value`. If `isDeep` is `true` nested objects are cloned,
- * otherwise they are assigned by reference. If `customizer` is provided it's
- * invoked to produce the cloned values. If `customizer` returns `undefined`
- * cloning is handled by the method instead. The `customizer` is bound to
- * `thisArg` and invoked with up to three argument; (value [, index|key, object]).
- *
- * **Note:** This method is loosely based on the
- * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).
- * The enumerable properties of `arguments` objects and objects created by
- * constructors other than `Object` are cloned to plain `Object` objects. An
- * empty object is returned for uncloneable values such as functions, DOM nodes,
- * Maps, Sets, and WeakMaps.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @param {Function} [customizer] The function to customize cloning values.
- * @param {*} [thisArg] The `this` binding of `customizer`.
- * @returns {*} Returns the cloned value.
- * @example
- *
- * var users = [
- * { 'user': 'barney' },
- * { 'user': 'fred' }
- * ];
- *
- * var shallow = _.clone(users);
- * shallow[0] === users[0];
- * // => true
- *
- * var deep = _.clone(users, true);
- * deep[0] === users[0];
- * // => false
- *
- * // using a customizer callback
- * var el = _.clone(document.body, function(value) {
- * if (_.isElement(value)) {
- * return value.cloneNode(false);
- * }
- * });
- *
- * el === document.body
- * // => false
- * el.nodeName
- * // => BODY
- * el.childNodes.length;
- * // => 0
- */
-function clone(value, isDeep, customizer, thisArg) {
- if (isDeep && typeof isDeep != 'boolean' && isIterateeCall(value, isDeep, customizer)) {
- isDeep = false;
- }
- else if (typeof isDeep == 'function') {
- thisArg = customizer;
- customizer = isDeep;
- isDeep = false;
- }
- return typeof customizer == 'function'
- ? baseClone(value, isDeep, bindCallback(customizer, thisArg, 3))
- : baseClone(value, isDeep);
-}
-
-module.exports = clone;
diff --git a/deps/npm/node_modules/lodash/lang/cloneDeep.js b/deps/npm/node_modules/lodash/lang/cloneDeep.js
deleted file mode 100644
index c4d2517a11..0000000000
--- a/deps/npm/node_modules/lodash/lang/cloneDeep.js
+++ /dev/null
@@ -1,55 +0,0 @@
-var baseClone = require('../internal/baseClone'),
- bindCallback = require('../internal/bindCallback');
-
-/**
- * Creates a deep clone of `value`. If `customizer` is provided it's invoked
- * to produce the cloned values. If `customizer` returns `undefined` cloning
- * is handled by the method instead. The `customizer` is bound to `thisArg`
- * and invoked with up to three argument; (value [, index|key, object]).
- *
- * **Note:** This method is loosely based on the
- * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).
- * The enumerable properties of `arguments` objects and objects created by
- * constructors other than `Object` are cloned to plain `Object` objects. An
- * empty object is returned for uncloneable values such as functions, DOM nodes,
- * Maps, Sets, and WeakMaps.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to deep clone.
- * @param {Function} [customizer] The function to customize cloning values.
- * @param {*} [thisArg] The `this` binding of `customizer`.
- * @returns {*} Returns the deep cloned value.
- * @example
- *
- * var users = [
- * { 'user': 'barney' },
- * { 'user': 'fred' }
- * ];
- *
- * var deep = _.cloneDeep(users);
- * deep[0] === users[0];
- * // => false
- *
- * // using a customizer callback
- * var el = _.cloneDeep(document.body, function(value) {
- * if (_.isElement(value)) {
- * return value.cloneNode(true);
- * }
- * });
- *
- * el === document.body
- * // => false
- * el.nodeName
- * // => BODY
- * el.childNodes.length;
- * // => 20
- */
-function cloneDeep(value, customizer, thisArg) {
- return typeof customizer == 'function'
- ? baseClone(value, true, bindCallback(customizer, thisArg, 3))
- : baseClone(value, true);
-}
-
-module.exports = cloneDeep;
diff --git a/deps/npm/node_modules/lodash/lang/eq.js b/deps/npm/node_modules/lodash/lang/eq.js
deleted file mode 100644
index e6a5ce0caf..0000000000
--- a/deps/npm/node_modules/lodash/lang/eq.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./isEqual');
diff --git a/deps/npm/node_modules/lodash/lang/gt.js b/deps/npm/node_modules/lodash/lang/gt.js
deleted file mode 100644
index ddaf5ea067..0000000000
--- a/deps/npm/node_modules/lodash/lang/gt.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Checks if `value` is greater than `other`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is greater than `other`, else `false`.
- * @example
- *
- * _.gt(3, 1);
- * // => true
- *
- * _.gt(3, 3);
- * // => false
- *
- * _.gt(1, 3);
- * // => false
- */
-function gt(value, other) {
- return value > other;
-}
-
-module.exports = gt;
diff --git a/deps/npm/node_modules/lodash/lang/gte.js b/deps/npm/node_modules/lodash/lang/gte.js
deleted file mode 100644
index 4a5ffb5cdc..0000000000
--- a/deps/npm/node_modules/lodash/lang/gte.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Checks if `value` is greater than or equal to `other`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is greater than or equal to `other`, else `false`.
- * @example
- *
- * _.gte(3, 1);
- * // => true
- *
- * _.gte(3, 3);
- * // => true
- *
- * _.gte(1, 3);
- * // => false
- */
-function gte(value, other) {
- return value >= other;
-}
-
-module.exports = gte;
diff --git a/deps/npm/node_modules/lodash/lang/isArguments.js b/deps/npm/node_modules/lodash/lang/isArguments.js
deleted file mode 100644
index ce9763d231..0000000000
--- a/deps/npm/node_modules/lodash/lang/isArguments.js
+++ /dev/null
@@ -1,34 +0,0 @@
-var isArrayLike = require('../internal/isArrayLike'),
- isObjectLike = require('../internal/isObjectLike');
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/** Native method references. */
-var propertyIsEnumerable = objectProto.propertyIsEnumerable;
-
-/**
- * Checks if `value` is classified as an `arguments` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isArguments(function() { return arguments; }());
- * // => true
- *
- * _.isArguments([1, 2, 3]);
- * // => false
- */
-function isArguments(value) {
- return isObjectLike(value) && isArrayLike(value) &&
- hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
-}
-
-module.exports = isArguments;
diff --git a/deps/npm/node_modules/lodash/lang/isArray.js b/deps/npm/node_modules/lodash/lang/isArray.js
deleted file mode 100644
index 9ab023acb9..0000000000
--- a/deps/npm/node_modules/lodash/lang/isArray.js
+++ /dev/null
@@ -1,40 +0,0 @@
-var getNative = require('../internal/getNative'),
- isLength = require('../internal/isLength'),
- isObjectLike = require('../internal/isObjectLike');
-
-/** `Object#toString` result references. */
-var arrayTag = '[object Array]';
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objToString = objectProto.toString;
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeIsArray = getNative(Array, 'isArray');
-
-/**
- * Checks if `value` is classified as an `Array` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isArray([1, 2, 3]);
- * // => true
- *
- * _.isArray(function() { return arguments; }());
- * // => false
- */
-var isArray = nativeIsArray || function(value) {
- return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;
-};
-
-module.exports = isArray;
diff --git a/deps/npm/node_modules/lodash/lang/isBoolean.js b/deps/npm/node_modules/lodash/lang/isBoolean.js
deleted file mode 100644
index 460e6c5bdf..0000000000
--- a/deps/npm/node_modules/lodash/lang/isBoolean.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var isObjectLike = require('../internal/isObjectLike');
-
-/** `Object#toString` result references. */
-var boolTag = '[object Boolean]';
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objToString = objectProto.toString;
-
-/**
- * Checks if `value` is classified as a boolean primitive or object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isBoolean(false);
- * // => true
- *
- * _.isBoolean(null);
- * // => false
- */
-function isBoolean(value) {
- return value === true || value === false || (isObjectLike(value) && objToString.call(value) == boolTag);
-}
-
-module.exports = isBoolean;
diff --git a/deps/npm/node_modules/lodash/lang/isDate.js b/deps/npm/node_modules/lodash/lang/isDate.js
deleted file mode 100644
index 29850d9471..0000000000
--- a/deps/npm/node_modules/lodash/lang/isDate.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var isObjectLike = require('../internal/isObjectLike');
-
-/** `Object#toString` result references. */
-var dateTag = '[object Date]';
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objToString = objectProto.toString;
-
-/**
- * Checks if `value` is classified as a `Date` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isDate(new Date);
- * // => true
- *
- * _.isDate('Mon April 23 2012');
- * // => false
- */
-function isDate(value) {
- return isObjectLike(value) && objToString.call(value) == dateTag;
-}
-
-module.exports = isDate;
diff --git a/deps/npm/node_modules/lodash/lang/isElement.js b/deps/npm/node_modules/lodash/lang/isElement.js
deleted file mode 100644
index 2e9c970485..0000000000
--- a/deps/npm/node_modules/lodash/lang/isElement.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var isObjectLike = require('../internal/isObjectLike'),
- isPlainObject = require('./isPlainObject');
-
-/**
- * Checks if `value` is a DOM element.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
- * @example
- *
- * _.isElement(document.body);
- * // => true
- *
- * _.isElement('<body>');
- * // => false
- */
-function isElement(value) {
- return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value);
-}
-
-module.exports = isElement;
diff --git a/deps/npm/node_modules/lodash/lang/isEmpty.js b/deps/npm/node_modules/lodash/lang/isEmpty.js
deleted file mode 100644
index 6b344a0b37..0000000000
--- a/deps/npm/node_modules/lodash/lang/isEmpty.js
+++ /dev/null
@@ -1,47 +0,0 @@
-var isArguments = require('./isArguments'),
- isArray = require('./isArray'),
- isArrayLike = require('../internal/isArrayLike'),
- isFunction = require('./isFunction'),
- isObjectLike = require('../internal/isObjectLike'),
- isString = require('./isString'),
- keys = require('../object/keys');
-
-/**
- * Checks if `value` is empty. A value is considered empty unless it's an
- * `arguments` object, array, string, or jQuery-like collection with a length
- * greater than `0` or an object with own enumerable properties.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {Array|Object|string} value The value to inspect.
- * @returns {boolean} Returns `true` if `value` is empty, else `false`.
- * @example
- *
- * _.isEmpty(null);
- * // => true
- *
- * _.isEmpty(true);
- * // => true
- *
- * _.isEmpty(1);
- * // => true
- *
- * _.isEmpty([1, 2, 3]);
- * // => false
- *
- * _.isEmpty({ 'a': 1 });
- * // => false
- */
-function isEmpty(value) {
- if (value == null) {
- return true;
- }
- if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) ||
- (isObjectLike(value) && isFunction(value.splice)))) {
- return !value.length;
- }
- return !keys(value).length;
-}
-
-module.exports = isEmpty;
diff --git a/deps/npm/node_modules/lodash/lang/isEqual.js b/deps/npm/node_modules/lodash/lang/isEqual.js
deleted file mode 100644
index 41bf568dfd..0000000000
--- a/deps/npm/node_modules/lodash/lang/isEqual.js
+++ /dev/null
@@ -1,54 +0,0 @@
-var baseIsEqual = require('../internal/baseIsEqual'),
- bindCallback = require('../internal/bindCallback');
-
-/**
- * Performs a deep comparison between two values to determine if they are
- * equivalent. If `customizer` is provided it's invoked to compare values.
- * If `customizer` returns `undefined` comparisons are handled by the method
- * instead. The `customizer` is bound to `thisArg` and invoked with up to
- * three arguments: (value, other [, index|key]).
- *
- * **Note:** This method supports comparing arrays, booleans, `Date` objects,
- * numbers, `Object` objects, regexes, and strings. Objects are compared by
- * their own, not inherited, enumerable properties. Functions and DOM nodes
- * are **not** supported. Provide a customizer function to extend support
- * for comparing other values.
- *
- * @static
- * @memberOf _
- * @alias eq
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @param {Function} [customizer] The function to customize value comparisons.
- * @param {*} [thisArg] The `this` binding of `customizer`.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'user': 'fred' };
- * var other = { 'user': 'fred' };
- *
- * object == other;
- * // => false
- *
- * _.isEqual(object, other);
- * // => true
- *
- * // using a customizer callback
- * var array = ['hello', 'goodbye'];
- * var other = ['hi', 'goodbye'];
- *
- * _.isEqual(array, other, function(value, other) {
- * if (_.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/)) {
- * return true;
- * }
- * });
- * // => true
- */
-function isEqual(value, other, customizer, thisArg) {
- customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined;
- var result = customizer ? customizer(value, other) : undefined;
- return result === undefined ? baseIsEqual(value, other, customizer) : !!result;
-}
-
-module.exports = isEqual;
diff --git a/deps/npm/node_modules/lodash/lang/isError.js b/deps/npm/node_modules/lodash/lang/isError.js
deleted file mode 100644
index a7bb0d0946..0000000000
--- a/deps/npm/node_modules/lodash/lang/isError.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var isObjectLike = require('../internal/isObjectLike');
-
-/** `Object#toString` result references. */
-var errorTag = '[object Error]';
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objToString = objectProto.toString;
-
-/**
- * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
- * `SyntaxError`, `TypeError`, or `URIError` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
- * @example
- *
- * _.isError(new Error);
- * // => true
- *
- * _.isError(Error);
- * // => false
- */
-function isError(value) {
- return isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag;
-}
-
-module.exports = isError;
diff --git a/deps/npm/node_modules/lodash/lang/isFinite.js b/deps/npm/node_modules/lodash/lang/isFinite.js
deleted file mode 100644
index e01a307fc3..0000000000
--- a/deps/npm/node_modules/lodash/lang/isFinite.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeIsFinite = global.isFinite;
-
-/**
- * Checks if `value` is a finite primitive number.
- *
- * **Note:** This method is based on [`Number.isFinite`](http://ecma-international.org/ecma-262/6.0/#sec-number.isfinite).
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
- * @example
- *
- * _.isFinite(10);
- * // => true
- *
- * _.isFinite('10');
- * // => false
- *
- * _.isFinite(true);
- * // => false
- *
- * _.isFinite(Object(10));
- * // => false
- *
- * _.isFinite(Infinity);
- * // => false
- */
-function isFinite(value) {
- return typeof value == 'number' && nativeIsFinite(value);
-}
-
-module.exports = isFinite;
diff --git a/deps/npm/node_modules/lodash/lang/isFunction.js b/deps/npm/node_modules/lodash/lang/isFunction.js
deleted file mode 100644
index abe5668ec3..0000000000
--- a/deps/npm/node_modules/lodash/lang/isFunction.js
+++ /dev/null
@@ -1,38 +0,0 @@
-var isObject = require('./isObject');
-
-/** `Object#toString` result references. */
-var funcTag = '[object Function]';
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objToString = objectProto.toString;
-
-/**
- * Checks if `value` is classified as a `Function` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
- *
- * _.isFunction(/abc/);
- * // => false
- */
-function isFunction(value) {
- // The use of `Object#toString` avoids issues with the `typeof` operator
- // in older versions of Chrome and Safari which return 'function' for regexes
- // and Safari 8 which returns 'object' for typed array constructors.
- return isObject(value) && objToString.call(value) == funcTag;
-}
-
-module.exports = isFunction;
diff --git a/deps/npm/node_modules/lodash/lang/isMatch.js b/deps/npm/node_modules/lodash/lang/isMatch.js
deleted file mode 100644
index 0a51d4920e..0000000000
--- a/deps/npm/node_modules/lodash/lang/isMatch.js
+++ /dev/null
@@ -1,49 +0,0 @@
-var baseIsMatch = require('../internal/baseIsMatch'),
- bindCallback = require('../internal/bindCallback'),
- getMatchData = require('../internal/getMatchData');
-
-/**
- * Performs a deep comparison between `object` and `source` to determine if
- * `object` contains equivalent property values. If `customizer` is provided
- * it's invoked to compare values. If `customizer` returns `undefined`
- * comparisons are handled by the method instead. The `customizer` is bound
- * to `thisArg` and invoked with three arguments: (value, other, index|key).
- *
- * **Note:** This method supports comparing properties of arrays, booleans,
- * `Date` objects, numbers, `Object` objects, regexes, and strings. Functions
- * and DOM nodes are **not** supported. Provide a customizer function to extend
- * support for comparing other values.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {Object} object The object to inspect.
- * @param {Object} source The object of property values to match.
- * @param {Function} [customizer] The function to customize value comparisons.
- * @param {*} [thisArg] The `this` binding of `customizer`.
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
- * @example
- *
- * var object = { 'user': 'fred', 'age': 40 };
- *
- * _.isMatch(object, { 'age': 40 });
- * // => true
- *
- * _.isMatch(object, { 'age': 36 });
- * // => false
- *
- * // using a customizer callback
- * var object = { 'greeting': 'hello' };
- * var source = { 'greeting': 'hi' };
- *
- * _.isMatch(object, source, function(value, other) {
- * return _.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/) || undefined;
- * });
- * // => true
- */
-function isMatch(object, source, customizer, thisArg) {
- customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined;
- return baseIsMatch(object, getMatchData(source), customizer);
-}
-
-module.exports = isMatch;
diff --git a/deps/npm/node_modules/lodash/lang/isNaN.js b/deps/npm/node_modules/lodash/lang/isNaN.js
deleted file mode 100644
index cf83d56637..0000000000
--- a/deps/npm/node_modules/lodash/lang/isNaN.js
+++ /dev/null
@@ -1,34 +0,0 @@
-var isNumber = require('./isNumber');
-
-/**
- * Checks if `value` is `NaN`.
- *
- * **Note:** This method is not the same as [`isNaN`](https://es5.github.io/#x15.1.2.4)
- * which returns `true` for `undefined` and other non-numeric values.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
- * @example
- *
- * _.isNaN(NaN);
- * // => true
- *
- * _.isNaN(new Number(NaN));
- * // => true
- *
- * isNaN(undefined);
- * // => true
- *
- * _.isNaN(undefined);
- * // => false
- */
-function isNaN(value) {
- // An `NaN` primitive is the only value that is not equal to itself.
- // Perform the `toStringTag` check first to avoid errors with some host objects in IE.
- return isNumber(value) && value != +value;
-}
-
-module.exports = isNaN;
diff --git a/deps/npm/node_modules/lodash/lang/isNative.js b/deps/npm/node_modules/lodash/lang/isNative.js
deleted file mode 100644
index 3ad7144528..0000000000
--- a/deps/npm/node_modules/lodash/lang/isNative.js
+++ /dev/null
@@ -1,48 +0,0 @@
-var isFunction = require('./isFunction'),
- isObjectLike = require('../internal/isObjectLike');
-
-/** Used to detect host constructors (Safari > 5). */
-var reIsHostCtor = /^\[object .+?Constructor\]$/;
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to resolve the decompiled source of functions. */
-var fnToString = Function.prototype.toString;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/** Used to detect if a method is native. */
-var reIsNative = RegExp('^' +
- fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
-);
-
-/**
- * Checks if `value` is a native function.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
- * @example
- *
- * _.isNative(Array.prototype.push);
- * // => true
- *
- * _.isNative(_);
- * // => false
- */
-function isNative(value) {
- if (value == null) {
- return false;
- }
- if (isFunction(value)) {
- return reIsNative.test(fnToString.call(value));
- }
- return isObjectLike(value) && reIsHostCtor.test(value);
-}
-
-module.exports = isNative;
diff --git a/deps/npm/node_modules/lodash/lang/isNull.js b/deps/npm/node_modules/lodash/lang/isNull.js
deleted file mode 100644
index ec66c4d8d8..0000000000
--- a/deps/npm/node_modules/lodash/lang/isNull.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Checks if `value` is `null`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
- * @example
- *
- * _.isNull(null);
- * // => true
- *
- * _.isNull(void 0);
- * // => false
- */
-function isNull(value) {
- return value === null;
-}
-
-module.exports = isNull;
diff --git a/deps/npm/node_modules/lodash/lang/isNumber.js b/deps/npm/node_modules/lodash/lang/isNumber.js
deleted file mode 100644
index 6764d6f99d..0000000000
--- a/deps/npm/node_modules/lodash/lang/isNumber.js
+++ /dev/null
@@ -1,41 +0,0 @@
-var isObjectLike = require('../internal/isObjectLike');
-
-/** `Object#toString` result references. */
-var numberTag = '[object Number]';
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objToString = objectProto.toString;
-
-/**
- * Checks if `value` is classified as a `Number` primitive or object.
- *
- * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified
- * as numbers, use the `_.isFinite` method.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isNumber(8.4);
- * // => true
- *
- * _.isNumber(NaN);
- * // => true
- *
- * _.isNumber('8.4');
- * // => false
- */
-function isNumber(value) {
- return typeof value == 'number' || (isObjectLike(value) && objToString.call(value) == numberTag);
-}
-
-module.exports = isNumber;
diff --git a/deps/npm/node_modules/lodash/lang/isObject.js b/deps/npm/node_modules/lodash/lang/isObject.js
deleted file mode 100644
index 6db5998720..0000000000
--- a/deps/npm/node_modules/lodash/lang/isObject.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(1);
- * // => false
- */
-function isObject(value) {
- // Avoid a V8 JIT bug in Chrome 19-20.
- // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
- var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
-}
-
-module.exports = isObject;
diff --git a/deps/npm/node_modules/lodash/lang/isPlainObject.js b/deps/npm/node_modules/lodash/lang/isPlainObject.js
deleted file mode 100644
index 5b34c83896..0000000000
--- a/deps/npm/node_modules/lodash/lang/isPlainObject.js
+++ /dev/null
@@ -1,71 +0,0 @@
-var baseForIn = require('../internal/baseForIn'),
- isArguments = require('./isArguments'),
- isObjectLike = require('../internal/isObjectLike');
-
-/** `Object#toString` result references. */
-var objectTag = '[object Object]';
-
-/** Used for native method references. */
-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/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objToString = objectProto.toString;
-
-/**
- * Checks if `value` is a plain object, that is, an object created by the
- * `Object` constructor or one with a `[[Prototype]]` of `null`.
- *
- * **Note:** This method assumes objects created by the `Object` constructor
- * have no inherited enumerable properties.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * }
- *
- * _.isPlainObject(new Foo);
- * // => false
- *
- * _.isPlainObject([1, 2, 3]);
- * // => false
- *
- * _.isPlainObject({ 'x': 0, 'y': 0 });
- * // => true
- *
- * _.isPlainObject(Object.create(null));
- * // => true
- */
-function isPlainObject(value) {
- var Ctor;
-
- // Exit early for non `Object` objects.
- if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isArguments(value)) ||
- (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) {
- return false;
- }
- // IE < 9 iterates inherited properties before own properties. If the first
- // iterated property is an object's own property then there are no inherited
- // enumerable properties.
- var result;
- // In most environments an object's own properties are iterated before
- // its inherited properties. If the last iterated property is an object's
- // own property then there are no inherited enumerable properties.
- baseForIn(value, function(subValue, key) {
- result = key;
- });
- return result === undefined || hasOwnProperty.call(value, result);
-}
-
-module.exports = isPlainObject;
diff --git a/deps/npm/node_modules/lodash/lang/isRegExp.js b/deps/npm/node_modules/lodash/lang/isRegExp.js
deleted file mode 100644
index f029cbdcd6..0000000000
--- a/deps/npm/node_modules/lodash/lang/isRegExp.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var isObject = require('./isObject');
-
-/** `Object#toString` result references. */
-var regexpTag = '[object RegExp]';
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objToString = objectProto.toString;
-
-/**
- * Checks if `value` is classified as a `RegExp` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isRegExp(/abc/);
- * // => true
- *
- * _.isRegExp('/abc/');
- * // => false
- */
-function isRegExp(value) {
- return isObject(value) && objToString.call(value) == regexpTag;
-}
-
-module.exports = isRegExp;
diff --git a/deps/npm/node_modules/lodash/lang/isString.js b/deps/npm/node_modules/lodash/lang/isString.js
deleted file mode 100644
index 8b28ee19ad..0000000000
--- a/deps/npm/node_modules/lodash/lang/isString.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var isObjectLike = require('../internal/isObjectLike');
-
-/** `Object#toString` result references. */
-var stringTag = '[object String]';
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objToString = objectProto.toString;
-
-/**
- * Checks if `value` is classified as a `String` primitive or object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isString('abc');
- * // => true
- *
- * _.isString(1);
- * // => false
- */
-function isString(value) {
- return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag);
-}
-
-module.exports = isString;
diff --git a/deps/npm/node_modules/lodash/lang/isTypedArray.js b/deps/npm/node_modules/lodash/lang/isTypedArray.js
deleted file mode 100644
index 6e8a6e0383..0000000000
--- a/deps/npm/node_modules/lodash/lang/isTypedArray.js
+++ /dev/null
@@ -1,74 +0,0 @@
-var isLength = require('../internal/isLength'),
- isObjectLike = require('../internal/isObjectLike');
-
-/** `Object#toString` result references. */
-var argsTag = '[object Arguments]',
- arrayTag = '[object Array]',
- boolTag = '[object Boolean]',
- dateTag = '[object Date]',
- errorTag = '[object Error]',
- funcTag = '[object Function]',
- mapTag = '[object Map]',
- numberTag = '[object Number]',
- objectTag = '[object Object]',
- regexpTag = '[object RegExp]',
- setTag = '[object Set]',
- stringTag = '[object String]',
- weakMapTag = '[object WeakMap]';
-
-var arrayBufferTag = '[object ArrayBuffer]',
- float32Tag = '[object Float32Array]',
- float64Tag = '[object Float64Array]',
- int8Tag = '[object Int8Array]',
- int16Tag = '[object Int16Array]',
- int32Tag = '[object Int32Array]',
- uint8Tag = '[object Uint8Array]',
- uint8ClampedTag = '[object Uint8ClampedArray]',
- uint16Tag = '[object Uint16Array]',
- uint32Tag = '[object Uint32Array]';
-
-/** Used to identify `toStringTag` values of typed arrays. */
-var typedArrayTags = {};
-typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
-typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
-typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
-typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
-typedArrayTags[uint32Tag] = true;
-typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
-typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
-typedArrayTags[dateTag] = typedArrayTags[errorTag] =
-typedArrayTags[funcTag] = typedArrayTags[mapTag] =
-typedArrayTags[numberTag] = typedArrayTags[objectTag] =
-typedArrayTags[regexpTag] = typedArrayTags[setTag] =
-typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objToString = objectProto.toString;
-
-/**
- * Checks if `value` is classified as a typed array.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isTypedArray(new Uint8Array);
- * // => true
- *
- * _.isTypedArray([]);
- * // => false
- */
-function isTypedArray(value) {
- return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)];
-}
-
-module.exports = isTypedArray;
diff --git a/deps/npm/node_modules/lodash/lang/isUndefined.js b/deps/npm/node_modules/lodash/lang/isUndefined.js
deleted file mode 100644
index d64e560c66..0000000000
--- a/deps/npm/node_modules/lodash/lang/isUndefined.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Checks if `value` is `undefined`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
- * @example
- *
- * _.isUndefined(void 0);
- * // => true
- *
- * _.isUndefined(null);
- * // => false
- */
-function isUndefined(value) {
- return value === undefined;
-}
-
-module.exports = isUndefined;
diff --git a/deps/npm/node_modules/lodash/lang/lt.js b/deps/npm/node_modules/lodash/lang/lt.js
deleted file mode 100644
index 4439870a31..0000000000
--- a/deps/npm/node_modules/lodash/lang/lt.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Checks if `value` is less than `other`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is less than `other`, else `false`.
- * @example
- *
- * _.lt(1, 3);
- * // => true
- *
- * _.lt(3, 3);
- * // => false
- *
- * _.lt(3, 1);
- * // => false
- */
-function lt(value, other) {
- return value < other;
-}
-
-module.exports = lt;
diff --git a/deps/npm/node_modules/lodash/lang/lte.js b/deps/npm/node_modules/lodash/lang/lte.js
deleted file mode 100644
index e2b8ab15a0..0000000000
--- a/deps/npm/node_modules/lodash/lang/lte.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Checks if `value` is less than or equal to `other`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is less than or equal to `other`, else `false`.
- * @example
- *
- * _.lte(1, 3);
- * // => true
- *
- * _.lte(3, 3);
- * // => true
- *
- * _.lte(3, 1);
- * // => false
- */
-function lte(value, other) {
- return value <= other;
-}
-
-module.exports = lte;
diff --git a/deps/npm/node_modules/lodash/lang/toArray.js b/deps/npm/node_modules/lodash/lang/toArray.js
deleted file mode 100644
index 72b0b46e18..0000000000
--- a/deps/npm/node_modules/lodash/lang/toArray.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var arrayCopy = require('../internal/arrayCopy'),
- getLength = require('../internal/getLength'),
- isLength = require('../internal/isLength'),
- values = require('../object/values');
-
-/**
- * Converts `value` to an array.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {Array} Returns the converted array.
- * @example
- *
- * (function() {
- * return _.toArray(arguments).slice(1);
- * }(1, 2, 3));
- * // => [2, 3]
- */
-function toArray(value) {
- var length = value ? getLength(value) : 0;
- if (!isLength(length)) {
- return values(value);
- }
- if (!length) {
- return [];
- }
- return arrayCopy(value);
-}
-
-module.exports = toArray;
diff --git a/deps/npm/node_modules/lodash/lang/toPlainObject.js b/deps/npm/node_modules/lodash/lang/toPlainObject.js
deleted file mode 100644
index 6315176ecb..0000000000
--- a/deps/npm/node_modules/lodash/lang/toPlainObject.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var baseCopy = require('../internal/baseCopy'),
- keysIn = require('../object/keysIn');
-
-/**
- * Converts `value` to a plain object flattening inherited enumerable
- * properties of `value` to own properties of the plain object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {Object} Returns the converted plain object.
- * @example
- *
- * function Foo() {
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.assign({ 'a': 1 }, new Foo);
- * // => { 'a': 1, 'b': 2 }
- *
- * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
- * // => { 'a': 1, 'b': 2, 'c': 3 }
- */
-function toPlainObject(value) {
- return baseCopy(value, keysIn(value));
-}
-
-module.exports = toPlainObject;
diff --git a/deps/npm/node_modules/lodash/math.js b/deps/npm/node_modules/lodash/math.js
deleted file mode 100644
index 21409cebd8..0000000000
--- a/deps/npm/node_modules/lodash/math.js
+++ /dev/null
@@ -1,9 +0,0 @@
-module.exports = {
- 'add': require('./math/add'),
- 'ceil': require('./math/ceil'),
- 'floor': require('./math/floor'),
- 'max': require('./math/max'),
- 'min': require('./math/min'),
- 'round': require('./math/round'),
- 'sum': require('./math/sum')
-};
diff --git a/deps/npm/node_modules/lodash/math/add.js b/deps/npm/node_modules/lodash/math/add.js
deleted file mode 100644
index 59ced2fb6e..0000000000
--- a/deps/npm/node_modules/lodash/math/add.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Adds two numbers.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {number} augend The first number to add.
- * @param {number} addend The second number to add.
- * @returns {number} Returns the sum.
- * @example
- *
- * _.add(6, 4);
- * // => 10
- */
-function add(augend, addend) {
- return (+augend || 0) + (+addend || 0);
-}
-
-module.exports = add;
diff --git a/deps/npm/node_modules/lodash/math/ceil.js b/deps/npm/node_modules/lodash/math/ceil.js
deleted file mode 100644
index 9dbf0c26db..0000000000
--- a/deps/npm/node_modules/lodash/math/ceil.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var createRound = require('../internal/createRound');
-
-/**
- * Calculates `n` rounded up to `precision`.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {number} n The number to round up.
- * @param {number} [precision=0] The precision to round up to.
- * @returns {number} Returns the rounded up number.
- * @example
- *
- * _.ceil(4.006);
- * // => 5
- *
- * _.ceil(6.004, 2);
- * // => 6.01
- *
- * _.ceil(6040, -2);
- * // => 6100
- */
-var ceil = createRound('ceil');
-
-module.exports = ceil;
diff --git a/deps/npm/node_modules/lodash/math/floor.js b/deps/npm/node_modules/lodash/math/floor.js
deleted file mode 100644
index e4dcae8bf8..0000000000
--- a/deps/npm/node_modules/lodash/math/floor.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var createRound = require('../internal/createRound');
-
-/**
- * Calculates `n` rounded down to `precision`.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {number} n The number to round down.
- * @param {number} [precision=0] The precision to round down to.
- * @returns {number} Returns the rounded down number.
- * @example
- *
- * _.floor(4.006);
- * // => 4
- *
- * _.floor(0.046, 2);
- * // => 0.04
- *
- * _.floor(4060, -2);
- * // => 4000
- */
-var floor = createRound('floor');
-
-module.exports = floor;
diff --git a/deps/npm/node_modules/lodash/math/max.js b/deps/npm/node_modules/lodash/math/max.js
deleted file mode 100644
index 220c1050df..0000000000
--- a/deps/npm/node_modules/lodash/math/max.js
+++ /dev/null
@@ -1,56 +0,0 @@
-var createExtremum = require('../internal/createExtremum'),
- gt = require('../lang/gt');
-
-/** Used as references for `-Infinity` and `Infinity`. */
-var NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY;
-
-/**
- * Gets the maximum value of `collection`. If `collection` is empty or falsey
- * `-Infinity` is returned. If an iteratee function is provided it's invoked
- * for each value in `collection` to generate the criterion by which the value
- * is ranked. The `iteratee` is bound to `thisArg` and invoked with three
- * arguments: (value, index, collection).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {*} Returns the maximum value.
- * @example
- *
- * _.max([4, 2, 8, 6]);
- * // => 8
- *
- * _.max([]);
- * // => -Infinity
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 }
- * ];
- *
- * _.max(users, function(chr) {
- * return chr.age;
- * });
- * // => { 'user': 'fred', 'age': 40 }
- *
- * // using the `_.property` callback shorthand
- * _.max(users, 'age');
- * // => { 'user': 'fred', 'age': 40 }
- */
-var max = createExtremum(gt, NEGATIVE_INFINITY);
-
-module.exports = max;
diff --git a/deps/npm/node_modules/lodash/math/min.js b/deps/npm/node_modules/lodash/math/min.js
deleted file mode 100644
index 6d92d4fa83..0000000000
--- a/deps/npm/node_modules/lodash/math/min.js
+++ /dev/null
@@ -1,56 +0,0 @@
-var createExtremum = require('../internal/createExtremum'),
- lt = require('../lang/lt');
-
-/** Used as references for `-Infinity` and `Infinity`. */
-var POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
-
-/**
- * Gets the minimum value of `collection`. If `collection` is empty or falsey
- * `Infinity` is returned. If an iteratee function is provided it's invoked
- * for each value in `collection` to generate the criterion by which the value
- * is ranked. The `iteratee` is bound to `thisArg` and invoked with three
- * arguments: (value, index, collection).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {*} Returns the minimum value.
- * @example
- *
- * _.min([4, 2, 8, 6]);
- * // => 2
- *
- * _.min([]);
- * // => Infinity
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 }
- * ];
- *
- * _.min(users, function(chr) {
- * return chr.age;
- * });
- * // => { 'user': 'barney', 'age': 36 }
- *
- * // using the `_.property` callback shorthand
- * _.min(users, 'age');
- * // => { 'user': 'barney', 'age': 36 }
- */
-var min = createExtremum(lt, POSITIVE_INFINITY);
-
-module.exports = min;
diff --git a/deps/npm/node_modules/lodash/math/round.js b/deps/npm/node_modules/lodash/math/round.js
deleted file mode 100644
index 5c69d0c15c..0000000000
--- a/deps/npm/node_modules/lodash/math/round.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var createRound = require('../internal/createRound');
-
-/**
- * Calculates `n` rounded to `precision`.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {number} n The number to round.
- * @param {number} [precision=0] The precision to round to.
- * @returns {number} Returns the rounded number.
- * @example
- *
- * _.round(4.006);
- * // => 4
- *
- * _.round(4.006, 2);
- * // => 4.01
- *
- * _.round(4060, -2);
- * // => 4100
- */
-var round = createRound('round');
-
-module.exports = round;
diff --git a/deps/npm/node_modules/lodash/math/sum.js b/deps/npm/node_modules/lodash/math/sum.js
deleted file mode 100644
index 114ff1b0a1..0000000000
--- a/deps/npm/node_modules/lodash/math/sum.js
+++ /dev/null
@@ -1,50 +0,0 @@
-var arraySum = require('../internal/arraySum'),
- baseCallback = require('../internal/baseCallback'),
- baseSum = require('../internal/baseSum'),
- isArray = require('../lang/isArray'),
- isIterateeCall = require('../internal/isIterateeCall'),
- toIterable = require('../internal/toIterable');
-
-/**
- * Gets the sum of the values in `collection`.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {number} Returns the sum.
- * @example
- *
- * _.sum([4, 6]);
- * // => 10
- *
- * _.sum({ 'a': 4, 'b': 6 });
- * // => 10
- *
- * var objects = [
- * { 'n': 4 },
- * { 'n': 6 }
- * ];
- *
- * _.sum(objects, function(object) {
- * return object.n;
- * });
- * // => 10
- *
- * // using the `_.property` callback shorthand
- * _.sum(objects, 'n');
- * // => 10
- */
-function sum(collection, iteratee, thisArg) {
- if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
- iteratee = undefined;
- }
- iteratee = baseCallback(iteratee, thisArg, 3);
- return iteratee.length == 1
- ? arraySum(isArray(collection) ? collection : toIterable(collection), iteratee)
- : baseSum(collection, iteratee);
-}
-
-module.exports = sum;
diff --git a/deps/npm/node_modules/lodash/number.js b/deps/npm/node_modules/lodash/number.js
deleted file mode 100644
index afab9d9956..0000000000
--- a/deps/npm/node_modules/lodash/number.js
+++ /dev/null
@@ -1,4 +0,0 @@
-module.exports = {
- 'inRange': require('./number/inRange'),
- 'random': require('./number/random')
-};
diff --git a/deps/npm/node_modules/lodash/number/inRange.js b/deps/npm/node_modules/lodash/number/inRange.js
deleted file mode 100644
index 30bf798ac6..0000000000
--- a/deps/npm/node_modules/lodash/number/inRange.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeMax = Math.max,
- nativeMin = Math.min;
-
-/**
- * Checks if `n` is between `start` and up to but not including, `end`. If
- * `end` is not specified it's set to `start` with `start` then set to `0`.
- *
- * @static
- * @memberOf _
- * @category Number
- * @param {number} n The number to check.
- * @param {number} [start=0] The start of the range.
- * @param {number} end The end of the range.
- * @returns {boolean} Returns `true` if `n` is in the range, else `false`.
- * @example
- *
- * _.inRange(3, 2, 4);
- * // => true
- *
- * _.inRange(4, 8);
- * // => true
- *
- * _.inRange(4, 2);
- * // => false
- *
- * _.inRange(2, 2);
- * // => false
- *
- * _.inRange(1.2, 2);
- * // => true
- *
- * _.inRange(5.2, 4);
- * // => false
- */
-function inRange(value, start, end) {
- start = +start || 0;
- if (end === undefined) {
- end = start;
- start = 0;
- } else {
- end = +end || 0;
- }
- return value >= nativeMin(start, end) && value < nativeMax(start, end);
-}
-
-module.exports = inRange;
diff --git a/deps/npm/node_modules/lodash/number/random.js b/deps/npm/node_modules/lodash/number/random.js
deleted file mode 100644
index 589d74e7ce..0000000000
--- a/deps/npm/node_modules/lodash/number/random.js
+++ /dev/null
@@ -1,70 +0,0 @@
-var baseRandom = require('../internal/baseRandom'),
- isIterateeCall = require('../internal/isIterateeCall');
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeMin = Math.min,
- nativeRandom = Math.random;
-
-/**
- * Produces a random number between `min` and `max` (inclusive). If only one
- * argument is provided a number between `0` and the given number is returned.
- * If `floating` is `true`, or either `min` or `max` are floats, a floating-point
- * number is returned instead of an integer.
- *
- * @static
- * @memberOf _
- * @category Number
- * @param {number} [min=0] The minimum possible value.
- * @param {number} [max=1] The maximum possible value.
- * @param {boolean} [floating] Specify returning a floating-point number.
- * @returns {number} Returns the random number.
- * @example
- *
- * _.random(0, 5);
- * // => an integer between 0 and 5
- *
- * _.random(5);
- * // => also an integer between 0 and 5
- *
- * _.random(5, true);
- * // => a floating-point number between 0 and 5
- *
- * _.random(1.2, 5.2);
- * // => a floating-point number between 1.2 and 5.2
- */
-function random(min, max, floating) {
- if (floating && isIterateeCall(min, max, floating)) {
- max = floating = undefined;
- }
- var noMin = min == null,
- noMax = max == null;
-
- if (floating == null) {
- if (noMax && typeof min == 'boolean') {
- floating = min;
- min = 1;
- }
- else if (typeof max == 'boolean') {
- floating = max;
- noMax = true;
- }
- }
- if (noMin && noMax) {
- max = 1;
- noMax = false;
- }
- min = +min || 0;
- if (noMax) {
- max = min;
- min = 0;
- } else {
- max = +max || 0;
- }
- if (floating || min % 1 || max % 1) {
- var rand = nativeRandom();
- return nativeMin(min + (rand * (max - min + parseFloat('1e-' + ((rand + '').length - 1)))), max);
- }
- return baseRandom(min, max);
-}
-
-module.exports = random;
diff --git a/deps/npm/node_modules/lodash/object.js b/deps/npm/node_modules/lodash/object.js
deleted file mode 100644
index 4beb005ac8..0000000000
--- a/deps/npm/node_modules/lodash/object.js
+++ /dev/null
@@ -1,31 +0,0 @@
-module.exports = {
- 'assign': require('./object/assign'),
- 'create': require('./object/create'),
- 'defaults': require('./object/defaults'),
- 'defaultsDeep': require('./object/defaultsDeep'),
- 'extend': require('./object/extend'),
- 'findKey': require('./object/findKey'),
- 'findLastKey': require('./object/findLastKey'),
- 'forIn': require('./object/forIn'),
- 'forInRight': require('./object/forInRight'),
- 'forOwn': require('./object/forOwn'),
- 'forOwnRight': require('./object/forOwnRight'),
- 'functions': require('./object/functions'),
- 'get': require('./object/get'),
- 'has': require('./object/has'),
- 'invert': require('./object/invert'),
- 'keys': require('./object/keys'),
- 'keysIn': require('./object/keysIn'),
- 'mapKeys': require('./object/mapKeys'),
- 'mapValues': require('./object/mapValues'),
- 'merge': require('./object/merge'),
- 'methods': require('./object/methods'),
- 'omit': require('./object/omit'),
- 'pairs': require('./object/pairs'),
- 'pick': require('./object/pick'),
- 'result': require('./object/result'),
- 'set': require('./object/set'),
- 'transform': require('./object/transform'),
- 'values': require('./object/values'),
- 'valuesIn': require('./object/valuesIn')
-};
diff --git a/deps/npm/node_modules/lodash/object/assign.js b/deps/npm/node_modules/lodash/object/assign.js
deleted file mode 100644
index 4a765ed547..0000000000
--- a/deps/npm/node_modules/lodash/object/assign.js
+++ /dev/null
@@ -1,43 +0,0 @@
-var assignWith = require('../internal/assignWith'),
- baseAssign = require('../internal/baseAssign'),
- createAssigner = require('../internal/createAssigner');
-
-/**
- * Assigns own enumerable properties of source object(s) to the destination
- * object. Subsequent sources overwrite property assignments of previous sources.
- * If `customizer` is provided it's invoked to produce the assigned values.
- * The `customizer` is bound to `thisArg` and invoked with five arguments:
- * (objectValue, sourceValue, key, object, source).
- *
- * **Note:** This method mutates `object` and is based on
- * [`Object.assign`](http://ecma-international.org/ecma-262/6.0/#sec-object.assign).
- *
- * @static
- * @memberOf _
- * @alias extend
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @param {Function} [customizer] The function to customize assigned values.
- * @param {*} [thisArg] The `this` binding of `customizer`.
- * @returns {Object} Returns `object`.
- * @example
- *
- * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' });
- * // => { 'user': 'fred', 'age': 40 }
- *
- * // using a customizer callback
- * var defaults = _.partialRight(_.assign, function(value, other) {
- * return _.isUndefined(value) ? other : value;
- * });
- *
- * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
- * // => { 'user': 'barney', 'age': 36 }
- */
-var assign = createAssigner(function(object, source, customizer) {
- return customizer
- ? assignWith(object, source, customizer)
- : baseAssign(object, source);
-});
-
-module.exports = assign;
diff --git a/deps/npm/node_modules/lodash/object/create.js b/deps/npm/node_modules/lodash/object/create.js
deleted file mode 100644
index 176294f35b..0000000000
--- a/deps/npm/node_modules/lodash/object/create.js
+++ /dev/null
@@ -1,47 +0,0 @@
-var baseAssign = require('../internal/baseAssign'),
- baseCreate = require('../internal/baseCreate'),
- isIterateeCall = require('../internal/isIterateeCall');
-
-/**
- * Creates an object that inherits from the given `prototype` object. If a
- * `properties` object is provided its own enumerable properties are assigned
- * to the created object.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} prototype The object to inherit from.
- * @param {Object} [properties] The properties to assign to the object.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Object} Returns the new object.
- * @example
- *
- * function Shape() {
- * this.x = 0;
- * this.y = 0;
- * }
- *
- * function Circle() {
- * Shape.call(this);
- * }
- *
- * Circle.prototype = _.create(Shape.prototype, {
- * 'constructor': Circle
- * });
- *
- * var circle = new Circle;
- * circle instanceof Circle;
- * // => true
- *
- * circle instanceof Shape;
- * // => true
- */
-function create(prototype, properties, guard) {
- var result = baseCreate(prototype);
- if (guard && isIterateeCall(prototype, properties, guard)) {
- properties = undefined;
- }
- return properties ? baseAssign(result, properties) : result;
-}
-
-module.exports = create;
diff --git a/deps/npm/node_modules/lodash/object/defaults.js b/deps/npm/node_modules/lodash/object/defaults.js
deleted file mode 100644
index c05011e528..0000000000
--- a/deps/npm/node_modules/lodash/object/defaults.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var assign = require('./assign'),
- assignDefaults = require('../internal/assignDefaults'),
- createDefaults = require('../internal/createDefaults');
-
-/**
- * Assigns own enumerable properties of source object(s) to the destination
- * object for all destination properties that resolve to `undefined`. Once a
- * property is set, additional values of the same property are ignored.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @example
- *
- * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
- * // => { 'user': 'barney', 'age': 36 }
- */
-var defaults = createDefaults(assign, assignDefaults);
-
-module.exports = defaults;
diff --git a/deps/npm/node_modules/lodash/object/defaultsDeep.js b/deps/npm/node_modules/lodash/object/defaultsDeep.js
deleted file mode 100644
index ec6e687e34..0000000000
--- a/deps/npm/node_modules/lodash/object/defaultsDeep.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var createDefaults = require('../internal/createDefaults'),
- merge = require('./merge'),
- mergeDefaults = require('../internal/mergeDefaults');
-
-/**
- * This method is like `_.defaults` except that it recursively assigns
- * default properties.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @example
- *
- * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } });
- * // => { 'user': { 'name': 'barney', 'age': 36 } }
- *
- */
-var defaultsDeep = createDefaults(merge, mergeDefaults);
-
-module.exports = defaultsDeep;
diff --git a/deps/npm/node_modules/lodash/object/extend.js b/deps/npm/node_modules/lodash/object/extend.js
deleted file mode 100644
index dd0ca941c8..0000000000
--- a/deps/npm/node_modules/lodash/object/extend.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./assign');
diff --git a/deps/npm/node_modules/lodash/object/findKey.js b/deps/npm/node_modules/lodash/object/findKey.js
deleted file mode 100644
index 1359df3406..0000000000
--- a/deps/npm/node_modules/lodash/object/findKey.js
+++ /dev/null
@@ -1,54 +0,0 @@
-var baseForOwn = require('../internal/baseForOwn'),
- createFindKey = require('../internal/createFindKey');
-
-/**
- * This method is like `_.find` except that it returns the key of the first
- * element `predicate` returns truthy for instead of the element itself.
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to search.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {string|undefined} Returns the key of the matched element, else `undefined`.
- * @example
- *
- * var users = {
- * 'barney': { 'age': 36, 'active': true },
- * 'fred': { 'age': 40, 'active': false },
- * 'pebbles': { 'age': 1, 'active': true }
- * };
- *
- * _.findKey(users, function(chr) {
- * return chr.age < 40;
- * });
- * // => 'barney' (iteration order is not guaranteed)
- *
- * // using the `_.matches` callback shorthand
- * _.findKey(users, { 'age': 1, 'active': true });
- * // => 'pebbles'
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.findKey(users, 'active', false);
- * // => 'fred'
- *
- * // using the `_.property` callback shorthand
- * _.findKey(users, 'active');
- * // => 'barney'
- */
-var findKey = createFindKey(baseForOwn);
-
-module.exports = findKey;
diff --git a/deps/npm/node_modules/lodash/object/findLastKey.js b/deps/npm/node_modules/lodash/object/findLastKey.js
deleted file mode 100644
index 42893a4b71..0000000000
--- a/deps/npm/node_modules/lodash/object/findLastKey.js
+++ /dev/null
@@ -1,54 +0,0 @@
-var baseForOwnRight = require('../internal/baseForOwnRight'),
- createFindKey = require('../internal/createFindKey');
-
-/**
- * This method is like `_.findKey` except that it iterates over elements of
- * a collection in the opposite order.
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to search.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {string|undefined} Returns the key of the matched element, else `undefined`.
- * @example
- *
- * var users = {
- * 'barney': { 'age': 36, 'active': true },
- * 'fred': { 'age': 40, 'active': false },
- * 'pebbles': { 'age': 1, 'active': true }
- * };
- *
- * _.findLastKey(users, function(chr) {
- * return chr.age < 40;
- * });
- * // => returns `pebbles` assuming `_.findKey` returns `barney`
- *
- * // using the `_.matches` callback shorthand
- * _.findLastKey(users, { 'age': 36, 'active': true });
- * // => 'barney'
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.findLastKey(users, 'active', false);
- * // => 'fred'
- *
- * // using the `_.property` callback shorthand
- * _.findLastKey(users, 'active');
- * // => 'pebbles'
- */
-var findLastKey = createFindKey(baseForOwnRight);
-
-module.exports = findLastKey;
diff --git a/deps/npm/node_modules/lodash/object/forIn.js b/deps/npm/node_modules/lodash/object/forIn.js
deleted file mode 100644
index 52d34af8ea..0000000000
--- a/deps/npm/node_modules/lodash/object/forIn.js
+++ /dev/null
@@ -1,33 +0,0 @@
-var baseFor = require('../internal/baseFor'),
- createForIn = require('../internal/createForIn');
-
-/**
- * Iterates over own and inherited enumerable properties of an object invoking
- * `iteratee` for each property. The `iteratee` is bound to `thisArg` and invoked
- * with three arguments: (value, key, object). Iteratee functions may exit
- * iteration early by explicitly returning `false`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns `object`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.forIn(new Foo, function(value, key) {
- * console.log(key);
- * });
- * // => logs 'a', 'b', and 'c' (iteration order is not guaranteed)
- */
-var forIn = createForIn(baseFor);
-
-module.exports = forIn;
diff --git a/deps/npm/node_modules/lodash/object/forInRight.js b/deps/npm/node_modules/lodash/object/forInRight.js
deleted file mode 100644
index 6780b92978..0000000000
--- a/deps/npm/node_modules/lodash/object/forInRight.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var baseForRight = require('../internal/baseForRight'),
- createForIn = require('../internal/createForIn');
-
-/**
- * This method is like `_.forIn` except that it iterates over properties of
- * `object` in the opposite order.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns `object`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.forInRight(new Foo, function(value, key) {
- * console.log(key);
- * });
- * // => logs 'c', 'b', and 'a' assuming `_.forIn ` logs 'a', 'b', and 'c'
- */
-var forInRight = createForIn(baseForRight);
-
-module.exports = forInRight;
diff --git a/deps/npm/node_modules/lodash/object/forOwn.js b/deps/npm/node_modules/lodash/object/forOwn.js
deleted file mode 100644
index 747bb7651b..0000000000
--- a/deps/npm/node_modules/lodash/object/forOwn.js
+++ /dev/null
@@ -1,33 +0,0 @@
-var baseForOwn = require('../internal/baseForOwn'),
- createForOwn = require('../internal/createForOwn');
-
-/**
- * Iterates over own enumerable properties of an object invoking `iteratee`
- * for each property. The `iteratee` is bound to `thisArg` and invoked with
- * three arguments: (value, key, object). Iteratee functions may exit iteration
- * early by explicitly returning `false`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns `object`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.forOwn(new Foo, function(value, key) {
- * console.log(key);
- * });
- * // => logs 'a' and 'b' (iteration order is not guaranteed)
- */
-var forOwn = createForOwn(baseForOwn);
-
-module.exports = forOwn;
diff --git a/deps/npm/node_modules/lodash/object/forOwnRight.js b/deps/npm/node_modules/lodash/object/forOwnRight.js
deleted file mode 100644
index 8122338b37..0000000000
--- a/deps/npm/node_modules/lodash/object/forOwnRight.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var baseForOwnRight = require('../internal/baseForOwnRight'),
- createForOwn = require('../internal/createForOwn');
-
-/**
- * This method is like `_.forOwn` except that it iterates over properties of
- * `object` in the opposite order.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns `object`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.forOwnRight(new Foo, function(value, key) {
- * console.log(key);
- * });
- * // => logs 'b' and 'a' assuming `_.forOwn` logs 'a' and 'b'
- */
-var forOwnRight = createForOwn(baseForOwnRight);
-
-module.exports = forOwnRight;
diff --git a/deps/npm/node_modules/lodash/object/functions.js b/deps/npm/node_modules/lodash/object/functions.js
deleted file mode 100644
index 10799becd3..0000000000
--- a/deps/npm/node_modules/lodash/object/functions.js
+++ /dev/null
@@ -1,23 +0,0 @@
-var baseFunctions = require('../internal/baseFunctions'),
- keysIn = require('./keysIn');
-
-/**
- * Creates an array of function property names from all enumerable properties,
- * own and inherited, of `object`.
- *
- * @static
- * @memberOf _
- * @alias methods
- * @category Object
- * @param {Object} object The object to inspect.
- * @returns {Array} Returns the new array of property names.
- * @example
- *
- * _.functions(_);
- * // => ['after', 'ary', 'assign', ...]
- */
-function functions(object) {
- return baseFunctions(object, keysIn(object));
-}
-
-module.exports = functions;
diff --git a/deps/npm/node_modules/lodash/object/get.js b/deps/npm/node_modules/lodash/object/get.js
deleted file mode 100644
index 7e88f1e960..0000000000
--- a/deps/npm/node_modules/lodash/object/get.js
+++ /dev/null
@@ -1,33 +0,0 @@
-var baseGet = require('../internal/baseGet'),
- toPath = require('../internal/toPath');
-
-/**
- * Gets the property value at `path` of `object`. If the resolved value is
- * `undefined` the `defaultValue` is used in its place.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to get.
- * @param {*} [defaultValue] The value returned if the resolved value is `undefined`.
- * @returns {*} Returns the resolved value.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
- *
- * _.get(object, 'a[0].b.c');
- * // => 3
- *
- * _.get(object, ['a', '0', 'b', 'c']);
- * // => 3
- *
- * _.get(object, 'a.b.c', 'default');
- * // => 'default'
- */
-function get(object, path, defaultValue) {
- var result = object == null ? undefined : baseGet(object, toPath(path), (path + ''));
- return result === undefined ? defaultValue : result;
-}
-
-module.exports = get;
diff --git a/deps/npm/node_modules/lodash/object/has.js b/deps/npm/node_modules/lodash/object/has.js
deleted file mode 100644
index f356243eba..0000000000
--- a/deps/npm/node_modules/lodash/object/has.js
+++ /dev/null
@@ -1,57 +0,0 @@
-var baseGet = require('../internal/baseGet'),
- baseSlice = require('../internal/baseSlice'),
- isArguments = require('../lang/isArguments'),
- isArray = require('../lang/isArray'),
- isIndex = require('../internal/isIndex'),
- isKey = require('../internal/isKey'),
- isLength = require('../internal/isLength'),
- last = require('../array/last'),
- toPath = require('../internal/toPath');
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Checks if `path` is a direct property.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path to check.
- * @returns {boolean} Returns `true` if `path` is a direct property, else `false`.
- * @example
- *
- * var object = { 'a': { 'b': { 'c': 3 } } };
- *
- * _.has(object, 'a');
- * // => true
- *
- * _.has(object, 'a.b.c');
- * // => true
- *
- * _.has(object, ['a', 'b', 'c']);
- * // => true
- */
-function has(object, path) {
- if (object == null) {
- return false;
- }
- var result = hasOwnProperty.call(object, path);
- if (!result && !isKey(path)) {
- path = toPath(path);
- object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
- if (object == null) {
- return false;
- }
- path = last(path);
- result = hasOwnProperty.call(object, path);
- }
- return result || (isLength(object.length) && isIndex(path, object.length) &&
- (isArray(object) || isArguments(object)));
-}
-
-module.exports = has;
diff --git a/deps/npm/node_modules/lodash/object/invert.js b/deps/npm/node_modules/lodash/object/invert.js
deleted file mode 100644
index 54fb1f1bef..0000000000
--- a/deps/npm/node_modules/lodash/object/invert.js
+++ /dev/null
@@ -1,60 +0,0 @@
-var isIterateeCall = require('../internal/isIterateeCall'),
- keys = require('./keys');
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Creates an object composed of the inverted keys and values of `object`.
- * If `object` contains duplicate values, subsequent values overwrite property
- * assignments of previous values unless `multiValue` is `true`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to invert.
- * @param {boolean} [multiValue] Allow multiple values per key.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Object} Returns the new inverted object.
- * @example
- *
- * var object = { 'a': 1, 'b': 2, 'c': 1 };
- *
- * _.invert(object);
- * // => { '1': 'c', '2': 'b' }
- *
- * // with `multiValue`
- * _.invert(object, true);
- * // => { '1': ['a', 'c'], '2': ['b'] }
- */
-function invert(object, multiValue, guard) {
- if (guard && isIterateeCall(object, multiValue, guard)) {
- multiValue = undefined;
- }
- var index = -1,
- props = keys(object),
- length = props.length,
- result = {};
-
- while (++index < length) {
- var key = props[index],
- value = object[key];
-
- if (multiValue) {
- if (hasOwnProperty.call(result, value)) {
- result[value].push(key);
- } else {
- result[value] = [key];
- }
- }
- else {
- result[value] = key;
- }
- }
- return result;
-}
-
-module.exports = invert;
diff --git a/deps/npm/node_modules/lodash/object/keys.js b/deps/npm/node_modules/lodash/object/keys.js
deleted file mode 100644
index 4706fd618f..0000000000
--- a/deps/npm/node_modules/lodash/object/keys.js
+++ /dev/null
@@ -1,45 +0,0 @@
-var getNative = require('../internal/getNative'),
- isArrayLike = require('../internal/isArrayLike'),
- isObject = require('../lang/isObject'),
- shimKeys = require('../internal/shimKeys');
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeKeys = getNative(Object, 'keys');
-
-/**
- * Creates an array of the own enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects. See the
- * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
- * for more details.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keys(new Foo);
- * // => ['a', 'b'] (iteration order is not guaranteed)
- *
- * _.keys('hi');
- * // => ['0', '1']
- */
-var keys = !nativeKeys ? shimKeys : function(object) {
- var Ctor = object == null ? undefined : object.constructor;
- if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
- (typeof object != 'function' && isArrayLike(object))) {
- return shimKeys(object);
- }
- return isObject(object) ? nativeKeys(object) : [];
-};
-
-module.exports = keys;
diff --git a/deps/npm/node_modules/lodash/object/keysIn.js b/deps/npm/node_modules/lodash/object/keysIn.js
deleted file mode 100644
index 45a85d7954..0000000000
--- a/deps/npm/node_modules/lodash/object/keysIn.js
+++ /dev/null
@@ -1,64 +0,0 @@
-var isArguments = require('../lang/isArguments'),
- isArray = require('../lang/isArray'),
- isIndex = require('../internal/isIndex'),
- isLength = require('../internal/isLength'),
- isObject = require('../lang/isObject');
-
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Creates an array of the own and inherited enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keysIn(new Foo);
- * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
- */
-function keysIn(object) {
- if (object == null) {
- return [];
- }
- if (!isObject(object)) {
- object = Object(object);
- }
- var length = object.length;
- length = (length && isLength(length) &&
- (isArray(object) || isArguments(object)) && length) || 0;
-
- var Ctor = object.constructor,
- index = -1,
- isProto = typeof Ctor == 'function' && Ctor.prototype === object,
- result = Array(length),
- skipIndexes = length > 0;
-
- while (++index < length) {
- result[index] = (index + '');
- }
- for (var key in object) {
- if (!(skipIndexes && isIndex(key, length)) &&
- !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
- result.push(key);
- }
- }
- return result;
-}
-
-module.exports = keysIn;
diff --git a/deps/npm/node_modules/lodash/object/mapKeys.js b/deps/npm/node_modules/lodash/object/mapKeys.js
deleted file mode 100644
index 680b29b5ff..0000000000
--- a/deps/npm/node_modules/lodash/object/mapKeys.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var createObjectMapper = require('../internal/createObjectMapper');
-
-/**
- * The opposite of `_.mapValues`; this method creates an object with the
- * same values as `object` and keys generated by running each own enumerable
- * property of `object` through `iteratee`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns the new mapped object.
- * @example
- *
- * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
- * return key + value;
- * });
- * // => { 'a1': 1, 'b2': 2 }
- */
-var mapKeys = createObjectMapper(true);
-
-module.exports = mapKeys;
diff --git a/deps/npm/node_modules/lodash/object/mapValues.js b/deps/npm/node_modules/lodash/object/mapValues.js
deleted file mode 100644
index 2afe6bac70..0000000000
--- a/deps/npm/node_modules/lodash/object/mapValues.js
+++ /dev/null
@@ -1,46 +0,0 @@
-var createObjectMapper = require('../internal/createObjectMapper');
-
-/**
- * Creates an object with the same keys as `object` and values generated by
- * running each own enumerable property of `object` through `iteratee`. The
- * iteratee function is bound to `thisArg` and invoked with three arguments:
- * (value, key, object).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns the new mapped object.
- * @example
- *
- * _.mapValues({ 'a': 1, 'b': 2 }, function(n) {
- * return n * 3;
- * });
- * // => { 'a': 3, 'b': 6 }
- *
- * var users = {
- * 'fred': { 'user': 'fred', 'age': 40 },
- * 'pebbles': { 'user': 'pebbles', 'age': 1 }
- * };
- *
- * // using the `_.property` callback shorthand
- * _.mapValues(users, 'age');
- * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
- */
-var mapValues = createObjectMapper();
-
-module.exports = mapValues;
diff --git a/deps/npm/node_modules/lodash/object/merge.js b/deps/npm/node_modules/lodash/object/merge.js
deleted file mode 100644
index 86dd8af977..0000000000
--- a/deps/npm/node_modules/lodash/object/merge.js
+++ /dev/null
@@ -1,54 +0,0 @@
-var baseMerge = require('../internal/baseMerge'),
- createAssigner = require('../internal/createAssigner');
-
-/**
- * Recursively merges own enumerable properties of the source object(s), that
- * don't resolve to `undefined` into the destination object. Subsequent sources
- * overwrite property assignments of previous sources. If `customizer` is
- * provided it's 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 bound to `thisArg` and invoked
- * with five arguments: (objectValue, sourceValue, key, object, source).
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @param {Function} [customizer] The function to customize assigned values.
- * @param {*} [thisArg] The `this` binding of `customizer`.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var users = {
- * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
- * };
- *
- * var ages = {
- * 'data': [{ 'age': 36 }, { 'age': 40 }]
- * };
- *
- * _.merge(users, ages);
- * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
- *
- * // using a customizer callback
- * var object = {
- * 'fruits': ['apple'],
- * 'vegetables': ['beet']
- * };
- *
- * var other = {
- * 'fruits': ['banana'],
- * 'vegetables': ['carrot']
- * };
- *
- * _.merge(object, other, function(a, b) {
- * if (_.isArray(a)) {
- * return a.concat(b);
- * }
- * });
- * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
- */
-var merge = createAssigner(baseMerge);
-
-module.exports = merge;
diff --git a/deps/npm/node_modules/lodash/object/methods.js b/deps/npm/node_modules/lodash/object/methods.js
deleted file mode 100644
index 8a304feed1..0000000000
--- a/deps/npm/node_modules/lodash/object/methods.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./functions');
diff --git a/deps/npm/node_modules/lodash/object/omit.js b/deps/npm/node_modules/lodash/object/omit.js
deleted file mode 100644
index fe3f48538b..0000000000
--- a/deps/npm/node_modules/lodash/object/omit.js
+++ /dev/null
@@ -1,47 +0,0 @@
-var arrayMap = require('../internal/arrayMap'),
- baseDifference = require('../internal/baseDifference'),
- baseFlatten = require('../internal/baseFlatten'),
- bindCallback = require('../internal/bindCallback'),
- keysIn = require('./keysIn'),
- pickByArray = require('../internal/pickByArray'),
- pickByCallback = require('../internal/pickByCallback'),
- restParam = require('../function/restParam');
-
-/**
- * The opposite of `_.pick`; this method creates an object composed of the
- * own and inherited enumerable properties of `object` that are not omitted.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The source object.
- * @param {Function|...(string|string[])} [predicate] The function invoked per
- * iteration or property names to omit, specified as individual property
- * names or arrays of property names.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Object} Returns the new object.
- * @example
- *
- * var object = { 'user': 'fred', 'age': 40 };
- *
- * _.omit(object, 'age');
- * // => { 'user': 'fred' }
- *
- * _.omit(object, _.isNumber);
- * // => { 'user': 'fred' }
- */
-var omit = restParam(function(object, props) {
- if (object == null) {
- return {};
- }
- if (typeof props[0] != 'function') {
- var props = arrayMap(baseFlatten(props), String);
- return pickByArray(object, baseDifference(keysIn(object), props));
- }
- var predicate = bindCallback(props[0], props[1], 3);
- return pickByCallback(object, function(value, key, object) {
- return !predicate(value, key, object);
- });
-});
-
-module.exports = omit;
diff --git a/deps/npm/node_modules/lodash/object/pairs.js b/deps/npm/node_modules/lodash/object/pairs.js
deleted file mode 100644
index fd4644cea2..0000000000
--- a/deps/npm/node_modules/lodash/object/pairs.js
+++ /dev/null
@@ -1,33 +0,0 @@
-var keys = require('./keys'),
- toObject = require('../internal/toObject');
-
-/**
- * Creates a two dimensional array of the key-value pairs for `object`,
- * e.g. `[[key1, value1], [key2, value2]]`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the new array of key-value pairs.
- * @example
- *
- * _.pairs({ 'barney': 36, 'fred': 40 });
- * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed)
- */
-function pairs(object) {
- object = toObject(object);
-
- var index = -1,
- props = keys(object),
- length = props.length,
- result = Array(length);
-
- while (++index < length) {
- var key = props[index];
- result[index] = [key, object[key]];
- }
- return result;
-}
-
-module.exports = pairs;
diff --git a/deps/npm/node_modules/lodash/object/pick.js b/deps/npm/node_modules/lodash/object/pick.js
deleted file mode 100644
index e3187669a5..0000000000
--- a/deps/npm/node_modules/lodash/object/pick.js
+++ /dev/null
@@ -1,42 +0,0 @@
-var baseFlatten = require('../internal/baseFlatten'),
- bindCallback = require('../internal/bindCallback'),
- pickByArray = require('../internal/pickByArray'),
- pickByCallback = require('../internal/pickByCallback'),
- restParam = require('../function/restParam');
-
-/**
- * Creates an object composed of the picked `object` properties. Property
- * names may be specified as individual arguments or as arrays of property
- * names. If `predicate` is provided it's invoked for each property of `object`
- * picking the properties `predicate` returns truthy for. The predicate is
- * bound to `thisArg` and invoked with three arguments: (value, key, object).
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The source object.
- * @param {Function|...(string|string[])} [predicate] The function invoked per
- * iteration or property names to pick, specified as individual property
- * names or arrays of property names.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Object} Returns the new object.
- * @example
- *
- * var object = { 'user': 'fred', 'age': 40 };
- *
- * _.pick(object, 'user');
- * // => { 'user': 'fred' }
- *
- * _.pick(object, _.isString);
- * // => { 'user': 'fred' }
- */
-var pick = restParam(function(object, props) {
- if (object == null) {
- return {};
- }
- return typeof props[0] == 'function'
- ? pickByCallback(object, bindCallback(props[0], props[1], 3))
- : pickByArray(object, baseFlatten(props));
-});
-
-module.exports = pick;
diff --git a/deps/npm/node_modules/lodash/object/result.js b/deps/npm/node_modules/lodash/object/result.js
deleted file mode 100644
index 29b38e6e34..0000000000
--- a/deps/npm/node_modules/lodash/object/result.js
+++ /dev/null
@@ -1,49 +0,0 @@
-var baseGet = require('../internal/baseGet'),
- baseSlice = require('../internal/baseSlice'),
- isFunction = require('../lang/isFunction'),
- isKey = require('../internal/isKey'),
- last = require('../array/last'),
- toPath = require('../internal/toPath');
-
-/**
- * This method is like `_.get` except that if the resolved value is a function
- * it's invoked with the `this` binding of its parent object and its result
- * is returned.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to resolve.
- * @param {*} [defaultValue] The value returned if the resolved value is `undefined`.
- * @returns {*} Returns the resolved value.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
- *
- * _.result(object, 'a[0].b.c1');
- * // => 3
- *
- * _.result(object, 'a[0].b.c2');
- * // => 4
- *
- * _.result(object, 'a.b.c', 'default');
- * // => 'default'
- *
- * _.result(object, 'a.b.c', _.constant('default'));
- * // => 'default'
- */
-function result(object, path, defaultValue) {
- var result = object == null ? undefined : object[path];
- if (result === undefined) {
- if (object != null && !isKey(path, object)) {
- path = toPath(path);
- object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
- result = object == null ? undefined : object[last(path)];
- }
- result = result === undefined ? defaultValue : result;
- }
- return isFunction(result) ? result.call(object) : result;
-}
-
-module.exports = result;
diff --git a/deps/npm/node_modules/lodash/object/set.js b/deps/npm/node_modules/lodash/object/set.js
deleted file mode 100644
index 7a1e4e9ba9..0000000000
--- a/deps/npm/node_modules/lodash/object/set.js
+++ /dev/null
@@ -1,55 +0,0 @@
-var isIndex = require('../internal/isIndex'),
- isKey = require('../internal/isKey'),
- isObject = require('../lang/isObject'),
- toPath = require('../internal/toPath');
-
-/**
- * Sets the property value of `path` on `object`. If a portion of `path`
- * does not exist it's created.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to augment.
- * @param {Array|string} path The path of the property to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
- *
- * _.set(object, 'a[0].b.c', 4);
- * console.log(object.a[0].b.c);
- * // => 4
- *
- * _.set(object, 'x[0].y.z', 5);
- * console.log(object.x[0].y.z);
- * // => 5
- */
-function set(object, path, value) {
- if (object == null) {
- return object;
- }
- var pathKey = (path + '');
- path = (object[pathKey] != null || isKey(path, object)) ? [pathKey] : toPath(path);
-
- var index = -1,
- length = path.length,
- lastIndex = length - 1,
- nested = object;
-
- while (nested != null && ++index < length) {
- var key = path[index];
- if (isObject(nested)) {
- if (index == lastIndex) {
- nested[key] = value;
- } else if (nested[key] == null) {
- nested[key] = isIndex(path[index + 1]) ? [] : {};
- }
- }
- nested = nested[key];
- }
- return object;
-}
-
-module.exports = set;
diff --git a/deps/npm/node_modules/lodash/object/transform.js b/deps/npm/node_modules/lodash/object/transform.js
deleted file mode 100644
index 9a814b145f..0000000000
--- a/deps/npm/node_modules/lodash/object/transform.js
+++ /dev/null
@@ -1,61 +0,0 @@
-var arrayEach = require('../internal/arrayEach'),
- baseCallback = require('../internal/baseCallback'),
- baseCreate = require('../internal/baseCreate'),
- baseForOwn = require('../internal/baseForOwn'),
- isArray = require('../lang/isArray'),
- isFunction = require('../lang/isFunction'),
- isObject = require('../lang/isObject'),
- isTypedArray = require('../lang/isTypedArray');
-
-/**
- * An alternative to `_.reduce`; this method transforms `object` to a new
- * `accumulator` object which is the result of running each of its own enumerable
- * properties through `iteratee`, with each invocation potentially mutating
- * the `accumulator` object. The `iteratee` is bound to `thisArg` and invoked
- * with four arguments: (accumulator, value, key, object). Iteratee functions
- * may exit iteration early by explicitly returning `false`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Array|Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [accumulator] The custom accumulator value.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {*} Returns the accumulated value.
- * @example
- *
- * _.transform([2, 3, 4], function(result, n) {
- * result.push(n *= n);
- * return n % 2 == 0;
- * });
- * // => [4, 9]
- *
- * _.transform({ 'a': 1, 'b': 2 }, function(result, n, key) {
- * result[key] = n * 3;
- * });
- * // => { 'a': 3, 'b': 6 }
- */
-function transform(object, iteratee, accumulator, thisArg) {
- var isArr = isArray(object) || isTypedArray(object);
- iteratee = baseCallback(iteratee, thisArg, 4);
-
- if (accumulator == null) {
- if (isArr || isObject(object)) {
- var Ctor = object.constructor;
- if (isArr) {
- accumulator = isArray(object) ? new Ctor : [];
- } else {
- accumulator = baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
- }
- } else {
- accumulator = {};
- }
- }
- (isArr ? arrayEach : baseForOwn)(object, function(value, index, object) {
- return iteratee(accumulator, value, index, object);
- });
- return accumulator;
-}
-
-module.exports = transform;
diff --git a/deps/npm/node_modules/lodash/object/values.js b/deps/npm/node_modules/lodash/object/values.js
deleted file mode 100644
index 0171515055..0000000000
--- a/deps/npm/node_modules/lodash/object/values.js
+++ /dev/null
@@ -1,33 +0,0 @@
-var baseValues = require('../internal/baseValues'),
- keys = require('./keys');
-
-/**
- * Creates an array of the own enumerable property values of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property values.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.values(new Foo);
- * // => [1, 2] (iteration order is not guaranteed)
- *
- * _.values('hi');
- * // => ['h', 'i']
- */
-function values(object) {
- return baseValues(object, keys(object));
-}
-
-module.exports = values;
diff --git a/deps/npm/node_modules/lodash/object/valuesIn.js b/deps/npm/node_modules/lodash/object/valuesIn.js
deleted file mode 100644
index 5f067c060b..0000000000
--- a/deps/npm/node_modules/lodash/object/valuesIn.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var baseValues = require('../internal/baseValues'),
- keysIn = require('./keysIn');
-
-/**
- * Creates an array of the own and inherited enumerable property values
- * of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property values.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.valuesIn(new Foo);
- * // => [1, 2, 3] (iteration order is not guaranteed)
- */
-function valuesIn(object) {
- return baseValues(object, keysIn(object));
-}
-
-module.exports = valuesIn;
diff --git a/deps/npm/node_modules/lodash/package.json b/deps/npm/node_modules/lodash/package.json
deleted file mode 100644
index 90a234110e..0000000000
--- a/deps/npm/node_modules/lodash/package.json
+++ /dev/null
@@ -1,81 +0,0 @@
-{
- "_from": "lodash@^3.10.1",
- "_id": "lodash@3.10.1",
- "_inBundle": false,
- "_integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=",
- "_location": "/lodash",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "lodash@^3.10.1",
- "name": "lodash",
- "escapedName": "lodash",
- "rawSpec": "^3.10.1",
- "saveSpec": null,
- "fetchSpec": "^3.10.1"
- },
- "_requiredBy": [
- "/cli-table2"
- ],
- "_resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
- "_shasum": "5bf45e8e49ba4189e17d482789dfd15bd140b7b6",
- "_spec": "lodash@^3.10.1",
- "_where": "/Users/rebecca/code/npm/node_modules/cli-table2",
- "author": {
- "name": "John-David Dalton",
- "email": "john.david.dalton@gmail.com",
- "url": "http://allyoucanleet.com/"
- },
- "bugs": {
- "url": "https://github.com/lodash/lodash/issues"
- },
- "bundleDependencies": false,
- "contributors": [
- {
- "name": "John-David Dalton",
- "email": "john.david.dalton@gmail.com",
- "url": "http://allyoucanleet.com/"
- },
- {
- "name": "Benjamin Tan",
- "email": "demoneaux@gmail.com",
- "url": "https://d10.github.io/"
- },
- {
- "name": "Blaine Bublitz",
- "email": "blaine@iceddev.com",
- "url": "http://www.iceddev.com/"
- },
- {
- "name": "Kit Cambridge",
- "email": "github@kitcambridge.be",
- "url": "http://kitcambridge.be/"
- },
- {
- "name": "Mathias Bynens",
- "email": "mathias@qiwi.be",
- "url": "https://mathiasbynens.be/"
- }
- ],
- "deprecated": false,
- "description": "The modern build of lodash modular utilities.",
- "homepage": "https://lodash.com/",
- "icon": "https://lodash.com/icon.svg",
- "keywords": [
- "modules",
- "stdlib",
- "util"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "lodash",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/lodash/lodash.git"
- },
- "scripts": {
- "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
- },
- "version": "3.10.1"
-}
diff --git a/deps/npm/node_modules/lodash/string.js b/deps/npm/node_modules/lodash/string.js
deleted file mode 100644
index f777945302..0000000000
--- a/deps/npm/node_modules/lodash/string.js
+++ /dev/null
@@ -1,25 +0,0 @@
-module.exports = {
- 'camelCase': require('./string/camelCase'),
- 'capitalize': require('./string/capitalize'),
- 'deburr': require('./string/deburr'),
- 'endsWith': require('./string/endsWith'),
- 'escape': require('./string/escape'),
- 'escapeRegExp': require('./string/escapeRegExp'),
- 'kebabCase': require('./string/kebabCase'),
- 'pad': require('./string/pad'),
- 'padLeft': require('./string/padLeft'),
- 'padRight': require('./string/padRight'),
- 'parseInt': require('./string/parseInt'),
- 'repeat': require('./string/repeat'),
- 'snakeCase': require('./string/snakeCase'),
- 'startCase': require('./string/startCase'),
- 'startsWith': require('./string/startsWith'),
- 'template': require('./string/template'),
- 'templateSettings': require('./string/templateSettings'),
- 'trim': require('./string/trim'),
- 'trimLeft': require('./string/trimLeft'),
- 'trimRight': require('./string/trimRight'),
- 'trunc': require('./string/trunc'),
- 'unescape': require('./string/unescape'),
- 'words': require('./string/words')
-};
diff --git a/deps/npm/node_modules/lodash/string/camelCase.js b/deps/npm/node_modules/lodash/string/camelCase.js
deleted file mode 100644
index 2d438f4aac..0000000000
--- a/deps/npm/node_modules/lodash/string/camelCase.js
+++ /dev/null
@@ -1,27 +0,0 @@
-var createCompounder = require('../internal/createCompounder');
-
-/**
- * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the camel cased string.
- * @example
- *
- * _.camelCase('Foo Bar');
- * // => 'fooBar'
- *
- * _.camelCase('--foo-bar');
- * // => 'fooBar'
- *
- * _.camelCase('__foo_bar__');
- * // => 'fooBar'
- */
-var camelCase = createCompounder(function(result, word, index) {
- word = word.toLowerCase();
- return result + (index ? (word.charAt(0).toUpperCase() + word.slice(1)) : word);
-});
-
-module.exports = camelCase;
diff --git a/deps/npm/node_modules/lodash/string/capitalize.js b/deps/npm/node_modules/lodash/string/capitalize.js
deleted file mode 100644
index f9222dc2eb..0000000000
--- a/deps/npm/node_modules/lodash/string/capitalize.js
+++ /dev/null
@@ -1,21 +0,0 @@
-var baseToString = require('../internal/baseToString');
-
-/**
- * Capitalizes the first character of `string`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to capitalize.
- * @returns {string} Returns the capitalized string.
- * @example
- *
- * _.capitalize('fred');
- * // => 'Fred'
- */
-function capitalize(string) {
- string = baseToString(string);
- return string && (string.charAt(0).toUpperCase() + string.slice(1));
-}
-
-module.exports = capitalize;
diff --git a/deps/npm/node_modules/lodash/string/deburr.js b/deps/npm/node_modules/lodash/string/deburr.js
deleted file mode 100644
index 0bd03e62dc..0000000000
--- a/deps/npm/node_modules/lodash/string/deburr.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var baseToString = require('../internal/baseToString'),
- deburrLetter = require('../internal/deburrLetter');
-
-/** Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). */
-var reComboMark = /[\u0300-\u036f\ufe20-\ufe23]/g;
-
-/** Used to match latin-1 supplementary letters (excluding mathematical operators). */
-var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;
-
-/**
- * Deburrs `string` by converting [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
- * to basic latin letters and removing [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to deburr.
- * @returns {string} Returns the deburred string.
- * @example
- *
- * _.deburr('déjà vu');
- * // => 'deja vu'
- */
-function deburr(string) {
- string = baseToString(string);
- return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, '');
-}
-
-module.exports = deburr;
diff --git a/deps/npm/node_modules/lodash/string/endsWith.js b/deps/npm/node_modules/lodash/string/endsWith.js
deleted file mode 100644
index 26821e2661..0000000000
--- a/deps/npm/node_modules/lodash/string/endsWith.js
+++ /dev/null
@@ -1,40 +0,0 @@
-var baseToString = require('../internal/baseToString');
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeMin = Math.min;
-
-/**
- * Checks if `string` ends with the given target string.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to search.
- * @param {string} [target] The string to search for.
- * @param {number} [position=string.length] The position to search from.
- * @returns {boolean} Returns `true` if `string` ends with `target`, else `false`.
- * @example
- *
- * _.endsWith('abc', 'c');
- * // => true
- *
- * _.endsWith('abc', 'b');
- * // => false
- *
- * _.endsWith('abc', 'b', 2);
- * // => true
- */
-function endsWith(string, target, position) {
- string = baseToString(string);
- target = (target + '');
-
- var length = string.length;
- position = position === undefined
- ? length
- : nativeMin(position < 0 ? 0 : (+position || 0), length);
-
- position -= target.length;
- return position >= 0 && string.indexOf(target, position) == position;
-}
-
-module.exports = endsWith;
diff --git a/deps/npm/node_modules/lodash/string/escape.js b/deps/npm/node_modules/lodash/string/escape.js
deleted file mode 100644
index cd08a5ddfb..0000000000
--- a/deps/npm/node_modules/lodash/string/escape.js
+++ /dev/null
@@ -1,48 +0,0 @@
-var baseToString = require('../internal/baseToString'),
- escapeHtmlChar = require('../internal/escapeHtmlChar');
-
-/** Used to match HTML entities and HTML characters. */
-var reUnescapedHtml = /[&<>"'`]/g,
- reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
-
-/**
- * Converts the characters "&", "<", ">", '"', "'", and "\`", in `string` to
- * their corresponding HTML entities.
- *
- * **Note:** No other characters are escaped. To escape additional characters
- * use a third-party library like [_he_](https://mths.be/he).
- *
- * Though the ">" character is escaped for symmetry, characters like
- * ">" and "/" don't need escaping in HTML and have no special meaning
- * unless they're part of a tag or unquoted attribute value.
- * See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
- * (under "semi-related fun fact") for more details.
- *
- * Backticks are escaped because in Internet Explorer < 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.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to escape.
- * @returns {string} Returns the escaped string.
- * @example
- *
- * _.escape('fred, barney, & pebbles');
- * // => 'fred, barney, &amp; pebbles'
- */
-function escape(string) {
- // Reset `lastIndex` because in IE < 9 `String#replace` does not.
- string = baseToString(string);
- return (string && reHasUnescapedHtml.test(string))
- ? string.replace(reUnescapedHtml, escapeHtmlChar)
- : string;
-}
-
-module.exports = escape;
diff --git a/deps/npm/node_modules/lodash/string/escapeRegExp.js b/deps/npm/node_modules/lodash/string/escapeRegExp.js
deleted file mode 100644
index 176137abf1..0000000000
--- a/deps/npm/node_modules/lodash/string/escapeRegExp.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var baseToString = require('../internal/baseToString'),
- escapeRegExpChar = require('../internal/escapeRegExpChar');
-
-/**
- * Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns)
- * and those outlined by [`EscapeRegExpPattern`](http://ecma-international.org/ecma-262/6.0/#sec-escaperegexppattern).
- */
-var reRegExpChars = /^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,
- reHasRegExpChars = RegExp(reRegExpChars.source);
-
-/**
- * Escapes the `RegExp` special characters "\", "/", "^", "$", ".", "|", "?",
- * "*", "+", "(", ")", "[", "]", "{" and "}" in `string`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to escape.
- * @returns {string} Returns the escaped string.
- * @example
- *
- * _.escapeRegExp('[lodash](https://lodash.com/)');
- * // => '\[lodash\]\(https:\/\/lodash\.com\/\)'
- */
-function escapeRegExp(string) {
- string = baseToString(string);
- return (string && reHasRegExpChars.test(string))
- ? string.replace(reRegExpChars, escapeRegExpChar)
- : (string || '(?:)');
-}
-
-module.exports = escapeRegExp;
diff --git a/deps/npm/node_modules/lodash/string/kebabCase.js b/deps/npm/node_modules/lodash/string/kebabCase.js
deleted file mode 100644
index d29c2f908a..0000000000
--- a/deps/npm/node_modules/lodash/string/kebabCase.js
+++ /dev/null
@@ -1,26 +0,0 @@
-var createCompounder = require('../internal/createCompounder');
-
-/**
- * Converts `string` to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the kebab cased string.
- * @example
- *
- * _.kebabCase('Foo Bar');
- * // => 'foo-bar'
- *
- * _.kebabCase('fooBar');
- * // => 'foo-bar'
- *
- * _.kebabCase('__foo_bar__');
- * // => 'foo-bar'
- */
-var kebabCase = createCompounder(function(result, word, index) {
- return result + (index ? '-' : '') + word.toLowerCase();
-});
-
-module.exports = kebabCase;
diff --git a/deps/npm/node_modules/lodash/string/pad.js b/deps/npm/node_modules/lodash/string/pad.js
deleted file mode 100644
index 60e523b9e4..0000000000
--- a/deps/npm/node_modules/lodash/string/pad.js
+++ /dev/null
@@ -1,47 +0,0 @@
-var baseToString = require('../internal/baseToString'),
- createPadding = require('../internal/createPadding');
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeCeil = Math.ceil,
- nativeFloor = Math.floor,
- nativeIsFinite = global.isFinite;
-
-/**
- * Pads `string` on the left and right sides if it's shorter than `length`.
- * Padding characters are truncated if they can't be evenly divided by `length`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to pad.
- * @param {number} [length=0] The padding length.
- * @param {string} [chars=' '] The string used as padding.
- * @returns {string} Returns the padded string.
- * @example
- *
- * _.pad('abc', 8);
- * // => ' abc '
- *
- * _.pad('abc', 8, '_-');
- * // => '_-abc_-_'
- *
- * _.pad('abc', 3);
- * // => 'abc'
- */
-function pad(string, length, chars) {
- string = baseToString(string);
- length = +length;
-
- var strLength = string.length;
- if (strLength >= length || !nativeIsFinite(length)) {
- return string;
- }
- var mid = (length - strLength) / 2,
- leftLength = nativeFloor(mid),
- rightLength = nativeCeil(mid);
-
- chars = createPadding('', rightLength, chars);
- return chars.slice(0, leftLength) + string + chars;
-}
-
-module.exports = pad;
diff --git a/deps/npm/node_modules/lodash/string/padLeft.js b/deps/npm/node_modules/lodash/string/padLeft.js
deleted file mode 100644
index bb0c94d0cd..0000000000
--- a/deps/npm/node_modules/lodash/string/padLeft.js
+++ /dev/null
@@ -1,27 +0,0 @@
-var createPadDir = require('../internal/createPadDir');
-
-/**
- * Pads `string` on the left side if it's shorter than `length`. Padding
- * characters are truncated if they exceed `length`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to pad.
- * @param {number} [length=0] The padding length.
- * @param {string} [chars=' '] The string used as padding.
- * @returns {string} Returns the padded string.
- * @example
- *
- * _.padLeft('abc', 6);
- * // => ' abc'
- *
- * _.padLeft('abc', 6, '_-');
- * // => '_-_abc'
- *
- * _.padLeft('abc', 3);
- * // => 'abc'
- */
-var padLeft = createPadDir();
-
-module.exports = padLeft;
diff --git a/deps/npm/node_modules/lodash/string/padRight.js b/deps/npm/node_modules/lodash/string/padRight.js
deleted file mode 100644
index dc12f55993..0000000000
--- a/deps/npm/node_modules/lodash/string/padRight.js
+++ /dev/null
@@ -1,27 +0,0 @@
-var createPadDir = require('../internal/createPadDir');
-
-/**
- * Pads `string` on the right side if it's shorter than `length`. Padding
- * characters are truncated if they exceed `length`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to pad.
- * @param {number} [length=0] The padding length.
- * @param {string} [chars=' '] The string used as padding.
- * @returns {string} Returns the padded string.
- * @example
- *
- * _.padRight('abc', 6);
- * // => 'abc '
- *
- * _.padRight('abc', 6, '_-');
- * // => 'abc_-_'
- *
- * _.padRight('abc', 3);
- * // => 'abc'
- */
-var padRight = createPadDir(true);
-
-module.exports = padRight;
diff --git a/deps/npm/node_modules/lodash/string/parseInt.js b/deps/npm/node_modules/lodash/string/parseInt.js
deleted file mode 100644
index f457711e49..0000000000
--- a/deps/npm/node_modules/lodash/string/parseInt.js
+++ /dev/null
@@ -1,46 +0,0 @@
-var isIterateeCall = require('../internal/isIterateeCall'),
- trim = require('./trim');
-
-/** Used to detect hexadecimal string values. */
-var reHasHexPrefix = /^0[xX]/;
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeParseInt = global.parseInt;
-
-/**
- * Converts `string` to an integer of the specified radix. If `radix` is
- * `undefined` or `0`, a `radix` of `10` is used unless `value` is a hexadecimal,
- * in which case a `radix` of `16` is used.
- *
- * **Note:** This method aligns with the [ES5 implementation](https://es5.github.io/#E)
- * of `parseInt`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} string The string to convert.
- * @param {number} [radix] The radix to interpret `value` by.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {number} Returns the converted integer.
- * @example
- *
- * _.parseInt('08');
- * // => 8
- *
- * _.map(['6', '08', '10'], _.parseInt);
- * // => [6, 8, 10]
- */
-function parseInt(string, radix, guard) {
- // Firefox < 21 and Opera < 15 follow ES3 for `parseInt`.
- // Chrome fails to trim leading <BOM> whitespace characters.
- // See https://code.google.com/p/v8/issues/detail?id=3109 for more details.
- if (guard ? isIterateeCall(string, radix, guard) : radix == null) {
- radix = 0;
- } else if (radix) {
- radix = +radix;
- }
- string = trim(string);
- return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10));
-}
-
-module.exports = parseInt;
diff --git a/deps/npm/node_modules/lodash/string/repeat.js b/deps/npm/node_modules/lodash/string/repeat.js
deleted file mode 100644
index 2902123e6d..0000000000
--- a/deps/npm/node_modules/lodash/string/repeat.js
+++ /dev/null
@@ -1,47 +0,0 @@
-var baseToString = require('../internal/baseToString');
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeFloor = Math.floor,
- nativeIsFinite = global.isFinite;
-
-/**
- * Repeats the given string `n` times.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to repeat.
- * @param {number} [n=0] The number of times to repeat the string.
- * @returns {string} Returns the repeated string.
- * @example
- *
- * _.repeat('*', 3);
- * // => '***'
- *
- * _.repeat('abc', 2);
- * // => 'abcabc'
- *
- * _.repeat('abc', 0);
- * // => ''
- */
-function repeat(string, n) {
- var result = '';
- string = baseToString(string);
- n = +n;
- if (n < 1 || !string || !nativeIsFinite(n)) {
- return result;
- }
- // Leverage the exponentiation by squaring algorithm for a faster repeat.
- // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
- do {
- if (n % 2) {
- result += string;
- }
- n = nativeFloor(n / 2);
- string += string;
- } while (n);
-
- return result;
-}
-
-module.exports = repeat;
diff --git a/deps/npm/node_modules/lodash/string/snakeCase.js b/deps/npm/node_modules/lodash/string/snakeCase.js
deleted file mode 100644
index c9ebffd913..0000000000
--- a/deps/npm/node_modules/lodash/string/snakeCase.js
+++ /dev/null
@@ -1,26 +0,0 @@
-var createCompounder = require('../internal/createCompounder');
-
-/**
- * Converts `string` to [snake case](https://en.wikipedia.org/wiki/Snake_case).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the snake cased string.
- * @example
- *
- * _.snakeCase('Foo Bar');
- * // => 'foo_bar'
- *
- * _.snakeCase('fooBar');
- * // => 'foo_bar'
- *
- * _.snakeCase('--foo-bar');
- * // => 'foo_bar'
- */
-var snakeCase = createCompounder(function(result, word, index) {
- return result + (index ? '_' : '') + word.toLowerCase();
-});
-
-module.exports = snakeCase;
diff --git a/deps/npm/node_modules/lodash/string/startCase.js b/deps/npm/node_modules/lodash/string/startCase.js
deleted file mode 100644
index 740d48a513..0000000000
--- a/deps/npm/node_modules/lodash/string/startCase.js
+++ /dev/null
@@ -1,26 +0,0 @@
-var createCompounder = require('../internal/createCompounder');
-
-/**
- * Converts `string` to [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the start cased string.
- * @example
- *
- * _.startCase('--foo-bar');
- * // => 'Foo Bar'
- *
- * _.startCase('fooBar');
- * // => 'Foo Bar'
- *
- * _.startCase('__foo_bar__');
- * // => 'Foo Bar'
- */
-var startCase = createCompounder(function(result, word, index) {
- return result + (index ? ' ' : '') + (word.charAt(0).toUpperCase() + word.slice(1));
-});
-
-module.exports = startCase;
diff --git a/deps/npm/node_modules/lodash/string/startsWith.js b/deps/npm/node_modules/lodash/string/startsWith.js
deleted file mode 100644
index 65fae2a462..0000000000
--- a/deps/npm/node_modules/lodash/string/startsWith.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var baseToString = require('../internal/baseToString');
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeMin = Math.min;
-
-/**
- * Checks if `string` starts with the given target string.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to search.
- * @param {string} [target] The string to search for.
- * @param {number} [position=0] The position to search from.
- * @returns {boolean} Returns `true` if `string` starts with `target`, else `false`.
- * @example
- *
- * _.startsWith('abc', 'a');
- * // => true
- *
- * _.startsWith('abc', 'b');
- * // => false
- *
- * _.startsWith('abc', 'b', 1);
- * // => true
- */
-function startsWith(string, target, position) {
- string = baseToString(string);
- position = position == null
- ? 0
- : nativeMin(position < 0 ? 0 : (+position || 0), string.length);
-
- return string.lastIndexOf(target, position) == position;
-}
-
-module.exports = startsWith;
diff --git a/deps/npm/node_modules/lodash/string/template.js b/deps/npm/node_modules/lodash/string/template.js
deleted file mode 100644
index e75e992b24..0000000000
--- a/deps/npm/node_modules/lodash/string/template.js
+++ /dev/null
@@ -1,226 +0,0 @@
-var assignOwnDefaults = require('../internal/assignOwnDefaults'),
- assignWith = require('../internal/assignWith'),
- attempt = require('../utility/attempt'),
- baseAssign = require('../internal/baseAssign'),
- baseToString = require('../internal/baseToString'),
- baseValues = require('../internal/baseValues'),
- escapeStringChar = require('../internal/escapeStringChar'),
- isError = require('../lang/isError'),
- isIterateeCall = require('../internal/isIterateeCall'),
- keys = require('../object/keys'),
- reInterpolate = require('../internal/reInterpolate'),
- templateSettings = require('./templateSettings');
-
-/** Used to match empty string literals in compiled template source. */
-var reEmptyStringLeading = /\b__p \+= '';/g,
- reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
- reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
-
-/** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */
-var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
-
-/** Used to ensure capturing order of template delimiters. */
-var reNoMatch = /($^)/;
-
-/** Used to match unescaped characters in compiled string literals. */
-var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
-
-/**
- * Creates a compiled template function that can interpolate data properties
- * in "interpolate" delimiters, HTML-escape interpolated data properties in
- * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
- * properties may be accessed as free variables in the template. If a setting
- * object is provided it takes precedence over `_.templateSettings` values.
- *
- * **Note:** In the development build `_.template` utilizes
- * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
- * for easier debugging.
- *
- * For more information on precompiling templates see
- * [lodash's custom builds documentation](https://lodash.com/custom-builds).
- *
- * For more information on Chrome extension sandboxes see
- * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The template string.
- * @param {Object} [options] The options object.
- * @param {RegExp} [options.escape] The HTML "escape" delimiter.
- * @param {RegExp} [options.evaluate] The "evaluate" delimiter.
- * @param {Object} [options.imports] An object to import into the template as free variables.
- * @param {RegExp} [options.interpolate] The "interpolate" delimiter.
- * @param {string} [options.sourceURL] The sourceURL of the template's compiled source.
- * @param {string} [options.variable] The data object variable name.
- * @param- {Object} [otherOptions] Enables the legacy `options` param signature.
- * @returns {Function} Returns the compiled template function.
- * @example
- *
- * // using the "interpolate" delimiter to create a compiled template
- * var compiled = _.template('hello <%= user %>!');
- * compiled({ 'user': 'fred' });
- * // => 'hello fred!'
- *
- * // using the HTML "escape" delimiter to escape data property values
- * var compiled = _.template('<b><%- value %></b>');
- * compiled({ 'value': '<script>' });
- * // => '<b>&lt;script&gt;</b>'
- *
- * // using the "evaluate" delimiter to execute JavaScript and generate HTML
- * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
- * compiled({ 'users': ['fred', 'barney'] });
- * // => '<li>fred</li><li>barney</li>'
- *
- * // using the internal `print` function in "evaluate" delimiters
- * var compiled = _.template('<% print("hello " + user); %>!');
- * compiled({ 'user': 'barney' });
- * // => 'hello barney!'
- *
- * // using the ES delimiter as an alternative to the default "interpolate" delimiter
- * var compiled = _.template('hello ${ user }!');
- * compiled({ 'user': 'pebbles' });
- * // => 'hello pebbles!'
- *
- * // using custom template delimiters
- * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
- * var compiled = _.template('hello {{ user }}!');
- * compiled({ 'user': 'mustache' });
- * // => 'hello mustache!'
- *
- * // using backslashes to treat delimiters as plain text
- * var compiled = _.template('<%= "\\<%- value %\\>" %>');
- * compiled({ 'value': 'ignored' });
- * // => '<%- value %>'
- *
- * // using the `imports` option to import `jQuery` as `jq`
- * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
- * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
- * compiled({ 'users': ['fred', 'barney'] });
- * // => '<li>fred</li><li>barney</li>'
- *
- * // using the `sourceURL` option to specify a custom sourceURL for the template
- * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
- * compiled(data);
- * // => find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector
- *
- * // using the `variable` option to ensure a with-statement isn't used in the compiled template
- * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
- * compiled.source;
- * // => function(data) {
- * // var __t, __p = '';
- * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
- * // return __p;
- * // }
- *
- * // using the `source` property to inline compiled templates for meaningful
- * // line numbers in error messages and a stack trace
- * fs.writeFileSync(path.join(cwd, 'jst.js'), '\
- * var JST = {\
- * "main": ' + _.template(mainText).source + '\
- * };\
- * ');
- */
-function template(string, options, otherOptions) {
- // Based on John Resig's `tmpl` implementation (http://ejohn.org/blog/javascript-micro-templating/)
- // and Laura Doktorova's doT.js (https://github.com/olado/doT).
- var settings = templateSettings.imports._.templateSettings || templateSettings;
-
- if (otherOptions && isIterateeCall(string, options, otherOptions)) {
- options = otherOptions = undefined;
- }
- string = baseToString(string);
- options = assignWith(baseAssign({}, otherOptions || options), settings, assignOwnDefaults);
-
- var imports = assignWith(baseAssign({}, options.imports), settings.imports, assignOwnDefaults),
- importsKeys = keys(imports),
- importsValues = baseValues(imports, importsKeys);
-
- var isEscaping,
- isEvaluating,
- index = 0,
- interpolate = options.interpolate || reNoMatch,
- source = "__p += '";
-
- // Compile the regexp to match each delimiter.
- var reDelimiters = RegExp(
- (options.escape || reNoMatch).source + '|' +
- interpolate.source + '|' +
- (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
- (options.evaluate || reNoMatch).source + '|$'
- , 'g');
-
- // Use a sourceURL for easier debugging.
- var sourceURL = 'sourceURL' in options ? '//# sourceURL=' + options.sourceURL + '\n' : '';
-
- string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
- interpolateValue || (interpolateValue = esTemplateValue);
-
- // Escape characters that can't be included in string literals.
- source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
-
- // Replace delimiters with snippets.
- if (escapeValue) {
- isEscaping = true;
- source += "' +\n__e(" + escapeValue + ") +\n'";
- }
- if (evaluateValue) {
- isEvaluating = true;
- source += "';\n" + evaluateValue + ";\n__p += '";
- }
- if (interpolateValue) {
- source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
- }
- index = offset + match.length;
-
- // The JS engine embedded in Adobe products requires returning the `match`
- // string in order to produce the correct `offset` value.
- return match;
- });
-
- source += "';\n";
-
- // If `variable` is not specified wrap a with-statement around the generated
- // code to add the data object to the top of the scope chain.
- var variable = options.variable;
- if (!variable) {
- source = 'with (obj) {\n' + source + '\n}\n';
- }
- // Cleanup code by stripping empty strings.
- source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
- .replace(reEmptyStringMiddle, '$1')
- .replace(reEmptyStringTrailing, '$1;');
-
- // Frame code as the function body.
- source = 'function(' + (variable || 'obj') + ') {\n' +
- (variable
- ? ''
- : 'obj || (obj = {});\n'
- ) +
- "var __t, __p = ''" +
- (isEscaping
- ? ', __e = _.escape'
- : ''
- ) +
- (isEvaluating
- ? ', __j = Array.prototype.join;\n' +
- "function print() { __p += __j.call(arguments, '') }\n"
- : ';\n'
- ) +
- source +
- 'return __p\n}';
-
- var result = attempt(function() {
- return Function(importsKeys, sourceURL + 'return ' + source).apply(undefined, importsValues);
- });
-
- // Provide the compiled function's source by its `toString` method or
- // the `source` property as a convenience for inlining compiled templates.
- result.source = source;
- if (isError(result)) {
- throw result;
- }
- return result;
-}
-
-module.exports = template;
diff --git a/deps/npm/node_modules/lodash/string/templateSettings.js b/deps/npm/node_modules/lodash/string/templateSettings.js
deleted file mode 100644
index cdcef9ba21..0000000000
--- a/deps/npm/node_modules/lodash/string/templateSettings.js
+++ /dev/null
@@ -1,67 +0,0 @@
-var escape = require('./escape'),
- reEscape = require('../internal/reEscape'),
- reEvaluate = require('../internal/reEvaluate'),
- reInterpolate = require('../internal/reInterpolate');
-
-/**
- * By default, the template delimiters used by lodash are like those in
- * embedded Ruby (ERB). Change the following template settings to use
- * alternative delimiters.
- *
- * @static
- * @memberOf _
- * @type Object
- */
-var templateSettings = {
-
- /**
- * Used to detect `data` property values to be HTML-escaped.
- *
- * @memberOf _.templateSettings
- * @type RegExp
- */
- 'escape': reEscape,
-
- /**
- * Used to detect code to be evaluated.
- *
- * @memberOf _.templateSettings
- * @type RegExp
- */
- 'evaluate': reEvaluate,
-
- /**
- * Used to detect `data` property values to inject.
- *
- * @memberOf _.templateSettings
- * @type RegExp
- */
- 'interpolate': reInterpolate,
-
- /**
- * Used to reference the data object in the template text.
- *
- * @memberOf _.templateSettings
- * @type string
- */
- 'variable': '',
-
- /**
- * Used to import variables into the compiled template.
- *
- * @memberOf _.templateSettings
- * @type Object
- */
- 'imports': {
-
- /**
- * A reference to the `lodash` function.
- *
- * @memberOf _.templateSettings.imports
- * @type Function
- */
- '_': { 'escape': escape }
- }
-};
-
-module.exports = templateSettings;
diff --git a/deps/npm/node_modules/lodash/string/trim.js b/deps/npm/node_modules/lodash/string/trim.js
deleted file mode 100644
index 22cd38a5b2..0000000000
--- a/deps/npm/node_modules/lodash/string/trim.js
+++ /dev/null
@@ -1,42 +0,0 @@
-var baseToString = require('../internal/baseToString'),
- charsLeftIndex = require('../internal/charsLeftIndex'),
- charsRightIndex = require('../internal/charsRightIndex'),
- isIterateeCall = require('../internal/isIterateeCall'),
- trimmedLeftIndex = require('../internal/trimmedLeftIndex'),
- trimmedRightIndex = require('../internal/trimmedRightIndex');
-
-/**
- * Removes leading and trailing whitespace or specified characters from `string`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to trim.
- * @param {string} [chars=whitespace] The characters to trim.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {string} Returns the trimmed string.
- * @example
- *
- * _.trim(' abc ');
- * // => 'abc'
- *
- * _.trim('-_-abc-_-', '_-');
- * // => 'abc'
- *
- * _.map([' foo ', ' bar '], _.trim);
- * // => ['foo', 'bar']
- */
-function trim(string, chars, guard) {
- var value = string;
- string = baseToString(string);
- if (!string) {
- return string;
- }
- if (guard ? isIterateeCall(value, chars, guard) : chars == null) {
- return string.slice(trimmedLeftIndex(string), trimmedRightIndex(string) + 1);
- }
- chars = (chars + '');
- return string.slice(charsLeftIndex(string, chars), charsRightIndex(string, chars) + 1);
-}
-
-module.exports = trim;
diff --git a/deps/npm/node_modules/lodash/string/trimLeft.js b/deps/npm/node_modules/lodash/string/trimLeft.js
deleted file mode 100644
index 29299677a0..0000000000
--- a/deps/npm/node_modules/lodash/string/trimLeft.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var baseToString = require('../internal/baseToString'),
- charsLeftIndex = require('../internal/charsLeftIndex'),
- isIterateeCall = require('../internal/isIterateeCall'),
- trimmedLeftIndex = require('../internal/trimmedLeftIndex');
-
-/**
- * Removes leading whitespace or specified characters from `string`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to trim.
- * @param {string} [chars=whitespace] The characters to trim.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {string} Returns the trimmed string.
- * @example
- *
- * _.trimLeft(' abc ');
- * // => 'abc '
- *
- * _.trimLeft('-_-abc-_-', '_-');
- * // => 'abc-_-'
- */
-function trimLeft(string, chars, guard) {
- var value = string;
- string = baseToString(string);
- if (!string) {
- return string;
- }
- if (guard ? isIterateeCall(value, chars, guard) : chars == null) {
- return string.slice(trimmedLeftIndex(string));
- }
- return string.slice(charsLeftIndex(string, (chars + '')));
-}
-
-module.exports = trimLeft;
diff --git a/deps/npm/node_modules/lodash/string/trimRight.js b/deps/npm/node_modules/lodash/string/trimRight.js
deleted file mode 100644
index 0f9be71fbe..0000000000
--- a/deps/npm/node_modules/lodash/string/trimRight.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var baseToString = require('../internal/baseToString'),
- charsRightIndex = require('../internal/charsRightIndex'),
- isIterateeCall = require('../internal/isIterateeCall'),
- trimmedRightIndex = require('../internal/trimmedRightIndex');
-
-/**
- * Removes trailing whitespace or specified characters from `string`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to trim.
- * @param {string} [chars=whitespace] The characters to trim.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {string} Returns the trimmed string.
- * @example
- *
- * _.trimRight(' abc ');
- * // => ' abc'
- *
- * _.trimRight('-_-abc-_-', '_-');
- * // => '-_-abc'
- */
-function trimRight(string, chars, guard) {
- var value = string;
- string = baseToString(string);
- if (!string) {
- return string;
- }
- if (guard ? isIterateeCall(value, chars, guard) : chars == null) {
- return string.slice(0, trimmedRightIndex(string) + 1);
- }
- return string.slice(0, charsRightIndex(string, (chars + '')) + 1);
-}
-
-module.exports = trimRight;
diff --git a/deps/npm/node_modules/lodash/string/trunc.js b/deps/npm/node_modules/lodash/string/trunc.js
deleted file mode 100644
index 29e1939902..0000000000
--- a/deps/npm/node_modules/lodash/string/trunc.js
+++ /dev/null
@@ -1,105 +0,0 @@
-var baseToString = require('../internal/baseToString'),
- isIterateeCall = require('../internal/isIterateeCall'),
- isObject = require('../lang/isObject'),
- isRegExp = require('../lang/isRegExp');
-
-/** Used as default options for `_.trunc`. */
-var DEFAULT_TRUNC_LENGTH = 30,
- DEFAULT_TRUNC_OMISSION = '...';
-
-/** Used to match `RegExp` flags from their coerced string values. */
-var reFlags = /\w*$/;
-
-/**
- * Truncates `string` if it's longer than the given maximum string length.
- * The last characters of the truncated string are replaced with the omission
- * string which defaults to "...".
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to truncate.
- * @param {Object|number} [options] The options object or maximum string length.
- * @param {number} [options.length=30] The maximum string length.
- * @param {string} [options.omission='...'] The string to indicate text is omitted.
- * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {string} Returns the truncated string.
- * @example
- *
- * _.trunc('hi-diddly-ho there, neighborino');
- * // => 'hi-diddly-ho there, neighbo...'
- *
- * _.trunc('hi-diddly-ho there, neighborino', 24);
- * // => 'hi-diddly-ho there, n...'
- *
- * _.trunc('hi-diddly-ho there, neighborino', {
- * 'length': 24,
- * 'separator': ' '
- * });
- * // => 'hi-diddly-ho there,...'
- *
- * _.trunc('hi-diddly-ho there, neighborino', {
- * 'length': 24,
- * 'separator': /,? +/
- * });
- * // => 'hi-diddly-ho there...'
- *
- * _.trunc('hi-diddly-ho there, neighborino', {
- * 'omission': ' [...]'
- * });
- * // => 'hi-diddly-ho there, neig [...]'
- */
-function trunc(string, options, guard) {
- if (guard && isIterateeCall(string, options, guard)) {
- options = undefined;
- }
- var length = DEFAULT_TRUNC_LENGTH,
- omission = DEFAULT_TRUNC_OMISSION;
-
- if (options != null) {
- if (isObject(options)) {
- var separator = 'separator' in options ? options.separator : separator;
- length = 'length' in options ? (+options.length || 0) : length;
- omission = 'omission' in options ? baseToString(options.omission) : omission;
- } else {
- length = +options || 0;
- }
- }
- string = baseToString(string);
- if (length >= string.length) {
- return string;
- }
- var end = length - omission.length;
- if (end < 1) {
- return omission;
- }
- var result = string.slice(0, end);
- if (separator == null) {
- return result + omission;
- }
- if (isRegExp(separator)) {
- if (string.slice(end).search(separator)) {
- var match,
- newEnd,
- substring = string.slice(0, end);
-
- if (!separator.global) {
- separator = RegExp(separator.source, (reFlags.exec(separator) || '') + 'g');
- }
- separator.lastIndex = 0;
- while ((match = separator.exec(substring))) {
- newEnd = match.index;
- }
- result = result.slice(0, newEnd == null ? end : newEnd);
- }
- } else if (string.indexOf(separator, end) != end) {
- var index = result.lastIndexOf(separator);
- if (index > -1) {
- result = result.slice(0, index);
- }
- }
- return result + omission;
-}
-
-module.exports = trunc;
diff --git a/deps/npm/node_modules/lodash/string/unescape.js b/deps/npm/node_modules/lodash/string/unescape.js
deleted file mode 100644
index b0266a7ac4..0000000000
--- a/deps/npm/node_modules/lodash/string/unescape.js
+++ /dev/null
@@ -1,33 +0,0 @@
-var baseToString = require('../internal/baseToString'),
- unescapeHtmlChar = require('../internal/unescapeHtmlChar');
-
-/** Used to match HTML entities and HTML characters. */
-var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/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 their
- * corresponding characters.
- *
- * **Note:** No other HTML entities are unescaped. To unescape additional HTML
- * entities use a third-party library like [_he_](https://mths.be/he).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to unescape.
- * @returns {string} Returns the unescaped string.
- * @example
- *
- * _.unescape('fred, barney, &amp; pebbles');
- * // => 'fred, barney, & pebbles'
- */
-function unescape(string) {
- string = baseToString(string);
- return (string && reHasEscapedHtml.test(string))
- ? string.replace(reEscapedHtml, unescapeHtmlChar)
- : string;
-}
-
-module.exports = unescape;
diff --git a/deps/npm/node_modules/lodash/string/words.js b/deps/npm/node_modules/lodash/string/words.js
deleted file mode 100644
index 3013ad6301..0000000000
--- a/deps/npm/node_modules/lodash/string/words.js
+++ /dev/null
@@ -1,38 +0,0 @@
-var baseToString = require('../internal/baseToString'),
- isIterateeCall = require('../internal/isIterateeCall');
-
-/** Used to match words to create compound words. */
-var reWords = (function() {
- var upper = '[A-Z\\xc0-\\xd6\\xd8-\\xde]',
- lower = '[a-z\\xdf-\\xf6\\xf8-\\xff]+';
-
- return RegExp(upper + '+(?=' + upper + lower + ')|' + upper + '?' + lower + '|' + upper + '+|[0-9]+', 'g');
-}());
-
-/**
- * Splits `string` into an array of its words.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to inspect.
- * @param {RegExp|string} [pattern] The pattern to match words.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Array} Returns the words of `string`.
- * @example
- *
- * _.words('fred, barney, & pebbles');
- * // => ['fred', 'barney', 'pebbles']
- *
- * _.words('fred, barney, & pebbles', /[^, ]+/g);
- * // => ['fred', 'barney', '&', 'pebbles']
- */
-function words(string, pattern, guard) {
- if (guard && isIterateeCall(string, pattern, guard)) {
- pattern = undefined;
- }
- string = baseToString(string);
- return string.match(pattern || reWords) || [];
-}
-
-module.exports = words;
diff --git a/deps/npm/node_modules/lodash/support.js b/deps/npm/node_modules/lodash/support.js
deleted file mode 100644
index 5009c2c502..0000000000
--- a/deps/npm/node_modules/lodash/support.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/**
- * An object environment feature flags.
- *
- * @static
- * @memberOf _
- * @type Object
- */
-var support = {};
-
-module.exports = support;
diff --git a/deps/npm/node_modules/lodash/utility.js b/deps/npm/node_modules/lodash/utility.js
deleted file mode 100644
index 25311faefc..0000000000
--- a/deps/npm/node_modules/lodash/utility.js
+++ /dev/null
@@ -1,18 +0,0 @@
-module.exports = {
- 'attempt': require('./utility/attempt'),
- 'callback': require('./utility/callback'),
- 'constant': require('./utility/constant'),
- 'identity': require('./utility/identity'),
- 'iteratee': require('./utility/iteratee'),
- 'matches': require('./utility/matches'),
- 'matchesProperty': require('./utility/matchesProperty'),
- 'method': require('./utility/method'),
- 'methodOf': require('./utility/methodOf'),
- 'mixin': require('./utility/mixin'),
- 'noop': require('./utility/noop'),
- 'property': require('./utility/property'),
- 'propertyOf': require('./utility/propertyOf'),
- 'range': require('./utility/range'),
- 'times': require('./utility/times'),
- 'uniqueId': require('./utility/uniqueId')
-};
diff --git a/deps/npm/node_modules/lodash/utility/attempt.js b/deps/npm/node_modules/lodash/utility/attempt.js
deleted file mode 100644
index 8d8fb98102..0000000000
--- a/deps/npm/node_modules/lodash/utility/attempt.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var isError = require('../lang/isError'),
- restParam = require('../function/restParam');
-
-/**
- * Attempts to invoke `func`, returning either the result or the caught error
- * object. Any additional arguments are provided to `func` when it's invoked.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Function} func The function to attempt.
- * @returns {*} Returns the `func` result or error object.
- * @example
- *
- * // avoid throwing errors for invalid selectors
- * var elements = _.attempt(function(selector) {
- * return document.querySelectorAll(selector);
- * }, '>_>');
- *
- * if (_.isError(elements)) {
- * elements = [];
- * }
- */
-var attempt = restParam(function(func, args) {
- try {
- return func.apply(undefined, args);
- } catch(e) {
- return isError(e) ? e : new Error(e);
- }
-});
-
-module.exports = attempt;
diff --git a/deps/npm/node_modules/lodash/utility/callback.js b/deps/npm/node_modules/lodash/utility/callback.js
deleted file mode 100644
index 21223d0231..0000000000
--- a/deps/npm/node_modules/lodash/utility/callback.js
+++ /dev/null
@@ -1,53 +0,0 @@
-var baseCallback = require('../internal/baseCallback'),
- isIterateeCall = require('../internal/isIterateeCall'),
- isObjectLike = require('../internal/isObjectLike'),
- matches = require('./matches');
-
-/**
- * Creates a function that invokes `func` with the `this` binding of `thisArg`
- * and arguments of the created function. If `func` is a property name the
- * created callback returns the property value for a given element. If `func`
- * is an object the created callback returns `true` for elements that contain
- * the equivalent object properties, otherwise it returns `false`.
- *
- * @static
- * @memberOf _
- * @alias iteratee
- * @category Utility
- * @param {*} [func=_.identity] The value to convert to a callback.
- * @param {*} [thisArg] The `this` binding of `func`.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Function} Returns the callback.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 }
- * ];
- *
- * // wrap to create custom callback shorthands
- * _.callback = _.wrap(_.callback, function(callback, func, thisArg) {
- * var match = /^(.+?)__([gl]t)(.+)$/.exec(func);
- * if (!match) {
- * return callback(func, thisArg);
- * }
- * return function(object) {
- * return match[2] == 'gt'
- * ? object[match[1]] > match[3]
- * : object[match[1]] < match[3];
- * };
- * });
- *
- * _.filter(users, 'age__gt36');
- * // => [{ 'user': 'fred', 'age': 40 }]
- */
-function callback(func, thisArg, guard) {
- if (guard && isIterateeCall(func, thisArg, guard)) {
- thisArg = undefined;
- }
- return isObjectLike(func)
- ? matches(func)
- : baseCallback(func, thisArg);
-}
-
-module.exports = callback;
diff --git a/deps/npm/node_modules/lodash/utility/constant.js b/deps/npm/node_modules/lodash/utility/constant.js
deleted file mode 100644
index 6919b76328..0000000000
--- a/deps/npm/node_modules/lodash/utility/constant.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Creates a function that returns `value`.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {*} value The value to return from the new function.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var object = { 'user': 'fred' };
- * var getter = _.constant(object);
- *
- * getter() === object;
- * // => true
- */
-function constant(value) {
- return function() {
- return value;
- };
-}
-
-module.exports = constant;
diff --git a/deps/npm/node_modules/lodash/utility/identity.js b/deps/npm/node_modules/lodash/utility/identity.js
deleted file mode 100644
index 3a1d1d4c9c..0000000000
--- a/deps/npm/node_modules/lodash/utility/identity.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * This method returns the first argument provided to it.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {*} value Any value.
- * @returns {*} Returns `value`.
- * @example
- *
- * var object = { 'user': 'fred' };
- *
- * _.identity(object) === object;
- * // => true
- */
-function identity(value) {
- return value;
-}
-
-module.exports = identity;
diff --git a/deps/npm/node_modules/lodash/utility/iteratee.js b/deps/npm/node_modules/lodash/utility/iteratee.js
deleted file mode 100644
index fcfa202105..0000000000
--- a/deps/npm/node_modules/lodash/utility/iteratee.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./callback');
diff --git a/deps/npm/node_modules/lodash/utility/matches.js b/deps/npm/node_modules/lodash/utility/matches.js
deleted file mode 100644
index a182637bdb..0000000000
--- a/deps/npm/node_modules/lodash/utility/matches.js
+++ /dev/null
@@ -1,33 +0,0 @@
-var baseClone = require('../internal/baseClone'),
- baseMatches = require('../internal/baseMatches');
-
-/**
- * Creates a function that performs a deep comparison between a given object
- * and `source`, returning `true` if the given object has equivalent property
- * values, else `false`.
- *
- * **Note:** This method supports comparing arrays, booleans, `Date` objects,
- * numbers, `Object` objects, regexes, and strings. Objects are compared by
- * their own, not inherited, enumerable properties. For comparing a single
- * own or inherited property value see `_.matchesProperty`.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Object} source The object of property values to match.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false }
- * ];
- *
- * _.filter(users, _.matches({ 'age': 40, 'active': false }));
- * // => [{ 'user': 'fred', 'age': 40, 'active': false }]
- */
-function matches(source) {
- return baseMatches(baseClone(source, true));
-}
-
-module.exports = matches;
diff --git a/deps/npm/node_modules/lodash/utility/matchesProperty.js b/deps/npm/node_modules/lodash/utility/matchesProperty.js
deleted file mode 100644
index 91e51a56cb..0000000000
--- a/deps/npm/node_modules/lodash/utility/matchesProperty.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var baseClone = require('../internal/baseClone'),
- baseMatchesProperty = require('../internal/baseMatchesProperty');
-
-/**
- * Creates a function that compares the property value of `path` on a given
- * object to `value`.
- *
- * **Note:** This method supports comparing arrays, booleans, `Date` objects,
- * numbers, `Object` objects, regexes, and strings. Objects are compared by
- * their own, not inherited, enumerable properties.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Array|string} path The path of the property to get.
- * @param {*} srcValue The value to match.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var users = [
- * { 'user': 'barney' },
- * { 'user': 'fred' }
- * ];
- *
- * _.find(users, _.matchesProperty('user', 'fred'));
- * // => { 'user': 'fred' }
- */
-function matchesProperty(path, srcValue) {
- return baseMatchesProperty(path, baseClone(srcValue, true));
-}
-
-module.exports = matchesProperty;
diff --git a/deps/npm/node_modules/lodash/utility/method.js b/deps/npm/node_modules/lodash/utility/method.js
deleted file mode 100644
index e315b7f355..0000000000
--- a/deps/npm/node_modules/lodash/utility/method.js
+++ /dev/null
@@ -1,33 +0,0 @@
-var invokePath = require('../internal/invokePath'),
- restParam = require('../function/restParam');
-
-/**
- * Creates a function that invokes the method at `path` on a given object.
- * Any additional arguments are provided to the invoked method.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Array|string} path The path of the method to invoke.
- * @param {...*} [args] The arguments to invoke the method with.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var objects = [
- * { 'a': { 'b': { 'c': _.constant(2) } } },
- * { 'a': { 'b': { 'c': _.constant(1) } } }
- * ];
- *
- * _.map(objects, _.method('a.b.c'));
- * // => [2, 1]
- *
- * _.invoke(_.sortBy(objects, _.method(['a', 'b', 'c'])), 'a.b.c');
- * // => [1, 2]
- */
-var method = restParam(function(path, args) {
- return function(object) {
- return invokePath(object, path, args);
- };
-});
-
-module.exports = method;
diff --git a/deps/npm/node_modules/lodash/utility/methodOf.js b/deps/npm/node_modules/lodash/utility/methodOf.js
deleted file mode 100644
index f61b782272..0000000000
--- a/deps/npm/node_modules/lodash/utility/methodOf.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var invokePath = require('../internal/invokePath'),
- restParam = require('../function/restParam');
-
-/**
- * The opposite of `_.method`; this method creates a function that invokes
- * the method at a given path on `object`. Any additional arguments are
- * provided to the invoked method.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Object} object The object to query.
- * @param {...*} [args] The arguments to invoke the method with.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var array = _.times(3, _.constant),
- * object = { 'a': array, 'b': array, 'c': array };
- *
- * _.map(['a[2]', 'c[0]'], _.methodOf(object));
- * // => [2, 0]
- *
- * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
- * // => [2, 0]
- */
-var methodOf = restParam(function(object, args) {
- return function(path) {
- return invokePath(object, path, args);
- };
-});
-
-module.exports = methodOf;
diff --git a/deps/npm/node_modules/lodash/utility/mixin.js b/deps/npm/node_modules/lodash/utility/mixin.js
deleted file mode 100644
index 5c4a372d3c..0000000000
--- a/deps/npm/node_modules/lodash/utility/mixin.js
+++ /dev/null
@@ -1,82 +0,0 @@
-var arrayCopy = require('../internal/arrayCopy'),
- arrayPush = require('../internal/arrayPush'),
- baseFunctions = require('../internal/baseFunctions'),
- isFunction = require('../lang/isFunction'),
- isObject = require('../lang/isObject'),
- keys = require('../object/keys');
-
-/**
- * Adds all own enumerable function properties of a source object to the
- * destination object. If `object` is a function then methods are added to
- * its prototype as well.
- *
- * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
- * avoid conflicts caused by modifying the original.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Function|Object} [object=lodash] The destination object.
- * @param {Object} source The object of functions to add.
- * @param {Object} [options] The options object.
- * @param {boolean} [options.chain=true] Specify whether the functions added
- * are chainable.
- * @returns {Function|Object} Returns `object`.
- * @example
- *
- * function vowels(string) {
- * return _.filter(string, function(v) {
- * return /[aeiou]/i.test(v);
- * });
- * }
- *
- * _.mixin({ 'vowels': vowels });
- * _.vowels('fred');
- * // => ['e']
- *
- * _('fred').vowels().value();
- * // => ['e']
- *
- * _.mixin({ 'vowels': vowels }, { 'chain': false });
- * _('fred').vowels();
- * // => ['e']
- */
-function mixin(object, source, options) {
- var methodNames = baseFunctions(source, keys(source));
-
- var chain = true,
- index = -1,
- isFunc = isFunction(object),
- length = methodNames.length;
-
- if (options === false) {
- chain = false;
- } else if (isObject(options) && 'chain' in options) {
- chain = options.chain;
- }
- while (++index < length) {
- var methodName = methodNames[index],
- func = source[methodName];
-
- object[methodName] = func;
- if (isFunc) {
- object.prototype[methodName] = (function(func) {
- return function() {
- var chainAll = this.__chain__;
- if (chain || chainAll) {
- var result = object(this.__wrapped__),
- actions = result.__actions__ = arrayCopy(this.__actions__);
-
- actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
- result.__chain__ = chainAll;
- return result;
- }
- return func.apply(object, arrayPush([this.value()], arguments));
- };
- }(func));
- }
- }
- return object;
-}
-
-module.exports = mixin;
diff --git a/deps/npm/node_modules/lodash/utility/noop.js b/deps/npm/node_modules/lodash/utility/noop.js
deleted file mode 100644
index 56d651344a..0000000000
--- a/deps/npm/node_modules/lodash/utility/noop.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * A no-operation function that returns `undefined` regardless of the
- * arguments it receives.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @example
- *
- * var object = { 'user': 'fred' };
- *
- * _.noop(object) === undefined;
- * // => true
- */
-function noop() {
- // No operation performed.
-}
-
-module.exports = noop;
diff --git a/deps/npm/node_modules/lodash/utility/property.js b/deps/npm/node_modules/lodash/utility/property.js
deleted file mode 100644
index ddfd59798f..0000000000
--- a/deps/npm/node_modules/lodash/utility/property.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var baseProperty = require('../internal/baseProperty'),
- basePropertyDeep = require('../internal/basePropertyDeep'),
- isKey = require('../internal/isKey');
-
-/**
- * Creates a function that returns the property value at `path` on a
- * given object.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Array|string} path The path of the property to get.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var objects = [
- * { 'a': { 'b': { 'c': 2 } } },
- * { 'a': { 'b': { 'c': 1 } } }
- * ];
- *
- * _.map(objects, _.property('a.b.c'));
- * // => [2, 1]
- *
- * _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c');
- * // => [1, 2]
- */
-function property(path) {
- return isKey(path) ? baseProperty(path) : basePropertyDeep(path);
-}
-
-module.exports = property;
diff --git a/deps/npm/node_modules/lodash/utility/propertyOf.js b/deps/npm/node_modules/lodash/utility/propertyOf.js
deleted file mode 100644
index 593a266b1c..0000000000
--- a/deps/npm/node_modules/lodash/utility/propertyOf.js
+++ /dev/null
@@ -1,30 +0,0 @@
-var baseGet = require('../internal/baseGet'),
- toPath = require('../internal/toPath');
-
-/**
- * The opposite of `_.property`; this method creates a function that returns
- * the property value at a given path on `object`.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Object} object The object to query.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var array = [0, 1, 2],
- * object = { 'a': array, 'b': array, 'c': array };
- *
- * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
- * // => [2, 0]
- *
- * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
- * // => [2, 0]
- */
-function propertyOf(object) {
- return function(path) {
- return baseGet(object, toPath(path), (path + ''));
- };
-}
-
-module.exports = propertyOf;
diff --git a/deps/npm/node_modules/lodash/utility/range.js b/deps/npm/node_modules/lodash/utility/range.js
deleted file mode 100644
index 671939afcc..0000000000
--- a/deps/npm/node_modules/lodash/utility/range.js
+++ /dev/null
@@ -1,66 +0,0 @@
-var isIterateeCall = require('../internal/isIterateeCall');
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeCeil = Math.ceil,
- nativeMax = Math.max;
-
-/**
- * Creates an array of numbers (positive and/or negative) progressing from
- * `start` up to, but not including, `end`. If `end` is not specified it's
- * set to `start` with `start` then set to `0`. If `end` is less than `start`
- * a zero-length range is created unless a negative `step` is specified.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {number} [start=0] The start of the range.
- * @param {number} end The end of the range.
- * @param {number} [step=1] The value to increment or decrement by.
- * @returns {Array} Returns the new array of numbers.
- * @example
- *
- * _.range(4);
- * // => [0, 1, 2, 3]
- *
- * _.range(1, 5);
- * // => [1, 2, 3, 4]
- *
- * _.range(0, 20, 5);
- * // => [0, 5, 10, 15]
- *
- * _.range(0, -4, -1);
- * // => [0, -1, -2, -3]
- *
- * _.range(1, 4, 0);
- * // => [1, 1, 1]
- *
- * _.range(0);
- * // => []
- */
-function range(start, end, step) {
- if (step && isIterateeCall(start, end, step)) {
- end = step = undefined;
- }
- start = +start || 0;
- step = step == null ? 1 : (+step || 0);
-
- if (end == null) {
- end = start;
- start = 0;
- } else {
- end = +end || 0;
- }
- // Use `Array(length)` so engines like Chakra and V8 avoid slower modes.
- // See https://youtu.be/XAqIpGU8ZZk#t=17m25s for more details.
- var index = -1,
- length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
- result = Array(length);
-
- while (++index < length) {
- result[index] = start;
- start += step;
- }
- return result;
-}
-
-module.exports = range;
diff --git a/deps/npm/node_modules/lodash/utility/times.js b/deps/npm/node_modules/lodash/utility/times.js
deleted file mode 100644
index 9a41e2fe28..0000000000
--- a/deps/npm/node_modules/lodash/utility/times.js
+++ /dev/null
@@ -1,60 +0,0 @@
-var bindCallback = require('../internal/bindCallback');
-
-/* Native method references for those with the same name as other `lodash` methods. */
-var nativeFloor = Math.floor,
- nativeIsFinite = global.isFinite,
- nativeMin = Math.min;
-
-/** Used as references for the maximum length and index of an array. */
-var MAX_ARRAY_LENGTH = 4294967295;
-
-/**
- * Invokes the iteratee function `n` times, returning an array of the results
- * of each invocation. The `iteratee` is bound to `thisArg` and invoked with
- * one argument; (index).
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {number} n The number of times to invoke `iteratee`.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Array} Returns the array of results.
- * @example
- *
- * var diceRolls = _.times(3, _.partial(_.random, 1, 6, false));
- * // => [3, 6, 4]
- *
- * _.times(3, function(n) {
- * mage.castSpell(n);
- * });
- * // => invokes `mage.castSpell(n)` three times with `n` of `0`, `1`, and `2`
- *
- * _.times(3, function(n) {
- * this.cast(n);
- * }, mage);
- * // => also invokes `mage.castSpell(n)` three times
- */
-function times(n, iteratee, thisArg) {
- n = nativeFloor(n);
-
- // Exit early to avoid a JSC JIT bug in Safari 8
- // where `Array(0)` is treated as `Array(1)`.
- if (n < 1 || !nativeIsFinite(n)) {
- return [];
- }
- var index = -1,
- result = Array(nativeMin(n, MAX_ARRAY_LENGTH));
-
- iteratee = bindCallback(iteratee, thisArg, 1);
- while (++index < n) {
- if (index < MAX_ARRAY_LENGTH) {
- result[index] = iteratee(index);
- } else {
- iteratee(index);
- }
- }
- return result;
-}
-
-module.exports = times;
diff --git a/deps/npm/node_modules/lodash/utility/uniqueId.js b/deps/npm/node_modules/lodash/utility/uniqueId.js
deleted file mode 100644
index 88e02bf300..0000000000
--- a/deps/npm/node_modules/lodash/utility/uniqueId.js
+++ /dev/null
@@ -1,27 +0,0 @@
-var baseToString = require('../internal/baseToString');
-
-/** Used to generate unique IDs. */
-var idCounter = 0;
-
-/**
- * Generates a unique ID. If `prefix` is provided the ID is appended to it.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {string} [prefix] The value to prefix the ID with.
- * @returns {string} Returns the unique ID.
- * @example
- *
- * _.uniqueId('contact_');
- * // => 'contact_104'
- *
- * _.uniqueId();
- * // => '105'
- */
-function uniqueId(prefix) {
- var id = ++idCounter;
- return baseToString(prefix) + id;
-}
-
-module.exports = uniqueId;
diff --git a/deps/npm/node_modules/node-gyp/.github/ISSUE_TEMPLATE.md b/deps/npm/node_modules/node-gyp/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000000..cd0e3ce3d8
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,25 @@
+<!--
+Thank you for reporting an issue. The more information you can give us, the
+better the chance we can fix your problem.
+
+This issue tracker is for issues with node-gyp,
+if you have an issue installing a specific module, please file an issue on
+that module's issue tracker (`npm issues modulename`).
+-->
+
+* **Node Version**: <!-- `node -v` and `npm -v` -->
+* **Platform**: <!-- `uname -a` (UNIX), or `systeminfo | findstr /B /C:"OS Name" /C:"OS Version" /C:"System Type"` (Windows) -->
+* **Compiler**: <!-- `cc -v` (UNIX) or `msbuild /version & cl` (Windows) -->
+* **Module**: <!-- what you tried to build/install -->
+
+<details><summary>Verbose output (from npm or node-gyp):</summary>
+
+<!-- Paste your log between the backticks. Contents of npm-debug.log or verbose build output -->
+
+```
+
+```
+
+</details>
+
+<!-- Any further details -->
diff --git a/deps/npm/node_modules/node-gyp/.github/PULL_REQUEST_TEMPLATE.md b/deps/npm/node_modules/node-gyp/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000000..312dcc05c0
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,16 @@
+<!--
+Thank you for your pull request. Please review the below requirements.
+
+Contributor guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md
+-->
+
+##### Checklist
+<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->
+
+- [ ] `npm install && npm test` passes
+- [ ] tests are included <!-- Bug fixes and new features should include tests -->
+- [ ] documentation is changed or added
+- [ ] commit message follows [commit guidelines](https://github.com/nodejs/node/blob/master/CONTRIBUTING.md#commit-message-guidelines)
+
+##### Description of change
+<!-- Provide a description of the change -->
diff --git a/deps/npm/node_modules/node-gyp/.npmignore b/deps/npm/node_modules/node-gyp/.npmignore
deleted file mode 100644
index 6748492014..0000000000
--- a/deps/npm/node_modules/node-gyp/.npmignore
+++ /dev/null
@@ -1,3 +0,0 @@
-gyp/test
-node_modules
-test/.node-gyp
diff --git a/deps/npm/node_modules/node-gyp/CHANGELOG.md b/deps/npm/node_modules/node-gyp/CHANGELOG.md
index 9a56013dae..0b92960309 100644
--- a/deps/npm/node_modules/node-gyp/CHANGELOG.md
+++ b/deps/npm/node_modules/node-gyp/CHANGELOG.md
@@ -1,3 +1,9 @@
+v3.6.3 2018-06-08
+=================
+
+* [[`90cd2e8da9`](https://github.com/nodejs/node-gyp/commit/90cd2e8da9)] - **gyp**: fix regex to match multi-digit versions (Jonas Hermsmeier) [#1455](https://github.com/nodejs/node-gyp/pull/1455)
+* [[`7900122337`](https://github.com/nodejs/node-gyp/commit/7900122337)] - deps: pin `request` version range (Refael Ackerman) [#1300](https://github.com/nodejs/node-gyp/pull/1300)
+
v3.6.2 2017-06-01
=================
diff --git a/deps/npm/node_modules/node-gyp/CONTRIBUTING.md b/deps/npm/node_modules/node-gyp/CONTRIBUTING.md
new file mode 100644
index 0000000000..f48786bd84
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/CONTRIBUTING.md
@@ -0,0 +1,34 @@
+# Contributing to node-gyp
+
+## Code of Conduct
+
+Please read the
+[Code of Conduct](https://github.com/nodejs/TSC/blob/master/CODE_OF_CONDUCT.md)
+which explains the minimum behavior expectations for node-gyp contributors.
+
+<a id="developers-certificate-of-origin"></a>
+## Developer's Certificate of Origin 1.1
+
+By making a contribution to this project, I certify that:
+
+* (a) The contribution was created in whole or in part by me and I
+ have the right to submit it under the open source license
+ indicated in the file; or
+
+* (b) The contribution is based upon previous work that, to the best
+ of my knowledge, is covered under an appropriate open source
+ license and I have the right under that license to submit that
+ work with modifications, whether created in whole or in part
+ by me, under the same open source license (unless I am
+ permitted to submit under a different license), as indicated
+ in the file; or
+
+* (c) The contribution was provided directly to me by some other
+ person who certified (a), (b) or (c) and I have not modified
+ it.
+
+* (d) I understand and agree that this project and the contribution
+ are public and that a record of the contribution (including all
+ personal information I submit with it, including my sign-off) is
+ maintained indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
diff --git a/deps/npm/node_modules/node-gyp/README.md b/deps/npm/node_modules/node-gyp/README.md
index a5c1325c71..ec823dbd01 100644
--- a/deps/npm/node_modules/node-gyp/README.md
+++ b/deps/npm/node_modules/node-gyp/README.md
@@ -1,6 +1,6 @@
node-gyp
=========
-### Node.js native addon build tool
+## Node.js native addon build tool
`node-gyp` is a cross-platform command-line tool written in Node.js for compiling
native addon modules for Node.js. It bundles the [gyp](https://gyp.gsrc.io)
@@ -14,7 +14,7 @@ Multiple target versions of node are supported (i.e. `0.8`, ..., `4`, `5`, `6`,
etc.), regardless of what version of node is actually installed on your system
(`node-gyp` downloads the necessary development files or headers for the target version).
-#### Features:
+## Features
* Easy to use, consistent interface
* Same commands to build your module on every platform
@@ -32,29 +32,46 @@ $ npm install -g node-gyp
You will also need to install:
- * On Unix:
- * `python` (`v2.7` recommended, `v3.x.x` is __*not*__ supported)
- * `make`
- * A proper C/C++ compiler toolchain, like [GCC](https://gcc.gnu.org)
- * On Mac OS X:
- * `python` (`v2.7` recommended, `v3.x.x` is __*not*__ supported) (already installed on Mac OS X)
- * [Xcode](https://developer.apple.com/xcode/download/)
- * You also need to install the `Command Line Tools` via Xcode. You can find this under the menu `Xcode -> Preferences -> Downloads`
- * This step will install `gcc` and the related toolchain containing `make`
- * On Windows:
- * Option 1: Install all the required tools and configurations using Microsoft's [windows-build-tools](https://github.com/felixrieseberg/windows-build-tools) using `npm install --global --production windows-build-tools` from an elevated PowerShell or CMD.exe (run as Administrator).
- * Option 2: Install tools and configuration manually:
- * Visual C++ Build Environment:
- * Option 1: Install [Visual C++ Build Tools](http://landinghub.visualstudio.com/visual-cpp-build-tools) using the **Default Install** option.
+### On Unix
- * Option 2: Install [Visual Studio 2015](https://www.visualstudio.com/products/visual-studio-community-vs) (or modify an existing installation) and select *Common Tools for Visual C++* during setup. This also works with the free Community and Express for Desktop editions.
+ * `python` (`v2.7` recommended, `v3.x.x` is __*not*__ supported)
+ * `make`
+ * A proper C/C++ compiler toolchain, like [GCC](https://gcc.gnu.org)
- > :bulb: [Windows Vista / 7 only] requires [.NET Framework 4.5.1](http://www.microsoft.com/en-us/download/details.aspx?id=40773)
+### On macOS
- * Install [Python 2.7](https://www.python.org/downloads/) (`v3.x.x` is not supported), and run `npm config set python python2.7` (or see below for further instructions on specifying the proper Python version and path.)
- * Launch cmd, `npm config set msvs_version 2015`
+ * `python` (`v2.7` recommended, `v3.x.x` is __*not*__ supported) (already installed on macOS)
+ * [Xcode](https://developer.apple.com/xcode/download/)
+ * You also need to install the `Command Line Tools` via Xcode. You can find this under the menu `Xcode -> Preferences -> Downloads` (or by running `xcode-select --install` in your Terminal)
+ * This step will install `gcc` and the related toolchain containing `make`
- If the above steps didn't work for you, please visit [Microsoft's Node.js Guidelines for Windows](https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules) for additional tips.
+### On Windows
+
+#### Option 1
+
+Install all the required tools and configurations using Microsoft's [windows-build-tools](https://github.com/felixrieseberg/windows-build-tools) using `npm install --global --production windows-build-tools` from an elevated PowerShell or CMD.exe (run as Administrator).
+
+#### Option 2
+
+Install tools and configuration manually:
+ * Visual C++ Build Environment:
+ * Option 1: Install [Visual C++ Build Tools](http://landinghub.visualstudio.com/visual-cpp-build-tools) using the **Default Install** option.
+
+ * Option 2: Install [Visual Studio 2015](https://www.visualstudio.com/products/visual-studio-community-vs) and select *Common Tools for Visual C++* during setup. This also works with the free Community and Express for Desktop editions.
+
+ * Option 3: if you already have Visual Studio 2015 installed and did not install the
+ *Common Tools for Visual C++* during setup, you can `File -> New -> Project`, pick
+ any of the options under `Templates -> Other Languages -> Visual C++` then `Ok`
+ and Visual Studio will offer to install the *Common Tools for Visual C++* with a
+ "Install Missing Features" / "You need the Universal Windows App Development Tools
+ to develop Windows app projects." dialog.
+
+ > :bulb: [Windows Vista / 7 only] requires [.NET Framework 4.5.1](http://www.microsoft.com/en-us/download/details.aspx?id=40773)
+
+ * Install [Python 2.7](https://www.python.org/downloads/) (`v3.x.x` is not supported), and run `npm config set python python2.7` (or see below for further instructions on specifying the proper Python version and path.)
+ * Launch cmd, `npm config set msvs_version 2015`
+
+ If the above steps didn't work for you, please visit [Microsoft's Node.js Guidelines for Windows](https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules) for additional tips.
If you have multiple Python versions installed, you can identify which Python
version `node-gyp` uses by setting the '--python' variable:
@@ -71,10 +88,6 @@ value:
$ npm config set python /path/to/executable/python2.7
```
-Note that OS X is just a flavour of Unix and so needs `python`, `make`, and C/C++.
-An easy way to obtain these is to install XCode from Apple,
-and then use it to install the command line tools (under Preferences -> Downloads).
-
How to Use
----------
@@ -186,7 +199,7 @@ Command Options
| `--dist-url=$url` | Download header tarball from custom URL
| `--proxy=$url` | Set HTTP proxy for downloading header tarball
| `--cafile=$cafile` | Override default CA chain (to download tarball)
-| `--nodedir=$path` | Set the path to the node binary
+| `--nodedir=$path` | Set the path to the node source code
| `--python=$path` | Set path to the python (2) binary
| `--msvs_version=$version` | Set Visual Studio version (win)
| `--solution=$solution` | Set Visual Studio Solution version (win)
diff --git a/deps/npm/node_modules/node-gyp/addon.gypi b/deps/npm/node_modules/node-gyp/addon.gypi
index f2f6a7925e..55fb321118 100644
--- a/deps/npm/node_modules/node-gyp/addon.gypi
+++ b/deps/npm/node_modules/node-gyp/addon.gypi
@@ -18,7 +18,10 @@
'include_dirs': [
'<(node_root_dir)/include/node',
'<(node_root_dir)/src',
+ '<(node_root_dir)/deps/openssl/config',
+ '<(node_root_dir)/deps/openssl/openssl/include',
'<(node_root_dir)/deps/uv/include',
+ '<(node_root_dir)/deps/zlib',
'<(node_root_dir)/<(node_engine_include_dir)'
],
'defines!': [
@@ -89,6 +92,17 @@
'-Wl,-bimport:<(node_exp_file)'
],
}],
+ [ 'OS=="zos"', {
+ 'cflags': [
+ '-q64',
+ '-Wc,DLL',
+ '-qlonglong'
+ ],
+ 'ldflags': [
+ '-q64',
+ '<(node_exp_file)'
+ ],
+ }],
[ 'OS=="win"', {
'conditions': [
['node_engine=="chakracore"', {
diff --git a/deps/npm/node_modules/node-gyp/gyp/.npmignore b/deps/npm/node_modules/node-gyp/gyp/.npmignore
deleted file mode 100644
index 0d20b6487c..0000000000
--- a/deps/npm/node_modules/node-gyp/gyp/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-*.pyc
diff --git a/deps/npm/node_modules/node-gyp/gyp/buildbot/aosp_manifest.xml b/deps/npm/node_modules/node-gyp/gyp/buildbot/aosp_manifest.xml
deleted file mode 100644
index bd73b303c6..0000000000
--- a/deps/npm/node_modules/node-gyp/gyp/buildbot/aosp_manifest.xml
+++ /dev/null
@@ -1,466 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<manifest>
- <remote name="aosp"
- fetch=".."
- review="https://android-review.googlesource.com/" />
- <default revision="master"
- remote="aosp"
- sync-j="4" />
-
- <project groups="device,flo" name="device/asus/deb" revision="0ce3a783d549d023ddc553a04fed717ffb2ff533" />
- <project groups="device,flo" name="device/asus/flo" revision="55ea79b11f9f82b2aa03f44a3429112fc5c06d07" />
- <project groups="device,flo" name="device/asus/flo-kernel" revision="6d74123947016999ae62d9c3067ae97782fdba21" />
- <project groups="device,grouper" name="device/asus/grouper" revision="78fe48f44e90ef3a7eceab5465dbad63cd16ce88" />
- <project groups="device,grouper" name="device/asus/tilapia" revision="e5033bc80764067cbb1c9dc3970f0718e35ae8c7" />
- <project name="device/common" revision="6a2995683de147791e516aae2ccb31fdfbe2ad30" />
- <project groups="pdk" name="device/generic/armv7-a-neon" revision="8bcf4b7a6380b26c2b42dae00dd8443de2a8e12c" />
- <project groups="pdk" name="device/generic/common" revision="11c092a6cbfcf6207f07a9a8e3398e747e7f5461" />
- <project groups="pdk" name="device/generic/goldfish" revision="638ee524f83053613c47ddea22c4bf98a0175c2f" />
- <project groups="pdk" name="device/generic/mini-emulator-armv7-a-neon" revision="2a7ade61377b7906187ab46b5859c896baa0ab0e" />
- <project groups="pdk" name="device/generic/mini-emulator-mips" revision="2ff06dda649ba43507a911057f7854a3373ef7d6" />
- <project groups="pdk" name="device/generic/mini-emulator-x86" revision="a2f05b8c5259c232be5b029b2d5e721ba3f70917" />
- <project groups="pdk" name="device/generic/mips" revision="dd06e7883227cc68bb1206584c8e3a768e49d02d" />
- <project name="device/generic/qemu" revision="bd2543e810f3fa56e9dcfe301b893832534c85db" />
- <project groups="pdk" name="device/generic/x86" revision="f111878fb41e2bdf4eb092d1edf0eb53cc5d0153" />
- <project groups="device" name="device/google/accessory/arduino" revision="abc5159a3ca9dbb5c7e364a1eab99901a4440ac5" />
- <project groups="device" name="device/google/accessory/demokit" revision="7dfe7f89a3b174709c773fe319531006e46440d9" />
- <project groups="device,hammerhead" name="device/lge/hammerhead" revision="ec229bf178b891cc18552833f2de743acf390a7c" />
- <project groups="device,hammerhead" name="device/lge/hammerhead-kernel" revision="a1dc58be96e7a71496e3e89079ac704930f982f2" />
- <project groups="device,mako" name="device/lge/mako" revision="7e5f0f313819ffa3b45cd4208ab552f446c33936" />
- <project groups="device,mako" name="device/lge/mako-kernel" revision="b7de901b8cb86036e9b92b3b6f188b45a524b125" />
- <project groups="pdk" name="device/sample" revision="096f9eb5763fd2766fcbbe4f6b9da51c87f61797" />
- <project groups="device,manta" name="device/samsung/manta" revision="78fe248ddb214aca2215df46be83882dc50c9283" />
- <project groups="pdk" name="platform/abi/cpp" path="abi/cpp" revision="a0f99286d0909f7a30b0bee742bec2a0b62c4dd0" />
- <project name="platform/art" path="art" revision="36b111c7d3d635e262114dabde4c26952c7dcbe6" />
- <project groups="pdk" name="platform/bionic" path="bionic" revision="36bacd237de931c48714d1a8aa4aa9522283e407" />
- <project name="platform/bootable/bootloader/legacy" path="bootable/bootloader/legacy" revision="3c491d6efb8ff2534a6934702760a6273f197918" />
- <project name="platform/bootable/diskinstaller" path="bootable/diskinstaller" revision="ca40959a8caafa0df6a5c3d845e2afe6b252093f" />
- <project groups="pdk" name="platform/bootable/recovery" path="bootable/recovery" revision="974fe112ae6df95ca6d49688d6e3e459d87e16de" />
- <project groups="pdk" name="platform/build" path="build" revision="d23798bfdc9bb34909177c3c5f06f0c97cc9897e" >
- <copyfile dest="Makefile" src="core/root.mk"/>
- </project>
- <project groups="cts" name="platform/cts" path="cts" revision="e15e8f846e19816e18ee3293c5b99f78463be28e" />
- <project name="platform/dalvik" path="dalvik" revision="fb5b0d5bc46bce9c8ed6b1150498d6e145811a7d" />
- <project name="platform/developers/build" path="developers/build" revision="75c5c41b06f045c3304b1b19d8250f04a8da8f10" />
- <project name="platform/developers/demos" path="developers/demos" revision="64526120cd8da89bcb9a48acf95307d2c172a6e8" />
- <project name="platform/developers/docs" path="developers/docs" revision="c0b835ddd9acc27176dc9a0f7d1aa2faf5d51806" />
- <project name="platform/developers/samples/android" path="developers/samples/android" revision="dea82fa23f038d66bd9cfdff2afb8ef22add1c4f" />
- <project name="platform/development" path="development" revision="0efeb2c66bff9b36feecd9315d14d2afb46e4669" />
- <project name="platform/docs/source.android.com" path="docs/source.android.com" revision="c4795fa0df2c5fb4832ae65482944e8e5400e4f6" />
- <project groups="pdk" name="platform/external/aac" path="external/aac" revision="35f30c5ab8089f38681d2fdd416c00aebef5a7ff" />
- <project name="platform/external/android-clat" path="external/android-clat" revision="18921713780edb45ceef327d5fcf3387818300f3" />
- <project name="platform/external/android-mock" path="external/android-mock" revision="4fe497660c2e939300dc5b743d662aef458b1726" />
- <project name="platform/external/ant-glob" path="external/ant-glob" revision="0f189400fd2a36bf11bfb058e7f3917eb7ed163a" />
- <project name="platform/external/antlr" path="external/antlr" revision="47997265eeb7d954a32ece693bbe6dab740872dd" />
- <project name="platform/external/apache-harmony" path="external/apache-harmony" revision="6942e08fdbbd8402c9deabb0f60c8c871194b244" />
- <project name="platform/external/apache-http" path="external/apache-http" revision="85ed0e10781c3c57343300a02556dd5131c450aa" />
- <project name="platform/external/apache-qp" path="external/apache-qp" revision="64ea622b23e6612eb8e7dcae6bfd4314beb022a8" />
- <project name="platform/external/apache-xml" path="external/apache-xml" revision="00ee83ff1bd827a852065986ed0da7a3ded57a55" />
- <project name="platform/external/arduino" path="external/arduino" revision="d06daf9bbc46838400461eb8e15842974e38d82a" />
- <project groups="pdk" name="platform/external/bison" path="external/bison" revision="c2418b886165add7f5a31fc5609f0ce2d004a90e" />
- <project name="platform/external/blktrace" path="external/blktrace" revision="d345431f16b8f76f30a58193ff2b26d5853e1109" />
- <project groups="pdk" name="platform/external/bluetooth/bluedroid" path="external/bluetooth/bluedroid" revision="3b4040093ddf0e0025d0dd034aa65078bb695514" />
- <project name="platform/external/bouncycastle" path="external/bouncycastle" revision="234720ebe66540a53cff98b2448dddbc884bd09f" />
- <project groups="pdk" name="platform/external/bsdiff" path="external/bsdiff" revision="6f503758fad2cbcf8359e8f0af32e4d79a2a48ae" />
- <project groups="pdk" name="platform/external/bzip2" path="external/bzip2" revision="1cb636bd8e9e5cdfd5d5b2909a122f6e80db62de" />
- <project name="platform/external/ceres-solver" path="external/ceres-solver" revision="399f7d09e0c45af54b77b4ab9508d6f23759b927" />
- <project groups="pdk" name="platform/external/checkpolicy" path="external/checkpolicy" revision="c66ac590eebc731f6021f267ebea208e87d8f04f" />
- <project name="platform/external/chromium" path="external/chromium" revision="f294081d501ad98b7d7f50bc73f291063caf2c5f" />
- <project name="platform/external/chromium-libpac" path="external/chromium-libpac" revision="09cf45bf5a650fe1abd50b9d61c2670a62f62767" />
- <project groups="pdk" name="platform/external/chromium-trace" path="external/chromium-trace" revision="8252ae6b83ea65cf871e7981e981da07379f5a0f" />
- <project name="platform/external/chromium_org" path="external/chromium_org" revision="43165a58c6167882aabb62f470c4e4d21f807d79" />
- <project name="platform/external/chromium_org/sdch/open-vcdiff" path="external/chromium_org/sdch/open-vcdiff" revision="6d634da5463d9bc5fc88f86aec1d2ac4fe6f612e" />
- <project name="platform/external/chromium_org/testing/gtest" path="external/chromium_org/testing/gtest" revision="65df883d09205766c521f2e6c126f4070a423141" />
- <project name="platform/external/chromium_org/third_party/WebKit" path="external/chromium_org/third_party/WebKit" revision="a25b4978c2c50d573391a6d56a0e8ad35f52ffc8" />
- <project name="platform/external/chromium_org/third_party/angle" path="external/chromium_org/third_party/angle" revision="8b77c2b2231f7d895979f6341e1ad1964a654ce4" />
- <project name="platform/external/chromium_org/third_party/boringssl/src" path="external/chromium_org/third_party/boringssl/src" revision="85fb7432d3c851200342dd982b211f8dac860687" />
- <project name="platform/external/chromium_org/third_party/brotli/src" path="external/chromium_org/third_party/brotli/src" revision="96f298ac43a9216b251d6c3264d8f5ada89e107f" />
- <project name="platform/external/chromium_org/third_party/eyesfree/src/android/java/src/com/googlecode/eyesfree/braille" path="external/chromium_org/third_party/eyesfree/src/android/java/src/com/googlecode/eyesfree/braille" revision="bb4c72f1deb0b8b2b0468b0bf1050462ebcf6135" />
- <project name="platform/external/chromium_org/third_party/freetype" path="external/chromium_org/third_party/freetype" revision="dc263f2ee2786739da036911ed8b29c07a639ab9" />
- <project name="platform/external/chromium_org/third_party/icu" path="external/chromium_org/third_party/icu" revision="85e5871666cade1bb4b53f0cebfae53bc7d8d1f2" />
- <project name="platform/external/chromium_org/third_party/leveldatabase/src" path="external/chromium_org/third_party/leveldatabase/src" revision="d4e10f2a91f5de7bd17adcdbd80c54b19ab336fe" />
- <project name="platform/external/chromium_org/third_party/libaddressinput/src" path="external/chromium_org/third_party/libaddressinput/src" revision="7127f6844fac19d7610e34f4f7e03398fcd95531" />
- <project name="platform/external/chromium_org/third_party/libjingle/source/talk" path="external/chromium_org/third_party/libjingle/source/talk" revision="8fd7b6a4d9e6757c5e1ff50147e6089979bf6701" />
- <project name="platform/external/chromium_org/third_party/libphonenumber/src/phonenumbers" path="external/chromium_org/third_party/libphonenumber/src/phonenumbers" revision="de6af28b9f9f34a31ffb7772b7510fd215a0814e" />
- <project name="platform/external/chromium_org/third_party/libphonenumber/src/resources" path="external/chromium_org/third_party/libphonenumber/src/resources" revision="8f194ead1ebd76ebb28b7e2dfc0a7baddc62bb22" />
- <project name="platform/external/chromium_org/third_party/libsrtp" path="external/chromium_org/third_party/libsrtp" revision="5eddd5b3436aa8b2c7eb1f3c6db154281c6b91c5" />
- <project name="platform/external/chromium_org/third_party/libvpx" path="external/chromium_org/third_party/libvpx" revision="c20d6540c47e427470c5a56b35fea3c5e9098748" />
- <project name="platform/external/chromium_org/third_party/libyuv" path="external/chromium_org/third_party/libyuv" revision="6e77b766a9eb7889c1a10cab978705ffe03ff3e7" />
- <project name="platform/external/chromium_org/third_party/mesa/src" path="external/chromium_org/third_party/mesa/src" revision="e70a8ff30d20e1bf6bb5c06b5cd7bd4ea9ae20e1" />
- <project name="platform/external/chromium_org/third_party/openmax_dl" path="external/chromium_org/third_party/openmax_dl" revision="83d0254a412b93e81b06a354b90fb627408b4ec8" />
- <project name="platform/external/chromium_org/third_party/openssl" path="external/chromium_org/third_party/openssl" revision="c2a9402712e13e15fcae2b17ec0cbecb816ef52e" />
- <project name="platform/external/chromium_org/third_party/opus/src" path="external/chromium_org/third_party/opus/src" revision="e383b38591b010ab08ebddf1fd8d821796bd961a" />
- <project name="platform/external/chromium_org/third_party/ots" path="external/chromium_org/third_party/ots" revision="4d6e4ddc4b0db2023b1380236c33aa04a7e9e927" />
- <project name="platform/external/chromium_org/third_party/sfntly/cpp/src" path="external/chromium_org/third_party/sfntly/cpp/src" revision="2bac2ec7167835b214bfe42e762cd2ce6cf8cf1a" />
- <project name="platform/external/chromium_org/third_party/skia" path="external/chromium_org/third_party/skia" revision="2d75d0865c7bac54bf5e234855609d0f628388b7" />
- <project name="platform/external/chromium_org/third_party/smhasher/src" path="external/chromium_org/third_party/smhasher/src" revision="09e3094b8ab52bb1ad9ab8c8351d99df50327b67" />
- <project name="platform/external/chromium_org/third_party/usrsctp/usrsctplib" path="external/chromium_org/third_party/usrsctp/usrsctplib" revision="ed9a6fb519aa7606cab965b2c4218756e849ddb6" />
- <project name="platform/external/chromium_org/third_party/webrtc" path="external/chromium_org/third_party/webrtc" revision="8b45a80ec9c21b148a5674d3a23ca5fa70981f71" />
- <project name="platform/external/chromium_org/third_party/yasm/source/patched-yasm" path="external/chromium_org/third_party/yasm/source/patched-yasm" revision="0f308c9bc9aa3258a0e90285b9d4e69bbb5b0a73" />
- <project name="platform/external/chromium_org/tools/grit" path="external/chromium_org/tools/grit" revision="4ad93ed16c8ae7742fd7c34c83036b8d03c21fb9" />
- <project name="platform/external/chromium_org/tools/gyp" path="external/chromium_org/tools/gyp" revision="9c42a79388ce87185ad04cb02047c1e56ac5e066" />
- <project name="platform/external/chromium_org/v8" path="external/chromium_org/v8" revision="db865e6839e98cc9d07609bf81bb6610117ba6ff" />
- <project groups="pdk" name="platform/external/clang" path="external/clang" revision="070ed154a0a8bc2c0fd4fb9b8a86a0f1218e6dfa" />
- <project groups="pdk" name="platform/external/compiler-rt" path="external/compiler-rt" revision="c185902e393cd71823258016ead1b315ed062b24" />
- <project name="platform/external/conscrypt" path="external/conscrypt" revision="26163c268a6d2625384b87e907afad8ef19f9a47" />
- <project name="platform/external/dexmaker" path="external/dexmaker" revision="2b528c4b156f2de5c641875b98e59e0b09ebaccd" />
- <project name="platform/external/dhcpcd" path="external/dhcpcd" revision="03baf5eab896198b5060d287af3fd60d360bf48f" />
- <project groups="pdk" name="platform/external/dnsmasq" path="external/dnsmasq" revision="7674911bc9d10adf57c2c2d15d0c641b48e4afe6" />
- <project name="platform/external/doclava" path="external/doclava" revision="b9d279d8f9c29a3044d13482846efb21f27b5df4" />
- <project groups="pdk" name="platform/external/e2fsprogs" path="external/e2fsprogs" revision="721f3bc56989b5f4101e646a02d598ddb4a7ff6e" />
- <project name="platform/external/easymock" path="external/easymock" revision="c9a234086537e5fd820b110bbd99e3cdc695004c" />
- <project name="platform/external/eclipse-basebuilder" path="external/eclipse-basebuilder" revision="6134da6347cc997e0cf2921aaadfb46f21c05d85" />
- <project name="platform/external/eclipse-windowbuilder" path="external/eclipse-windowbuilder" revision="a5f3ee137e94737538ec3bdf9b3716765d178c17" />
- <project name="platform/external/eigen" path="external/eigen" revision="b015e75e8c7ba1ab4ddb91e9372a57e76f3fd159" />
- <project name="platform/external/elfutils" path="external/elfutils" revision="38ecac0276825a9463803485440646582e477e78" />
- <project name="platform/external/embunit" path="external/embunit" revision="336b7c65098af0d1be69f2db55f4e75342d73b3f" />
- <project name="platform/external/emma" path="external/emma" revision="daacd02a6b9f7a3e82bdf1cc5b84db85ed59edb1" />
- <project name="platform/external/esd" path="external/esd" revision="224a67f2683a7ee997179fc5dd16115e39987b0f" />
- <project groups="pdk" name="platform/external/expat" path="external/expat" revision="907ec055718996baf36961e7f47f8447e49b3865" />
- <project name="platform/external/eyes-free" path="external/eyes-free" revision="16bd4c7a4d1bfe229068b637614dad7c48dd2ceb" />
- <project name="platform/external/f2fs-tools" path="external/f2fs-tools" revision="00dc8a1c6c87acf687e64e66cfc2fd7ca28e646e" />
- <project name="platform/external/fdlibm" path="external/fdlibm" revision="c831c726067e0d8a05362e710e2405f0eff81e07" />
- <project name="platform/external/fio" path="external/fio" revision="6f4e805b805f1ab3025482e471147bb51efa99bd" />
- <project groups="pdk" name="platform/external/flac" path="external/flac" revision="7f32dd57579bdff88e46e1e403154be0b99165da" />
- <project groups="pdk" name="platform/external/freetype" path="external/freetype" revision="899c67b6cfcd2010784fbf08c5415af16c526e0c" />
- <project name="platform/external/fsck_msdos" path="external/fsck_msdos" revision="17a1471db8c528cd9d44ec4385d2eb3614138856" />
- <project name="platform/external/ganymed-ssh2" path="external/ganymed-ssh2" revision="d3724dabc1cfbacd105fe6c422b4dcba80e4fb2d" />
- <project groups="pdk" name="platform/external/gcc-demangle" path="external/gcc-demangle" revision="9241386b62c353302c2f9eccda0672685b252b4d" />
- <project name="platform/external/genext2fs" path="external/genext2fs" revision="e11a9c7fe6f1cef99aad2f25afaea37b72fe9f93" />
- <project name="platform/external/giflib" path="external/giflib" revision="621696a283c0ce34956417f760f1005fadcd12ae" />
- <project name="platform/external/google-diff-match-patch" path="external/google-diff-match-patch" revision="cecbe12841337860291c2d6a5728b681ec5fca2a" />
- <project name="platform/external/google-fonts/carrois-gothic-sc" path="external/google-fonts/carrois-gothic-sc" revision="0062a10458d4c357f3082d66bcb129d11913aaae" />
- <project name="platform/external/google-fonts/coming-soon" path="external/google-fonts/coming-soon" revision="2c5cb418c690815545bbb0316eae5fd33b9fc859" />
- <project name="platform/external/google-fonts/dancing-script" path="external/google-fonts/dancing-script" revision="7b6623bd54cee3e48ae8a4f477f616366643cc78" />
- <project name="platform/external/grub" path="external/grub" revision="33a4e7e4cfa81dc21d37091515891859ef3ab934" />
- <project groups="pdk" name="platform/external/gtest" path="external/gtest" revision="fa3c26b862ca17c0d2db67606226b49d1648b4bf" />
- <project name="platform/external/guava" path="external/guava" revision="5e6db342fc75b1945298142530f2d1d1861bce73" />
- <project name="platform/external/hamcrest" path="external/hamcrest" revision="ba28ac1e0386f26d9a45be5ed16fc9c598b27e70" />
- <project name="platform/external/harfbuzz" path="external/harfbuzz" revision="7a08026033b424da3b7022ebcce35f033949df8b" />
- <project name="platform/external/harfbuzz_ng" path="external/harfbuzz_ng" revision="3e537b48a7b56c742ecf3c2ed24ff15fcb73f575" />
- <project name="platform/external/hyphenation" path="external/hyphenation" revision="bfa84834dfeb7fe8d058c2e7e07b5981451ddf82" />
- <project name="platform/external/icu" path="external/icu" revision="3c09e2ebbdae6000f3bd471c34d055bc1913f7e4" />
- <project groups="pdk" name="platform/external/icu4c" path="external/icu4c" revision="e5311394ca22b280da41cd17059288dab3fb1ea6" />
- <project groups="pdk" name="platform/external/iproute2" path="external/iproute2" revision="5d4c86892885ae1bc12e0e157b35ef44e8ba81bd" />
- <project name="platform/external/ipsec-tools" path="external/ipsec-tools" revision="f4cb1ee4b00abbfb6f968dc25818c23b4b47e584" />
- <project name="platform/external/iptables" path="external/iptables" revision="e3928b77f18db0fdc615693017c6c15eb71bf4e0" />
- <project name="platform/external/iputils" path="external/iputils" revision="1c7c426ab377c3a005a36d612ebbb16de86fb7d4" />
- <project name="platform/external/jack" path="external/jack" revision="5ceb2025ac5d25ed48183ac2d3dac4691fe761fb" />
- <project name="platform/external/javasqlite" path="external/javasqlite" revision="b8501bdeb0b7e39a0d82f2a96ad382c05a763b22" />
- <project name="platform/external/javassist" path="external/javassist" revision="9566207cff5871c672fac1f0d4332d93292036d7" />
- <project name="platform/external/jdiff" path="external/jdiff" revision="e4694302d6a3786c64d954e0b3cf42786283bd3c" />
- <project name="platform/external/jemalloc" path="external/jemalloc" revision="615fe54259e545c33275753a316c2bfd1198b4f0" />
- <project groups="pdk" name="platform/external/jhead" path="external/jhead" revision="871af5c305ce1d3087e58fae091c60c359f5fa45" />
- <project name="platform/external/jmdns" path="external/jmdns" revision="f4eb7466d5c09098f9dc54137ed3235e3c43fc9f" />
- <project name="platform/external/jmonkeyengine" path="external/jmonkeyengine" revision="a6b44658eb1c55295f132a36233a11aa2bd8f9cf" />
- <project groups="pdk" name="platform/external/jpeg" path="external/jpeg" revision="213197252c8c4825f6572c651126c22067025fe9" />
- <project name="platform/external/jsilver" path="external/jsilver" revision="739060b01245f1dc5f1800949b3c30c291253cff" />
- <project name="platform/external/jsr305" path="external/jsr305" revision="a82868820d6350811b9ddfde4bf8ed5016084269" />
- <project name="platform/external/junit" path="external/junit" revision="8f312e0c3d6dff30d015d2c85fdaae0a39220fd6" />
- <project name="platform/external/kernel-headers" path="external/kernel-headers" revision="8b663ef01dcaadfe1dec7ba826e5cd1cf0bb2c91" />
- <project name="platform/external/libcap-ng" path="external/libcap-ng" revision="1d1011a3c5049a7f9eef99d22f3704e4367579cc" />
- <project name="platform/external/libcxx" path="external/libcxx" revision="a9aa30b5d18422fce29a42ce1a704bc5f28febde" />
- <project name="platform/external/libcxxabi" path="external/libcxxabi" revision="87a9be28aceed80250cd1d1a47eb8afa0ee67b51" />
- <project name="platform/external/libcxxrt" path="external/libcxxrt" revision="d1ee2b2a4946a073596514462d7629373d22fb27" />
- <project name="platform/external/libexif" path="external/libexif" revision="25d371312cee1452a2adcf8b7f6cad6267bda32d" />
- <project name="platform/external/libffi" path="external/libffi" revision="385ba8b006b9995456d3c9283fd20dded90809cc" />
- <project groups="pdk" name="platform/external/libgsm" path="external/libgsm" revision="50761abed8f4734970874165b386cfd4d9599db4" />
- <project groups="pdk" name="platform/external/liblzf" path="external/liblzf" revision="6946aa575b0949d045722794850896099d937cbb" />
- <project name="platform/external/libmtp" path="external/libmtp" revision="7075348937f6a8c9d9211942fcb6c376f4227776" />
- <project groups="pdk" name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="46abb3dcf960058e48d1444b6a11cc7e84912339" />
- <project groups="pdk" name="platform/external/libnfc-nxp" path="external/libnfc-nxp" revision="15d81f71a668b3092549c6b7f83694bf680d9c49" />
- <project name="platform/external/libnl" path="external/libnl" revision="99debfa4c01b49c9b470884cc56f81fcdee0fa1f" />
- <project groups="pdk" name="platform/external/libnl-headers" path="external/libnl-headers" revision="52c926a9de955fa2d987bf8c5d4a1304b5a2a611" />
- <project name="platform/external/libogg" path="external/libogg" revision="ec0b24fb1468abe37be4164a6feb16568e036bde" />
- <project name="platform/external/libpcap" path="external/libpcap" revision="9dab0cd7430a4d23e0a7752fb13b941692171c3d" />
- <project name="platform/external/libphonenumber" path="external/libphonenumber" revision="485e6d5c6e48a1fc43cc0a090e687c723dac056c" />
- <project groups="pdk" name="platform/external/libpng" path="external/libpng" revision="48b7ba25a15a9eae83d366c02475539725d035d0" />
- <project name="platform/external/libppp" path="external/libppp" revision="706e567fc5ff6b79738a5f470e5aa7b2cae76459" />
- <project name="platform/external/libseccomp-helper" path="external/libseccomp-helper" revision="e87019943a8b5a7cd0880910f671c37b240d5754" />
- <project groups="pdk" name="platform/external/libselinux" path="external/libselinux" revision="da4208c8808e6a62fcfe848343abd3e2f3b339cc" />
- <project groups="pdk" name="platform/external/libsepol" path="external/libsepol" revision="d26204e7d0a3be178a97d4920b82007e05a2a632" />
- <project name="platform/external/libssh2" path="external/libssh2" revision="2bb40f2445cab3ba588efb29e1835cdba2b27248" />
- <project name="platform/external/libunwind" path="external/libunwind" revision="b3436a3feed4dcb22dafc8f7818b742cacaddd1d" />
- <project name="platform/external/libusb" path="external/libusb" revision="2801917fe150393d4f4a354165fe89550ae22613" />
- <project name="platform/external/libusb-compat" path="external/libusb-compat" revision="94867ba54eb7faa8efca81cf2214d00bb9143d27" />
- <project name="platform/external/libvorbis" path="external/libvorbis" revision="de559619fd4dd0d2d9608436696fd44bdf74eba8" />
- <project groups="pdk" name="platform/external/libvpx" path="external/libvpx" revision="d64f247f64fbb814c9ecf06a56bcb0948bfca21f" />
- <project name="platform/external/libxml2" path="external/libxml2" revision="399e808f940777d18efe377bd34f738dc84729e0" />
- <project name="platform/external/libxslt" path="external/libxslt" revision="98f5140c33273d3bd67ca03566f8417406001016" />
- <project groups="libyuv" name="platform/external/libyuv" path="external/libyuv" revision="482a582884351288fb701532359652970b1ba7c0" />
- <project name="platform/external/linux-tools-perf" path="external/linux-tools-perf" revision="3e1937964f6c183eb6a0000e2dca27fc3a419ca2" />
- <project name="platform/external/littlemock" path="external/littlemock" revision="328b01eada8965cd38feea884d4080c31e3763b0" />
- <project groups="pdk" name="platform/external/llvm" path="external/llvm" revision="c4c1f81ae1b07138df50e0459631abf3082bda9c" />
- <project name="platform/external/ltrace" path="external/ltrace" revision="82ae18484c7b6a8af05354caf6de3a7f1ac5fcf9" />
- <project name="platform/external/lzma" path="external/lzma" revision="19cf4f773361c09e47a2ffe1613d66cbf632227f" />
- <project name="platform/external/marisa-trie" path="external/marisa-trie" revision="629ed059b1e85cd8e4de363d8b3dc53c15c3e08a" />
- <project name="platform/external/markdown" path="external/markdown" revision="6f2e3554ae38cc90518d32e02cb57d05988270a6" />
- <project groups="pdk" name="platform/external/mdnsresponder" path="external/mdnsresponder" revision="b25c2507ecc3f674e3b4f0a770acf9ad8fd874d0" />
- <project name="platform/external/mesa3d" path="external/mesa3d" revision="97d3f36a59ea448fa77e47a90bf04f1254670542" />
- <project name="platform/external/messageformat" path="external/messageformat" revision="180a28770171075aa484729a69d14c7cf0c93fcf" />
- <project groups="pdk" name="platform/external/mksh" path="external/mksh" revision="2a54bce0ae98f53f0b867e949b26d081691e1493" />
- <project name="platform/external/mockito" path="external/mockito" revision="4d0dcd53b27a243baf72ee0b127b188a058b318d" />
- <project name="platform/external/mockwebserver" path="external/mockwebserver" revision="2f7659c426de53122ee7922b0981058a900124a7" />
- <project name="platform/external/mp4parser" path="external/mp4parser" revision="16051e950485c6b62127c0446a760111de1a0cb9" />
- <project name="platform/external/mtpd" path="external/mtpd" revision="5ea8006691664b7e6d46d6a6dc889eac91b7fe37" />
- <project name="platform/external/naver-fonts" path="external/naver-fonts" revision="3bba7d2430bc3ec8105678a27f03fb080f0f8384" />
- <project name="platform/external/netcat" path="external/netcat" revision="444644cfa9a2f3002863caa168fb2d6b34dfd1e8" />
- <project name="platform/external/netperf" path="external/netperf" revision="38e47cd883738cb84bdb47a7d263f14f14062d7b" />
- <project name="platform/external/neven" path="external/neven" revision="504ee5ccaabd8bce4da3430b0f4e9714ac2a8e6c" />
- <project name="platform/external/nfacct" path="external/nfacct" revision="6f7aae0264821b44e9fe80fb5596c525d3e2f475" />
- <project name="platform/external/nist-pkits" path="external/nist-pkits" revision="b7a53ad5a587926cb880d9bb6f3d51657596474c" />
- <project name="platform/external/nist-sip" path="external/nist-sip" revision="b23dbfce7ea84c39cea75b612868a5832cb9af2b" />
- <project name="platform/external/noto-fonts" path="external/noto-fonts" revision="90372d894b5d9c9f2a111315d2eb3b8de1979ee4" />
- <project name="platform/external/oauth" path="external/oauth" revision="bc170f58de82000ed6460f111686a850a1890c07" />
- <project name="platform/external/objenesis" path="external/objenesis" revision="2a7655c0d503fcf5989098f65bf89eae78c32e5a" />
- <project name="platform/external/okhttp" path="external/okhttp" revision="4909663c795d974d0d4b0e2d1ebd6e179486c897" />
- <project name="platform/external/open-vcdiff" path="external/open-vcdiff" revision="6d29f2f083baf8250db94ed0b4807e513a84163d" />
- <project name="platform/external/opencv" path="external/opencv" revision="4a99e243b42afcb885d036bb451eb3c2739275b6" />
- <project name="platform/external/openfst" path="external/openfst" revision="b7434caa51427a0f5ab5c807e1a92d6ca2af8884" />
- <project name="platform/external/openssh" path="external/openssh" revision="3c335c9fb9c12375ad62748fa1d1e5ebe4710c94" />
- <project groups="pdk" name="platform/external/openssl" path="external/openssl" revision="cfe73257599ae4baae3ffb50c2c841d9249d2d16" />
- <project name="platform/external/oprofile" path="external/oprofile" revision="3722f1053f4cab90c4daf61451713a2d61d79c71" />
- <project name="platform/external/owasp/sanitizer" path="external/owasp/sanitizer" revision="6a304233f9f2010821a5a1dd40e2832b68353a3c" />
- <project name="platform/external/pcre" path="external/pcre" revision="993a14b71c8e7af03eb929d44a444137393a5324" />
- <project name="platform/external/pixman" path="external/pixman" revision="afd5bbd8074cedec8544d07920fa06786d5a4f08" />
- <project name="platform/external/ppp" path="external/ppp" revision="8b58d9bd02e2c55f547fafbe9ba55b1160665761" />
- <project groups="pdk-java" name="platform/external/proguard" path="external/proguard" revision="3fd19dba2bdc0c4b64afda4d75836e1dcf7abf97" />
- <project groups="pdk" name="platform/external/protobuf" path="external/protobuf" revision="95d99df4574c28debcf9646056a0350ff44bc7c9" />
- <project name="platform/external/qemu" path="external/qemu" revision="539e1f25ecbfe80814dba2ea77feb22087b9d53b" />
- <project name="platform/external/qemu-pc-bios" path="external/qemu-pc-bios" revision="20349dae98d7de09a7e390d4a706c64f1db6edc2" />
- <project name="platform/external/regex-re2" path="external/regex-re2" revision="0d4c52358a1af421705c54bd8a9fdd8a30558a2e" />
- <project name="platform/external/replicaisland" path="external/replicaisland" revision="99e2e54c5d036048caf09bb05eea0969de093104" />
- <project name="platform/external/robolectric" path="external/robolectric" revision="6bf395c984ed3f69711663b006aeffbb0f7e8a90" />
- <project groups="pdk" name="platform/external/safe-iop" path="external/safe-iop" revision="aa0725fb1da35e47676b6da30009322eb5ed59be" />
- <project groups="pdk" name="platform/external/scrypt" path="external/scrypt" revision="dde037b82e5cd6215244e3240dbaad417928eafa" />
- <project groups="pdk" name="platform/external/sepolicy" path="external/sepolicy" revision="21ada26daea538397029396099dce865267bae2f" />
- <project name="platform/external/sfntly" path="external/sfntly" revision="6723e5241a45c6de224c96384a595a1bf5bc5449" />
- <project name="platform/external/sil-fonts" path="external/sil-fonts" revision="795a2f4339f8a82d6cff187e2a77bb01d5911aac" />
- <project name="platform/external/skia" path="external/skia" revision="d6f2c76fdb9b0469261fa2db0b29ed48c7ac38b5" />
- <project name="platform/external/smack" path="external/smack" revision="d7955ce24d294fb2014c59d11fca184471056f44" />
- <project name="platform/external/smali" path="external/smali" revision="5fd395796e215a80c722815bf180728948868f18" />
- <project groups="pdk" name="platform/external/sonivox" path="external/sonivox" revision="c0723d864b10fbd6c5cbbfa65e886c5e9eb3aafd" />
- <project groups="pdk" name="platform/external/speex" path="external/speex" revision="eaa4765b8cc6a6dd5ee0d26dc1b61a1044817f32" />
- <project groups="pdk" name="platform/external/sqlite" path="external/sqlite" revision="50af37d784661b2d54c8e043de52ffc4f02a1a50" />
- <project name="platform/external/srec" path="external/srec" revision="540e7ee8dbf1d7ee72ef45c92efbebcb89bf6d1a" />
- <project name="platform/external/srtp" path="external/srtp" revision="98bd63b48a31b4633cdfdc8138577dfa6d8dd2a6" />
- <project groups="pdk" name="platform/external/stlport" path="external/stlport" revision="dc05ca5be2319f74b41cb429ea50f30fceff4ace" />
- <project name="platform/external/strace" path="external/strace" revision="a2adbed6e2d3ce85ebb167e16ae370681a8b5188" />
- <project name="platform/external/stressapptest" path="external/stressapptest" revision="0956427aa995561acb4471764158ae057a36dad5" />
- <project name="platform/external/svox" path="external/svox" revision="ad0a55bd0e13a27ed11034346eee9c47e3684ef2" />
- <project name="platform/external/syspatch" path="external/syspatch" revision="358a4f86b8c2cb3d3f879a37f6773dd09d4b77b0" />
- <project name="platform/external/tagsoup" path="external/tagsoup" revision="a97828cb3f8f3a1af8470e55d3c5cd62d6a7cb4c" />
- <project name="platform/external/tcpdump" path="external/tcpdump" revision="de49cdcfddf36f2b41ef3278e98a8a550a189952" />
- <project name="platform/external/timezonepicker-support" path="external/timezonepicker-support" revision="99e91a76fd74bad10266623d67cdb98d011f709e" />
- <project groups="pdk" name="platform/external/tinyalsa" path="external/tinyalsa" revision="653e7a4015341c87b4d55ec9a94ec7bdee044f6f" />
- <project groups="pdk" name="platform/external/tinycompress" path="external/tinycompress" revision="aeee2c6a19b9d3765f72bc79555005786a424233" />
- <project groups="pdk" name="platform/external/tinyxml" path="external/tinyxml" revision="f065a8058659c0e6c5a5ccddcdb4faf0fe645cd0" />
- <project groups="pdk" name="platform/external/tinyxml2" path="external/tinyxml2" revision="c74b546f5af36968ffa56d7fd4529f4273b96f48" />
- <project groups="pdk" name="platform/external/tremolo" path="external/tremolo" revision="0fec2aefa8143c83df43752bb0218dfa371cc57e" />
- <project groups="pdk" name="platform/external/valgrind" path="external/valgrind" revision="893257d6c86a18cc5cf6c92528b7027f327dca70" />
- <project name="platform/external/vixl" path="external/vixl" revision="e1ab25cde167109efb28fa6a86d5c2c80b762d58" />
- <project name="platform/external/webp" path="external/webp" revision="0db01fc3411621bec473d50db0071fd2a225962e" />
- <project groups="pdk" name="platform/external/webrtc" path="external/webrtc" revision="d62aeac391d16d4953a12120c0ff614ccde02a30" />
- <project groups="pdk" name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="88ef20ce4facae68a3e6b05429bb9f3f73a93996" />
- <project name="platform/external/xdelta3" path="external/xdelta3" revision="52d9c642e6a307c43881f20a4ed1c10e947234ba" />
- <project name="platform/external/xmlwriter" path="external/xmlwriter" revision="e95d92246ee35273dde2bee8b00485cc14c12be5" />
- <project name="platform/external/xmp_toolkit" path="external/xmp_toolkit" revision="42ea4dc6d1fc2206a7778029070ed9213e3b0fbf" />
- <project groups="pdk" name="platform/external/yaffs2" path="external/yaffs2" revision="a2cff2275e1b501ff478b03757d6e4f05fddc2db" />
- <project groups="pdk" name="platform/external/zlib" path="external/zlib" revision="8d977782c1cfe9d75cc9a464439c2ff1e27e1665" />
- <project name="platform/external/zxing" path="external/zxing" revision="7620644768ffc235607b3a94671e49518c18686f" />
- <project groups="pdk" name="platform/frameworks/av" path="frameworks/av" revision="a018cd4926460f8f5ab30a9a11df9775572d8620" />
- <project name="platform/frameworks/base" path="frameworks/base" revision="6a58309e734086a21580dd8d9175ac1817ca3ab2" />
- <project groups="pdk" name="platform/frameworks/compile/libbcc" path="frameworks/compile/libbcc" revision="3fc91521640692f844aece8b1743c4df702d1c66" />
- <project groups="pdk" name="platform/frameworks/compile/mclinker" path="frameworks/compile/mclinker" revision="e673be8f0526f9cbc83093fb579c0f76de9e4e3c" />
- <project groups="pdk" name="platform/frameworks/compile/slang" path="frameworks/compile/slang" revision="c957dd47b0a0705a686896b26cd1859d25824552" />
- <project name="platform/frameworks/ex" path="frameworks/ex" revision="3696df848aa7c574f913c97c3bf415b634934048" />
- <project name="platform/frameworks/mff" path="frameworks/mff" revision="b9669b8540a1e5c953374d53b115514335e23c27" />
- <project name="platform/frameworks/ml" path="frameworks/ml" revision="b020ad88ca28ada76a596b5dcc7e6c2854fcc132" />
- <project name="platform/frameworks/multidex" path="frameworks/multidex" revision="590a07e63868f0a1da311ff22b4a9f35eb48a865" />
- <project groups="pdk" name="platform/frameworks/native" path="frameworks/native" revision="e8878921db4a51ff5d4e75d9c8958d889a048603" />
- <project name="platform/frameworks/opt/calendar" path="frameworks/opt/calendar" revision="03b18577f8f8f799e87a62b8e03889ddacf6daa2" />
- <project name="platform/frameworks/opt/carddav" path="frameworks/opt/carddav" revision="f08aa2df132dd8dc32a0013d3750137d9dd9280a" />
- <project name="platform/frameworks/opt/colorpicker" path="frameworks/opt/colorpicker" revision="720a40ae24d526268b3c0f2dd8497b5df2cc6f23" />
- <project name="platform/frameworks/opt/datetimepicker" path="frameworks/opt/datetimepicker" revision="8a1c55baaf5ced7a98b196c689ccdd59238f6e58" />
- <project name="platform/frameworks/opt/emoji" path="frameworks/opt/emoji" revision="709f713ebcd62c61defc270d945810efca179621" />
- <project name="platform/frameworks/opt/inputmethodcommon" path="frameworks/opt/inputmethodcommon" revision="df9dd39c2047992a43b64e13bb0fc348a1630f3b" />
- <project name="platform/frameworks/opt/mailcommon" path="frameworks/opt/mailcommon" revision="1537812900e59f875cfea0483f0ae261b16d3e4b" />
- <project name="platform/frameworks/opt/mms" path="frameworks/opt/mms" revision="64817e848552fd0a429a3e026b7b1562103c56bb" />
- <project name="platform/frameworks/opt/net/voip" path="frameworks/opt/net/voip" revision="0f722c7f09ce67e058eb1cfaabf1d85f1abdf797" />
- <project name="platform/frameworks/opt/photoviewer" path="frameworks/opt/photoviewer" revision="8c32972911bf73babdb01d30267f57255e242d78" />
- <project groups="pdk" name="platform/frameworks/opt/telephony" path="frameworks/opt/telephony" revision="93faaed9056491c551ef7046e9e1de7d6397e95c" />
- <project name="platform/frameworks/opt/timezonepicker" path="frameworks/opt/timezonepicker" revision="3820b87bfbc86d066e9093e78254e1f3728ad77d" />
- <project name="platform/frameworks/opt/vcard" path="frameworks/opt/vcard" revision="5907243e6cf0603adf266ebfa7ee5ee465b9c596" />
- <project name="platform/frameworks/opt/widget" path="frameworks/opt/widget" revision="466e0e0307b3f6aa4f4be3d9419b5996bd389da5" />
- <project groups="pdk" name="platform/frameworks/rs" path="frameworks/rs" revision="ad0544fdf918e64cec05d1c98588880f10b09220" />
- <project name="platform/frameworks/support" path="frameworks/support" revision="f05c07d3528765076adc16337a1f68f1700955dc" />
- <project name="platform/frameworks/testing" path="frameworks/testing" revision="5c8e0271db889518f5969b142a37faa01a4ee54d" />
- <project name="platform/frameworks/volley" path="frameworks/volley" revision="0e406003b5d434d8f16d7d6ad97d446060b788e6" />
- <project name="platform/frameworks/webview" path="frameworks/webview" revision="6ed700e171cb2ee3303c08a1db2abc0e56fd307a" />
- <project name="platform/frameworks/wilhelm" path="frameworks/wilhelm" revision="a62c3572e60ae0446632de15418a65089cccf551" />
- <project name="platform/hardware/akm" path="hardware/akm" revision="32838ef838d1341aa8b77022869b801fb0bbb26c" />
- <project groups="pdk" name="platform/hardware/broadcom/libbt" path="hardware/broadcom/libbt" revision="55ddd0cce019e88829f92b2fe4e17d5869daa9b9" />
- <project groups="broadcom_wlan" name="platform/hardware/broadcom/wlan" path="hardware/broadcom/wlan" revision="47a3b8f496e6d2a836ac6b7268e5626c969542ec" />
- <project groups="invensense" name="platform/hardware/invensense" path="hardware/invensense" revision="0f5bc7cd710fac85377621a8b9a4c364af80605f" />
- <project groups="pdk" name="platform/hardware/libhardware" path="hardware/libhardware" revision="3e618a6aa10c783d1536f20edfc3347939cfa18e" />
- <project groups="pdk" name="platform/hardware/libhardware_legacy" path="hardware/libhardware_legacy" revision="4c20a09e8684657448f0bc97a2da4e56c94d484e" />
- <project groups="qcom" name="platform/hardware/qcom/audio" path="hardware/qcom/audio" revision="d47ff224c7b24933c701acae8d5e4c98a1bc80af" />
- <project groups="qcom" name="platform/hardware/qcom/bt" path="hardware/qcom/bt" revision="cf314a462ba06f4bd3352d5d4630edcf6edbbe97" />
- <project groups="qcom" name="platform/hardware/qcom/camera" path="hardware/qcom/camera" revision="fbf72e519ec5fe2f2720b1a3d119e2d69e172e34" />
- <project groups="qcom" name="platform/hardware/qcom/display" path="hardware/qcom/display" revision="0a611c6ae11b65fec5ada5ecaa0893541db34156" />
- <project groups="qcom" name="platform/hardware/qcom/keymaster" path="hardware/qcom/keymaster" revision="70d36107318e1d3f7abf62a56279b3f9da3ff000" />
- <project groups="qcom" name="platform/hardware/qcom/media" path="hardware/qcom/media" revision="1208a868bcb0ffaa650a7e68b51031254c775d39" />
- <project groups="qcom_msm8960" name="platform/hardware/qcom/msm8960" path="hardware/qcom/msm8960" revision="ca38ed098b05a79d20e852348f27d7c40a53f801" />
- <project groups="qcom_msm8x74" name="platform/hardware/qcom/msm8x74" path="hardware/qcom/msm8x74" revision="0c6844ea9ee14fd7bbfd6af0bcc6b6b682f46d1c" />
- <project groups="qcom" name="platform/hardware/qcom/power" path="hardware/qcom/power" revision="ff9f4538c09399030fa73e3e65a167852cb91e8f" />
- <project groups="qcom" name="platform/hardware/qcom/sensors" path="hardware/qcom/sensors" revision="07c5bcdb36158e22d33bac02eecd83d4ff1fb2f8" />
- <project groups="qcom_wlan" name="platform/hardware/qcom/wlan" path="hardware/qcom/wlan" revision="daa321b0ad8c10b454dc28d7e6dadc72196a8c7a" />
- <project groups="pdk" name="platform/hardware/ril" path="hardware/ril" revision="eb2a93458204a928edfe36f043ddb48cf5575143" />
- <project groups="exynos5" name="platform/hardware/samsung_slsi/exynos5" path="hardware/samsung_slsi/exynos5" revision="d7bd354358ecfb1e52afb3da4fc586c0822c696a" />
- <project name="platform/hardware/ti/omap3" path="hardware/ti/omap3" revision="949aad363a9cc794f9ac8fd42338ae1678e50bc1" />
- <project groups="omap4" name="platform/hardware/ti/omap4xxx" path="hardware/ti/omap4xxx" revision="c32caab84ff9edc1489ed6c8079c7d252caafc4d" />
- <project name="platform/libcore" path="libcore" revision="d343e35535a99bad32eea0defc8a3e9c23c9967f" />
- <project groups="pdk-java" name="platform/libnativehelper" path="libnativehelper" revision="b37e11d07dec2d49b576709ae8e0568a9daabd07" />
- <project name="platform/ndk" path="ndk" revision="f584f76882baf374166cf12b99cd5f3dbdf3b6b9" />
- <project name="platform/packages/apps/BasicSmsReceiver" path="packages/apps/BasicSmsReceiver" revision="80327793c4b4ebf4a6a53b72e46c477afe18f135" />
- <project name="platform/packages/apps/Bluetooth" path="packages/apps/Bluetooth" revision="7efa9db2129c99475684a2e44c4fb89cce3134bc" />
- <project name="platform/packages/apps/Browser" path="packages/apps/Browser" revision="fe4083510dc773911651456f150bf5432f81a6c0" />
- <project name="platform/packages/apps/Calculator" path="packages/apps/Calculator" revision="6c7521bb685c9b7b7c36f2077612d4b1a0e808d4" />
- <project name="platform/packages/apps/Calendar" path="packages/apps/Calendar" revision="2d72f6bed6a0eeaddbda08393063fe873c1c7922" />
- <project name="platform/packages/apps/Camera" path="packages/apps/Camera" revision="b0e357d548fb8d10896200add2b932199a96a2ea" />
- <project name="platform/packages/apps/Camera2" path="packages/apps/Camera2" revision="ece4866dc575b956801f6dab2d6c4923e272c5fa" />
- <project name="platform/packages/apps/CellBroadcastReceiver" path="packages/apps/CellBroadcastReceiver" revision="21d8baf492007cc01545905de33ecefe5d947843" />
- <project name="platform/packages/apps/CertInstaller" path="packages/apps/CertInstaller" revision="483a188feda6e9d311aef437d28f30e1fb6afeb0" />
- <project name="platform/packages/apps/Contacts" path="packages/apps/Contacts" revision="24a4f48dc5c768188143648e267889477e4185e8" />
- <project name="platform/packages/apps/ContactsCommon" path="packages/apps/ContactsCommon" revision="6ce4a3bc083a7dbcc7ffa2bebff242638d7f8e61" />
- <project name="platform/packages/apps/DeskClock" path="packages/apps/DeskClock" revision="d3bfe9223f3e70271813f48b8ef5500c3a90c0b3" />
- <project name="platform/packages/apps/Dialer" path="packages/apps/Dialer" revision="5cb300ef50e9942eef746319dd1b1b6e7c2c05e2" />
- <project name="platform/packages/apps/Email" path="packages/apps/Email" revision="22766dcf6a44416b2972c053739472317017257d" />
- <project name="platform/packages/apps/Exchange" path="packages/apps/Exchange" revision="ab03a7f9b197b6ffcc390dd5fb589067a5161148" />
- <project name="platform/packages/apps/Gallery" path="packages/apps/Gallery" revision="9595006a3347c08e6b8e31d679903bb8f77a343d" />
- <project name="platform/packages/apps/Gallery2" path="packages/apps/Gallery2" revision="9cde04ed08f3a5201a007d78b3c89f43fb3003e0" />
- <project name="platform/packages/apps/HTMLViewer" path="packages/apps/HTMLViewer" revision="7498890092c388dc59ca932e09ec79dd568b1a19" />
- <project name="platform/packages/apps/InCallUI" path="packages/apps/InCallUI" revision="d968d1a28dae45229b1be9f05bef8df13821e94d" />
- <project name="platform/packages/apps/KeyChain" path="packages/apps/KeyChain" revision="e6243f79f3ce6daeb2d8d879e6e1a684ffc1b2fc" />
- <project name="platform/packages/apps/Launcher2" path="packages/apps/Launcher2" revision="31569f6dbd44d443ff54c460b733e62fc37d2319" />
- <project name="platform/packages/apps/Launcher3" path="packages/apps/Launcher3" revision="3a9f3a7806a0153865415d6207c6812915d3f6b1" />
- <project name="platform/packages/apps/LegacyCamera" path="packages/apps/LegacyCamera" revision="d9b5d8941d1ec47ff391da2b8cc8ec90f902062f" />
- <project name="platform/packages/apps/Mms" path="packages/apps/Mms" revision="e770738ea4389afddb0b4e6c69749f9456ed0f48" />
- <project name="platform/packages/apps/Music" path="packages/apps/Music" revision="bfca689bb6605cfcd1e0c1781c707735efb7444e" />
- <project name="platform/packages/apps/MusicFX" path="packages/apps/MusicFX" revision="aaa2f99caac6f088b23de55fe2eb1e8ee305b1fb" />
- <project name="platform/packages/apps/Nfc" path="packages/apps/Nfc" revision="f62a9a00a13ba333e88cb9e8ce2553d6acf708ad" />
- <project name="platform/packages/apps/OneTimeInitializer" path="packages/apps/OneTimeInitializer" revision="01e429c08e51291315890de9677151a7e0b6ad35" />
- <project name="platform/packages/apps/PackageInstaller" path="packages/apps/PackageInstaller" revision="212398024b4491276ef00cf7fcd829c89200b6ba" />
- <project name="platform/packages/apps/Phone" path="packages/apps/Phone" revision="bf4ec5b1258628bfa6a82aa0d80f348a77bbf194" />
- <project name="platform/packages/apps/PhoneCommon" path="packages/apps/PhoneCommon" revision="16f62c5ab5c21981e63d678187ad4b44e686332b" />
- <project name="platform/packages/apps/Protips" path="packages/apps/Protips" revision="325232e344b257a3c236ead2adc60c7378f226c0" />
- <project name="platform/packages/apps/Provision" path="packages/apps/Provision" revision="78ca0db658fe6253d506916e36319e620476f809" />
- <project name="platform/packages/apps/QuickSearchBox" path="packages/apps/QuickSearchBox" revision="cfb7af6652a7fbcc0f86341edfe14dc316c9ff37" />
- <project name="platform/packages/apps/Settings" path="packages/apps/Settings" revision="2abbacb7d46657e5863eb2ef0035521ffc41a0a8" />
- <project name="platform/packages/apps/SmartCardService" path="packages/apps/SmartCardService" revision="29eae320a4bd222b5ff1c092f84f1aebba88d0b7" />
- <project name="platform/packages/apps/SoundRecorder" path="packages/apps/SoundRecorder" revision="b0e671faf142fa0b933b4f1cd7d186b1f37ebe46" />
- <project name="platform/packages/apps/SpareParts" path="packages/apps/SpareParts" revision="4db997871e3f4c3f84660815096e5276b47c5c91" />
- <project name="platform/packages/apps/SpeechRecorder" path="packages/apps/SpeechRecorder" revision="536aa74ff3a77186bef29dc9333a34688fa59d13" />
- <project name="platform/packages/apps/Stk" path="packages/apps/Stk" revision="115b75461f8e1fb432fe1a892549ca1c96cef497" />
- <project name="platform/packages/apps/Tag" path="packages/apps/Tag" revision="f830b07335bd2dd794b84507b5390f7d893fe428" />
- <project name="platform/packages/apps/TvSettings" path="packages/apps/TvSettings" revision="24e45eaf3b4badaf02e449e7f6d07c72e743f521" />
- <project name="platform/packages/apps/UnifiedEmail" path="packages/apps/UnifiedEmail" revision="d4537c907920f4470b70e91c187ef7a0b31632db" />
- <project name="platform/packages/apps/VideoEditor" path="packages/apps/VideoEditor" revision="a49ea28e1628f507ae3a564215664c29c5fa1215" />
- <project name="platform/packages/apps/VoiceDialer" path="packages/apps/VoiceDialer" revision="72df4532dfca9a82e8aef55fcdfce3026d3d3312" />
- <project name="platform/packages/experimental" path="packages/experimental" revision="588c7cda9c62fb77d23bc089a63cba8a96bc9ffb" />
- <project name="platform/packages/inputmethods/LatinIME" path="packages/inputmethods/LatinIME" revision="159474f2ae5d13308ca1b92b8a5ccd809ec6a450" />
- <project name="platform/packages/inputmethods/OpenWnn" path="packages/inputmethods/OpenWnn" revision="59aefa242169b7a51c2381daee58ff22fd1834ce" />
- <project name="platform/packages/inputmethods/PinyinIME" path="packages/inputmethods/PinyinIME" revision="49aebad1c1cfbbcaa9288ffed5161e79e57c3679" />
- <project name="platform/packages/providers/ApplicationsProvider" path="packages/providers/ApplicationsProvider" revision="3347f31bd268ca3153abe5def9361f625bd73efd" />
- <project name="platform/packages/providers/CalendarProvider" path="packages/providers/CalendarProvider" revision="20360f2fdd7ad2de1234b7ed61e3ea120f0dc635" />
- <project name="platform/packages/providers/ContactsProvider" path="packages/providers/ContactsProvider" revision="6ac2395324c0e7539434b7c68ec738f867d7ed37" />
- <project name="platform/packages/providers/DownloadProvider" path="packages/providers/DownloadProvider" revision="90e7485d68095b5fc5044dd1bc6cd4dfc485eaa3" />
- <project name="platform/packages/providers/MediaProvider" path="packages/providers/MediaProvider" revision="501b93fb00db86fe4fb53dc000f6f11587afe4b0" />
- <project name="platform/packages/providers/PartnerBookmarksProvider" path="packages/providers/PartnerBookmarksProvider" revision="96d0a80af45923767baf449fc8c735c2f71d64ae" />
- <project name="platform/packages/providers/TelephonyProvider" path="packages/providers/TelephonyProvider" revision="91e705bc7662192ea33f2bac6b0a6c79fc9bc7ab" />
- <project name="platform/packages/providers/UserDictionaryProvider" path="packages/providers/UserDictionaryProvider" revision="361f35b7b1fe758d93e0952536a298b2ed045a89" />
- <project name="platform/packages/screensavers/Basic" path="packages/screensavers/Basic" revision="4b5d9d8bea733c4e5876541831f27bf40588b516" />
- <project name="platform/packages/screensavers/PhotoTable" path="packages/screensavers/PhotoTable" revision="a5e0fee8e923cfc8682eb4431bc3997ed15f649a" />
- <project name="platform/packages/screensavers/WebView" path="packages/screensavers/WebView" revision="6e0a80f6faed6191acc8ce1b6c79eada09e9e042" />
- <project name="platform/packages/services/Telephony" path="packages/services/Telephony" revision="aa156251eb0414b8c6546c98769789dc28b38140" />
- <project name="platform/packages/wallpapers/Basic" path="packages/wallpapers/Basic" revision="2e1d8404b87caf13cde644959f28213f2db09843" />
- <project name="platform/packages/wallpapers/Galaxy4" path="packages/wallpapers/Galaxy4" revision="34b31b45e75b2e73a770fef1a2f9a862b10f1a57" />
- <project name="platform/packages/wallpapers/HoloSpiral" path="packages/wallpapers/HoloSpiral" revision="63b75996a7cfb713a6a6feb5c774ba4b46c7d6eb" />
- <project name="platform/packages/wallpapers/LivePicker" path="packages/wallpapers/LivePicker" revision="8082f92e76774607d62412e8e1191dd940f055ba" />
- <project name="platform/packages/wallpapers/MagicSmoke" path="packages/wallpapers/MagicSmoke" revision="f01ea4c07914010d52a42130acb7e67d4306fbda" />
- <project name="platform/packages/wallpapers/MusicVisualization" path="packages/wallpapers/MusicVisualization" revision="72fbcf3a8e4ebee42c36a5887432ca823ef0e4e5" />
- <project name="platform/packages/wallpapers/NoiseField" path="packages/wallpapers/NoiseField" revision="7d3e52a18a1255baffd7c0675a465f1b85b99f56" />
- <project name="platform/packages/wallpapers/PhaseBeam" path="packages/wallpapers/PhaseBeam" revision="0da76f35378677f1102e0be218ce1993c0e528b6" />
- <project groups="pdk" name="platform/pdk" path="pdk" revision="d440d4219412981df7ef90bed65acf29b2e7ea6a" />
- <project name="platform/prebuilts/android-emulator" path="prebuilts/android-emulator" revision="d6a246c24accff42eb433f5e39d14cb24faf1e58" />
- <project groups="pdk,darwin" name="platform/prebuilts/clang/darwin-x86/3.1" path="prebuilts/clang/darwin-x86/3.1" revision="426233405bef3c7c825095ab14256c3773894b9b" />
- <project groups="pdk,darwin" name="platform/prebuilts/clang/darwin-x86/3.2" path="prebuilts/clang/darwin-x86/3.2" revision="af856d77b3cbb1f6afccdc531bee991403c28907" />
- <project groups="darwin,arm" name="platform/prebuilts/clang/darwin-x86/arm/3.3" path="prebuilts/clang/darwin-x86/arm/3.3" revision="54acc51e28850485e380b55916868a4e1ff17998" />
- <project groups="pdk,darwin" name="platform/prebuilts/clang/darwin-x86/host/3.4" path="prebuilts/clang/darwin-x86/host/3.4" revision="a798fe00dbd92ad4e5f7123a2e2bc1d805db04f6" />
- <project groups="pdk,darwin" name="platform/prebuilts/clang/darwin-x86/host/3.5" path="prebuilts/clang/darwin-x86/host/3.5" revision="ce812d27fb78972e71482e93241b9770ca54845d" />
- <project groups="darwin,mips" name="platform/prebuilts/clang/darwin-x86/mips/3.3" path="prebuilts/clang/darwin-x86/mips/3.3" revision="da3dad928542362835082b2eda44e4dc315d65bb" />
- <project groups="darwin,x86" name="platform/prebuilts/clang/darwin-x86/x86/3.3" path="prebuilts/clang/darwin-x86/x86/3.3" revision="f67a83f35e30f92b312fbee852184c3f6dc38f34" />
- <project groups="pdk,linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="e95b4ce22c825da44d14299e1190ea39a5260bde" />
- <project groups="pdk,linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="471afab478649078ad7c75ec6b252481a59e19b8" />
- <project groups="linux,arm" name="platform/prebuilts/clang/linux-x86/arm/3.3" path="prebuilts/clang/linux-x86/arm/3.3" revision="2f6d2db9e2af3507d132cf5d286a42fe1d47f7bc" />
- <project groups="pdk,linux" name="platform/prebuilts/clang/linux-x86/host/3.4" path="prebuilts/clang/linux-x86/host/3.4" revision="fae26a039f79d780ddedcad07f164d9e6c05fc87" />
- <project groups="pdk,linux" name="platform/prebuilts/clang/linux-x86/host/3.5" path="prebuilts/clang/linux-x86/host/3.5" revision="485ffdc99707f81f4201e85bbbb937f23e1e04aa" />
- <project groups="linux,mips" name="platform/prebuilts/clang/linux-x86/mips/3.3" path="prebuilts/clang/linux-x86/mips/3.3" revision="51f8e2760628588fe268438d612d942c30d13fb2" />
- <project groups="linux,x86" name="platform/prebuilts/clang/linux-x86/x86/3.3" path="prebuilts/clang/linux-x86/x86/3.3" revision="017a8a67f92a66b29ab17772e50642a7b9d0f8e6" />
- <project name="platform/prebuilts/devtools" path="prebuilts/devtools" revision="be724be535ea50585d8c625b768ccb63aacd2926" />
- <project groups="pdk" name="platform/prebuilts/eclipse" path="prebuilts/eclipse" revision="cf9f78f8cf41b16edf9f712598a42743d5cea4af" />
- <project groups="notdefault,eclipse" name="platform/prebuilts/eclipse-build-deps" path="prebuilts/eclipse-build-deps" revision="ceb739d6a7c10f5fb5a6cf6e1f702453b1361ad3" />
- <project groups="notdefault,eclipse" name="platform/prebuilts/eclipse-build-deps-sources" path="prebuilts/eclipse-build-deps-sources" revision="8b7d8f6033ffe2d22905d10cf6d57d5bdcbe519b" />
- <project groups="pdk,darwin,arm" name="platform/prebuilts/gcc/darwin-x86/aarch64/aarch64-linux-android-4.8" path="prebuilts/gcc/darwin-x86/aarch64/aarch64-linux-android-4.8" revision="a261d38eaebb7ff406a6bb60237b36fc61714d46" />
- <project groups="pdk,darwin,arm" name="platform/prebuilts/gcc/darwin-x86/aarch64/aarch64-linux-android-4.9" path="prebuilts/gcc/darwin-x86/aarch64/aarch64-linux-android-4.9" revision="32d722d66d7a935a8b6f8e6ab2d5d8bf0e9e0986" />
- <project groups="pdk,darwin,arm" name="platform/prebuilts/gcc/darwin-x86/arm/arm-eabi-4.8" path="prebuilts/gcc/darwin-x86/arm/arm-eabi-4.8" revision="6d08ca9f45ff685648fd13c75bf5cac4b11c19bb" />
- <project groups="pdk,darwin,arm" name="platform/prebuilts/gcc/darwin-x86/arm/arm-linux-androideabi-4.8" path="prebuilts/gcc/darwin-x86/arm/arm-linux-androideabi-4.8" revision="264394c23b2686ce52cd4ffb116ced127aa7f8fc" />
- <project groups="pdk,darwin" name="platform/prebuilts/gcc/darwin-x86/host/headers" path="prebuilts/gcc/darwin-x86/host/headers" revision="4ac4f7cc41cf3c9e36fc3d6cf37fd1cfa9587a68" />
- <project groups="pdk,darwin" name="platform/prebuilts/gcc/darwin-x86/host/i686-apple-darwin-4.2.1" path="prebuilts/gcc/darwin-x86/host/i686-apple-darwin-4.2.1" revision="8834958755acc291d126ba7ee38ac731d04f9c9e" />
- <project groups="pdk,darwin,mips" name="platform/prebuilts/gcc/darwin-x86/mips/mips64el-linux-android-4.8" path="prebuilts/gcc/darwin-x86/mips/mips64el-linux-android-4.8" revision="3b5bef47de8017ff39ef5bfbe801e3fa6b272fab" />
- <project name="platform/prebuilts/gcc/darwin-x86/mips/mips64el-linux-android-4.9" path="prebuilts/gcc/darwin-x86/mips/mips64el-linux-android-4.9" revision="367a6529b0cc9f5ac5ca69226f583420563fd473" />
- <project groups="pdk,darwin,mips" name="platform/prebuilts/gcc/darwin-x86/mips/mipsel-linux-android-4.8" path="prebuilts/gcc/darwin-x86/mips/mipsel-linux-android-4.8" revision="ba97180acd4251d3acf08530faa4a724af74abd3" />
- <project groups="pdk,darwin,x86" name="platform/prebuilts/gcc/darwin-x86/x86/x86_64-linux-android-4.8" path="prebuilts/gcc/darwin-x86/x86/x86_64-linux-android-4.8" revision="c3c37a54f07d51a50e17d63dbf1d92da343f45ce" />
- <project name="platform/prebuilts/gcc/darwin-x86/x86/x86_64-linux-android-4.9" path="prebuilts/gcc/darwin-x86/x86/x86_64-linux-android-4.9" revision="a7c5a1df753fd3a24494d5e1fe00211048be5c1d" />
- <project groups="pdk,linux,arm" name="platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" path="prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" revision="7334f0a7a872700d0aaf00bea75917c077c45530" />
- <project groups="pdk,linux,arm" name="platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9" path="prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9" revision="a3f0180676c6b6cd9c664704f86855d3404ae4dd" />
- <project groups="pdk,linux,arm" name="platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8" path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.8" revision="26e93f6af47f7bd3a9beb5c102a5f45e19bfa38a" />
- <project groups="pdk,linux,arm" name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" revision="d9735fc81434f2af2c44d86ca57740c673c8d9bc" />
- <project groups="pdk,linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6" revision="eb5c9f0ae36bf964f6855bde54e1b387e2c26bb6" />
- <project groups="pdk,linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8" revision="1b0544da652fda90a41a1f69889d6b137ce20fb9" />
- <project name="platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8" path="prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8" revision="2725a175a32032fb9a63e247c176ecc3d448ea27" />
- <project groups="pdk,linux,mips" name="platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.8" path="prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.8" revision="38586de6b44714b4adcf21119fe6b267e33f3ca6" />
- <project name="platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9" path="prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9" revision="eabc7ae8ed527ee3d4517196732fa3f3e8939a28" />
- <project groups="pdk,linux,mips" name="platform/prebuilts/gcc/linux-x86/mips/mipsel-linux-android-4.8" path="prebuilts/gcc/linux-x86/mips/mipsel-linux-android-4.8" revision="c06b9b305c365163c99d4ffba49ac37ce2716024" />
- <project groups="pdk,linux,x86" name="platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.8" path="prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.8" revision="e08fa7e57a573a9baa5ccd8d4b8d73cc871f9b48" />
- <project name="platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9" path="prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9" revision="e99278016e6285363bc20d1b35d4b9b5c4e8b0a0" />
- <project name="platform/prebuilts/gradle-plugin" path="prebuilts/gradle-plugin" revision="e7814a3cbb96742ff74505a1fc152cb534fbf2f9" />
- <project name="platform/prebuilts/maven_repo/android" path="prebuilts/maven_repo/android" revision="0dbe3df0f057de9e83e599b9be2ca866c673130d" />
- <project groups="pdk" name="platform/prebuilts/misc" path="prebuilts/misc" revision="3cc2e316acf9da501479bbfd85159407239994d2" />
- <project groups="pdk" name="platform/prebuilts/ndk" path="prebuilts/ndk" revision="7a8bc5c36d519c41de61765ff94245f56c4bed7a" />
- <project groups="darwin" name="platform/prebuilts/python/darwin-x86/2.7.5" path="prebuilts/python/darwin-x86/2.7.5" revision="2bdd4fd418614c7c0101147d02199d0e47c4980e" />
- <project groups="linux" name="platform/prebuilts/python/linux-x86/2.7.5" path="prebuilts/python/linux-x86/2.7.5" revision="6fbc8802b3b68d24a4ee83f164b22490cf702ff2" />
- <project groups="pdk" name="platform/prebuilts/qemu-kernel" path="prebuilts/qemu-kernel" revision="5f91f38eac40a8465f3a7e4aa298a75afcf2936a" />
- <project name="platform/prebuilts/runtime" path="prebuilts/runtime" revision="56e663b8ec9cd0df9ce5afdc7b7d56460faf44c8" />
- <project groups="pdk" name="platform/prebuilts/sdk" path="prebuilts/sdk" revision="52043ca65e06bc84779dd8d3e55e72ad04bcef59" />
- <project groups="pdk,tools" name="platform/prebuilts/tools" path="prebuilts/tools" revision="130c3d0a1a484d617531d75ddd50714f68213cbb" />
- <project name="platform/sdk" path="sdk" revision="1af9ef83f5f6c6fd9202d5bdd8d4248a4eb855aa" />
- <project groups="pdk" name="platform/system/core" path="system/core" revision="cddc97cb3a927d179a42e0fec77f0d267fcd74d1" />
- <project groups="pdk" name="platform/system/extras" path="system/extras" revision="97ed949ec7bef088ca3d06fb7b5f3bdad9a5103c" />
- <project name="platform/system/keymaster" path="system/keymaster" revision="7a70abbf29293b30bb1e7ed3a58deb40f8774a53" />
- <project groups="pdk" name="platform/system/media" path="system/media" revision="77f0f32b32adc5ba1134e7a68e4d907c4f695eb6" />
- <project groups="pdk" name="platform/system/netd" path="system/netd" revision="f5d949ef0991737af9daa7ba702cc2ec638e435b" />
- <project groups="pdk" name="platform/system/security" path="system/security" revision="0387a7fd23021b904612101b727a2060847f6169" />
- <project groups="pdk" name="platform/system/vold" path="system/vold" revision="c0c2867518eed4539444434c95fad8185a6ac08e" />
- <project groups="notdefault,tools" name="platform/tools/adt/eclipse" path="tools/adt/eclipse" revision="ede2ed86419bb4c78428f1ac09825b1a247d8e24" />
- <project groups="notdefault,tools" name="platform/tools/adt/idea" path="tools/adt/idea" revision="50a5da1af3e851df7aff37c291541000685bcad4" />
- <project groups="notdefault,tools" name="platform/tools/base" path="tools/base" revision="4dc06057ba77596807e2d28c715719f240f71549" />
- <project groups="notdefault,tools" name="platform/tools/build" path="tools/build" revision="69c4b95102b4b9862bfba68b3eaf5b7537a705ee" />
- <project groups="notdefault,tools" name="platform/tools/emulator" path="tools/emulator" revision="c427e5d5227ba9413307670a5d758d9ced394a7e" />
- <project groups="tools" name="platform/tools/external/fat32lib" path="tools/external/fat32lib" revision="3880776e41ff7def06e351720f2d162f88b58a03" />
- <project groups="tools" name="platform/tools/external/gradle" path="tools/external/gradle" revision="842b7a27df8606faa29b0875a13270701eb78dd8" />
- <project groups="notdefault,tools" name="platform/tools/idea" path="tools/idea" revision="12356153d01fcde14dd3a06948cfded92c20d068" />
- <project groups="notdefault,motodev" name="platform/tools/motodev" path="tools/motodev" revision="69989786cefbde82527960a1e100ec9afba46a98" />
- <project groups="notdefault,tools" name="platform/tools/studio/cloud" path="tools/studio/cloud" revision="839eb097c5fc73f91a722f1457a2e8e11eb4e1a5" />
- <project groups="notdefault,tools" name="platform/tools/swt" path="tools/swt" revision="aaf3131b0e4b15d39156a6e94e5da06b0183d61d" />
-</manifest>
diff --git a/deps/npm/node_modules/node-gyp/gyp/buildbot/buildbot_run.py b/deps/npm/node_modules/node-gyp/gyp/buildbot/buildbot_run.py
deleted file mode 100755
index 9a2b71f1b3..0000000000
--- a/deps/npm/node_modules/node-gyp/gyp/buildbot/buildbot_run.py
+++ /dev/null
@@ -1,136 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Argument-less script to select what to run on the buildbots."""
-
-import os
-import shutil
-import subprocess
-import sys
-
-
-BUILDBOT_DIR = os.path.dirname(os.path.abspath(__file__))
-TRUNK_DIR = os.path.dirname(BUILDBOT_DIR)
-ROOT_DIR = os.path.dirname(TRUNK_DIR)
-CMAKE_DIR = os.path.join(ROOT_DIR, 'cmake')
-CMAKE_BIN_DIR = os.path.join(CMAKE_DIR, 'bin')
-OUT_DIR = os.path.join(TRUNK_DIR, 'out')
-
-
-def CallSubProcess(*args, **kwargs):
- """Wrapper around subprocess.call which treats errors as build exceptions."""
- with open(os.devnull) as devnull_fd:
- retcode = subprocess.call(stdin=devnull_fd, *args, **kwargs)
- if retcode != 0:
- print '@@@STEP_EXCEPTION@@@'
- sys.exit(1)
-
-
-def PrepareCmake():
- """Build CMake 2.8.8 since the version in Precise is 2.8.7."""
- if os.environ['BUILDBOT_CLOBBER'] == '1':
- print '@@@BUILD_STEP Clobber CMake checkout@@@'
- shutil.rmtree(CMAKE_DIR)
-
- # We always build CMake 2.8.8, so no need to do anything
- # if the directory already exists.
- if os.path.isdir(CMAKE_DIR):
- return
-
- print '@@@BUILD_STEP Initialize CMake checkout@@@'
- os.mkdir(CMAKE_DIR)
-
- print '@@@BUILD_STEP Sync CMake@@@'
- CallSubProcess(
- ['git', 'clone',
- '--depth', '1',
- '--single-branch',
- '--branch', 'v2.8.8',
- '--',
- 'git://cmake.org/cmake.git',
- CMAKE_DIR],
- cwd=CMAKE_DIR)
-
- print '@@@BUILD_STEP Build CMake@@@'
- CallSubProcess(
- ['/bin/bash', 'bootstrap', '--prefix=%s' % CMAKE_DIR],
- cwd=CMAKE_DIR)
-
- CallSubProcess( ['make', 'cmake'], cwd=CMAKE_DIR)
-
-
-def GypTestFormat(title, format=None, msvs_version=None, tests=[]):
- """Run the gyp tests for a given format, emitting annotator tags.
-
- See annotator docs at:
- https://sites.google.com/a/chromium.org/dev/developers/testing/chromium-build-infrastructure/buildbot-annotations
- Args:
- format: gyp format to test.
- Returns:
- 0 for sucesss, 1 for failure.
- """
- if not format:
- format = title
-
- print '@@@BUILD_STEP ' + title + '@@@'
- sys.stdout.flush()
- env = os.environ.copy()
- if msvs_version:
- env['GYP_MSVS_VERSION'] = msvs_version
- command = ' '.join(
- [sys.executable, 'gyp/gyptest.py',
- '--all',
- '--passed',
- '--format', format,
- '--path', CMAKE_BIN_DIR,
- '--chdir', 'gyp'] + tests)
- retcode = subprocess.call(command, cwd=ROOT_DIR, env=env, shell=True)
- if retcode:
- # Emit failure tag, and keep going.
- print '@@@STEP_FAILURE@@@'
- return 1
- return 0
-
-
-def GypBuild():
- # Dump out/ directory.
- print '@@@BUILD_STEP cleanup@@@'
- print 'Removing %s...' % OUT_DIR
- shutil.rmtree(OUT_DIR, ignore_errors=True)
- print 'Done.'
-
- retcode = 0
- if sys.platform.startswith('linux'):
- retcode += GypTestFormat('ninja')
- retcode += GypTestFormat('make')
- PrepareCmake()
- retcode += GypTestFormat('cmake')
- elif sys.platform == 'darwin':
- retcode += GypTestFormat('ninja')
- retcode += GypTestFormat('xcode')
- retcode += GypTestFormat('make')
- elif sys.platform == 'win32':
- retcode += GypTestFormat('ninja')
- if os.environ['BUILDBOT_BUILDERNAME'] == 'gyp-win64':
- retcode += GypTestFormat('msvs-ninja-2013', format='msvs-ninja',
- msvs_version='2013',
- tests=[
- r'test\generator-output\gyptest-actions.py',
- r'test\generator-output\gyptest-relocate.py',
- r'test\generator-output\gyptest-rules.py'])
- retcode += GypTestFormat('msvs-2013', format='msvs', msvs_version='2013')
- else:
- raise Exception('Unknown platform')
- if retcode:
- # TODO(bradnelson): once the annotator supports a postscript (section for
- # after the build proper that could be used for cumulative failures),
- # use that instead of this. This isolates the final return value so
- # that it isn't misattributed to the last stage.
- print '@@@BUILD_STEP failures@@@'
- sys.exit(retcode)
-
-
-if __name__ == '__main__':
- GypBuild()
diff --git a/deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/OWNERS b/deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/OWNERS
deleted file mode 100644
index b269c198b4..0000000000
--- a/deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/OWNERS
+++ /dev/null
@@ -1,6 +0,0 @@
-set noparent
-bradnelson@chromium.org
-bradnelson@google.com
-iannucci@chromium.org
-scottmg@chromium.org
-thakis@chromium.org
diff --git a/deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/README b/deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/README
deleted file mode 100644
index 9428497883..0000000000
--- a/deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/README
+++ /dev/null
@@ -1,3 +0,0 @@
-cq_config.json describes the trybots that must pass in order
-to land a change through the commit queue.
-Comments are here as the file is strictly JSON.
diff --git a/deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/cq_config.json b/deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/cq_config.json
deleted file mode 100644
index 656c21e54f..0000000000
--- a/deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/cq_config.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "trybots": {
- "launched": {
- "tryserver.nacl": {
- "gyp-presubmit": ["defaulttests"],
- "gyp-linux": ["defaulttests"],
- "gyp-mac": ["defaulttests"],
- "gyp-win32": ["defaulttests"],
- "gyp-win64": ["defaulttests"]
- }
- },
- "triggered": {
- }
- }
-}
diff --git a/deps/npm/node_modules/node-gyp/gyp/gyptest.py b/deps/npm/node_modules/node-gyp/gyp/gyptest.py
deleted file mode 100755
index 8e4fc47d5c..0000000000
--- a/deps/npm/node_modules/node-gyp/gyp/gyptest.py
+++ /dev/null
@@ -1,274 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-__doc__ = """
-gyptest.py -- test runner for GYP tests.
-"""
-
-import os
-import optparse
-import subprocess
-import sys
-
-class CommandRunner(object):
- """
- Executor class for commands, including "commands" implemented by
- Python functions.
- """
- verbose = True
- active = True
-
- def __init__(self, dictionary={}):
- self.subst_dictionary(dictionary)
-
- def subst_dictionary(self, dictionary):
- self._subst_dictionary = dictionary
-
- def subst(self, string, dictionary=None):
- """
- Substitutes (via the format operator) the values in the specified
- dictionary into the specified command.
-
- The command can be an (action, string) tuple. In all cases, we
- perform substitution on strings and don't worry if something isn't
- a string. (It's probably a Python function to be executed.)
- """
- if dictionary is None:
- dictionary = self._subst_dictionary
- if dictionary:
- try:
- string = string % dictionary
- except TypeError:
- pass
- return string
-
- def display(self, command, stdout=None, stderr=None):
- if not self.verbose:
- return
- if type(command) == type(()):
- func = command[0]
- args = command[1:]
- s = '%s(%s)' % (func.__name__, ', '.join(map(repr, args)))
- if type(command) == type([]):
- # TODO: quote arguments containing spaces
- # TODO: handle meta characters?
- s = ' '.join(command)
- else:
- s = self.subst(command)
- if not s.endswith('\n'):
- s += '\n'
- sys.stdout.write(s)
- sys.stdout.flush()
-
- def execute(self, command, stdout=None, stderr=None):
- """
- Executes a single command.
- """
- if not self.active:
- return 0
- if type(command) == type(''):
- command = self.subst(command)
- cmdargs = shlex.split(command)
- if cmdargs[0] == 'cd':
- command = (os.chdir,) + tuple(cmdargs[1:])
- if type(command) == type(()):
- func = command[0]
- args = command[1:]
- return func(*args)
- else:
- if stdout is sys.stdout:
- # Same as passing sys.stdout, except python2.4 doesn't fail on it.
- subout = None
- else:
- # Open pipe for anything else so Popen works on python2.4.
- subout = subprocess.PIPE
- if stderr is sys.stderr:
- # Same as passing sys.stderr, except python2.4 doesn't fail on it.
- suberr = None
- elif stderr is None:
- # Merge with stdout if stderr isn't specified.
- suberr = subprocess.STDOUT
- else:
- # Open pipe for anything else so Popen works on python2.4.
- suberr = subprocess.PIPE
- p = subprocess.Popen(command,
- shell=(sys.platform == 'win32'),
- stdout=subout,
- stderr=suberr)
- p.wait()
- if stdout is None:
- self.stdout = p.stdout.read()
- elif stdout is not sys.stdout:
- stdout.write(p.stdout.read())
- if stderr not in (None, sys.stderr):
- stderr.write(p.stderr.read())
- return p.returncode
-
- def run(self, command, display=None, stdout=None, stderr=None):
- """
- Runs a single command, displaying it first.
- """
- if display is None:
- display = command
- self.display(display)
- return self.execute(command, stdout, stderr)
-
-
-class Unbuffered(object):
- def __init__(self, fp):
- self.fp = fp
- def write(self, arg):
- self.fp.write(arg)
- self.fp.flush()
- def __getattr__(self, attr):
- return getattr(self.fp, attr)
-
-sys.stdout = Unbuffered(sys.stdout)
-sys.stderr = Unbuffered(sys.stderr)
-
-
-def is_test_name(f):
- return f.startswith('gyptest') and f.endswith('.py')
-
-
-def find_all_gyptest_files(directory):
- result = []
- for root, dirs, files in os.walk(directory):
- if '.svn' in dirs:
- dirs.remove('.svn')
- result.extend([ os.path.join(root, f) for f in files if is_test_name(f) ])
- result.sort()
- return result
-
-
-def main(argv=None):
- if argv is None:
- argv = sys.argv
-
- usage = "gyptest.py [-ahlnq] [-f formats] [test ...]"
- parser = optparse.OptionParser(usage=usage)
- parser.add_option("-a", "--all", action="store_true",
- help="run all tests")
- parser.add_option("-C", "--chdir", action="store", default=None,
- help="chdir to the specified directory")
- parser.add_option("-f", "--format", action="store", default='',
- help="run tests with the specified formats")
- parser.add_option("-G", '--gyp_option', action="append", default=[],
- help="Add -G options to the gyp command line")
- parser.add_option("-l", "--list", action="store_true",
- help="list available tests and exit")
- parser.add_option("-n", "--no-exec", action="store_true",
- help="no execute, just print the command line")
- parser.add_option("--passed", action="store_true",
- help="report passed tests")
- parser.add_option("--path", action="append", default=[],
- help="additional $PATH directory")
- parser.add_option("-q", "--quiet", action="store_true",
- help="quiet, don't print test command lines")
- opts, args = parser.parse_args(argv[1:])
-
- if opts.chdir:
- os.chdir(opts.chdir)
-
- if opts.path:
- extra_path = [os.path.abspath(p) for p in opts.path]
- extra_path = os.pathsep.join(extra_path)
- os.environ['PATH'] = extra_path + os.pathsep + os.environ['PATH']
-
- if not args:
- if not opts.all:
- sys.stderr.write('Specify -a to get all tests.\n')
- return 1
- args = ['test']
-
- tests = []
- for arg in args:
- if os.path.isdir(arg):
- tests.extend(find_all_gyptest_files(os.path.normpath(arg)))
- else:
- if not is_test_name(os.path.basename(arg)):
- print >>sys.stderr, arg, 'is not a valid gyp test name.'
- sys.exit(1)
- tests.append(arg)
-
- if opts.list:
- for test in tests:
- print test
- sys.exit(0)
-
- CommandRunner.verbose = not opts.quiet
- CommandRunner.active = not opts.no_exec
- cr = CommandRunner()
-
- os.environ['PYTHONPATH'] = os.path.abspath('test/lib')
- if not opts.quiet:
- sys.stdout.write('PYTHONPATH=%s\n' % os.environ['PYTHONPATH'])
-
- passed = []
- failed = []
- no_result = []
-
- if opts.format:
- format_list = opts.format.split(',')
- else:
- # TODO: not duplicate this mapping from pylib/gyp/__init__.py
- format_list = {
- 'aix5': ['make'],
- 'freebsd7': ['make'],
- 'freebsd8': ['make'],
- 'openbsd5': ['make'],
- 'cygwin': ['msvs'],
- 'win32': ['msvs', 'ninja'],
- 'linux2': ['make', 'ninja'],
- 'linux3': ['make', 'ninja'],
- 'darwin': ['make', 'ninja', 'xcode', 'xcode-ninja'],
- }[sys.platform]
-
- for format in format_list:
- os.environ['TESTGYP_FORMAT'] = format
- if not opts.quiet:
- sys.stdout.write('TESTGYP_FORMAT=%s\n' % format)
-
- gyp_options = []
- for option in opts.gyp_option:
- gyp_options += ['-G', option]
- if gyp_options and not opts.quiet:
- sys.stdout.write('Extra Gyp options: %s\n' % gyp_options)
-
- for test in tests:
- status = cr.run([sys.executable, test] + gyp_options,
- stdout=sys.stdout,
- stderr=sys.stderr)
- if status == 2:
- no_result.append(test)
- elif status:
- failed.append(test)
- else:
- passed.append(test)
-
- if not opts.quiet:
- def report(description, tests):
- if tests:
- if len(tests) == 1:
- sys.stdout.write("\n%s the following test:\n" % description)
- else:
- fmt = "\n%s the following %d tests:\n"
- sys.stdout.write(fmt % (description, len(tests)))
- sys.stdout.write("\t" + "\n\t".join(tests) + "\n")
-
- if opts.passed:
- report("Passed", passed)
- report("Failed", failed)
- report("No result from", no_result)
-
- if failed:
- return 1
- else:
- return 0
-
-
-if __name__ == "__main__":
- sys.exit(main())
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py
index 256e3f3a6b..501118796f 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py
@@ -429,6 +429,10 @@ def GetFlavor(params):
return 'netbsd'
if sys.platform.startswith('aix'):
return 'aix'
+ if sys.platform.startswith('zos'):
+ return 'zos'
+ if sys.platform.startswith('os390'):
+ return 'zos'
return 'linux'
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py
index b71e9d4e8a..841f31f925 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py
@@ -4,6 +4,7 @@
import re
import os
+import locale
def XmlToString(content, encoding='utf-8', pretty=False):
@@ -116,10 +117,9 @@ def WriteXmlIfChanged(content, path, encoding='utf-8', pretty=False,
if win32 and os.linesep != '\r\n':
xml_string = xml_string.replace('\n', '\r\n')
- try:
- xml_string = xml_string.encode(encoding)
- except Exception:
- xml_string = unicode(xml_string, 'latin-1').encode(encoding)
+ default_encoding = locale.getdefaultlocale()[1]
+ if default_encoding.upper() != encoding.upper():
+ xml_string = xml_string.decode(default_encoding).encode(encoding)
# Get the old content
try:
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
index 6fc5d6b563..8990057a04 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
@@ -227,6 +227,25 @@ cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSE
"""
+LINK_COMMANDS_OS390 = """\
+quiet_cmd_alink = AR($(TOOLSET)) $@
+cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)
+
+quiet_cmd_alink_thin = AR($(TOOLSET)) $@
+cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
+
+quiet_cmd_link = LINK($(TOOLSET)) $@
+cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS)
+
+quiet_cmd_solink = SOLINK($(TOOLSET)) $@
+cmd_solink = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS) -Wl,DLL
+
+quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
+cmd_solink_module = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS) -Wl,DLL
+
+"""
+
+
# Header of toplevel Makefile.
# This should go into the build tree, but it's easier to keep it here for now.
SHARED_HEADER = ("""\
@@ -310,7 +329,7 @@ dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1)))
# We write to a dep file on the side first and then rename at the end
# so we can't end up with a broken dep file.
depfile = $(depsdir)/$(call replace_spaces,$@).d
-DEPFLAGS = -MMD -MF $(depfile).raw
+DEPFLAGS = %(makedep_args)s -MF $(depfile).raw
# We have to fixup the deps output in a few ways.
# (1) the file output should mention the proper .o file.
@@ -2016,6 +2035,7 @@ def GenerateOutput(target_list, target_dicts, data, params):
flock_command= 'flock'
copy_archive_arguments = '-af'
+ makedep_arguments = '-MMD'
header_params = {
'default_target': default_target,
'builddir': builddir_name,
@@ -2026,6 +2046,7 @@ def GenerateOutput(target_list, target_dicts, data, params):
'extra_commands': '',
'srcdir': srcdir,
'copy_archive_args': copy_archive_arguments,
+ 'makedep_args': makedep_arguments,
}
if flavor == 'mac':
flock_command = './gyp-mac-tool flock'
@@ -2039,6 +2060,14 @@ def GenerateOutput(target_list, target_dicts, data, params):
header_params.update({
'link_commands': LINK_COMMANDS_ANDROID,
})
+ elif flavor == 'zos':
+ copy_archive_arguments = '-fPR'
+ makedep_arguments = '-qmakedep=gcc'
+ header_params.update({
+ 'copy_archive_args': copy_archive_arguments,
+ 'makedep_args': makedep_arguments,
+ 'link_commands': LINK_COMMANDS_OS390,
+ })
elif flavor == 'solaris':
header_params.update({
'flock': './gyp-flock-tool flock',
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py
index 6bfad0f3bd..3901ba9416 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py
@@ -2118,7 +2118,7 @@ def _MapFileToMsBuildSourceType(source, rule_dependencies,
if ext in extension_to_rule_name:
group = 'rule'
element = extension_to_rule_name[ext]
- elif ext in ['.cc', '.cpp', '.c', '.cxx']:
+ elif ext in ['.cc', '.cpp', '.c', '.cxx', '.mm']:
group = 'compile'
element = 'ClCompile'
elif ext in ['.h', '.hxx']:
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py
index 841067ed34..4ee2bd1b4d 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py
@@ -2238,15 +2238,22 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params,
'stamp',
description='STAMP $out',
command='%s gyp-win-tool stamp $out' % sys.executable)
- master_ninja.rule(
- 'copy',
- description='COPY $in $out',
- command='%s gyp-win-tool recursive-mirror $in $out' % sys.executable)
else:
master_ninja.rule(
'stamp',
description='STAMP $out',
command='${postbuilds}touch $out')
+ if flavor == 'win':
+ master_ninja.rule(
+ 'copy',
+ description='COPY $in $out',
+ command='%s gyp-win-tool recursive-mirror $in $out' % sys.executable)
+ elif flavor == 'zos':
+ master_ninja.rule(
+ 'copy',
+ description='COPY $in $out',
+ command='rm -rf $out && cp -fRP $in $out')
+ else:
master_ninja.rule(
'copy',
description='COPY $in $out',
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py
index 7567d0a05b..10f6e0dba1 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py
@@ -233,7 +233,12 @@ def LoadOneBuildFile(build_file_path, data, aux_data, includes,
# Open the build file for read ('r') with universal-newlines mode ('U')
# to make sure platform specific newlines ('\r\n' or '\r') are converted to '\n'
# which otherwise will fail eval()
- build_file_contents = open(build_file_path, 'rU').read()
+ if sys.platform == 'zos':
+ # On z/OS, universal-newlines mode treats the file as an ascii file. But since
+ # node-gyp produces ebcdic files, do not use that mode.
+ build_file_contents = open(build_file_path, 'r').read()
+ else:
+ build_file_contents = open(build_file_path, 'rU').read()
else:
raise GypError("%s not found (cwd: %s)" % (build_file_path, os.getcwd()))
@@ -2033,7 +2038,7 @@ def MakePathRelative(to_file, fro_file, item):
gyp.common.RelativePath(os.path.dirname(fro_file),
os.path.dirname(to_file)),
item)).replace('\\', '/')
- if item[-1] == '/':
+ if item[-1:] == '/':
ret += '/'
return ret
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
index da29ebdf1a..4321f60895 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
@@ -429,7 +429,7 @@ class XcodeSettings(object):
# Since the CLT has no SDK paths anyway, returning None is the
# most sensible route and should still do the right thing.
try:
- return GetStdout(['xcodebuild', '-version', '-sdk', sdk, infoitem])
+ return GetStdoutQuiet(['xcodebuild', '-version', '-sdk', sdk, infoitem])
except:
pass
@@ -1251,7 +1251,7 @@ def XcodeVersion():
if XCODE_VERSION_CACHE:
return XCODE_VERSION_CACHE
try:
- version_list = GetStdout(['xcodebuild', '-version']).splitlines()
+ version_list = GetStdoutQuiet(['xcodebuild', '-version']).splitlines()
# In some circumstances xcodebuild exits 0 but doesn't return
# the right results; for example, a user on 10.7 or 10.8 with
# a bogus path set via xcode-select
@@ -1301,6 +1301,17 @@ def CLTVersion():
continue
+def GetStdoutQuiet(cmdlist):
+ """Returns the content of standard output returned by invoking |cmdlist|.
+ Ignores the stderr.
+ Raises |GypError| if the command return with a non-zero return code."""
+ job = subprocess.Popen(cmdlist, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ out = job.communicate()[0]
+ if job.returncode != 0:
+ raise GypError('Error %d running %s' % (job.returncode, cmdlist[0]))
+ return out.rstrip('\n')
+
+
def GetStdout(cmdlist):
"""Returns the content of standard output returned by invoking |cmdlist|.
Raises |GypError| if the command return with a non-zero return code."""
diff --git a/deps/npm/node_modules/node-gyp/lib/build.js b/deps/npm/node_modules/node-gyp/lib/build.js
index 0445fb6452..2f8e14c374 100644
--- a/deps/npm/node_modules/node-gyp/lib/build.js
+++ b/deps/npm/node_modules/node-gyp/lib/build.js
@@ -23,6 +23,10 @@ function build (gyp, argv, callback) {
platformMake = 'gmake'
} else if (process.platform.indexOf('bsd') !== -1) {
platformMake = 'gmake'
+ } else if (win && argv.length > 0) {
+ argv = argv.map(function(target) {
+ return '/t:' + target
+ })
}
var release = processRelease(argv, gyp, process.version, process.release)
diff --git a/deps/npm/node_modules/node-gyp/lib/configure.js b/deps/npm/node_modules/node-gyp/lib/configure.js
index 1351576d12..f141959bca 100644
--- a/deps/npm/node_modules/node-gyp/lib/configure.js
+++ b/deps/npm/node_modules/node-gyp/lib/configure.js
@@ -72,8 +72,10 @@ function configure (gyp, argv, callback) {
return callback(new Error('Invalid version number: ' + release.version))
}
- // ensure that the target node version's dev files are installed
- gyp.opts.ensure = true
+ // If the tarball option is set, always remove and reinstall the headers
+ // into devdir. Otherwise only install if they're not already there.
+ gyp.opts.ensure = gyp.opts.tarball ? false : true
+
gyp.commands.install([ release.version ], function (err, version) {
if (err) return callback(err)
log.verbose('get node dir', 'target node version installed:', release.versionDir)
@@ -242,28 +244,35 @@ function configure (gyp, argv, callback) {
argv.push('-I', config)
})
- // for AIX we need to set up the path to the exp file
+ // For AIX and z/OS we need to set up the path to the exports file
// which contains the symbols needed for linking.
- // The file will either be in one of the following
- // depending on whether it is an installed or
- // development environment:
- // - the include/node directory
- // - the out/Release directory
- // - the out/Debug directory
- // - the root directory
var node_exp_file = undefined
- if (process.platform === 'aix') {
+ if (process.platform === 'aix' || process.platform === 'os390') {
+ var ext = process.platform === 'aix' ? 'exp' : 'x'
var node_root_dir = findNodeDirectory()
- var candidates = ['include/node/node.exp',
- 'out/Release/node.exp',
- 'out/Debug/node.exp',
- 'node.exp']
+ var candidates = undefined
+ if (process.platform === 'aix') {
+ candidates = ['include/node/node',
+ 'out/Release/node',
+ 'out/Debug/node',
+ 'node'
+ ].map(function(file) {
+ return file + '.' + ext
+ })
+ } else {
+ candidates = ['out/Release/obj.target/libnode',
+ 'out/Debug/obj.target/libnode',
+ 'lib/libnode'
+ ].map(function(file) {
+ return file + '.' + ext
+ })
+ }
var logprefix = 'find exports file'
node_exp_file = findAccessibleSync(logprefix, node_root_dir, candidates)
if (node_exp_file !== undefined) {
log.verbose(logprefix, 'Found exports file: %s', node_exp_file)
} else {
- var msg = msgFormat('Could not find node.exp file in %s', node_root_dir)
+ var msg = msgFormat('Could not find node.%s file in %s', ext, node_root_dir)
log.error(logprefix, 'Could not find exports file')
return callback(new Error(msg))
}
@@ -292,7 +301,7 @@ function configure (gyp, argv, callback) {
argv.push('-Dlibrary=shared_library')
argv.push('-Dvisibility=default')
argv.push('-Dnode_root_dir=' + nodeDir)
- if (process.platform === 'aix') {
+ if (process.platform === 'aix' || process.platform === 'os390') {
argv.push('-Dnode_exp_file=' + node_exp_file)
}
argv.push('-Dnode_gyp_dir=' + nodeGypDir)
diff --git a/deps/npm/node_modules/node-gyp/lib/find-vs2017.js b/deps/npm/node_modules/node-gyp/lib/find-vs2017.js
index 8c79e9ec9b..ad46ceaf88 100644
--- a/deps/npm/node_modules/node-gyp/lib/find-vs2017.js
+++ b/deps/npm/node_modules/node-gyp/lib/find-vs2017.js
@@ -6,9 +6,9 @@ function findVS2017(callback) {
var ps = path.join(process.env.SystemRoot, 'System32', 'WindowsPowerShell',
'v1.0', 'powershell.exe')
var csFile = path.join(__dirname, 'Find-VS2017.cs')
- var psArgs = ['-ExecutionPolicy', 'Unrestricted', '-Command',
- '&{Add-Type -Path \'' + csFile +
- '\'; [VisualStudioConfiguration.Main]::Query()}']
+ var psArgs = ['-ExecutionPolicy', 'Unrestricted', '-NoProfile',
+ '-Command', '&{Add-Type -Path \'' + csFile + '\';' +
+ '[VisualStudioConfiguration.Main]::Query()}']
log.silly('find vs2017', 'Running', ps, psArgs)
var child = execFile(ps, psArgs, { encoding: 'utf8' },
diff --git a/deps/npm/node_modules/node-gyp/lib/install.js b/deps/npm/node_modules/node-gyp/lib/install.js
index fa2e1c5430..cb84972e18 100644
--- a/deps/npm/node_modules/node-gyp/lib/install.js
+++ b/deps/npm/node_modules/node-gyp/lib/install.js
@@ -1,7 +1,12 @@
+module.exports = exports = function (gyp, argv, callback) {
+ return install(fs, gyp, argv, callback)
+}
-module.exports = exports = install
-
-module.exports.test = { download: download, readCAFile: readCAFile }
+module.exports.test = {
+ download: download,
+ install: install,
+ readCAFile: readCAFile,
+}
exports.usage = 'Install node development files for the specified node version.'
@@ -20,12 +25,11 @@ var fs = require('graceful-fs')
, semver = require('semver')
, fstream = require('fstream')
, request = require('request')
- , minimatch = require('minimatch')
, mkdir = require('mkdirp')
, processRelease = require('./process-release')
, win = process.platform == 'win32'
-function install (gyp, argv, callback) {
+function install (fs, gyp, argv, callback) {
var release = processRelease(argv, gyp, process.version, process.release)
@@ -84,7 +88,7 @@ function install (gyp, argv, callback) {
log.verbose('install', 'version not already installed, continuing with install', release.version)
go()
} else if (err.code == 'EACCES') {
- eaccesFallback()
+ eaccesFallback(err)
} else {
cb(err)
}
@@ -129,7 +133,7 @@ function install (gyp, argv, callback) {
mkdir(devDir, function (err, created) {
if (err) {
if (err.code == 'EACCES') {
- eaccesFallback()
+ eaccesFallback(err)
} else {
cb(err)
}
@@ -396,8 +400,8 @@ function install (gyp, argv, callback) {
function valid (file) {
// header files
- return minimatch(file, '*.h', { matchBase: true }) ||
- minimatch(file, '*.gypi', { matchBase: true })
+ var extname = path.extname(file);
+ return extname === '.h' || extname === '.gypi';
}
/**
@@ -409,7 +413,9 @@ function install (gyp, argv, callback) {
* the compilation will succeed...
*/
- function eaccesFallback () {
+ function eaccesFallback (err) {
+ var noretry = '--node_gyp_internal_noretry'
+ if (-1 !== argv.indexOf(noretry)) return cb(err)
var tmpdir = osenv.tmpdir()
gyp.devDir = path.resolve(tmpdir, '.node-gyp')
log.warn('EACCES', 'user "%s" does not have permission to access the dev dir "%s"', osenv.user(), devDir)
@@ -418,7 +424,7 @@ function install (gyp, argv, callback) {
log.verbose('tmpdir == cwd', 'automatically will remove dev files after to save disk space')
gyp.todo.push({ name: 'remove', args: argv })
}
- gyp.commands.install(argv, cb)
+ gyp.commands.install([noretry].concat(argv), cb)
}
}
diff --git a/deps/npm/node_modules/node-gyp/package.json b/deps/npm/node_modules/node-gyp/package.json
index ced901766a..58e9f882f2 100644
--- a/deps/npm/node_modules/node-gyp/package.json
+++ b/deps/npm/node_modules/node-gyp/package.json
@@ -1,14 +1,8 @@
{
- "_args": [
- [
- "node-gyp@3.6.2",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "node-gyp@3.6.2",
- "_id": "node-gyp@3.6.2",
+ "_from": "node-gyp@latest",
+ "_id": "node-gyp@3.7.0",
"_inBundle": false,
- "_integrity": "sha1-m/vlRWIoYoSDjnUOrAUpWFP6HGA=",
+ "_integrity": "sha512-qDQE/Ft9xXP6zphwx4sD0t+VhwV7yFaloMpfbL2QnnDZcyaiakWlLdtFGGQfTAwpFHdpbRhRxVhIHN1OKAjgbg==",
"_location": "/node-gyp",
"_phantomChildren": {
"abbrev": "1.1.1",
@@ -17,22 +11,24 @@
"inherits": "2.0.3"
},
"_requested": {
- "type": "version",
+ "type": "tag",
"registry": true,
- "raw": "node-gyp@3.6.2",
+ "raw": "node-gyp@latest",
"name": "node-gyp",
"escapedName": "node-gyp",
- "rawSpec": "3.6.2",
+ "rawSpec": "latest",
"saveSpec": null,
- "fetchSpec": "3.6.2"
+ "fetchSpec": "latest"
},
"_requiredBy": [
+ "#USER",
"/",
"/npm-lifecycle"
],
- "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.6.2.tgz",
- "_spec": "3.6.2",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.7.0.tgz",
+ "_shasum": "789478e8f6c45e277aa014f3e28f958f286f9203",
+ "_spec": "node-gyp@latest",
+ "_where": "/Users/zkat/Documents/code/work/npm",
"author": {
"name": "Nathan Rajlich",
"email": "nathan@tootallnate.net",
@@ -44,21 +40,22 @@
"bugs": {
"url": "https://github.com/nodejs/node-gyp/issues"
},
+ "bundleDependencies": false,
"dependencies": {
"fstream": "^1.0.0",
"glob": "^7.0.3",
"graceful-fs": "^4.1.2",
- "minimatch": "^3.0.2",
"mkdirp": "^0.5.0",
"nopt": "2 || 3",
"npmlog": "0 || 1 || 2 || 3 || 4",
"osenv": "0",
- "request": "2",
+ "request": ">=2.9.0 <2.82.0",
"rimraf": "2",
"semver": "~5.3.0",
"tar": "^2.0.0",
"which": "1"
},
+ "deprecated": false,
"description": "Node.js native addon build tool",
"devDependencies": {
"bindings": "~1.2.1",
@@ -91,5 +88,5 @@
"scripts": {
"test": "tape test/test-*"
},
- "version": "3.6.2"
+ "version": "3.7.0"
}
diff --git a/deps/npm/node_modules/node-gyp/test/fixtures/test-charmap.py b/deps/npm/node_modules/node-gyp/test/fixtures/test-charmap.py
new file mode 100644
index 0000000000..d9fa6fb25e
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/test/fixtures/test-charmap.py
@@ -0,0 +1,22 @@
+import sys
+import locale
+
+reload(sys)
+
+def main():
+ encoding = locale.getdefaultlocale()[1]
+ if not encoding:
+ return False
+
+ sys.setdefaultencoding(encoding)
+ textmap = {
+ 'cp936': u'\u4e2d\u6587',
+ 'cp1252': u'Lat\u012Bna',
+ 'cp932': u'\u306b\u307b\u3093\u3054'
+ }
+ if textmap.has_key(encoding):
+ print textmap[encoding]
+ return True
+
+if __name__ == '__main__':
+ print main()
diff --git a/deps/npm/node_modules/node-gyp/test/test-addon.js b/deps/npm/node_modules/node-gyp/test/test-addon.js
index c2a71f4498..7ace1caf6a 100644
--- a/deps/npm/node_modules/node-gyp/test/test-addon.js
+++ b/deps/npm/node_modules/node-gyp/test/test-addon.js
@@ -1,10 +1,35 @@
'use strict'
var test = require('tape')
-var execFile = require('child_process').execFile
var path = require('path')
+var fs = require('graceful-fs')
+var child_process = require('child_process')
var addonPath = path.resolve(__dirname, 'node_modules', 'hello_world')
var nodeGyp = path.resolve(__dirname, '..', 'bin', 'node-gyp.js')
+var execFileSync = child_process.execFileSync
+var execFile = child_process.execFile
+
+function runHello() {
+ var testCode = "console.log(require('hello_world').hello())"
+ return execFileSync('node', ['-e', testCode], { cwd: __dirname }).toString()
+}
+
+function getEncoding() {
+ var code = 'import locale;print locale.getdefaultlocale()[1]'
+ return execFileSync('python', ['-c', code]).toString().trim()
+}
+
+function checkCharmapValid() {
+ var data
+ try {
+ data = execFileSync('python', ['fixtures/test-charmap.py'],
+ { cwd: __dirname })
+ } catch (err) {
+ return false
+ }
+ var lines = data.toString().trim().split('\n')
+ return lines.pop() === 'True'
+}
test('build simple addon', function (t) {
t.plan(3)
@@ -16,12 +41,72 @@ test('build simple addon', function (t) {
var lastLine = logLines[logLines.length-1]
t.strictEqual(err, null)
t.strictEqual(lastLine, 'gyp info ok', 'should end in ok')
+ t.strictEqual(runHello().trim(), 'world')
+ })
+ proc.stdout.setEncoding('utf-8')
+ proc.stderr.setEncoding('utf-8')
+})
+
+test('build simple addon in path with non-ascii characters', function (t) {
+ t.plan(1)
+
+ if (!checkCharmapValid()) {
+ return t.skip('python console app can\'t encode non-ascii character.')
+ }
+
+ var testDirNames = {
+ 'cp936': '文件夹',
+ 'cp1252': 'Latīna',
+ 'cp932': 'フォルダ'
+ }
+ // Select non-ascii characters by current encoding
+ var testDirName = testDirNames[getEncoding()]
+ // If encoding is UTF-8 or other then no need to test
+ if (!testDirName) {
+ return t.skip('no need to test')
+ }
+
+ t.plan(3)
+
+ var data, configPath = path.join(addonPath, 'build', 'config.gypi')
+ try {
+ data = fs.readFileSync(configPath, 'utf8')
+ } catch (err) {
+ t.error(err)
+ return
+ }
+ var config = JSON.parse(data.replace(/\#.+\n/, ''))
+ var nodeDir = config.variables.nodedir
+ var testNodeDir = path.join(addonPath, testDirName)
+ // Create symbol link to path with non-ascii characters
+ try {
+ fs.symlinkSync(nodeDir, testNodeDir, 'dir')
+ } catch (err) {
+ switch (err.code) {
+ case 'EEXIST': break
+ case 'EPERM':
+ t.error(err, 'Please try to running console as an administrator')
+ return
+ default:
+ t.error(err)
+ return
+ }
+ }
+
+ var cmd = [nodeGyp, 'rebuild', '-C', addonPath,
+ '--loglevel=verbose', '-nodedir=' + testNodeDir]
+ var proc = execFile(process.execPath, cmd, function (err, stdout, stderr) {
try {
- var binding = require('hello_world')
- t.strictEqual(binding.hello(), 'world')
- } catch (error) {
- t.error(error, 'load module')
+ fs.unlink(testNodeDir)
+ } catch (err) {
+ t.error(err)
}
+
+ var logLines = stderr.toString().trim().split(/\r?\n/)
+ var lastLine = logLines[logLines.length-1]
+ t.strictEqual(err, null)
+ t.strictEqual(lastLine, 'gyp info ok', 'should end in ok')
+ t.strictEqual(runHello().trim(), 'world')
})
proc.stdout.setEncoding('utf-8')
proc.stderr.setEncoding('utf-8')
diff --git a/deps/npm/node_modules/node-gyp/test/test-install.js b/deps/npm/node_modules/node-gyp/test/test-install.js
new file mode 100644
index 0000000000..f647326a7f
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/test/test-install.js
@@ -0,0 +1,37 @@
+'use strict'
+
+var test = require('tape')
+var install = require('../lib/install').test.install
+
+test('EACCES retry once', function (t) {
+ t.plan(3)
+
+ var fs = {}
+ fs.stat = function (path, cb) {
+ var err = new Error()
+ err.code = 'EACCES'
+ cb(err)
+ t.ok(true);
+ }
+
+
+ var gyp = {}
+ gyp.devDir = __dirname
+ gyp.opts = {}
+ gyp.opts.ensure = true
+ gyp.commands = {}
+ gyp.commands.install = function (argv, cb) {
+ install(fs, gyp, argv, cb)
+ }
+ gyp.commands.remove = function (argv, cb) {
+ cb()
+ }
+
+ gyp.commands.install([], function (err) {
+ t.ok(true)
+ if (/"pre" versions of node cannot be installed/.test(err.message)) {
+ t.ok(true)
+ t.ok(true)
+ }
+ })
+})
diff --git a/deps/npm/node_modules/npm-audit-report/CHANGELOG.md b/deps/npm/node_modules/npm-audit-report/CHANGELOG.md
index 428659ba0d..4cf6a1acda 100644
--- a/deps/npm/node_modules/npm-audit-report/CHANGELOG.md
+++ b/deps/npm/node_modules/npm-audit-report/CHANGELOG.md
@@ -2,6 +2,28 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+<a name="1.3.1"></a>
+## [1.3.1](https://github.com/npm/npm-audit-report/compare/v1.3.0...v1.3.1) (2018-07-10)
+
+
+
+<a name="1.3.0"></a>
+# [1.3.0](https://github.com/npm/npm-audit-report/compare/v1.2.1...v1.3.0) (2018-07-09)
+
+
+### Bug Fixes
+
+* **deps:** remove object.values dependency ([2c5374a](https://github.com/npm/npm-audit-report/commit/2c5374a))
+* **detail:** Fix info-level severity ([#18](https://github.com/npm/npm-audit-report/issues/18)) ([807db5a](https://github.com/npm/npm-audit-report/commit/807db5a))
+* **tests:** a test should not cause side-effects in other tests ([#23](https://github.com/npm/npm-audit-report/issues/23)) ([a94449f](https://github.com/npm/npm-audit-report/commit/a94449f))
+
+
+### Features
+
+* **output:** add `parseable` tabular output format support ([#21](https://github.com/npm/npm-audit-report/issues/21)) ([1c9aaf4](https://github.com/npm/npm-audit-report/commit/1c9aaf4))
+
+
+
<a name="1.2.1"></a>
## [1.2.1](https://github.com/npm/npm-audit-report/compare/v1.2.0...v1.2.1) (2018-05-17)
diff --git a/deps/npm/node_modules/npm-audit-report/README.md b/deps/npm/node_modules/npm-audit-report/README.md
index 73ef382c53..1d1697f4f5 100644
--- a/deps/npm/node_modules/npm-audit-report/README.md
+++ b/deps/npm/node_modules/npm-audit-report/README.md
@@ -20,6 +20,9 @@ The response is an object that contains an output string (the report) and a sugg
```
'use strict'
const Report = require('npm-audit-report')
+const options = {
+ reporter: 'json'
+}
Report(response, options, (result) => {
console.log(result.report)
@@ -30,11 +33,8 @@ Report(response, options, (result) => {
## options
-reporter:
- specify which output format you want to use (install, detail, json)
-
-withColor:
- true || false indicates if some report elements should use colors or not
-
-withUnicode:
- true || false indicates if unicode characters should be used or not.
+| option | values | default | description |
+| :--- | :--- | :--- |:--- |
+| reporter     | `install`, `detail`, `json`, `quiet` | `install` | specify which output format you want to use |
+| withColor     | `true`, `false`   | `true`   | indicates if some report elements should use colors |
+| withUnicode   | `true`, `false`                  | `true` | indicates if unicode characters should be used| \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-audit-report/index.js b/deps/npm/node_modules/npm-audit-report/index.js
index 2e0f21abb7..4f9f5d677b 100644
--- a/deps/npm/node_modules/npm-audit-report/index.js
+++ b/deps/npm/node_modules/npm-audit-report/index.js
@@ -2,6 +2,7 @@
const reporters = {
install: require('./reporters/install'),
+ parseable: require('./reporters/parseable'),
detail: require('./reporters/detail'),
json: require('./reporters/json'),
quiet: require('./reporters/quiet')
@@ -15,7 +16,7 @@ const report = function (data, options) {
}
const config = Object.assign({}, defaults, options)
- return new Promise((resolve, reject) => {
+ return new Promise((resolve) => {
const result = reporters[config.reporter](data, config)
return resolve(result)
})
diff --git a/deps/npm/node_modules/npm-audit-report/lib/utils.js b/deps/npm/node_modules/npm-audit-report/lib/utils.js
index 069ebac8a0..3b521a5f3b 100644
--- a/deps/npm/node_modules/npm-audit-report/lib/utils.js
+++ b/deps/npm/node_modules/npm-audit-report/lib/utils.js
@@ -2,6 +2,8 @@
exports.severityLabel = severityLabel
exports.color = color
+exports.totalVulnCount = totalVulnCount
+exports.severities = severities
const ccs = require('console-control-strings')
@@ -21,6 +23,10 @@ const severityColors = {
low: {
color: 'bold',
label: 'Low'
+ },
+ info: {
+ color: '',
+ label: 'Info'
}
}
@@ -29,7 +35,26 @@ function color (value, colorName, withColor) {
}
function severityLabel (sev, withColor, bold) {
+ if (!(sev in severityColors)) return sev.charAt(0).toUpperCase() + sev.substr(1).toLowerCase()
let colorName = severityColors[sev].color
if (bold) colorName = [colorName, 'bold']
return color(severityColors[sev].label, colorName, withColor)
}
+
+function totalVulnCount (vulns) {
+ return Object.keys(vulns).reduce((accumulator, key) => {
+ const vulnCount = vulns[key]
+ accumulator += vulnCount
+
+ return accumulator
+ }, 0)
+}
+
+function severities (vulns) {
+ return Object.keys(vulns).reduce((accumulator, severity) => {
+ const vulnCount = vulns[severity]
+ if (vulnCount > 0) accumulator.push([severity, vulnCount])
+
+ return accumulator
+ }, [])
+}
diff --git a/deps/npm/node_modules/npm-audit-report/package.json b/deps/npm/node_modules/npm-audit-report/package.json
index 7ed0b6a7c8..0f76601e27 100644
--- a/deps/npm/node_modules/npm-audit-report/package.json
+++ b/deps/npm/node_modules/npm-audit-report/package.json
@@ -1,42 +1,40 @@
{
- "_args": [
- [
- "npm-audit-report@1.2.1",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "npm-audit-report@1.2.1",
- "_id": "npm-audit-report@1.2.1",
+ "_from": "npm-audit-report@^1.2.1",
+ "_id": "npm-audit-report@1.3.1",
"_inBundle": false,
- "_integrity": "sha512-1eh6z0FivYQkLIU5xYcal8ssiGAgn0817u56EcF751HJD0m1PbAxurM/mc9WmAm3vhNZGkExleU/55VN/WRjFw==",
+ "_integrity": "sha512-SjTF8ZP4rOu3JiFrTMi4M1CmVo2tni2sP4TzhyCMHwnMGf6XkdGLZKt9cdZ12esKf0mbQqFyU9LtY0SoeahL7g==",
"_location": "/npm-audit-report",
"_phantomChildren": {},
"_requested": {
- "type": "version",
+ "type": "range",
"registry": true,
- "raw": "npm-audit-report@1.2.1",
+ "raw": "npm-audit-report@^1.2.1",
"name": "npm-audit-report",
"escapedName": "npm-audit-report",
- "rawSpec": "1.2.1",
+ "rawSpec": "^1.2.1",
"saveSpec": null,
- "fetchSpec": "1.2.1"
+ "fetchSpec": "^1.2.1"
},
"_requiredBy": [
+ "#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/npm-audit-report/-/npm-audit-report-1.2.1.tgz",
- "_spec": "1.2.1",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/npm-audit-report/-/npm-audit-report-1.3.1.tgz",
+ "_shasum": "e79ea1fcb5ffaf3031102b389d5222c2b0459632",
+ "_spec": "npm-audit-report@^1.2.1",
+ "_where": "/Users/zkat/Documents/code/work/npm",
"author": {
"name": "Adam Baldwin"
},
"bugs": {
"url": "https://github.com/npm/npm-audit-report/issues"
},
+ "bundleDependencies": false,
"dependencies": {
- "cli-table2": "^0.2.0",
+ "cli-table3": "^0.5.0",
"console-control-strings": "^1.1.0"
},
+ "deprecated": false,
"description": "Given a response from the npm security api, render it into a variety of security reports",
"devDependencies": {
"keyfob": "^1.0.0",
@@ -78,5 +76,5 @@
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
- "version": "1.2.1"
+ "version": "1.3.1"
}
diff --git a/deps/npm/node_modules/npm-audit-report/reporters/detail.js b/deps/npm/node_modules/npm-audit-report/reporters/detail.js
index f4f96b6771..2cbb8fea50 100644
--- a/deps/npm/node_modules/npm-audit-report/reporters/detail.js
+++ b/deps/npm/node_modules/npm-audit-report/reporters/detail.js
@@ -1,7 +1,7 @@
'use strict'
const summary = require('./install.js').summary
-const Table = require('cli-table2')
+const Table = require('cli-table3')
const Utils = require('../lib/utils')
const report = function (data, options) {
@@ -37,17 +37,8 @@ const report = function (data, options) {
}
const footer = function (data) {
- let total = 0
- const sev = []
-
- const keys = Object.keys(data.metadata.vulnerabilities)
- for (let key of keys) {
- const value = data.metadata.vulnerabilities[key]
- total = total + value
- if (value > 0) {
- sev.push([key, value])
- }
- }
+ const total = Utils.totalVulnCount(data.metadata.vulnerabilities)
+
if (total > 0) {
exit = 1
}
diff --git a/deps/npm/node_modules/npm-audit-report/reporters/install.js b/deps/npm/node_modules/npm-audit-report/reporters/install.js
index 00d3583936..96ea12bd81 100644
--- a/deps/npm/node_modules/npm-audit-report/reporters/install.js
+++ b/deps/npm/node_modules/npm-audit-report/reporters/install.js
@@ -43,17 +43,8 @@ function summary (data, options) {
log(`${green('0')} vulnerabilities`)
return output
} else {
- let total = 0
- const sev = []
-
- const keys = Object.keys(data.metadata.vulnerabilities)
- for (let key of keys) {
- const value = data.metadata.vulnerabilities[key]
- total = total + value
- if (value > 0) {
- sev.push([key, value])
- }
- }
+ const total = Utils.totalVulnCount(data.metadata.vulnerabilities)
+ const sev = Utils.severities(data.metadata.vulnerabilities)
if (sev.length > 1) {
const severities = sev.map((value) => {
diff --git a/deps/npm/node_modules/npm-audit-report/reporters/parseable.js b/deps/npm/node_modules/npm-audit-report/reporters/parseable.js
new file mode 100644
index 0000000000..3633597729
--- /dev/null
+++ b/deps/npm/node_modules/npm-audit-report/reporters/parseable.js
@@ -0,0 +1,96 @@
+'use strict'
+
+const report = function (data, options) {
+ const defaults = {
+ severityThreshold: 'info'
+ }
+
+ const config = Object.assign({}, defaults, options)
+
+ let exit = 0
+
+ const actions = function (data, config) {
+ let accumulator = {
+ high: '',
+ moderate: '',
+ low: ''
+ }
+
+ if (Object.keys(data.advisories).length !== 0) {
+ data.actions.forEach((action) => {
+ let l = {}
+ // Start with install/update actions
+ if (action.action === 'update' || action.action === 'install') {
+ const recommendation = getRecommendation(action, config)
+ l.recommendation = recommendation.cmd
+ l.breaking = recommendation.isBreaking ? 'Y' : 'N'
+
+ // TODO: Verify: The advisory seems to repeat and be the same for all the 'resolves'. Is it true?
+ const advisory = data.advisories[action.resolves[0].id]
+ l.sevLevel = advisory.severity
+ l.severity = advisory.title
+ l.package = advisory.module_name
+ l.moreInfo = `https://nodesecurity.io/advisories/${advisory.id}`
+ l.path = action.resolves[0].path
+
+ accumulator[advisory.severity] += [action.action, l.package, l.sevLevel, l.recommendation, l.severity, l.moreInfo, l.path, l.breaking]
+ .join('\t') + '\n'
+ }
+
+ if (action.action === 'review') {
+ action.resolves.forEach((resolution) => {
+ const advisory = data.advisories[resolution.id]
+
+ l.sevLevel = advisory.severity
+ l.severity = advisory.title
+ l.package = advisory.module_name
+ l.moreInfo = `https://nodesecurity.io/advisories/${advisory.id}`
+ l.patchedIn = advisory.patched_versions.replace(' ', '') === '<0.0.0' ? 'No patch available' : advisory.patched_versions
+ l.path = resolution.path
+
+ accumulator[advisory.severity] += [action.action, l.package, l.sevLevel, l.patchedIn, l.severity, l.moreInfo, l.path].join('\t') + '\n'
+ }) // forEach resolves
+ } // is review
+ }) // forEach actions
+ }
+ return accumulator['high'] + accumulator['moderate'] + accumulator['low']
+ }
+
+ const exitCode = function (metadata) {
+ let total = 0
+ const keys = Object.keys(metadata.vulnerabilities)
+ for (let key of keys) {
+ const value = metadata.vulnerabilities[key]
+ total = total + value
+ }
+
+ if (total > 0) {
+ exit = 1
+ }
+ }
+
+ exitCode(data.metadata)
+
+ return {
+ report: actions(data, config),
+ exitCode: exit
+ }
+}
+
+const getRecommendation = function (action, config) {
+ if (action.action === 'install') {
+ const isDev = action.resolves[0].dev
+
+ return {
+ cmd: `npm install ${isDev ? '--save-dev ' : ''}${action.module}@${action.target}`,
+ isBreaking: action.isMajor
+ }
+ } else {
+ return {
+ cmd: `npm update ${action.module} --depth ${action.depth}`,
+ isBreaking: false
+ }
+ }
+}
+
+module.exports = report
diff --git a/deps/npm/node_modules/npm-audit-report/reporters/quiet.js b/deps/npm/node_modules/npm-audit-report/reporters/quiet.js
index 3a5fd5eb9b..d6f5c5846b 100644
--- a/deps/npm/node_modules/npm-audit-report/reporters/quiet.js
+++ b/deps/npm/node_modules/npm-audit-report/reporters/quiet.js
@@ -1,17 +1,13 @@
'use strict'
-const report = function (data, options) {
- let total = 0
+const Utils = require('../lib/utils')
- const keys = Object.keys(data.metadata.vulnerabilities)
- for (let key of keys) {
- const value = data.metadata.vulnerabilities[key]
- total = total + value
- }
+const report = function (data) {
+ const totalVulnCount = Utils.totalVulnCount(data.metadata.vulnerabilities)
return {
report: '',
- exitCode: total === 0 ? 0 : 1
+ exitCode: totalVulnCount === 0 ? 0 : 1
}
}
diff --git a/deps/npm/node_modules/npm-profile/CHANGELOG.md b/deps/npm/node_modules/npm-profile/CHANGELOG.md
index 0e461412e3..cc36c38570 100644
--- a/deps/npm/node_modules/npm-profile/CHANGELOG.md
+++ b/deps/npm/node_modules/npm-profile/CHANGELOG.md
@@ -1,3 +1,9 @@
+# v3.0.2 (2018-06-07)
+
+- Allow newer make-fetch-happen.
+- Report 500s from weblogin end point as unsupported.
+- EAUTHUNKNOWN errors were incorrectly reported as EAUTHIP.
+
# v3.0.1 (2018-02-18)
- Log `npm-notice` headers
diff --git a/deps/npm/node_modules/npm-profile/index.js b/deps/npm/node_modules/npm-profile/index.js
index f99b631e63..023ddae40c 100644
--- a/deps/npm/node_modules/npm-profile/index.js
+++ b/deps/npm/node_modules/npm-profile/index.js
@@ -107,7 +107,7 @@ function webAuth (opener, conf, body) {
}
}
}).catch(er => {
- if (er.statusCode >= 400 && er.statusCode <= 499) {
+ if ((er.statusCode >= 400 && er.statusCode <= 499) || er.statusCode === 500) {
throw new WebLoginNotSupported('POST', target, {
status: er.statusCode,
headers: { raw: () => er.headers }
@@ -313,7 +313,7 @@ class HttpErrorAuthUnknown extends HttpErrorBase {
constructor (method, target, res, body) {
super(method, target, res, body)
this.message = 'Unable to authenticate, need: ' + res.headers.get('www-authenticate')
- this.code = 'EAUTHIP'
+ this.code = 'EAUTHUNKNOWN'
Error.captureStackTrace(this, HttpErrorAuthUnknown)
}
}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/CHANGELOG.md b/deps/npm/node_modules/npm-profile/node_modules/cacache/CHANGELOG.md
deleted file mode 100644
index 5c3e7911db..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/CHANGELOG.md
+++ /dev/null
@@ -1,478 +0,0 @@
-# Change Log
-
-All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
-
-<a name="10.0.4"></a>
-## [10.0.4](https://github.com/zkat/cacache/compare/v10.0.3...v10.0.4) (2018-02-16)
-
-
-
-<a name="10.0.3"></a>
-## [10.0.3](https://github.com/zkat/cacache/compare/v10.0.2...v10.0.3) (2018-02-16)
-
-
-### Bug Fixes
-
-* **content:** rethrow aggregate errors as ENOENT ([fa918f5](https://github.com/zkat/cacache/commit/fa918f5))
-
-
-
-<a name="10.0.2"></a>
-## [10.0.2](https://github.com/zkat/cacache/compare/v10.0.1...v10.0.2) (2018-01-07)
-
-
-### Bug Fixes
-
-* **ls:** deleted entries could cause a premature stream EOF ([347dc36](https://github.com/zkat/cacache/commit/347dc36))
-
-
-
-<a name="10.0.1"></a>
-## [10.0.1](https://github.com/zkat/cacache/compare/v10.0.0...v10.0.1) (2017-11-15)
-
-
-### Bug Fixes
-
-* **move-file:** actually use the fallback to `move-concurrently` (#110) ([073fbe1](https://github.com/zkat/cacache/commit/073fbe1))
-
-
-
-<a name="10.0.0"></a>
-# [10.0.0](https://github.com/zkat/cacache/compare/v9.3.0...v10.0.0) (2017-10-23)
-
-
-### Features
-
-* **license:** relicense to ISC (#111) ([fdbb4e5](https://github.com/zkat/cacache/commit/fdbb4e5))
-
-
-### Performance Improvements
-
-* more copyFile benchmarks ([63787bb](https://github.com/zkat/cacache/commit/63787bb))
-
-
-### BREAKING CHANGES
-
-* **license:** the license has been changed from CC0-1.0 to ISC.
-
-
-
-<a name="9.3.0"></a>
-# [9.3.0](https://github.com/zkat/cacache/compare/v9.2.9...v9.3.0) (2017-10-07)
-
-
-### Features
-
-* **copy:** added cacache.get.copy api for fast copies (#107) ([067b5f6](https://github.com/zkat/cacache/commit/067b5f6))
-
-
-
-<a name="9.2.9"></a>
-## [9.2.9](https://github.com/zkat/cacache/compare/v9.2.8...v9.2.9) (2017-06-17)
-
-
-
-<a name="9.2.8"></a>
-## [9.2.8](https://github.com/zkat/cacache/compare/v9.2.7...v9.2.8) (2017-06-05)
-
-
-### Bug Fixes
-
-* **ssri:** bump ssri for bugfix ([c3232ea](https://github.com/zkat/cacache/commit/c3232ea))
-
-
-
-<a name="9.2.7"></a>
-## [9.2.7](https://github.com/zkat/cacache/compare/v9.2.6...v9.2.7) (2017-06-05)
-
-
-### Bug Fixes
-
-* **content:** make verified content completely read-only (#96) ([4131196](https://github.com/zkat/cacache/commit/4131196))
-
-
-
-<a name="9.2.6"></a>
-## [9.2.6](https://github.com/zkat/cacache/compare/v9.2.5...v9.2.6) (2017-05-31)
-
-
-### Bug Fixes
-
-* **node:** update ssri to prevent old node 4 crash ([5209ffe](https://github.com/zkat/cacache/commit/5209ffe))
-
-
-
-<a name="9.2.5"></a>
-## [9.2.5](https://github.com/zkat/cacache/compare/v9.2.4...v9.2.5) (2017-05-25)
-
-
-### Bug Fixes
-
-* **deps:** fix lockfile issues and bump ssri ([84e1d7e](https://github.com/zkat/cacache/commit/84e1d7e))
-
-
-
-<a name="9.2.4"></a>
-## [9.2.4](https://github.com/zkat/cacache/compare/v9.2.3...v9.2.4) (2017-05-24)
-
-
-### Bug Fixes
-
-* **deps:** bumping deps ([bbccb12](https://github.com/zkat/cacache/commit/bbccb12))
-
-
-
-<a name="9.2.3"></a>
-## [9.2.3](https://github.com/zkat/cacache/compare/v9.2.2...v9.2.3) (2017-05-24)
-
-
-### Bug Fixes
-
-* **rm:** stop crashing if content is missing on rm ([ac90bc0](https://github.com/zkat/cacache/commit/ac90bc0))
-
-
-
-<a name="9.2.2"></a>
-## [9.2.2](https://github.com/zkat/cacache/compare/v9.2.1...v9.2.2) (2017-05-14)
-
-
-### Bug Fixes
-
-* **i18n:** lets pretend this didn't happen ([519b4ee](https://github.com/zkat/cacache/commit/519b4ee))
-
-
-
-<a name="9.2.1"></a>
-## [9.2.1](https://github.com/zkat/cacache/compare/v9.2.0...v9.2.1) (2017-05-14)
-
-
-### Bug Fixes
-
-* **docs:** fixing translation messup ([bb9e4f9](https://github.com/zkat/cacache/commit/bb9e4f9))
-
-
-
-<a name="9.2.0"></a>
-# [9.2.0](https://github.com/zkat/cacache/compare/v9.1.0...v9.2.0) (2017-05-14)
-
-
-### Features
-
-* **i18n:** add Spanish translation for API ([531f9a4](https://github.com/zkat/cacache/commit/531f9a4))
-
-
-
-<a name="9.1.0"></a>
-# [9.1.0](https://github.com/zkat/cacache/compare/v9.0.0...v9.1.0) (2017-05-14)
-
-
-### Features
-
-* **i18n:** Add Spanish translation and i18n setup (#91) ([323b90c](https://github.com/zkat/cacache/commit/323b90c))
-
-
-
-<a name="9.0.0"></a>
-# [9.0.0](https://github.com/zkat/cacache/compare/v8.0.0...v9.0.0) (2017-04-28)
-
-
-### Bug Fixes
-
-* **memoization:** actually use the LRU ([0e55dc9](https://github.com/zkat/cacache/commit/0e55dc9))
-
-
-### Features
-
-* **memoization:** memoizers can be injected through opts.memoize (#90) ([e5614c7](https://github.com/zkat/cacache/commit/e5614c7))
-
-
-### BREAKING CHANGES
-
-* **memoization:** If you were passing an object to opts.memoize, it will now be used as an injected memoization object. If you were only passing booleans and other non-objects through that option, no changes are needed.
-
-
-
-<a name="8.0.0"></a>
-# [8.0.0](https://github.com/zkat/cacache/compare/v7.1.0...v8.0.0) (2017-04-22)
-
-
-### Features
-
-* **read:** change hasContent to return {sri, size} (#88) ([bad6c49](https://github.com/zkat/cacache/commit/bad6c49)), closes [#87](https://github.com/zkat/cacache/issues/87)
-
-
-### BREAKING CHANGES
-
-* **read:** hasContent now returns an object with `{sri, size}` instead of `sri`. Use `result.sri` anywhere that needed the old return value.
-
-
-
-<a name="7.1.0"></a>
-# [7.1.0](https://github.com/zkat/cacache/compare/v7.0.5...v7.1.0) (2017-04-20)
-
-
-### Features
-
-* **size:** handle content size info (#49) ([91230af](https://github.com/zkat/cacache/commit/91230af))
-
-
-
-<a name="7.0.5"></a>
-## [7.0.5](https://github.com/zkat/cacache/compare/v7.0.4...v7.0.5) (2017-04-18)
-
-
-### Bug Fixes
-
-* **integrity:** new ssri with fixed integrity stream ([6d13e8e](https://github.com/zkat/cacache/commit/6d13e8e))
-* **write:** wrap stuff in promises to improve errors ([3624fc5](https://github.com/zkat/cacache/commit/3624fc5))
-
-
-
-<a name="7.0.4"></a>
-## [7.0.4](https://github.com/zkat/cacache/compare/v7.0.3...v7.0.4) (2017-04-15)
-
-
-### Bug Fixes
-
-* **fix-owner:** throw away ENOENTs on chownr ([d49bbcd](https://github.com/zkat/cacache/commit/d49bbcd))
-
-
-
-<a name="7.0.3"></a>
-## [7.0.3](https://github.com/zkat/cacache/compare/v7.0.2...v7.0.3) (2017-04-05)
-
-
-### Bug Fixes
-
-* **read:** fixing error message for integrity verification failures ([9d4f0a5](https://github.com/zkat/cacache/commit/9d4f0a5))
-
-
-
-<a name="7.0.2"></a>
-## [7.0.2](https://github.com/zkat/cacache/compare/v7.0.1...v7.0.2) (2017-04-03)
-
-
-### Bug Fixes
-
-* **integrity:** use EINTEGRITY error code and update ssri ([8dc2e62](https://github.com/zkat/cacache/commit/8dc2e62))
-
-
-
-<a name="7.0.1"></a>
-## [7.0.1](https://github.com/zkat/cacache/compare/v7.0.0...v7.0.1) (2017-04-03)
-
-
-### Bug Fixes
-
-* **docs:** fix header name conflict in readme ([afcd456](https://github.com/zkat/cacache/commit/afcd456))
-
-
-
-<a name="7.0.0"></a>
-# [7.0.0](https://github.com/zkat/cacache/compare/v6.3.0...v7.0.0) (2017-04-03)
-
-
-### Bug Fixes
-
-* **test:** fix content.write tests when running in docker ([d2e9b6a](https://github.com/zkat/cacache/commit/d2e9b6a))
-
-
-### Features
-
-* **integrity:** subresource integrity support (#78) ([b1e731f](https://github.com/zkat/cacache/commit/b1e731f))
-
-
-### BREAKING CHANGES
-
-* **integrity:** The entire API has been overhauled to use SRI hashes instead of digest/hashAlgorithm pairs. SRI hashes follow the Subresource Integrity standard and support strings and objects compatible with [`ssri`](https://npm.im/ssri).
-
-* This change bumps the index version, which will invalidate all previous index entries. Content entries will remain intact, and existing caches will automatically reuse any content from before this breaking change.
-
-* `cacache.get.info()`, `cacache.ls()`, and `cacache.ls.stream()` will now return objects that looks like this:
-
-```
-{
- key: String,
- integrity: '<algorithm>-<base64hash>',
- path: ContentPath,
- time: Date<ms>,
- metadata: Any
-}
-```
-
-* `opts.digest` and `opts.hashAlgorithm` are obsolete for any API calls that used them.
-
-* Anywhere `opts.digest` was accepted, `opts.integrity` is now an option. Any valid SRI hash is accepted here -- multiple hash entries will be resolved according to the standard: first, the "strongest" hash algorithm will be picked, and then each of the entries for that algorithm will be matched against the content. Content will be validated if *any* of the entries match (so, a single integrity string can be used for multiple "versions" of the same document/data).
-
-* `put.byDigest()`, `put.stream.byDigest`, `get.byDigest()` and `get.stream.byDigest()` now expect an SRI instead of a `digest` + `opts.hashAlgorithm` pairing.
-
-* `get.hasContent()` now expects an integrity hash instead of a digest. If content exists, it will return the specific single integrity hash that was found in the cache.
-
-* `verify()` has learned to handle integrity-based caches, and forgotten how to handle old-style cache indices due to the format change.
-
-* `cacache.rm.content()` now expects an integrity hash instead of a hex digest.
-
-
-
-<a name="6.3.0"></a>
-# [6.3.0](https://github.com/zkat/cacache/compare/v6.2.0...v6.3.0) (2017-04-01)
-
-
-### Bug Fixes
-
-* **fixOwner:** ignore EEXIST race condition from mkdirp ([4670e9b](https://github.com/zkat/cacache/commit/4670e9b))
-* **index:** ignore index removal races when inserting ([b9d2fa2](https://github.com/zkat/cacache/commit/b9d2fa2))
-* **memo:** use lru-cache for better mem management (#75) ([d8ac5aa](https://github.com/zkat/cacache/commit/d8ac5aa))
-
-
-### Features
-
-* **dependencies:** Switch to move-concurrently (#77) ([dc6482d](https://github.com/zkat/cacache/commit/dc6482d))
-
-
-
-<a name="6.2.0"></a>
-# [6.2.0](https://github.com/zkat/cacache/compare/v6.1.2...v6.2.0) (2017-03-15)
-
-
-### Bug Fixes
-
-* **index:** additional bucket entry verification with checksum (#72) ([f8e0f25](https://github.com/zkat/cacache/commit/f8e0f25))
-* **verify:** return fixOwner.chownr promise ([6818521](https://github.com/zkat/cacache/commit/6818521))
-
-
-### Features
-
-* **tmp:** safe tmp dir creation/management util (#73) ([c42da71](https://github.com/zkat/cacache/commit/c42da71))
-
-
-
-<a name="6.1.2"></a>
-## [6.1.2](https://github.com/zkat/cacache/compare/v6.1.1...v6.1.2) (2017-03-13)
-
-
-### Bug Fixes
-
-* **index:** set default hashAlgorithm ([d6eb2f0](https://github.com/zkat/cacache/commit/d6eb2f0))
-
-
-
-<a name="6.1.1"></a>
-## [6.1.1](https://github.com/zkat/cacache/compare/v6.1.0...v6.1.1) (2017-03-13)
-
-
-### Bug Fixes
-
-* **coverage:** bumping coverage for verify (#71) ([0b7faf6](https://github.com/zkat/cacache/commit/0b7faf6))
-* **deps:** glob should have been a regular dep :< ([0640bc4](https://github.com/zkat/cacache/commit/0640bc4))
-
-
-
-<a name="6.1.0"></a>
-# [6.1.0](https://github.com/zkat/cacache/compare/v6.0.2...v6.1.0) (2017-03-12)
-
-
-### Bug Fixes
-
-* **coverage:** more coverage for content reads (#70) ([ef4f70a](https://github.com/zkat/cacache/commit/ef4f70a))
-* **tests:** use safe-buffer because omfg (#69) ([6ab8132](https://github.com/zkat/cacache/commit/6ab8132))
-
-
-### Features
-
-* **rm:** limited rm.all and fixed bugs (#66) ([d5d25ba](https://github.com/zkat/cacache/commit/d5d25ba)), closes [#66](https://github.com/zkat/cacache/issues/66)
-* **verify:** tested, working cache verifier/gc (#68) ([45ad77a](https://github.com/zkat/cacache/commit/45ad77a))
-
-
-
-<a name="6.0.2"></a>
-## [6.0.2](https://github.com/zkat/cacache/compare/v6.0.1...v6.0.2) (2017-03-11)
-
-
-### Bug Fixes
-
-* **index:** segment cache items with another subbucket (#64) ([c3644e5](https://github.com/zkat/cacache/commit/c3644e5))
-
-
-
-<a name="6.0.1"></a>
-## [6.0.1](https://github.com/zkat/cacache/compare/v6.0.0...v6.0.1) (2017-03-05)
-
-
-### Bug Fixes
-
-* **docs:** Missed spots in README ([8ffb7fa](https://github.com/zkat/cacache/commit/8ffb7fa))
-
-
-
-<a name="6.0.0"></a>
-# [6.0.0](https://github.com/zkat/cacache/compare/v5.0.3...v6.0.0) (2017-03-05)
-
-
-### Bug Fixes
-
-* **api:** keep memo cache mostly-internal ([2f72d0a](https://github.com/zkat/cacache/commit/2f72d0a))
-* **content:** use the rest of the string, not the whole string ([fa8f3c3](https://github.com/zkat/cacache/commit/fa8f3c3))
-* **deps:** removed `format-number[@2](https://github.com/2).0.2` ([1187791](https://github.com/zkat/cacache/commit/1187791))
-* **deps:** removed inflight[@1](https://github.com/1).0.6 ([0d1819c](https://github.com/zkat/cacache/commit/0d1819c))
-* **deps:** rimraf[@2](https://github.com/2).6.1 ([9efab6b](https://github.com/zkat/cacache/commit/9efab6b))
-* **deps:** standard[@9](https://github.com/9).0.0 ([4202cba](https://github.com/zkat/cacache/commit/4202cba))
-* **deps:** tap[@10](https://github.com/10).3.0 ([aa03088](https://github.com/zkat/cacache/commit/aa03088))
-* **deps:** weallcontribute[@1](https://github.com/1).0.8 ([ad4f4dc](https://github.com/zkat/cacache/commit/ad4f4dc))
-* **docs:** add security note to hashKey ([03f81ba](https://github.com/zkat/cacache/commit/03f81ba))
-* **hashes:** change default hashAlgorithm to sha512 ([ea00ba6](https://github.com/zkat/cacache/commit/ea00ba6))
-* **hashes:** missed a spot for hashAlgorithm defaults ([45997d8](https://github.com/zkat/cacache/commit/45997d8))
-* **index:** add length header before JSON for verification ([fb8cb4d](https://github.com/zkat/cacache/commit/fb8cb4d))
-* **index:** change index filenames to sha1s of keys ([bbc5fca](https://github.com/zkat/cacache/commit/bbc5fca))
-* **index:** who cares about race conditions anyway ([b1d3888](https://github.com/zkat/cacache/commit/b1d3888))
-* **perf:** bulk-read get+read for massive speed ([d26cdf9](https://github.com/zkat/cacache/commit/d26cdf9))
-* **perf:** use bulk file reads for index reads ([79a8891](https://github.com/zkat/cacache/commit/79a8891))
-* **put-stream:** remove tmp file on stream insert error ([65f6632](https://github.com/zkat/cacache/commit/65f6632))
-* **put-stream:** robustified and predictibilized ([daf9e08](https://github.com/zkat/cacache/commit/daf9e08))
-* **put-stream:** use new promise API for moves ([1d36013](https://github.com/zkat/cacache/commit/1d36013))
-* **readme:** updated to reflect new default hashAlgo ([c60a2fa](https://github.com/zkat/cacache/commit/c60a2fa))
-* **verify:** tiny typo fix ([db22d05](https://github.com/zkat/cacache/commit/db22d05))
-
-
-### Features
-
-* **api:** converted external api ([7bf032f](https://github.com/zkat/cacache/commit/7bf032f))
-* **cacache:** exported clearMemoized() utility ([8d2c5b6](https://github.com/zkat/cacache/commit/8d2c5b6))
-* **cache:** add versioning to content and index ([31bc549](https://github.com/zkat/cacache/commit/31bc549))
-* **content:** collate content files into subdirs ([c094d9f](https://github.com/zkat/cacache/commit/c094d9f))
-* **deps:** [@npmcorp](https://github.com/npmcorp)/move[@1](https://github.com/1).0.0 ([bdd00bf](https://github.com/zkat/cacache/commit/bdd00bf))
-* **deps:** bluebird[@3](https://github.com/3).4.7 ([3a17aff](https://github.com/zkat/cacache/commit/3a17aff))
-* **deps:** promise-inflight[@1](https://github.com/1).0.1 ([a004fe6](https://github.com/zkat/cacache/commit/a004fe6))
-* **get:** added memoization support for get ([c77d794](https://github.com/zkat/cacache/commit/c77d794))
-* **get:** export hasContent ([2956ec3](https://github.com/zkat/cacache/commit/2956ec3))
-* **index:** add hashAlgorithm and format insert ret val ([b639746](https://github.com/zkat/cacache/commit/b639746))
-* **index:** collate index files into subdirs ([e8402a5](https://github.com/zkat/cacache/commit/e8402a5))
-* **index:** promisify entry index ([cda3335](https://github.com/zkat/cacache/commit/cda3335))
-* **memo:** added memoization lib ([da07b92](https://github.com/zkat/cacache/commit/da07b92))
-* **memo:** export memoization api ([954b1b3](https://github.com/zkat/cacache/commit/954b1b3))
-* **move-file:** add move fallback for weird errors ([5cf4616](https://github.com/zkat/cacache/commit/5cf4616))
-* **perf:** bulk content write api ([51b536e](https://github.com/zkat/cacache/commit/51b536e))
-* **put:** added memoization support to put ([b613a70](https://github.com/zkat/cacache/commit/b613a70))
-* **read:** switched to promises ([a869362](https://github.com/zkat/cacache/commit/a869362))
-* **rm:** added memoization support to rm ([4205cf0](https://github.com/zkat/cacache/commit/4205cf0))
-* **rm:** switched to promises ([a000d24](https://github.com/zkat/cacache/commit/a000d24))
-* **util:** promise-inflight ownership fix requests ([9517cd7](https://github.com/zkat/cacache/commit/9517cd7))
-* **util:** use promises for api ([ae204bb](https://github.com/zkat/cacache/commit/ae204bb))
-* **verify:** converted to Promises ([f0b3974](https://github.com/zkat/cacache/commit/f0b3974))
-
-
-### BREAKING CHANGES
-
-* cache: index/content directories are now versioned. Previous caches are no longer compatible and cannot be migrated.
-* util: fix-owner now uses Promises instead of callbacks
-* index: Previously-generated index entries are no longer compatible and the index must be regenerated.
-* index: The index format has changed and previous caches are no longer compatible. Existing caches will need to be regenerated.
-* hashes: Default hashAlgorithm changed from sha1 to sha512. If you
-rely on the prior setting, pass `opts.hashAlgorithm` in explicitly.
-* content: Previously-generated content directories are no longer compatible
-and must be regenerated.
-* verify: API is now promise-based
-* read: Switches to a Promise-based API and removes callback stuff
-* rm: Switches to a Promise-based API and removes callback stuff
-* index: this changes the API to work off promises instead of callbacks
-* api: this means we are going all in on promises now
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/LICENSE.md b/deps/npm/node_modules/npm-profile/node_modules/cacache/LICENSE.md
deleted file mode 100644
index 8d28acf866..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/LICENSE.md
+++ /dev/null
@@ -1,16 +0,0 @@
-ISC License
-
-Copyright (c) npm, Inc.
-
-Permission to use, copy, modify, and/or distribute this software for
-any purpose with or without fee is hereby granted, provided that the
-above copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER DISCLAIMS
-ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
-COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
-OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
-USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/README.es.md b/deps/npm/node_modules/npm-profile/node_modules/cacache/README.es.md
deleted file mode 100644
index 783a0a19b0..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/README.es.md
+++ /dev/null
@@ -1,628 +0,0 @@
-# cacache [![npm version](https://img.shields.io/npm/v/cacache.svg)](https://npm.im/cacache) [![license](https://img.shields.io/npm/l/cacache.svg)](https://npm.im/cacache) [![Travis](https://img.shields.io/travis/zkat/cacache.svg)](https://travis-ci.org/zkat/cacache) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/cacache?svg=true)](https://ci.appveyor.com/project/zkat/cacache) [![Coverage Status](https://coveralls.io/repos/github/zkat/cacache/badge.svg?branch=latest)](https://coveralls.io/github/zkat/cacache?branch=latest)
-
-[`cacache`](https://github.com/zkat/cacache) es una librería de Node.js para
-manejar caches locales en disco, con acceso tanto con claves únicas como
-direcciones de contenido (hashes/hacheos). Es súper rápida, excelente con el
-acceso concurrente, y jamás te dará datos incorrectos, aún si se corrompen o
-manipulan directamente los ficheros del cache.
-
-El propósito original era reemplazar el caché local de
-[npm](https://npm.im/npm), pero se puede usar por su propia cuenta.
-
-_Traducciones: [English](README.md)_
-
-## Instalación
-
-`$ npm install --save cacache`
-
-## Índice
-
-* [Ejemplo](#ejemplo)
-* [Características](#características)
-* [Cómo Contribuir](#cómo-contribuir)
-* [API](#api)
- * [Usando el API en español](#localized-api)
- * Leer
- * [`ls`](#ls)
- * [`ls.flujo`](#ls-stream)
- * [`saca`](#get-data)
- * [`saca.flujo`](#get-stream)
- * [`saca.info`](#get-info)
- * [`saca.tieneDatos`](#get-hasContent)
- * Escribir
- * [`mete`](#put-data)
- * [`mete.flujo`](#put-stream)
- * [opciones para `mete*`](#put-options)
- * [`rm.todo`](#rm-all)
- * [`rm.entrada`](#rm-entry)
- * [`rm.datos`](#rm-content)
- * Utilidades
- * [`ponLenguaje`](#set-locale)
- * [`limpiaMemoizado`](#clear-memoized)
- * [`tmp.hazdir`](#tmp-mkdir)
- * [`tmp.conTmp`](#with-tmp)
- * Integridad
- * [Subresource Integrity](#integrity)
- * [`verifica`](#verify)
- * [`verifica.ultimaVez`](#verify-last-run)
-
-### Ejemplo
-
-```javascript
-const cacache = require('cacache/es')
-const fs = require('fs')
-
-const tarbol = '/ruta/a/mi-tar.tgz'
-const rutaCache = '/tmp/my-toy-cache'
-const clave = 'mi-clave-única-1234'
-
-// ¡Añádelo al caché! Usa `rutaCache` como raíz del caché.
-cacache.mete(rutaCache, clave, '10293801983029384').then(integrity => {
- console.log(`Saved content to ${rutaCache}.`)
-})
-
-const destino = '/tmp/mytar.tgz'
-
-// Copia el contenido del caché a otro fichero, pero esta vez con flujos.
-cacache.saca.flujo(
- rutaCache, clave
-).pipe(
- fs.createWriteStream(destino)
-).on('finish', () => {
- console.log('extracción completada')
-})
-
-// La misma cosa, pero accesando el contenido directamente, sin tocar el índice.
-cacache.saca.porHacheo(rutaCache, integridad).then(datos => {
- fs.writeFile(destino, datos, err => {
- console.log('datos del tarbol sacados basado en su sha512, y escrito a otro fichero')
- })
-})
-```
-
-### Características
-
-* Extracción por clave o por dirección de contenido (shasum, etc)
-* Usa el estándard de web, [Subresource Integrity](#integrity)
-* Compatible con multiples algoritmos - usa sha1, sha512, etc, en el mismo caché sin problema
-* Entradas con contenido idéntico comparten ficheros
-* Tolerancia de fallas (inmune a corrupción, ficheros parciales, carreras de proceso, etc)
-* Verificación completa de datos cuando (escribiendo y leyendo)
-* Concurrencia rápida, segura y "lockless"
-* Compatible con `stream`s (flujos)
-* Compatible con `Promise`s (promesas)
-* Bastante rápida -- acceso, incluyendo verificación, en microsegundos
-* Almacenaje de metadatos arbitrarios
-* Colección de basura y verificación adicional fuera de banda
-* Cobertura rigurosa de pruebas
-* Probablente hay un "Bloom filter" por ahí en algún lado. Eso le mola a la gente, ¿Verdad? 🤔
-
-### Cómo Contribuir
-
-El equipo de cacache felizmente acepta contribuciones de código y otras maneras de participación. ¡Hay muchas formas diferentes de contribuir! La [Guía de Colaboradores](CONTRIBUTING.md) (en inglés) tiene toda la información que necesitas para cualquier tipo de contribución: todo desde cómo reportar errores hasta cómo someter parches con nuevas características. Con todo y eso, no se preocupe por si lo que haces está exáctamente correcto: no hay ningún problema en hacer preguntas si algo no está claro, o no lo encuentras.
-
-El equipo de cacache tiene miembros hispanohablantes: es completamente aceptable crear `issues` y `pull requests` en español/castellano.
-
-Todos los participantes en este proyecto deben obedecer el [Código de Conducta](CODE_OF_CONDUCT.md) (en inglés), y en general actuar de forma amable y respetuosa mientras participan en esta comunidad.
-
-Por favor refiérase al [Historial de Cambios](CHANGELOG.md) (en inglés) para detalles sobre cambios importantes incluídos en cada versión.
-
-Finalmente, cacache tiene un sistema de localización de lenguaje. Si te interesa añadir lenguajes o mejorar los que existen, mira en el directorio `./locales` para comenzar.
-
-Happy hacking!
-
-### API
-
-#### <a name="localized-api"></a> Usando el API en español
-
-cacache incluye una traducción completa de su API al castellano, con las mismas
-características. Para usar el API como está documentado en este documento, usa
-`require('cacache/es')`
-
-cacache también tiene otros lenguajes: encuéntralos bajo `./locales`, y podrás
-usar el API en ese lenguaje con `require('cacache/<lenguaje>')`
-
-#### <a name="ls"></a> `> cacache.ls(cache) -> Promise<Object>`
-
-Enumera todas las entradas en el caché, dentro de un solo objeto. Cada entrada
-en el objeto tendrá como clave la clave única usada para el índice, el valor
-siendo un objeto de [`saca.info`](#get-info).
-
-##### Ejemplo
-
-```javascript
-cacache.ls(rutaCache).then(console.log)
-// Salida
-{
- 'my-thing': {
- key: 'my-thing',
- integrity: 'sha512-BaSe64/EnCoDED+HAsh=='
- path: '.testcache/content/deadbeef', // unido con `rutaCache`
- time: 12345698490,
- size: 4023948,
- metadata: {
- name: 'blah',
- version: '1.2.3',
- description: 'this was once a package but now it is my-thing'
- }
- },
- 'other-thing': {
- key: 'other-thing',
- integrity: 'sha1-ANothER+hasH=',
- path: '.testcache/content/bada55',
- time: 11992309289,
- size: 111112
- }
-}
-```
-
-#### <a name="ls-stream"></a> `> cacache.ls.flujo(cache) -> Readable`
-
-Enumera todas las entradas en el caché, emitiendo un objeto de
-[`saca.info`](#get-info) por cada evento de `data` en el flujo.
-
-##### Ejemplo
-
-```javascript
-cacache.ls.flujo(rutaCache).on('data', console.log)
-// Salida
-{
- key: 'my-thing',
- integrity: 'sha512-BaSe64HaSh',
- path: '.testcache/content/deadbeef', // unido con `rutaCache`
- time: 12345698490,
- size: 13423,
- metadata: {
- name: 'blah',
- version: '1.2.3',
- description: 'this was once a package but now it is my-thing'
- }
-}
-
-{
- key: 'other-thing',
- integrity: 'whirlpool-WoWSoMuchSupport',
- path: '.testcache/content/bada55',
- time: 11992309289,
- size: 498023984029
-}
-
-{
- ...
-}
-```
-
-#### <a name="get-data"></a> `> cacache.saca(cache, clave, [ops]) -> Promise({data, metadata, integrity})`
-
-Devuelve un objeto con los datos, hacheo de integridad y metadatos identificados
-por la `clave`. La propiedad `data` de este objeto será una instancia de
-`Buffer` con los datos almacenados en el caché. to do with it! cacache just
-won't care.
-
-`integrity` es un `string` de [Subresource Integrity](#integrity). Dígase, un
-`string` que puede ser usado para verificar a la `data`, que tiene como formato
-`<algoritmo>-<hacheo-integridad-base64>`.
-
-So no existe ninguna entrada identificada por `clave`, o se los datos
-almacenados localmente fallan verificación, el `Promise` fallará.
-
-Una sub-función, `saca.porHacheo`, tiene casi el mismo comportamiento, excepto
-que busca entradas usando el hacheo de integridad, sin tocar el índice general.
-Esta versión *sólo* devuelve `data`, sin ningún objeto conteniéndola.
-
-##### Nota
-
-Esta función lee la entrada completa a la memoria antes de devolverla. Si estás
-almacenando datos Muy Grandes, es posible que [`saca.flujo`](#get-stream) sea
-una mejor solución.
-
-##### Ejemplo
-
-```javascript
-// Busca por clave
-cache.saca(rutaCache, 'my-thing').then(console.log)
-// Salida:
-{
- metadata: {
- thingName: 'my'
- },
- integrity: 'sha512-BaSe64HaSh',
- data: Buffer#<deadbeef>,
- size: 9320
-}
-
-// Busca por hacheo
-cache.saca.porHacheo(rutaCache, 'sha512-BaSe64HaSh').then(console.log)
-// Salida:
-Buffer#<deadbeef>
-```
-
-#### <a name="get-stream"></a> `> cacache.saca.flujo(cache, clave, [ops]) -> Readable`
-
-Devuelve un [Readable
-Stream](https://nodejs.org/api/stream.html#stream_readable_streams) de los datos
-almacenados bajo `clave`.
-
-So no existe ninguna entrada identificada por `clave`, o se los datos
-almacenados localmente fallan verificación, el `Promise` fallará.
-
-`metadata` y `integrity` serán emitidos como eventos antes de que el flujo
-cierre.
-
-Una sub-función, `saca.flujo.porHacheo`, tiene casi el mismo comportamiento,
-excepto que busca entradas usando el hacheo de integridad, sin tocar el índice
-general. Esta versión no emite eventos de `metadata` o `integrity`.
-
-##### Ejemplo
-
-```javascript
-// Busca por clave
-cache.saca.flujo(
- rutaCache, 'my-thing'
-).on('metadata', metadata => {
- console.log('metadata:', metadata)
-}).on('integrity', integrity => {
- console.log('integrity:', integrity)
-}).pipe(
- fs.createWriteStream('./x.tgz')
-)
-// Salidas:
-metadata: { ... }
-integrity: 'sha512-SoMeDIGest+64=='
-
-// Busca por hacheo
-cache.saca.flujo.porHacheo(
- rutaCache, 'sha512-SoMeDIGest+64=='
-).pipe(
- fs.createWriteStream('./x.tgz')
-)
-```
-
-#### <a name="get-info"></a> `> cacache.saca.info(cache, clave) -> Promise`
-
-Busca la `clave` en el índice del caché, devolviendo información sobre la
-entrada si existe.
-
-##### Campos
-
-* `key` - Clave de la entrada. Igual al argumento `clave`.
-* `integrity` - [hacheo de Subresource Integrity](#integrity) del contenido al que se refiere esta entrada.
-* `path` - Dirección del fichero de datos almacenados, relativa al argumento `cache`.
-* `time` - Hora de creación de la entrada
-* `metadata` - Metadatos asignados a esta entrada por el usuario
-
-##### Ejemplo
-
-```javascript
-cacache.saca.info(rutaCache, 'my-thing').then(console.log)
-
-// Salida
-{
- key: 'my-thing',
- integrity: 'sha256-MUSTVERIFY+ALL/THINGS=='
- path: '.testcache/content/deadbeef',
- time: 12345698490,
- size: 849234,
- metadata: {
- name: 'blah',
- version: '1.2.3',
- description: 'this was once a package but now it is my-thing'
- }
-}
-```
-
-#### <a name="get-hasContent"></a> `> cacache.saca.tieneDatos(cache, integrity) -> Promise`
-
-Busca un [hacheo Subresource Integrity](#integrity) en el caché. Si existe el
-contenido asociado con `integrity`, devuelve un objeto con dos campos: el hacheo
-_específico_ que se usó para la búsqueda, `sri`, y el tamaño total del
-contenido, `size`. Si no existe ningún contenido asociado con `integrity`,
-devuelve `false`.
-
-##### Ejemplo
-
-```javascript
-cacache.saca.tieneDatos(rutaCache, 'sha256-MUSTVERIFY+ALL/THINGS==').then(console.log)
-
-// Salida
-{
- sri: {
- source: 'sha256-MUSTVERIFY+ALL/THINGS==',
- algorithm: 'sha256',
- digest: 'MUSTVERIFY+ALL/THINGS==',
- options: []
- },
- size: 9001
-}
-
-cacache.saca.tieneDatos(rutaCache, 'sha521-NOT+IN/CACHE==').then(console.log)
-
-// Salida
-false
-```
-
-#### <a name="put-data"></a> `> cacache.mete(cache, clave, datos, [ops]) -> Promise`
-
-Inserta `datos` en el caché. El `Promise` devuelto se resuelve con un hacheo
-(generado conforme a [`ops.algorithms`](#optsalgorithms)) después que la entrada
-haya sido escrita en completo.
-
-##### Ejemplo
-
-```javascript
-fetch(
- 'https://registry.npmjs.org/cacache/-/cacache-1.0.0.tgz'
-).then(datos => {
- return cacache.mete(rutaCache, 'registry.npmjs.org|cacache@1.0.0', datos)
-}).then(integridad => {
- console.log('el hacheo de integridad es', integridad)
-})
-```
-
-#### <a name="put-stream"></a> `> cacache.mete.flujo(cache, clave, [ops]) -> Writable`
-
-Devuelve un [Writable
-Stream](https://nodejs.org/api/stream.html#stream_writable_streams) que inserta
-al caché los datos escritos a él. Emite un evento `integrity` con el hacheo del
-contenido escrito, cuando completa.
-
-##### Ejemplo
-
-```javascript
-request.get(
- 'https://registry.npmjs.org/cacache/-/cacache-1.0.0.tgz'
-).pipe(
- cacache.mete.flujo(
- rutaCache, 'registry.npmjs.org|cacache@1.0.0'
- ).on('integrity', d => console.log(`integrity digest is ${d}`))
-)
-```
-
-#### <a name="put-options"></a> `> opciones para cacache.mete`
-
-La funciones `cacache.mete` tienen un número de opciones en común.
-
-##### `ops.metadata`
-
-Metadatos del usuario que se almacenarán con la entrada.
-
-##### `ops.size`
-
-El tamaño declarado de los datos que se van a insertar. Si es proveído, cacache
-verificará que los datos escritos sean de ese tamaño, o si no, fallará con un
-error con código `EBADSIZE`.
-
-##### `ops.integrity`
-
-El hacheo de integridad de los datos siendo escritos.
-
-Si es proveído, y los datos escritos no le corresponden, la operación fallará
-con un error con código `EINTEGRITY`.
-
-`ops.algorithms` no tiene ningún efecto si esta opción está presente.
-
-##### `ops.algorithms`
-
-Por Defecto: `['sha512']`
-
-Algoritmos que se deben usar cuando se calcule el hacheo de [subresource
-integrity](#integrity) para los datos insertados. Puede usar cualquier algoritmo
-enumerado en `crypto.getHashes()`.
-
-Por el momento, sólo se acepta un algoritmo (dígase, un array con exáctamente un
-valor). No tiene ningún efecto si `ops.integrity` también ha sido proveido.
-
-##### `ops.uid`/`ops.gid`
-
-Si están presentes, cacache hará todo lo posible para asegurarse que todos los
-ficheros creados en el proceso de sus operaciones en el caché usen esta
-combinación en particular.
-
-##### `ops.memoize`
-
-Por Defecto: `null`
-
-Si es verdad, cacache tratará de memoizar los datos de la entrada en memoria. La
-próxima vez que el proceso corriente trate de accesar los datos o entrada,
-cacache buscará en memoria antes de buscar en disco.
-
-Si `ops.memoize` es un objeto regular o un objeto como `Map` (es decir, un
-objeto con métodos `get()` y `set()`), este objeto en sí sera usado en vez del
-caché de memoria global. Esto permite tener lógica específica a tu aplicación
-encuanto al almacenaje en memoria de tus datos.
-
-Si quieres asegurarte que los datos se lean del disco en vez de memoria, usa
-`memoize: false` cuando uses funciones de `cacache.saca`.
-
-#### <a name="rm-all"></a> `> cacache.rm.todo(cache) -> Promise`
-
-Borra el caché completo, incluyendo ficheros temporeros, ficheros de datos, y el
-índice del caché.
-
-##### Ejemplo
-
-```javascript
-cacache.rm.todo(rutaCache).then(() => {
- console.log('THE APOCALYPSE IS UPON US 😱')
-})
-```
-
-#### <a name="rm-entry"></a> `> cacache.rm.entrada(cache, clave) -> Promise`
-
-Alias: `cacache.rm`
-
-Borra la entrada `clave` del índuce. El contenido asociado con esta entrada
-seguirá siendo accesible por hacheo usando
-[`saca.flujo.porHacheo`](#get-stream).
-
-Para borrar el contenido en sí, usa [`rm.datos`](#rm-content). Si quieres hacer
-esto de manera más segura (pues ficheros de contenido pueden ser usados por
-multiples entradas), usa [`verifica`](#verify) para borrar huérfanos.
-
-##### Ejemplo
-
-```javascript
-cacache.rm.entrada(rutaCache, 'my-thing').then(() => {
- console.log('I did not like it anyway')
-})
-```
-
-#### <a name="rm-content"></a> `> cacache.rm.datos(cache, integrity) -> Promise`
-
-Borra el contenido identificado por `integrity`. Cualquier entrada que se
-refiera a este contenido quedarán huérfanas y se invalidarán si se tratan de
-accesar, al menos que contenido idéntico sea añadido bajo `integrity`.
-
-##### Ejemplo
-
-```javascript
-cacache.rm.datos(rutaCache, 'sha512-SoMeDIGest/IN+BaSE64==').then(() => {
- console.log('los datos para `mi-cosa` se borraron')
-})
-```
-
-#### <a name="set-locale"></a> `> cacache.ponLenguaje(locale)`
-
-Configura el lenguaje usado para mensajes y errores de cacache. La lista de
-lenguajes disponibles está en el directorio `./locales` del proyecto.
-
-_Te interesa añadir más lenguajes? [Somete un PR](CONTRIBUTING.md)!_
-
-#### <a name="clear-memoized"></a> `> cacache.limpiaMemoizado()`
-
-Completamente reinicializa el caché de memoria interno. Si estás usando tu
-propio objecto con `ops.memoize`, debes hacer esto de manera específica a él.
-
-#### <a name="tmp-mkdir"></a> `> tmp.hazdir(cache, ops) -> Promise<Path>`
-
-Alias: `tmp.mkdir`
-
-Devuelve un directorio único dentro del directorio `tmp` del caché.
-
-Una vez tengas el directorio, es responsabilidad tuya asegurarte que todos los
-ficheros escrito a él sean creados usando los permisos y `uid`/`gid` concordante
-con el caché. Si no, puedes pedirle a cacache que lo haga llamando a
-[`cacache.tmp.fix()`](#tmp-fix). Esta función arreglará todos los permisos en el
-directorio tmp.
-
-Si quieres que cacache limpie el directorio automáticamente cuando termines, usa
-[`cacache.tmp.conTmp()`](#with-tpm).
-
-##### Ejemplo
-
-```javascript
-cacache.tmp.mkdir(cache).then(dir => {
- fs.writeFile(path.join(dir, 'blablabla'), Buffer#<1234>, ...)
-})
-```
-
-#### <a name="with-tmp"></a> `> tmp.conTmp(cache, ops, cb) -> Promise`
-
-Crea un directorio temporero con [`tmp.mkdir()`](#tmp-mkdir) y ejecuta `cb` con
-él como primer argumento. El directorio creado será removido automáticamente
-cuando el valor devolvido por `cb()` se resuelva.
-
-Las mismas advertencias aplican en cuanto a manejando permisos para los ficheros
-dentro del directorio.
-
-##### Ejemplo
-
-```javascript
-cacache.tmp.conTmp(cache, dir => {
- return fs.writeFileAsync(path.join(dir, 'blablabla'), Buffer#<1234>, ...)
-}).then(() => {
- // `dir` no longer exists
-})
-```
-
-#### <a name="integrity"></a> Hacheos de Subresource Integrity
-
-cacache usa strings que siguen la especificación de [Subresource Integrity
-spec](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity).
-
-Es decir, donde quiera cacache espera un argumento o opción `integrity`, ese
-string debería usar el formato `<algoritmo>-<hacheo-base64>`.
-
-Una variación importante sobre los hacheos que cacache acepta es que acepta el
-nombre de cualquier algoritmo aceptado por el proceso de Node.js donde se usa.
-Puedes usar `crypto.getHashes()` para ver cuales están disponibles.
-
-##### Generando tus propios hacheos
-
-Si tienes un `shasum`, en general va a estar en formato de string hexadecimal
-(es decir, un `sha1` se vería como algo así:
-`5f5513f8822fdbe5145af33b64d8d970dcf95c6e`).
-
-Para ser compatible con cacache, necesitas convertir esto a su equivalente en
-subresource integrity. Por ejemplo, el hacheo correspondiente al ejemplo
-anterior sería: `sha1-X1UT+IIv2+UUWvM7ZNjZcNz5XG4=`.
-
-Puedes usar código así para generarlo por tu cuenta:
-
-```javascript
-const crypto = require('crypto')
-const algoritmo = 'sha512'
-const datos = 'foobarbaz'
-
-const integrity = (
- algorithm +
- '-' +
- crypto.createHash(algoritmo).update(datos).digest('base64')
-)
-```
-
-También puedes usar [`ssri`](https://npm.im/ssri) para deferir el trabajo a otra
-librería que garantiza que todo esté correcto, pues maneja probablemente todas
-las operaciones que tendrías que hacer con SRIs, incluyendo convirtiendo entre
-hexadecimal y el formato SRI.
-
-#### <a name="verify"></a> `> cacache.verifica(cache, ops) -> Promise`
-
-Examina y arregla tu caché:
-
-* Limpia entradas inválidas, huérfanas y corrompidas
-* Te deja filtrar cuales entradas retener, con tu propio filtro
-* Reclama cualquier ficheros de contenido sin referencias en el índice
-* Verifica integridad de todos los ficheros de contenido y remueve los malos
-* Arregla permisos del caché
-* Remieve el directorio `tmp` en el caché, y todo su contenido.
-
-Cuando termine, devuelve un objeto con varias estadísticas sobre el proceso de
-verificación, por ejemplo la cantidad de espacio de disco reclamado, el número
-de entradas válidas, número de entradas removidas, etc.
-
-##### Opciones
-
-* `ops.uid` - uid para asignarle al caché y su contenido
-* `ops.gid` - gid para asignarle al caché y su contenido
-* `ops.filter` - recibe una entrada como argumento. Devuelve falso para removerla. Nota: es posible que esta función sea invocada con la misma entrada más de una vez.
-
-##### Example
-
-```sh
-echo somegarbage >> $RUTACACHE/content/deadbeef
-```
-
-```javascript
-cacache.verifica(rutaCache).then(stats => {
- // deadbeef collected, because of invalid checksum.
- console.log('cache is much nicer now! stats:', stats)
-})
-```
-
-#### <a name="verify-last-run"></a> `> cacache.verifica.ultimaVez(cache) -> Promise`
-
-Alias: `últimaVez`
-
-Devuelve un `Date` que representa la última vez que `cacache.verifica` fue
-ejecutada en `cache`.
-
-##### Example
-
-```javascript
-cacache.verifica(rutaCache).then(() => {
- cacache.verifica.ultimaVez(rutaCache).then(última => {
- console.log('La última vez que se usó cacache.verifica() fue ' + última)
- })
-})
-```
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/README.md b/deps/npm/node_modules/npm-profile/node_modules/cacache/README.md
deleted file mode 100644
index 4b284588a6..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/README.md
+++ /dev/null
@@ -1,624 +0,0 @@
-# cacache [![npm version](https://img.shields.io/npm/v/cacache.svg)](https://npm.im/cacache) [![license](https://img.shields.io/npm/l/cacache.svg)](https://npm.im/cacache) [![Travis](https://img.shields.io/travis/zkat/cacache.svg)](https://travis-ci.org/zkat/cacache) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/cacache?svg=true)](https://ci.appveyor.com/project/zkat/cacache) [![Coverage Status](https://coveralls.io/repos/github/zkat/cacache/badge.svg?branch=latest)](https://coveralls.io/github/zkat/cacache?branch=latest)
-
-[`cacache`](https://github.com/zkat/cacache) is a Node.js library for managing
-local key and content address caches. It's really fast, really good at
-concurrency, and it will never give you corrupted data, even if cache files
-get corrupted or manipulated.
-
-It was originally written to be used as [npm](https://npm.im)'s local cache, but
-can just as easily be used on its own.
-
-_Translations: [español](README.es.md)_
-
-## Install
-
-`$ npm install --save cacache`
-
-## Table of Contents
-
-* [Example](#example)
-* [Features](#features)
-* [Contributing](#contributing)
-* [API](#api)
- * [Using localized APIs](#localized-api)
- * Reading
- * [`ls`](#ls)
- * [`ls.stream`](#ls-stream)
- * [`get`](#get-data)
- * [`get.stream`](#get-stream)
- * [`get.info`](#get-info)
- * [`get.hasContent`](#get-hasContent)
- * Writing
- * [`put`](#put-data)
- * [`put.stream`](#put-stream)
- * [`put*` opts](#put-options)
- * [`rm.all`](#rm-all)
- * [`rm.entry`](#rm-entry)
- * [`rm.content`](#rm-content)
- * Utilities
- * [`setLocale`](#set-locale)
- * [`clearMemoized`](#clear-memoized)
- * [`tmp.mkdir`](#tmp-mkdir)
- * [`tmp.withTmp`](#with-tmp)
- * Integrity
- * [Subresource Integrity](#integrity)
- * [`verify`](#verify)
- * [`verify.lastRun`](#verify-last-run)
-
-### Example
-
-```javascript
-const cacache = require('cacache/en')
-const fs = require('fs')
-
-const tarball = '/path/to/mytar.tgz'
-const cachePath = '/tmp/my-toy-cache'
-const key = 'my-unique-key-1234'
-
-// Cache it! Use `cachePath` as the root of the content cache
-cacache.put(cachePath, key, '10293801983029384').then(integrity => {
- console.log(`Saved content to ${cachePath}.`)
-})
-
-const destination = '/tmp/mytar.tgz'
-
-// Copy the contents out of the cache and into their destination!
-// But this time, use stream instead!
-cacache.get.stream(
- cachePath, key
-).pipe(
- fs.createWriteStream(destination)
-).on('finish', () => {
- console.log('done extracting!')
-})
-
-// The same thing, but skip the key index.
-cacache.get.byDigest(cachePath, integrityHash).then(data => {
- fs.writeFile(destination, data, err => {
- console.log('tarball data fetched based on its sha512sum and written out!')
- })
-})
-```
-
-### Features
-
-* Extraction by key or by content address (shasum, etc)
-* [Subresource Integrity](#integrity) web standard support
-* Multi-hash support - safely host sha1, sha512, etc, in a single cache
-* Automatic content deduplication
-* Fault tolerance (immune to corruption, partial writes, process races, etc)
-* Consistency guarantees on read and write (full data verification)
-* Lockless, high-concurrency cache access
-* Streaming support
-* Promise support
-* Pretty darn fast -- sub-millisecond reads and writes including verification
-* Arbitrary metadata storage
-* Garbage collection and additional offline verification
-* Thorough test coverage
-* There's probably a bloom filter in there somewhere. Those are cool, right? 🤔
-
-### Contributing
-
-The cacache team enthusiastically welcomes contributions and project participation! There's a bunch of things you can do if you want to contribute! The [Contributor Guide](CONTRIBUTING.md) has all the information you need for everything from reporting bugs to contributing entire new features. Please don't hesitate to jump in if you'd like to, or even ask us questions if something isn't clear.
-
-All participants and maintainers in this project are expected to follow [Code of Conduct](CODE_OF_CONDUCT.md), and just generally be excellent to each other.
-
-Please refer to the [Changelog](CHANGELOG.md) for project history details, too.
-
-Happy hacking!
-
-### API
-
-#### <a name="localized-api"></a> Using localized APIs
-
-cacache includes a complete API in English, with the same features as other
-translations. To use the English API as documented in this README, use
-`require('cacache/en')`. This is also currently the default if you do
-`require('cacache')`, but may change in the future.
-
-cacache also supports other languages! You can find the list of currently
-supported ones by looking in `./locales` in the source directory. You can use
-the API in that language with `require('cacache/<lang>')`.
-
-Want to add support for a new language? Please go ahead! You should be able to
-copy `./locales/en.js` and `./locales/en.json` and fill them in. Translating the
-`README.md` is a bit more work, but also appreciated if you get around to it. 👍🏼
-
-#### <a name="ls"></a> `> cacache.ls(cache) -> Promise<Object>`
-
-Lists info for all entries currently in the cache as a single large object. Each
-entry in the object will be keyed by the unique index key, with corresponding
-[`get.info`](#get-info) objects as the values.
-
-##### Example
-
-```javascript
-cacache.ls(cachePath).then(console.log)
-// Output
-{
- 'my-thing': {
- key: 'my-thing',
- integrity: 'sha512-BaSe64/EnCoDED+HAsh=='
- path: '.testcache/content/deadbeef', // joined with `cachePath`
- time: 12345698490,
- size: 4023948,
- metadata: {
- name: 'blah',
- version: '1.2.3',
- description: 'this was once a package but now it is my-thing'
- }
- },
- 'other-thing': {
- key: 'other-thing',
- integrity: 'sha1-ANothER+hasH=',
- path: '.testcache/content/bada55',
- time: 11992309289,
- size: 111112
- }
-}
-```
-
-#### <a name="ls-stream"></a> `> cacache.ls.stream(cache) -> Readable`
-
-Lists info for all entries currently in the cache as a single large object.
-
-This works just like [`ls`](#ls), except [`get.info`](#get-info) entries are
-returned as `'data'` events on the returned stream.
-
-##### Example
-
-```javascript
-cacache.ls.stream(cachePath).on('data', console.log)
-// Output
-{
- key: 'my-thing',
- integrity: 'sha512-BaSe64HaSh',
- path: '.testcache/content/deadbeef', // joined with `cachePath`
- time: 12345698490,
- size: 13423,
- metadata: {
- name: 'blah',
- version: '1.2.3',
- description: 'this was once a package but now it is my-thing'
- }
-}
-
-{
- key: 'other-thing',
- integrity: 'whirlpool-WoWSoMuchSupport',
- path: '.testcache/content/bada55',
- time: 11992309289,
- size: 498023984029
-}
-
-{
- ...
-}
-```
-
-#### <a name="get-data"></a> `> cacache.get(cache, key, [opts]) -> Promise({data, metadata, integrity})`
-
-Returns an object with the cached data, digest, and metadata identified by
-`key`. The `data` property of this object will be a `Buffer` instance that
-presumably holds some data that means something to you. I'm sure you know what
-to do with it! cacache just won't care.
-
-`integrity` is a [Subresource
-Integrity](#integrity)
-string. That is, a string that can be used to verify `data`, which looks like
-`<hash-algorithm>-<base64-integrity-hash>`.
-
-If there is no content identified by `key`, or if the locally-stored data does
-not pass the validity checksum, the promise will be rejected.
-
-A sub-function, `get.byDigest` may be used for identical behavior, except lookup
-will happen by integrity hash, bypassing the index entirely. This version of the
-function *only* returns `data` itself, without any wrapper.
-
-##### Note
-
-This function loads the entire cache entry into memory before returning it. If
-you're dealing with Very Large data, consider using [`get.stream`](#get-stream)
-instead.
-
-##### Example
-
-```javascript
-// Look up by key
-cache.get(cachePath, 'my-thing').then(console.log)
-// Output:
-{
- metadata: {
- thingName: 'my'
- },
- integrity: 'sha512-BaSe64HaSh',
- data: Buffer#<deadbeef>,
- size: 9320
-}
-
-// Look up by digest
-cache.get.byDigest(cachePath, 'sha512-BaSe64HaSh').then(console.log)
-// Output:
-Buffer#<deadbeef>
-```
-
-#### <a name="get-stream"></a> `> cacache.get.stream(cache, key, [opts]) -> Readable`
-
-Returns a [Readable Stream](https://nodejs.org/api/stream.html#stream_readable_streams) of the cached data identified by `key`.
-
-If there is no content identified by `key`, or if the locally-stored data does
-not pass the validity checksum, an error will be emitted.
-
-`metadata` and `integrity` events will be emitted before the stream closes, if
-you need to collect that extra data about the cached entry.
-
-A sub-function, `get.stream.byDigest` may be used for identical behavior,
-except lookup will happen by integrity hash, bypassing the index entirely. This
-version does not emit the `metadata` and `integrity` events at all.
-
-##### Example
-
-```javascript
-// Look up by key
-cache.get.stream(
- cachePath, 'my-thing'
-).on('metadata', metadata => {
- console.log('metadata:', metadata)
-}).on('integrity', integrity => {
- console.log('integrity:', integrity)
-}).pipe(
- fs.createWriteStream('./x.tgz')
-)
-// Outputs:
-metadata: { ... }
-integrity: 'sha512-SoMeDIGest+64=='
-
-// Look up by digest
-cache.get.stream.byDigest(
- cachePath, 'sha512-SoMeDIGest+64=='
-).pipe(
- fs.createWriteStream('./x.tgz')
-)
-```
-
-#### <a name="get-info"></a> `> cacache.get.info(cache, key) -> Promise`
-
-Looks up `key` in the cache index, returning information about the entry if
-one exists.
-
-##### Fields
-
-* `key` - Key the entry was looked up under. Matches the `key` argument.
-* `integrity` - [Subresource Integrity hash](#integrity) for the content this entry refers to.
-* `path` - Filesystem path relative to `cache` argument where content is stored.
-* `time` - Timestamp the entry was first added on.
-* `metadata` - User-assigned metadata associated with the entry/content.
-
-##### Example
-
-```javascript
-cacache.get.info(cachePath, 'my-thing').then(console.log)
-
-// Output
-{
- key: 'my-thing',
- integrity: 'sha256-MUSTVERIFY+ALL/THINGS=='
- path: '.testcache/content/deadbeef',
- time: 12345698490,
- size: 849234,
- metadata: {
- name: 'blah',
- version: '1.2.3',
- description: 'this was once a package but now it is my-thing'
- }
-}
-```
-
-#### <a name="get-hasContent"></a> `> cacache.get.hasContent(cache, integrity) -> Promise`
-
-Looks up a [Subresource Integrity hash](#integrity) in the cache. If content
-exists for this `integrity`, it will return an object, with the specific single integrity hash
-that was found in `sri` key, and the size of the found content as `size`. If no content exists for this integrity, it will return `false`.
-
-##### Example
-
-```javascript
-cacache.get.hasContent(cachePath, 'sha256-MUSTVERIFY+ALL/THINGS==').then(console.log)
-
-// Output
-{
- sri: {
- source: 'sha256-MUSTVERIFY+ALL/THINGS==',
- algorithm: 'sha256',
- digest: 'MUSTVERIFY+ALL/THINGS==',
- options: []
- },
- size: 9001
-}
-
-cacache.get.hasContent(cachePath, 'sha521-NOT+IN/CACHE==').then(console.log)
-
-// Output
-false
-```
-
-#### <a name="put-data"></a> `> cacache.put(cache, key, data, [opts]) -> Promise`
-
-Inserts data passed to it into the cache. The returned Promise resolves with a
-digest (generated according to [`opts.algorithms`](#optsalgorithms)) after the
-cache entry has been successfully written.
-
-##### Example
-
-```javascript
-fetch(
- 'https://registry.npmjs.org/cacache/-/cacache-1.0.0.tgz'
-).then(data => {
- return cacache.put(cachePath, 'registry.npmjs.org|cacache@1.0.0', data)
-}).then(integrity => {
- console.log('integrity hash is', integrity)
-})
-```
-
-#### <a name="put-stream"></a> `> cacache.put.stream(cache, key, [opts]) -> Writable`
-
-Returns a [Writable
-Stream](https://nodejs.org/api/stream.html#stream_writable_streams) that inserts
-data written to it into the cache. Emits an `integrity` event with the digest of
-written contents when it succeeds.
-
-##### Example
-
-```javascript
-request.get(
- 'https://registry.npmjs.org/cacache/-/cacache-1.0.0.tgz'
-).pipe(
- cacache.put.stream(
- cachePath, 'registry.npmjs.org|cacache@1.0.0'
- ).on('integrity', d => console.log(`integrity digest is ${d}`))
-)
-```
-
-#### <a name="put-options"></a> `> cacache.put options`
-
-`cacache.put` functions have a number of options in common.
-
-##### `opts.metadata`
-
-Arbitrary metadata to be attached to the inserted key.
-
-##### `opts.size`
-
-If provided, the data stream will be verified to check that enough data was
-passed through. If there's more or less data than expected, insertion will fail
-with an `EBADSIZE` error.
-
-##### `opts.integrity`
-
-If present, the pre-calculated digest for the inserted content. If this option
-if provided and does not match the post-insertion digest, insertion will fail
-with an `EINTEGRITY` error.
-
-`algorithms` has no effect if this option is present.
-
-##### `opts.algorithms`
-
-Default: ['sha512']
-
-Hashing algorithms to use when calculating the [subresource integrity
-digest](#integrity)
-for inserted data. Can use any algorithm listed in `crypto.getHashes()` or
-`'omakase'`/`'お任せします'` to pick a random hash algorithm on each insertion. You
-may also use any anagram of `'modnar'` to use this feature.
-
-Currently only supports one algorithm at a time (i.e., an array length of
-exactly `1`). Has no effect if `opts.integrity` is present.
-
-##### `opts.uid`/`opts.gid`
-
-If provided, cacache will do its best to make sure any new files added to the
-cache use this particular `uid`/`gid` combination. This can be used,
-for example, to drop permissions when someone uses `sudo`, but cacache makes
-no assumptions about your needs here.
-
-##### `opts.memoize`
-
-Default: null
-
-If provided, cacache will memoize the given cache insertion in memory, bypassing
-any filesystem checks for that key or digest in future cache fetches. Nothing
-will be written to the in-memory cache unless this option is explicitly truthy.
-
-If `opts.memoize` is an object or a `Map`-like (that is, an object with `get`
-and `set` methods), it will be written to instead of the global memoization
-cache.
-
-Reading from disk data can be forced by explicitly passing `memoize: false` to
-the reader functions, but their default will be to read from memory.
-
-#### <a name="rm-all"></a> `> cacache.rm.all(cache) -> Promise`
-
-Clears the entire cache. Mainly by blowing away the cache directory itself.
-
-##### Example
-
-```javascript
-cacache.rm.all(cachePath).then(() => {
- console.log('THE APOCALYPSE IS UPON US 😱')
-})
-```
-
-#### <a name="rm-entry"></a> `> cacache.rm.entry(cache, key) -> Promise`
-
-Alias: `cacache.rm`
-
-Removes the index entry for `key`. Content will still be accessible if
-requested directly by content address ([`get.stream.byDigest`](#get-stream)).
-
-To remove the content itself (which might still be used by other entries), use
-[`rm.content`](#rm-content). Or, to safely vacuum any unused content, use
-[`verify`](#verify).
-
-##### Example
-
-```javascript
-cacache.rm.entry(cachePath, 'my-thing').then(() => {
- console.log('I did not like it anyway')
-})
-```
-
-#### <a name="rm-content"></a> `> cacache.rm.content(cache, integrity) -> Promise`
-
-Removes the content identified by `integrity`. Any index entries referring to it
-will not be usable again until the content is re-added to the cache with an
-identical digest.
-
-##### Example
-
-```javascript
-cacache.rm.content(cachePath, 'sha512-SoMeDIGest/IN+BaSE64==').then(() => {
- console.log('data for my-thing is gone!')
-})
-```
-
-#### <a name="set-locale"></a> `> cacache.setLocale(locale)`
-
-Configure the language/locale used for messages and errors coming from cacache.
-The list of available locales is in the `./locales` directory in the project
-root.
-
-_Interested in contributing more languages! [Submit a PR](CONTRIBUTING.md)!_
-
-#### <a name="clear-memoized"></a> `> cacache.clearMemoized()`
-
-Completely resets the in-memory entry cache.
-
-#### <a name="tmp-mkdir"></a> `> tmp.mkdir(cache, opts) -> Promise<Path>`
-
-Returns a unique temporary directory inside the cache's `tmp` dir. This
-directory will use the same safe user assignment that all the other stuff use.
-
-Once the directory is made, it's the user's responsibility that all files within
-are made according to the same `opts.gid`/`opts.uid` settings that would be
-passed in. If not, you can ask cacache to do it for you by calling
-[`tmp.fix()`](#tmp-fix), which will fix all tmp directory permissions.
-
-If you want automatic cleanup of this directory, use
-[`tmp.withTmp()`](#with-tpm)
-
-##### Example
-
-```javascript
-cacache.tmp.mkdir(cache).then(dir => {
- fs.writeFile(path.join(dir, 'blablabla'), Buffer#<1234>, ...)
-})
-```
-
-#### <a name="with-tmp"></a> `> tmp.withTmp(cache, opts, cb) -> Promise`
-
-Creates a temporary directory with [`tmp.mkdir()`](#tmp-mkdir) and calls `cb`
-with it. The created temporary directory will be removed when the return value
-of `cb()` resolves -- that is, if you return a Promise from `cb()`, the tmp
-directory will be automatically deleted once that promise completes.
-
-The same caveats apply when it comes to managing permissions for the tmp dir's
-contents.
-
-##### Example
-
-```javascript
-cacache.tmp.withTmp(cache, dir => {
- return fs.writeFileAsync(path.join(dir, 'blablabla'), Buffer#<1234>, ...)
-}).then(() => {
- // `dir` no longer exists
-})
-```
-
-#### <a name="integrity"></a> Subresource Integrity Digests
-
-For content verification and addressing, cacache uses strings following the
-[Subresource
-Integrity spec](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity).
-That is, any time cacache expects an `integrity` argument or option, it
-should be in the format `<hashAlgorithm>-<base64-hash>`.
-
-One deviation from the current spec is that cacache will support any hash
-algorithms supported by the underlying Node.js process. You can use
-`crypto.getHashes()` to see which ones you can use.
-
-##### Generating Digests Yourself
-
-If you have an existing content shasum, they are generally formatted as a
-hexadecimal string (that is, a sha1 would look like:
-`5f5513f8822fdbe5145af33b64d8d970dcf95c6e`). In order to be compatible with
-cacache, you'll need to convert this to an equivalent subresource integrity
-string. For this example, the corresponding hash would be:
-`sha1-X1UT+IIv2+UUWvM7ZNjZcNz5XG4=`.
-
-If you want to generate an integrity string yourself for existing data, you can
-use something like this:
-
-```javascript
-const crypto = require('crypto')
-const hashAlgorithm = 'sha512'
-const data = 'foobarbaz'
-
-const integrity = (
- hashAlgorithm +
- '-' +
- crypto.createHash(hashAlgorithm).update(data).digest('base64')
-)
-```
-
-You can also use [`ssri`](https://npm.im/ssri) to have a richer set of functionality
-around SRI strings, including generation, parsing, and translating from existing
-hex-formatted strings.
-
-#### <a name="verify"></a> `> cacache.verify(cache, opts) -> Promise`
-
-Checks out and fixes up your cache:
-
-* Cleans up corrupted or invalid index entries.
-* Custom entry filtering options.
-* Garbage collects any content entries not referenced by the index.
-* Checks integrity for all content entries and removes invalid content.
-* Fixes cache ownership.
-* Removes the `tmp` directory in the cache and all its contents.
-
-When it's done, it'll return an object with various stats about the verification
-process, including amount of storage reclaimed, number of valid entries, number
-of entries removed, etc.
-
-##### Options
-
-* `opts.uid` - uid to assign to cache and its contents
-* `opts.gid` - gid to assign to cache and its contents
-* `opts.filter` - receives a formatted entry. Return false to remove it.
- Note: might be called more than once on the same entry.
-
-##### Example
-
-```sh
-echo somegarbage >> $CACHEPATH/content/deadbeef
-```
-
-```javascript
-cacache.verify(cachePath).then(stats => {
- // deadbeef collected, because of invalid checksum.
- console.log('cache is much nicer now! stats:', stats)
-})
-```
-
-#### <a name="verify-last-run"></a> `> cacache.verify.lastRun(cache) -> Promise`
-
-Returns a `Date` representing the last time `cacache.verify` was run on `cache`.
-
-##### Example
-
-```javascript
-cacache.verify(cachePath).then(() => {
- cacache.verify.lastRun(cachePath).then(lastTime => {
- console.log('cacache.verify was last called on' + lastTime)
- })
-})
-```
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/en.js b/deps/npm/node_modules/npm-profile/node_modules/cacache/en.js
deleted file mode 100644
index a3db581c9f..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/en.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict'
-
-module.exports = require('./locales/en.js')
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/es.js b/deps/npm/node_modules/npm-profile/node_modules/cacache/es.js
deleted file mode 100644
index 6282363c3b..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/es.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict'
-
-module.exports = require('./locales/es.js')
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/get.js b/deps/npm/node_modules/npm-profile/node_modules/cacache/get.js
deleted file mode 100644
index 2bb3afa528..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/get.js
+++ /dev/null
@@ -1,190 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const fs = require('fs')
-const index = require('./lib/entry-index')
-const memo = require('./lib/memoization')
-const pipe = require('mississippi').pipe
-const pipeline = require('mississippi').pipeline
-const read = require('./lib/content/read')
-const through = require('mississippi').through
-
-module.exports = function get (cache, key, opts) {
- return getData(false, cache, key, opts)
-}
-module.exports.byDigest = function getByDigest (cache, digest, opts) {
- return getData(true, cache, digest, opts)
-}
-function getData (byDigest, cache, key, opts) {
- opts = opts || {}
- const memoized = (
- byDigest
- ? memo.get.byDigest(cache, key, opts)
- : memo.get(cache, key, opts)
- )
- if (memoized && opts.memoize !== false) {
- return BB.resolve(byDigest ? memoized : {
- metadata: memoized.entry.metadata,
- data: memoized.data,
- integrity: memoized.entry.integrity,
- size: memoized.entry.size
- })
- }
- return (
- byDigest ? BB.resolve(null) : index.find(cache, key, opts)
- ).then(entry => {
- if (!entry && !byDigest) {
- throw new index.NotFoundError(cache, key)
- }
- return read(cache, byDigest ? key : entry.integrity, {
- integrity: opts.integrity,
- size: opts.size
- }).then(data => byDigest ? data : {
- metadata: entry.metadata,
- data: data,
- size: entry.size,
- integrity: entry.integrity
- }).then(res => {
- if (opts.memoize && byDigest) {
- memo.put.byDigest(cache, key, res, opts)
- } else if (opts.memoize) {
- memo.put(cache, entry, res.data, opts)
- }
- return res
- })
- })
-}
-
-module.exports.stream = getStream
-function getStream (cache, key, opts) {
- opts = opts || {}
- let stream = through()
- const memoized = memo.get(cache, key, opts)
- if (memoized && opts.memoize !== false) {
- stream.on('newListener', function (ev, cb) {
- ev === 'metadata' && cb(memoized.entry.metadata)
- ev === 'integrity' && cb(memoized.entry.integrity)
- ev === 'size' && cb(memoized.entry.size)
- })
- stream.write(memoized.data, () => stream.end())
- return stream
- }
- index.find(cache, key).then(entry => {
- if (!entry) {
- return stream.emit(
- 'error', new index.NotFoundError(cache, key)
- )
- }
- let memoStream
- if (opts.memoize) {
- let memoData = []
- let memoLength = 0
- memoStream = through((c, en, cb) => {
- memoData && memoData.push(c)
- memoLength += c.length
- cb(null, c, en)
- }, cb => {
- memoData && memo.put(cache, entry, Buffer.concat(memoData, memoLength), opts)
- cb()
- })
- } else {
- memoStream = through()
- }
- opts.size = opts.size == null ? entry.size : opts.size
- stream.emit('metadata', entry.metadata)
- stream.emit('integrity', entry.integrity)
- stream.emit('size', entry.size)
- stream.on('newListener', function (ev, cb) {
- ev === 'metadata' && cb(entry.metadata)
- ev === 'integrity' && cb(entry.integrity)
- ev === 'size' && cb(entry.size)
- })
- pipe(
- read.readStream(cache, entry.integrity, opts),
- memoStream,
- stream
- )
- }, err => stream.emit('error', err))
- return stream
-}
-
-module.exports.stream.byDigest = getStreamDigest
-function getStreamDigest (cache, integrity, opts) {
- opts = opts || {}
- const memoized = memo.get.byDigest(cache, integrity, opts)
- if (memoized && opts.memoize !== false) {
- const stream = through()
- stream.write(memoized, () => stream.end())
- return stream
- } else {
- let stream = read.readStream(cache, integrity, opts)
- if (opts.memoize) {
- let memoData = []
- let memoLength = 0
- const memoStream = through((c, en, cb) => {
- memoData && memoData.push(c)
- memoLength += c.length
- cb(null, c, en)
- }, cb => {
- memoData && memo.put.byDigest(
- cache,
- integrity,
- Buffer.concat(memoData, memoLength),
- opts
- )
- cb()
- })
- stream = pipeline(stream, memoStream)
- }
- return stream
- }
-}
-
-module.exports.info = info
-function info (cache, key, opts) {
- opts = opts || {}
- const memoized = memo.get(cache, key, opts)
- if (memoized && opts.memoize !== false) {
- return BB.resolve(memoized.entry)
- } else {
- return index.find(cache, key)
- }
-}
-
-module.exports.hasContent = read.hasContent
-
-module.exports.copy = function cp (cache, key, dest, opts) {
- return copy(false, cache, key, dest, opts)
-}
-module.exports.copy.byDigest = function cpDigest (cache, digest, dest, opts) {
- return copy(true, cache, digest, dest, opts)
-}
-function copy (byDigest, cache, key, dest, opts) {
- opts = opts || {}
- if (read.copy) {
- return (
- byDigest ? BB.resolve(null) : index.find(cache, key, opts)
- ).then(entry => {
- if (!entry && !byDigest) {
- throw new index.NotFoundError(cache, key)
- }
- return read.copy(
- cache, byDigest ? key : entry.integrity, dest, opts
- ).then(() => byDigest ? key : {
- metadata: entry.metadata,
- size: entry.size,
- integrity: entry.integrity
- })
- })
- } else {
- return getData(byDigest, cache, key, opts).then(res => {
- return fs.writeFileAsync(dest, byDigest ? res : res.data)
- .then(() => byDigest ? key : {
- metadata: res.metadata,
- size: res.size,
- integrity: res.integrity
- })
- })
- }
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/index.js b/deps/npm/node_modules/npm-profile/node_modules/cacache/index.js
deleted file mode 100644
index a3db581c9f..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict'
-
-module.exports = require('./locales/en.js')
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/content/path.js b/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/content/path.js
deleted file mode 100644
index fa6491ba6f..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/content/path.js
+++ /dev/null
@@ -1,26 +0,0 @@
-'use strict'
-
-const contentVer = require('../../package.json')['cache-version'].content
-const hashToSegments = require('../util/hash-to-segments')
-const path = require('path')
-const ssri = require('ssri')
-
-// Current format of content file path:
-//
-// sha512-BaSE64Hex= ->
-// ~/.my-cache/content-v2/sha512/ba/da/55deadbeefc0ffee
-//
-module.exports = contentPath
-function contentPath (cache, integrity) {
- const sri = ssri.parse(integrity, {single: true})
- // contentPath is the *strongest* algo given
- return path.join.apply(path, [
- contentDir(cache),
- sri.algorithm
- ].concat(hashToSegments(sri.hexDigest())))
-}
-
-module.exports._contentDir = contentDir
-function contentDir (cache) {
- return path.join(cache, `content-v${contentVer}`)
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/content/read.js b/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/content/read.js
deleted file mode 100644
index 7a4da3beb8..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/content/read.js
+++ /dev/null
@@ -1,125 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const contentPath = require('./path')
-const fs = require('graceful-fs')
-const PassThrough = require('stream').PassThrough
-const pipe = BB.promisify(require('mississippi').pipe)
-const ssri = require('ssri')
-const Y = require('../util/y.js')
-
-BB.promisifyAll(fs)
-
-module.exports = read
-function read (cache, integrity, opts) {
- opts = opts || {}
- return pickContentSri(cache, integrity).then(content => {
- const sri = content.sri
- const cpath = contentPath(cache, sri)
- return fs.readFileAsync(cpath, null).then(data => {
- if (typeof opts.size === 'number' && opts.size !== data.length) {
- throw sizeError(opts.size, data.length)
- } else if (ssri.checkData(data, sri)) {
- return data
- } else {
- throw integrityError(sri, cpath)
- }
- })
- })
-}
-
-module.exports.stream = readStream
-module.exports.readStream = readStream
-function readStream (cache, integrity, opts) {
- opts = opts || {}
- const stream = new PassThrough()
- pickContentSri(
- cache, integrity
- ).then(content => {
- const sri = content.sri
- return pipe(
- fs.createReadStream(contentPath(cache, sri)),
- ssri.integrityStream({
- integrity: sri,
- size: opts.size
- }),
- stream
- )
- }).catch(err => {
- stream.emit('error', err)
- })
- return stream
-}
-
-if (fs.copyFile) {
- module.exports.copy = copy
-}
-function copy (cache, integrity, dest, opts) {
- opts = opts || {}
- return pickContentSri(cache, integrity).then(content => {
- const sri = content.sri
- const cpath = contentPath(cache, sri)
- return fs.copyFileAsync(cpath, dest).then(() => content.size)
- })
-}
-
-module.exports.hasContent = hasContent
-function hasContent (cache, integrity) {
- if (!integrity) { return BB.resolve(false) }
- return pickContentSri(cache, integrity)
- .catch({code: 'ENOENT'}, () => false)
- .catch({code: 'EPERM'}, err => {
- if (process.platform !== 'win32') {
- throw err
- } else {
- return false
- }
- }).then(content => {
- if (!content.sri) return false
- return ({ sri: content.sri, size: content.stat.size })
- })
-}
-
-module.exports._pickContentSri = pickContentSri
-function pickContentSri (cache, integrity) {
- const sri = ssri.parse(integrity)
- // If `integrity` has multiple entries, pick the first digest
- // with available local data.
- const algo = sri.pickAlgorithm()
- const digests = sri[algo]
- if (digests.length <= 1) {
- const cpath = contentPath(cache, digests[0])
- return fs.lstatAsync(cpath).then(stat => ({ sri: digests[0], stat }))
- } else {
- return BB.any(sri[sri.pickAlgorithm()].map(meta => {
- return pickContentSri(cache, meta)
- }))
- .catch(err => {
- if ([].some.call(err, e => e.code === 'ENOENT')) {
- throw Object.assign(
- new Error('No matching content found for ' + sri.toString()),
- {code: 'ENOENT'}
- )
- } else {
- throw err[0]
- }
- })
- }
-}
-
-function sizeError (expected, found) {
- var err = new Error(Y`Bad data size: expected inserted data to be ${expected} bytes, but got ${found} instead`)
- err.expected = expected
- err.found = found
- err.code = 'EBADSIZE'
- return err
-}
-
-function integrityError (sri, path) {
- var err = new Error(Y`Integrity verification failed for ${sri} (${path})`)
- err.code = 'EINTEGRITY'
- err.sri = sri
- err.path = path
- return err
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/content/rm.js b/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/content/rm.js
deleted file mode 100644
index 12cf158235..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/content/rm.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const contentPath = require('./path')
-const hasContent = require('./read').hasContent
-const rimraf = BB.promisify(require('rimraf'))
-
-module.exports = rm
-function rm (cache, integrity) {
- return hasContent(cache, integrity).then(content => {
- if (content) {
- const sri = content.sri
- if (sri) {
- return rimraf(contentPath(cache, sri)).then(() => true)
- }
- } else {
- return false
- }
- })
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/content/write.js b/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/content/write.js
deleted file mode 100644
index a79ae92902..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/content/write.js
+++ /dev/null
@@ -1,162 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const contentPath = require('./path')
-const fixOwner = require('../util/fix-owner')
-const fs = require('graceful-fs')
-const moveFile = require('../util/move-file')
-const PassThrough = require('stream').PassThrough
-const path = require('path')
-const pipe = BB.promisify(require('mississippi').pipe)
-const rimraf = BB.promisify(require('rimraf'))
-const ssri = require('ssri')
-const to = require('mississippi').to
-const uniqueFilename = require('unique-filename')
-const Y = require('../util/y.js')
-
-const writeFileAsync = BB.promisify(fs.writeFile)
-
-module.exports = write
-function write (cache, data, opts) {
- opts = opts || {}
- if (opts.algorithms && opts.algorithms.length > 1) {
- throw new Error(
- Y`opts.algorithms only supports a single algorithm for now`
- )
- }
- if (typeof opts.size === 'number' && data.length !== opts.size) {
- return BB.reject(sizeError(opts.size, data.length))
- }
- const sri = ssri.fromData(data, opts)
- if (opts.integrity && !ssri.checkData(data, opts.integrity, opts)) {
- return BB.reject(checksumError(opts.integrity, sri))
- }
- return BB.using(makeTmp(cache, opts), tmp => (
- writeFileAsync(
- tmp.target, data, {flag: 'wx'}
- ).then(() => (
- moveToDestination(tmp, cache, sri, opts)
- ))
- )).then(() => ({integrity: sri, size: data.length}))
-}
-
-module.exports.stream = writeStream
-function writeStream (cache, opts) {
- opts = opts || {}
- const inputStream = new PassThrough()
- let inputErr = false
- function errCheck () {
- if (inputErr) { throw inputErr }
- }
-
- let allDone
- const ret = to((c, n, cb) => {
- if (!allDone) {
- allDone = handleContent(inputStream, cache, opts, errCheck)
- }
- inputStream.write(c, n, cb)
- }, cb => {
- inputStream.end(() => {
- if (!allDone) {
- const e = new Error(Y`Cache input stream was empty`)
- e.code = 'ENODATA'
- return ret.emit('error', e)
- }
- allDone.then(res => {
- res.integrity && ret.emit('integrity', res.integrity)
- res.size !== null && ret.emit('size', res.size)
- cb()
- }, e => {
- ret.emit('error', e)
- })
- })
- })
- ret.once('error', e => {
- inputErr = e
- })
- return ret
-}
-
-function handleContent (inputStream, cache, opts, errCheck) {
- return BB.using(makeTmp(cache, opts), tmp => {
- errCheck()
- return pipeToTmp(
- inputStream, cache, tmp.target, opts, errCheck
- ).then(res => {
- return moveToDestination(
- tmp, cache, res.integrity, opts, errCheck
- ).then(() => res)
- })
- })
-}
-
-function pipeToTmp (inputStream, cache, tmpTarget, opts, errCheck) {
- return BB.resolve().then(() => {
- let integrity
- let size
- const hashStream = ssri.integrityStream({
- integrity: opts.integrity,
- algorithms: opts.algorithms,
- size: opts.size
- }).on('integrity', s => {
- integrity = s
- }).on('size', s => {
- size = s
- })
- const outStream = fs.createWriteStream(tmpTarget, {
- flags: 'wx'
- })
- errCheck()
- return pipe(inputStream, hashStream, outStream).then(() => {
- return {integrity, size}
- }, err => {
- return rimraf(tmpTarget).then(() => { throw err })
- })
- })
-}
-
-function makeTmp (cache, opts) {
- const tmpTarget = uniqueFilename(path.join(cache, 'tmp'), opts.tmpPrefix)
- return fixOwner.mkdirfix(
- path.dirname(tmpTarget), opts.uid, opts.gid
- ).then(() => ({
- target: tmpTarget,
- moved: false
- })).disposer(tmp => (!tmp.moved && rimraf(tmp.target)))
-}
-
-function moveToDestination (tmp, cache, sri, opts, errCheck) {
- errCheck && errCheck()
- const destination = contentPath(cache, sri)
- const destDir = path.dirname(destination)
-
- return fixOwner.mkdirfix(
- destDir, opts.uid, opts.gid
- ).then(() => {
- errCheck && errCheck()
- return moveFile(tmp.target, destination)
- }).then(() => {
- errCheck && errCheck()
- tmp.moved = true
- return fixOwner.chownr(destination, opts.uid, opts.gid)
- })
-}
-
-function sizeError (expected, found) {
- var err = new Error(Y`Bad data size: expected inserted data to be ${expected} bytes, but got ${found} instead`)
- err.expected = expected
- err.found = found
- err.code = 'EBADSIZE'
- return err
-}
-
-function checksumError (expected, found) {
- var err = new Error(Y`Integrity check failed:
- Wanted: ${expected}
- Found: ${found}`)
- err.code = 'EINTEGRITY'
- err.expected = expected
- err.found = found
- return err
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/entry-index.js b/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/entry-index.js
deleted file mode 100644
index fe1cd06457..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/entry-index.js
+++ /dev/null
@@ -1,225 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const contentPath = require('./content/path')
-const crypto = require('crypto')
-const fixOwner = require('./util/fix-owner')
-const fs = require('graceful-fs')
-const hashToSegments = require('./util/hash-to-segments')
-const ms = require('mississippi')
-const path = require('path')
-const ssri = require('ssri')
-const Y = require('./util/y.js')
-
-const indexV = require('../package.json')['cache-version'].index
-
-const appendFileAsync = BB.promisify(fs.appendFile)
-const readFileAsync = BB.promisify(fs.readFile)
-const readdirAsync = BB.promisify(fs.readdir)
-const concat = ms.concat
-const from = ms.from
-
-module.exports.NotFoundError = class NotFoundError extends Error {
- constructor (cache, key) {
- super(Y`No cache entry for \`${key}\` found in \`${cache}\``)
- this.code = 'ENOENT'
- this.cache = cache
- this.key = key
- }
-}
-
-module.exports.insert = insert
-function insert (cache, key, integrity, opts) {
- opts = opts || {}
- const bucket = bucketPath(cache, key)
- const entry = {
- key,
- integrity: integrity && ssri.stringify(integrity),
- time: Date.now(),
- size: opts.size,
- metadata: opts.metadata
- }
- return fixOwner.mkdirfix(
- path.dirname(bucket), opts.uid, opts.gid
- ).then(() => {
- const stringified = JSON.stringify(entry)
- // NOTE - Cleverness ahoy!
- //
- // This works because it's tremendously unlikely for an entry to corrupt
- // another while still preserving the string length of the JSON in
- // question. So, we just slap the length in there and verify it on read.
- //
- // Thanks to @isaacs for the whiteboarding session that ended up with this.
- return appendFileAsync(
- bucket, `\n${hashEntry(stringified)}\t${stringified}`
- )
- }).then(
- () => fixOwner.chownr(bucket, opts.uid, opts.gid)
- ).catch({code: 'ENOENT'}, () => {
- // There's a class of race conditions that happen when things get deleted
- // during fixOwner, or between the two mkdirfix/chownr calls.
- //
- // It's perfectly fine to just not bother in those cases and lie
- // that the index entry was written. Because it's a cache.
- }).then(() => {
- return formatEntry(cache, entry)
- })
-}
-
-module.exports.find = find
-function find (cache, key) {
- const bucket = bucketPath(cache, key)
- return bucketEntries(cache, bucket).then(entries => {
- return entries.reduce((latest, next) => {
- if (next && next.key === key) {
- return formatEntry(cache, next)
- } else {
- return latest
- }
- }, null)
- }).catch(err => {
- if (err.code === 'ENOENT') {
- return null
- } else {
- throw err
- }
- })
-}
-
-module.exports.delete = del
-function del (cache, key, opts) {
- return insert(cache, key, null, opts)
-}
-
-module.exports.lsStream = lsStream
-function lsStream (cache) {
- const indexDir = bucketDir(cache)
- const stream = from.obj()
-
- // "/cachename/*"
- readdirOrEmpty(indexDir).map(bucket => {
- const bucketPath = path.join(indexDir, bucket)
-
- // "/cachename/<bucket 0xFF>/*"
- return readdirOrEmpty(bucketPath).map(subbucket => {
- const subbucketPath = path.join(bucketPath, subbucket)
-
- // "/cachename/<bucket 0xFF>/<bucket 0xFF>/*"
- return readdirOrEmpty(subbucketPath).map(entry => {
- const getKeyToEntry = bucketEntries(
- cache,
- path.join(subbucketPath, entry)
- ).reduce((acc, entry) => {
- acc.set(entry.key, entry)
- return acc
- }, new Map())
-
- return getKeyToEntry.then(reduced => {
- for (let entry of reduced.values()) {
- const formatted = formatEntry(cache, entry)
- formatted && stream.push(formatted)
- }
- }).catch({code: 'ENOENT'}, nop)
- })
- })
- }).then(() => {
- stream.push(null)
- }, err => {
- stream.emit('error', err)
- })
-
- return stream
-}
-
-module.exports.ls = ls
-function ls (cache) {
- return BB.fromNode(cb => {
- lsStream(cache).on('error', cb).pipe(concat(entries => {
- cb(null, entries.reduce((acc, xs) => {
- acc[xs.key] = xs
- return acc
- }, {}))
- }))
- })
-}
-
-function bucketEntries (cache, bucket, filter) {
- return readFileAsync(
- bucket, 'utf8'
- ).then(data => {
- let entries = []
- data.split('\n').forEach(entry => {
- if (!entry) { return }
- const pieces = entry.split('\t')
- if (!pieces[1] || hashEntry(pieces[1]) !== pieces[0]) {
- // Hash is no good! Corruption or malice? Doesn't matter!
- // EJECT EJECT
- return
- }
- let obj
- try {
- obj = JSON.parse(pieces[1])
- } catch (e) {
- // Entry is corrupted!
- return
- }
- if (obj) {
- entries.push(obj)
- }
- })
- return entries
- })
-}
-
-module.exports._bucketDir = bucketDir
-function bucketDir (cache) {
- return path.join(cache, `index-v${indexV}`)
-}
-
-module.exports._bucketPath = bucketPath
-function bucketPath (cache, key) {
- const hashed = hashKey(key)
- return path.join.apply(path, [bucketDir(cache)].concat(
- hashToSegments(hashed)
- ))
-}
-
-module.exports._hashKey = hashKey
-function hashKey (key) {
- return hash(key, 'sha256')
-}
-
-module.exports._hashEntry = hashEntry
-function hashEntry (str) {
- return hash(str, 'sha1')
-}
-
-function hash (str, digest) {
- return crypto
- .createHash(digest)
- .update(str)
- .digest('hex')
-}
-
-function formatEntry (cache, entry) {
- // Treat null digests as deletions. They'll shadow any previous entries.
- if (!entry.integrity) { return null }
- return {
- key: entry.key,
- integrity: entry.integrity,
- path: contentPath(cache, entry.integrity),
- size: entry.size,
- time: entry.time,
- metadata: entry.metadata
- }
-}
-
-function readdirOrEmpty (dir) {
- return readdirAsync(dir)
- .catch({code: 'ENOENT'}, () => [])
- .catch({code: 'ENOTDIR'}, () => [])
-}
-
-function nop () {
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/memoization.js b/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/memoization.js
deleted file mode 100644
index 92179c7ac6..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/memoization.js
+++ /dev/null
@@ -1,69 +0,0 @@
-'use strict'
-
-const LRU = require('lru-cache')
-
-const MAX_SIZE = 50 * 1024 * 1024 // 50MB
-const MAX_AGE = 3 * 60 * 1000
-
-let MEMOIZED = new LRU({
- max: MAX_SIZE,
- maxAge: MAX_AGE,
- length: (entry, key) => {
- if (key.startsWith('key:')) {
- return entry.data.length
- } else if (key.startsWith('digest:')) {
- return entry.length
- }
- }
-})
-
-module.exports.clearMemoized = clearMemoized
-function clearMemoized () {
- const old = {}
- MEMOIZED.forEach((v, k) => {
- old[k] = v
- })
- MEMOIZED.reset()
- return old
-}
-
-module.exports.put = put
-function put (cache, entry, data, opts) {
- pickMem(opts).set(`key:${cache}:${entry.key}`, { entry, data })
- putDigest(cache, entry.integrity, data, opts)
-}
-
-module.exports.put.byDigest = putDigest
-function putDigest (cache, integrity, data, opts) {
- pickMem(opts).set(`digest:${cache}:${integrity}`, data)
-}
-
-module.exports.get = get
-function get (cache, key, opts) {
- return pickMem(opts).get(`key:${cache}:${key}`)
-}
-
-module.exports.get.byDigest = getDigest
-function getDigest (cache, integrity, opts) {
- return pickMem(opts).get(`digest:${cache}:${integrity}`)
-}
-
-class ObjProxy {
- constructor (obj) {
- this.obj = obj
- }
- get (key) { return this.obj[key] }
- set (key, val) { this.obj[key] = val }
-}
-
-function pickMem (opts) {
- if (!opts || !opts.memoize) {
- return MEMOIZED
- } else if (opts.memoize.get && opts.memoize.set) {
- return opts.memoize
- } else if (typeof opts.memoize === 'object') {
- return new ObjProxy(opts.memoize)
- } else {
- return MEMOIZED
- }
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/util/fix-owner.js b/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/util/fix-owner.js
deleted file mode 100644
index 7000bff048..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/util/fix-owner.js
+++ /dev/null
@@ -1,44 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const chownr = BB.promisify(require('chownr'))
-const mkdirp = BB.promisify(require('mkdirp'))
-const inflight = require('promise-inflight')
-
-module.exports.chownr = fixOwner
-function fixOwner (filepath, uid, gid) {
- if (!process.getuid) {
- // This platform doesn't need ownership fixing
- return BB.resolve()
- }
- if (typeof uid !== 'number' && typeof gid !== 'number') {
- // There's no permissions override. Nothing to do here.
- return BB.resolve()
- }
- if ((typeof uid === 'number' && process.getuid() === uid) &&
- (typeof gid === 'number' && process.getgid() === gid)) {
- // No need to override if it's already what we used.
- return BB.resolve()
- }
- return inflight(
- 'fixOwner: fixing ownership on ' + filepath,
- () => chownr(
- filepath,
- typeof uid === 'number' ? uid : process.getuid(),
- typeof gid === 'number' ? gid : process.getgid()
- ).catch({code: 'ENOENT'}, () => null)
- )
-}
-
-module.exports.mkdirfix = mkdirfix
-function mkdirfix (p, uid, gid, cb) {
- return mkdirp(p).then(made => {
- if (made) {
- return fixOwner(made, uid, gid).then(() => made)
- }
- }).catch({code: 'EEXIST'}, () => {
- // There's a race in mkdirp!
- return fixOwner(p, uid, gid).then(() => null)
- })
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/util/hash-to-segments.js b/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/util/hash-to-segments.js
deleted file mode 100644
index 192be2a6d6..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/util/hash-to-segments.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict'
-
-module.exports = hashToSegments
-
-function hashToSegments (hash) {
- return [
- hash.slice(0, 2),
- hash.slice(2, 4),
- hash.slice(4)
- ]
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/util/move-file.js b/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/util/move-file.js
deleted file mode 100644
index b43744b3da..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/util/move-file.js
+++ /dev/null
@@ -1,51 +0,0 @@
-'use strict'
-
-const fs = require('graceful-fs')
-const BB = require('bluebird')
-const chmod = BB.promisify(fs.chmod)
-const unlink = BB.promisify(fs.unlink)
-let move
-let pinflight
-
-module.exports = moveFile
-function moveFile (src, dest) {
- // This isn't quite an fs.rename -- the assumption is that
- // if `dest` already exists, and we get certain errors while
- // trying to move it, we should just not bother.
- //
- // In the case of cache corruption, users will receive an
- // EINTEGRITY error elsewhere, and can remove the offending
- // content their own way.
- //
- // Note that, as the name suggests, this strictly only supports file moves.
- return BB.fromNode(cb => {
- fs.link(src, dest, err => {
- if (err) {
- if (err.code === 'EEXIST' || err.code === 'EBUSY') {
- // file already exists, so whatever
- } else if (err.code === 'EPERM' && process.platform === 'win32') {
- // file handle stayed open even past graceful-fs limits
- } else {
- return cb(err)
- }
- }
- return cb()
- })
- }).then(() => {
- // content should never change for any reason, so make it read-only
- return BB.join(unlink(src), process.platform !== 'win32' && chmod(dest, '0444'))
- }).catch(() => {
- if (!pinflight) { pinflight = require('promise-inflight') }
- return pinflight('cacache-move-file:' + dest, () => {
- return BB.promisify(fs.stat)(dest).catch(err => {
- if (err.code !== 'ENOENT') {
- // Something else is wrong here. Bail bail bail
- throw err
- }
- // file doesn't already exist! let's try a rename -> copy fallback
- if (!move) { move = require('move-concurrently') }
- return move(src, dest, { BB, fs })
- })
- })
- })
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/util/tmp.js b/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/util/tmp.js
deleted file mode 100644
index 4fc4512cc8..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/util/tmp.js
+++ /dev/null
@@ -1,32 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const fixOwner = require('./fix-owner')
-const path = require('path')
-const rimraf = BB.promisify(require('rimraf'))
-const uniqueFilename = require('unique-filename')
-
-module.exports.mkdir = mktmpdir
-function mktmpdir (cache, opts) {
- opts = opts || {}
- const tmpTarget = uniqueFilename(path.join(cache, 'tmp'), opts.tmpPrefix)
- return fixOwner.mkdirfix(tmpTarget, opts.uid, opts.gid).then(() => {
- return tmpTarget
- })
-}
-
-module.exports.withTmp = withTmp
-function withTmp (cache, opts, cb) {
- if (!cb) {
- cb = opts
- opts = null
- }
- opts = opts || {}
- return BB.using(mktmpdir(cache, opts).disposer(rimraf), cb)
-}
-
-module.exports.fix = fixtmpdir
-function fixtmpdir (cache, opts) {
- return fixOwner(path.join(cache, 'tmp'), opts.uid, opts.gid)
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/util/y.js b/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/util/y.js
deleted file mode 100644
index d62bedacb3..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/util/y.js
+++ /dev/null
@@ -1,25 +0,0 @@
-'use strict'
-
-const path = require('path')
-const y18n = require('y18n')({
- directory: path.join(__dirname, '../../locales'),
- locale: 'en',
- updateFiles: process.env.CACACHE_UPDATE_LOCALE_FILES === 'true'
-})
-
-module.exports = yTag
-function yTag (parts) {
- let str = ''
- parts.forEach((part, i) => {
- const arg = arguments[i + 1]
- str += part
- if (arg) {
- str += '%s'
- }
- })
- return y18n.__.apply(null, [str].concat([].slice.call(arguments, 1)))
-}
-
-module.exports.setLocale = locale => {
- y18n.setLocale(locale)
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/verify.js b/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/verify.js
deleted file mode 100644
index 6a01004c97..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/lib/verify.js
+++ /dev/null
@@ -1,213 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const contentPath = require('./content/path')
-const finished = BB.promisify(require('mississippi').finished)
-const fixOwner = require('./util/fix-owner')
-const fs = require('graceful-fs')
-const glob = BB.promisify(require('glob'))
-const index = require('./entry-index')
-const path = require('path')
-const rimraf = BB.promisify(require('rimraf'))
-const ssri = require('ssri')
-
-BB.promisifyAll(fs)
-
-module.exports = verify
-function verify (cache, opts) {
- opts = opts || {}
- opts.log && opts.log.silly('verify', 'verifying cache at', cache)
- return BB.reduce([
- markStartTime,
- fixPerms,
- garbageCollect,
- rebuildIndex,
- cleanTmp,
- writeVerifile,
- markEndTime
- ], (stats, step, i) => {
- const label = step.name || `step #${i}`
- const start = new Date()
- return BB.resolve(step(cache, opts)).then(s => {
- s && Object.keys(s).forEach(k => {
- stats[k] = s[k]
- })
- const end = new Date()
- if (!stats.runTime) { stats.runTime = {} }
- stats.runTime[label] = end - start
- return stats
- })
- }, {}).tap(stats => {
- stats.runTime.total = stats.endTime - stats.startTime
- opts.log && opts.log.silly('verify', 'verification finished for', cache, 'in', `${stats.runTime.total}ms`)
- })
-}
-
-function markStartTime (cache, opts) {
- return { startTime: new Date() }
-}
-
-function markEndTime (cache, opts) {
- return { endTime: new Date() }
-}
-
-function fixPerms (cache, opts) {
- opts.log && opts.log.silly('verify', 'fixing cache permissions')
- return fixOwner.mkdirfix(cache, opts.uid, opts.gid).then(() => {
- // TODO - fix file permissions too
- return fixOwner.chownr(cache, opts.uid, opts.gid)
- }).then(() => null)
-}
-
-// Implements a naive mark-and-sweep tracing garbage collector.
-//
-// The algorithm is basically as follows:
-// 1. Read (and filter) all index entries ("pointers")
-// 2. Mark each integrity value as "live"
-// 3. Read entire filesystem tree in `content-vX/` dir
-// 4. If content is live, verify its checksum and delete it if it fails
-// 5. If content is not marked as live, rimraf it.
-//
-function garbageCollect (cache, opts) {
- opts.log && opts.log.silly('verify', 'garbage collecting content')
- const indexStream = index.lsStream(cache)
- const liveContent = new Set()
- indexStream.on('data', entry => {
- if (opts && opts.filter && !opts.filter(entry)) { return }
- liveContent.add(entry.integrity.toString())
- })
- return finished(indexStream).then(() => {
- const contentDir = contentPath._contentDir(cache)
- return glob(path.join(contentDir, '**'), {
- follow: false,
- nodir: true,
- nosort: true
- }).then(files => {
- return BB.resolve({
- verifiedContent: 0,
- reclaimedCount: 0,
- reclaimedSize: 0,
- badContentCount: 0,
- keptSize: 0
- }).tap((stats) => BB.map(files, (f) => {
- const split = f.split(/[/\\]/)
- const digest = split.slice(split.length - 3).join('')
- const algo = split[split.length - 4]
- const integrity = ssri.fromHex(digest, algo)
- if (liveContent.has(integrity.toString())) {
- return verifyContent(f, integrity).then(info => {
- if (!info.valid) {
- stats.reclaimedCount++
- stats.badContentCount++
- stats.reclaimedSize += info.size
- } else {
- stats.verifiedContent++
- stats.keptSize += info.size
- }
- return stats
- })
- } else {
- // No entries refer to this content. We can delete.
- stats.reclaimedCount++
- return fs.statAsync(f).then(s => {
- return rimraf(f).then(() => {
- stats.reclaimedSize += s.size
- return stats
- })
- })
- }
- }, {concurrency: opts.concurrency || 20}))
- })
- })
-}
-
-function verifyContent (filepath, sri) {
- return fs.statAsync(filepath).then(stat => {
- const contentInfo = {
- size: stat.size,
- valid: true
- }
- return ssri.checkStream(
- fs.createReadStream(filepath),
- sri
- ).catch(err => {
- if (err.code !== 'EINTEGRITY') { throw err }
- return rimraf(filepath).then(() => {
- contentInfo.valid = false
- })
- }).then(() => contentInfo)
- }).catch({code: 'ENOENT'}, () => ({size: 0, valid: false}))
-}
-
-function rebuildIndex (cache, opts) {
- opts.log && opts.log.silly('verify', 'rebuilding index')
- return index.ls(cache).then(entries => {
- const stats = {
- missingContent: 0,
- rejectedEntries: 0,
- totalEntries: 0
- }
- const buckets = {}
- for (let k in entries) {
- if (entries.hasOwnProperty(k)) {
- const hashed = index._hashKey(k)
- const entry = entries[k]
- const excluded = opts && opts.filter && !opts.filter(entry)
- excluded && stats.rejectedEntries++
- if (buckets[hashed] && !excluded) {
- buckets[hashed].push(entry)
- } else if (buckets[hashed] && excluded) {
- // skip
- } else if (excluded) {
- buckets[hashed] = []
- buckets[hashed]._path = index._bucketPath(cache, k)
- } else {
- buckets[hashed] = [entry]
- buckets[hashed]._path = index._bucketPath(cache, k)
- }
- }
- }
- return BB.map(Object.keys(buckets), key => {
- return rebuildBucket(cache, buckets[key], stats, opts)
- }, {concurrency: opts.concurrency || 20}).then(() => stats)
- })
-}
-
-function rebuildBucket (cache, bucket, stats, opts) {
- return fs.truncateAsync(bucket._path).then(() => {
- // This needs to be serialized because cacache explicitly
- // lets very racy bucket conflicts clobber each other.
- return BB.mapSeries(bucket, entry => {
- const content = contentPath(cache, entry.integrity)
- return fs.statAsync(content).then(() => {
- return index.insert(cache, entry.key, entry.integrity, {
- uid: opts.uid,
- gid: opts.gid,
- metadata: entry.metadata
- }).then(() => { stats.totalEntries++ })
- }).catch({code: 'ENOENT'}, () => {
- stats.rejectedEntries++
- stats.missingContent++
- })
- })
- })
-}
-
-function cleanTmp (cache, opts) {
- opts.log && opts.log.silly('verify', 'cleaning tmp directory')
- return rimraf(path.join(cache, 'tmp'))
-}
-
-function writeVerifile (cache, opts) {
- const verifile = path.join(cache, '_lastverified')
- opts.log && opts.log.silly('verify', 'writing verifile to ' + verifile)
- return fs.writeFileAsync(verifile, '' + (+(new Date())))
-}
-
-module.exports.lastRun = lastRun
-function lastRun (cache) {
- return fs.readFileAsync(
- path.join(cache, '_lastverified'), 'utf8'
- ).then(data => new Date(+data))
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/locales/en.js b/deps/npm/node_modules/npm-profile/node_modules/cacache/locales/en.js
deleted file mode 100644
index 22025cf0e8..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/locales/en.js
+++ /dev/null
@@ -1,44 +0,0 @@
-'use strict'
-
-const ls = require('../ls.js')
-const get = require('../get.js')
-const put = require('../put.js')
-const rm = require('../rm.js')
-const verify = require('../verify.js')
-const setLocale = require('../lib/util/y.js').setLocale
-const clearMemoized = require('../lib/memoization.js').clearMemoized
-const tmp = require('../lib/util/tmp.js')
-
-setLocale('en')
-
-const x = module.exports
-
-x.ls = cache => ls(cache)
-x.ls.stream = cache => ls.stream(cache)
-
-x.get = (cache, key, opts) => get(cache, key, opts)
-x.get.byDigest = (cache, hash, opts) => get.byDigest(cache, hash, opts)
-x.get.stream = (cache, key, opts) => get.stream(cache, key, opts)
-x.get.stream.byDigest = (cache, hash, opts) => get.stream.byDigest(cache, hash, opts)
-x.get.copy = (cache, key, dest, opts) => get.copy(cache, key, dest, opts)
-x.get.copy.byDigest = (cache, hash, dest, opts) => get.copy.byDigest(cache, hash, dest, opts)
-x.get.info = (cache, key) => get.info(cache, key)
-x.get.hasContent = (cache, hash) => get.hasContent(cache, hash)
-
-x.put = (cache, key, data, opts) => put(cache, key, data, opts)
-x.put.stream = (cache, key, opts) => put.stream(cache, key, opts)
-
-x.rm = (cache, key) => rm.entry(cache, key)
-x.rm.all = cache => rm.all(cache)
-x.rm.entry = x.rm
-x.rm.content = (cache, hash) => rm.content(cache, hash)
-
-x.setLocale = lang => setLocale(lang)
-x.clearMemoized = () => clearMemoized()
-
-x.tmp = {}
-x.tmp.mkdir = (cache, opts) => tmp.mkdir(cache, opts)
-x.tmp.withTmp = (cache, opts, cb) => tmp.withTmp(cache, opts, cb)
-
-x.verify = (cache, opts) => verify(cache, opts)
-x.verify.lastRun = cache => verify.lastRun(cache)
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/locales/en.json b/deps/npm/node_modules/npm-profile/node_modules/cacache/locales/en.json
deleted file mode 100644
index 82ecb08324..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/locales/en.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "No cache entry for `%s` found in `%s`": "No cache entry for %s found in %s",
- "Integrity verification failed for %s (%s)": "Integrity verification failed for %s (%s)",
- "Bad data size: expected inserted data to be %s bytes, but got %s instead": "Bad data size: expected inserted data to be %s bytes, but got %s instead",
- "Cache input stream was empty": "Cache input stream was empty"
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/locales/es.js b/deps/npm/node_modules/npm-profile/node_modules/cacache/locales/es.js
deleted file mode 100644
index 9a27de6585..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/locales/es.js
+++ /dev/null
@@ -1,46 +0,0 @@
-'use strict'
-
-const ls = require('../ls.js')
-const get = require('../get.js')
-const put = require('../put.js')
-const rm = require('../rm.js')
-const verify = require('../verify.js')
-const setLocale = require('../lib/util/y.js').setLocale
-const clearMemoized = require('../lib/memoization.js').clearMemoized
-const tmp = require('../lib/util/tmp.js')
-
-setLocale('es')
-
-const x = module.exports
-
-x.ls = cache => ls(cache)
-x.ls.flujo = cache => ls.stream(cache)
-
-x.saca = (cache, clave, ops) => get(cache, clave, ops)
-x.saca.porHacheo = (cache, hacheo, ops) => get.byDigest(cache, hacheo, ops)
-x.saca.flujo = (cache, clave, ops) => get.stream(cache, clave, ops)
-x.saca.flujo.porHacheo = (cache, hacheo, ops) => get.stream.byDigest(cache, hacheo, ops)
-x.sava.copia = (cache, clave, destino, opts) => get.copy(cache, clave, destino, opts)
-x.sava.copia.porHacheo = (cache, hacheo, destino, opts) => get.copy.byDigest(cache, hacheo, destino, opts)
-x.saca.info = (cache, clave) => get.info(cache, clave)
-x.saca.tieneDatos = (cache, hacheo) => get.hasContent(cache, hacheo)
-
-x.mete = (cache, clave, datos, ops) => put(cache, clave, datos, ops)
-x.mete.flujo = (cache, clave, ops) => put.stream(cache, clave, ops)
-
-x.rm = (cache, clave) => rm.entry(cache, clave)
-x.rm.todo = cache => rm.all(cache)
-x.rm.entrada = x.rm
-x.rm.datos = (cache, hacheo) => rm.content(cache, hacheo)
-
-x.ponLenguaje = lang => setLocale(lang)
-x.limpiaMemoizado = () => clearMemoized()
-
-x.tmp = {}
-x.tmp.mkdir = (cache, ops) => tmp.mkdir(cache, ops)
-x.tmp.hazdir = x.tmp.mkdir
-x.tmp.conTmp = (cache, ops, cb) => tmp.withTmp(cache, ops, cb)
-
-x.verifica = (cache, ops) => verify(cache, ops)
-x.verifica.ultimaVez = cache => verify.lastRun(cache)
-x.verifica.últimaVez = x.verifica.ultimaVez
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/locales/es.json b/deps/npm/node_modules/npm-profile/node_modules/cacache/locales/es.json
deleted file mode 100644
index a91d76225b..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/locales/es.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "No cache entry for `%s` found in `%s`": "No existe ninguna entrada para «%s» en «%s»",
- "Integrity verification failed for %s (%s)": "Verificación de integridad falló para «%s» (%s)",
- "Bad data size: expected inserted data to be %s bytes, but got %s instead": "Tamaño incorrecto de datos: los datos insertados debieron haber sido %s octetos, pero fueron %s",
- "Cache input stream was empty": "El stream de entrada al caché estaba vacío"
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/ls.js b/deps/npm/node_modules/npm-profile/node_modules/cacache/ls.js
deleted file mode 100644
index 9f49b388ac..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/ls.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict'
-
-var index = require('./lib/entry-index')
-
-module.exports = index.ls
-module.exports.stream = index.lsStream
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/node_modules/mississippi/changelog.md b/deps/npm/node_modules/npm-profile/node_modules/cacache/node_modules/mississippi/changelog.md
deleted file mode 100644
index 93430828f8..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/node_modules/mississippi/changelog.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# mississippi Change Log
-All notable changes to this project will be documented in this file.
-This project adheres to [Semantic Versioning](http://semver.org/).
-
-## 2.0.0 - 2018-01-30
-* Update to pump@2.0.1. (Use the individual modules to avoid potentially unnecessary major updates in your project)
-* Pin engines support to >= Node 4.0.0. Run Node LTS or greater.
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/node_modules/mississippi/index.js b/deps/npm/node_modules/npm-profile/node_modules/cacache/node_modules/mississippi/index.js
deleted file mode 100644
index d635b29c56..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/node_modules/mississippi/index.js
+++ /dev/null
@@ -1,10 +0,0 @@
-module.exports.pipe = require('pump')
-module.exports.each = require('stream-each')
-module.exports.pipeline = require('pumpify')
-module.exports.duplex = require('duplexify')
-module.exports.through = require('through2')
-module.exports.concat = require('concat-stream')
-module.exports.finished = require('end-of-stream')
-module.exports.from = require('from2')
-module.exports.to = require('flush-write-stream')
-module.exports.parallel = require('parallel-transform')
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/node_modules/mississippi/license b/deps/npm/node_modules/npm-profile/node_modules/cacache/node_modules/mississippi/license
deleted file mode 100644
index e34763968c..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/node_modules/mississippi/license
+++ /dev/null
@@ -1,7 +0,0 @@
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/node_modules/mississippi/package.json b/deps/npm/node_modules/npm-profile/node_modules/cacache/node_modules/mississippi/package.json
deleted file mode 100644
index b8c2616e87..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/node_modules/mississippi/package.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- "_from": "mississippi@^2.0.0",
- "_id": "mississippi@2.0.0",
- "_inBundle": false,
- "_integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==",
- "_location": "/npm-profile/cacache/mississippi",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "mississippi@^2.0.0",
- "name": "mississippi",
- "escapedName": "mississippi",
- "rawSpec": "^2.0.0",
- "saveSpec": null,
- "fetchSpec": "^2.0.0"
- },
- "_requiredBy": [
- "/npm-profile/cacache"
- ],
- "_resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz",
- "_shasum": "3442a508fafc28500486feea99409676e4ee5a6f",
- "_spec": "mississippi@^2.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/npm-profile/node_modules/cacache",
- "author": {
- "name": "max ogden"
- },
- "bugs": {
- "url": "https://github.com/maxogden/mississippi/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "concat-stream": "^1.5.0",
- "duplexify": "^3.4.2",
- "end-of-stream": "^1.1.0",
- "flush-write-stream": "^1.0.0",
- "from2": "^2.1.0",
- "parallel-transform": "^1.1.0",
- "pump": "^2.0.1",
- "pumpify": "^1.3.3",
- "stream-each": "^1.1.0",
- "through2": "^2.0.0"
- },
- "deprecated": false,
- "description": "a collection of useful streams",
- "devDependencies": {},
- "engines": {
- "node": ">=4.0.0"
- },
- "homepage": "https://github.com/maxogden/mississippi#readme",
- "license": "BSD-2-Clause",
- "main": "index.js",
- "name": "mississippi",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/maxogden/mississippi.git"
- },
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "version": "2.0.0"
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/node_modules/mississippi/readme.md b/deps/npm/node_modules/npm-profile/node_modules/cacache/node_modules/mississippi/readme.md
deleted file mode 100644
index 5fa6d66c89..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/node_modules/mississippi/readme.md
+++ /dev/null
@@ -1,411 +0,0 @@
-# mississippi
-
-a collection of useful stream utility modules. learn how the modules work using this and then pick the ones you want and use them individually
-
-the goal of the modules included in mississippi is to make working with streams easy without sacrificing speed, error handling or composability.
-
-## usage
-
-```js
-var miss = require('mississippi')
-```
-
-## methods
-
-- [pipe](#pipe)
-- [each](#each)
-- [pipeline](#pipeline)
-- [duplex](#duplex)
-- [through](#through)
-- [from](#from)
-- [to](#to)
-- [concat](#concat)
-- [finished](#finished)
-- [parallel](#parallel)
-
-### pipe
-
-##### `miss.pipe(stream1, stream2, stream3, ..., cb)`
-
-Pipes streams together and destroys all of them if one of them closes. Calls `cb` with `(error)` if there was an error in any of the streams.
-
-When using standard `source.pipe(destination)` the source will _not_ be destroyed if the destination emits close or error. You are also not able to provide a callback to tell when the pipe has finished.
-
-`miss.pipe` does these two things for you, ensuring you handle stream errors 100% of the time (unhandled errors are probably the most common bug in most node streams code)
-
-#### original module
-
-`miss.pipe` is provided by [`require('pump')`](https://www.npmjs.com/package/pump)
-
-#### example
-
-```js
-// lets do a simple file copy
-var fs = require('fs')
-
-var read = fs.createReadStream('./original.zip')
-var write = fs.createWriteStream('./copy.zip')
-
-// use miss.pipe instead of read.pipe(write)
-miss.pipe(read, write, function (err) {
- if (err) return console.error('Copy error!', err)
- console.log('Copied successfully')
-})
-```
-
-### each
-
-##### `miss.each(stream, each, [done])`
-
-Iterate the data in `stream` one chunk at a time. Your `each` function will be called with `(data, next)` where data is a data chunk and next is a callback. Call `next` when you are ready to consume the next chunk.
-
-Optionally you can call `next` with an error to destroy the stream. You can also pass the optional third argument, `done`, which is a function that will be called with `(err)` when the stream ends. The `err` argument will be populated with an error if the stream emitted an error.
-
-#### original module
-
-`miss.each` is provided by [`require('stream-each')`](https://www.npmjs.com/package/stream-each)
-
-#### example
-
-```js
-var fs = require('fs')
-var split = require('split2')
-
-var newLineSeparatedNumbers = fs.createReadStream('numbers.txt')
-
-var pipeline = miss.pipeline(newLineSeparatedNumbers, split())
-miss.each(pipeline, eachLine, done)
-var sum = 0
-
-function eachLine (line, next) {
- sum += parseInt(line.toString())
- next()
-}
-
-function done (err) {
- if (err) throw err
- console.log('sum is', sum)
-}
-```
-
-### pipeline
-
-##### `var pipeline = miss.pipeline(stream1, stream2, stream3, ...)`
-
-Builds a pipeline from all the transform streams passed in as arguments by piping them together and returning a single stream object that lets you write to the first stream and read from the last stream.
-
-If you are pumping object streams together use `pipeline = miss.pipeline.obj(s1, s2, ...)`.
-
-If any of the streams in the pipeline emits an error or gets destroyed, or you destroy the stream it returns, all of the streams will be destroyed and cleaned up for you.
-
-#### original module
-
-`miss.pipeline` is provided by [`require('pumpify')`](https://www.npmjs.com/package/pumpify)
-
-#### example
-
-```js
-// first create some transform streams (note: these two modules are fictional)
-var imageResize = require('image-resizer-stream')({width: 400})
-var pngOptimizer = require('png-optimizer-stream')({quality: 60})
-
-// instead of doing a.pipe(b), use pipelin
-var resizeAndOptimize = miss.pipeline(imageResize, pngOptimizer)
-// `resizeAndOptimize` is a transform stream. when you write to it, it writes
-// to `imageResize`. when you read from it, it reads from `pngOptimizer`.
-// it handles piping all the streams together for you
-
-// use it like any other transform stream
-var fs = require('fs')
-
-var read = fs.createReadStream('./image.png')
-var write = fs.createWriteStream('./resized-and-optimized.png')
-
-miss.pipe(read, resizeAndOptimize, write, function (err) {
- if (err) return console.error('Image processing error!', err)
- console.log('Image processed successfully')
-})
-```
-
-### duplex
-
-##### `var duplex = miss.duplex([writable, readable, opts])`
-
-Take two separate streams, a writable and a readable, and turn them into a single [duplex (readable and writable) stream](https://nodejs.org/api/stream.html#stream_class_stream_duplex).
-
-The returned stream will emit data from the readable. When you write to it it writes to the writable.
-
-You can either choose to supply the writable and the readable at the time you create the stream, or you can do it later using the `.setWritable` and `.setReadable` methods and data written to the stream in the meantime will be buffered for you.
-
-#### original module
-
-`miss.duplex` is provided by [`require('duplexify')`](https://www.npmjs.com/package/duplexify)
-
-#### example
-
-```js
-// lets spawn a process and take its stdout and stdin and combine them into 1 stream
-var child = require('child_process')
-
-// @- tells it to read from stdin, --data-binary sets 'raw' binary mode
-var curl = child.spawn('curl -X POST --data-binary @- http://foo.com')
-
-// duplexCurl will write to stdin and read from stdout
-var duplexCurl = miss.duplex(curl.stdin, curl.stdout)
-```
-
-### through
-
-##### `var transformer = miss.through([options, transformFunction, flushFunction])`
-
-Make a custom [transform stream](https://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform).
-
-The `options` object is passed to the internal transform stream and can be used to create an `objectMode` stream (or use the shortcut `miss.through.obj([...])`)
-
-The `transformFunction` is called when data is available for the writable side and has the signature `(chunk, encoding, cb)`. Within the function, add data to the readable side any number of times with `this.push(data)`. Call `cb()` to indicate processing of the `chunk` is complete. Or to easily emit a single error or chunk, call `cb(err, chunk)`
-
-The `flushFunction`, with signature `(cb)`, is called just before the stream is complete and should be used to wrap up stream processing.
-
-#### original module
-
-`miss.through` is provided by [`require('through2')`](https://www.npmjs.com/package/through2)
-
-#### example
-
-```js
-var fs = require('fs')
-
-var read = fs.createReadStream('./boring_lowercase.txt')
-var write = fs.createWriteStream('./AWESOMECASE.TXT')
-
-// Leaving out the options object
-var uppercaser = miss.through(
- function (chunk, enc, cb) {
- cb(null, chunk.toString().toUpperCase())
- },
- function (cb) {
- cb(null, 'ONE LAST BIT OF UPPERCASE')
- }
-)
-
-miss.pipe(read, uppercaser, write, function (err) {
- if (err) return console.error('Trouble uppercasing!')
- console.log('Splendid uppercasing!')
-})
-```
-
-### from
-
-##### `miss.from([opts], read)`
-
-Make a custom [readable stream](https://nodejs.org/docs/latest/api/stream.html#stream_class_stream_readable).
-
-`opts` contains the options to pass on to the ReadableStream constructor e.g. for creating a readable object stream (or use the shortcut `miss.from.obj([...])`).
-
-Returns a readable stream that calls `read(size, next)` when data is requested from the stream.
-
-- `size` is the recommended amount of data (in bytes) to retrieve.
-- `next(err, chunk)` should be called when you're ready to emit more data.
-
-#### original module
-
-`miss.from` is provided by [`require('from2')`](https://www.npmjs.com/package/from2)
-
-#### example
-
-```js
-
-
-function fromString(string) {
- return miss.from(function(size, next) {
- // if there's no more content
- // left in the string, close the stream.
- if (string.length <= 0) return next(null, null)
-
- // Pull in a new chunk of text,
- // removing it from the string.
- var chunk = string.slice(0, size)
- string = string.slice(size)
-
- // Emit "chunk" from the stream.
- next(null, chunk)
- })
-}
-
-// pipe "hello world" out
-// to stdout.
-fromString('hello world').pipe(process.stdout)
-```
-
-### to
-
-##### `miss.to([options], write, [flush])`
-
-Make a custom [writable stream](https://nodejs.org/docs/latest/api/stream.html#stream_class_stream_writable).
-
-`opts` contains the options to pass on to the WritableStream constructor e.g. for creating a writable object stream (or use the shortcut `miss.to.obj([...])`).
-
-Returns a writable stream that calls `write(data, enc, cb)` when data is written to the stream.
-
-- `data` is the received data to write the destination.
-- `enc` encoding of the piece of data received.
-- `cb(err, data)` should be called when you're ready to write more data, or encountered an error.
-
-`flush(cb)` is called before `finish` is emitted and allows for cleanup steps to occur.
-
-#### original module
-
-`miss.to` is provided by [`require('flush-write-stream')`](https://www.npmjs.com/package/flush-write-stream)
-
-#### example
-
-```js
-var ws = miss.to(write, flush)
-
-ws.on('finish', function () {
- console.log('finished')
-})
-
-ws.write('hello')
-ws.write('world')
-ws.end()
-
-function write (data, enc, cb) {
- // i am your normal ._write method
- console.log('writing', data.toString())
- cb()
-}
-
-function flush (cb) {
- // i am called before finish is emitted
- setTimeout(cb, 1000) // wait 1 sec
-}
-```
-
-If you run the above it will produce the following output
-
-```
-writing hello
-writing world
-(nothing happens for 1 sec)
-finished
-```
-
-### concat
-
-##### `var concat = miss.concat(cb)`
-
-Returns a writable stream that concatenates all data written to the stream and calls a callback with the single result.
-
-Calling `miss.concat(cb)` returns a writable stream. `cb` is called when the writable stream is finished, e.g. when all data is done being written to it. `cb` is called with a single argument, `(data)`, which will contain the result of concatenating all the data written to the stream.
-
-Note that `miss.concat` will not handle stream errors for you. To handle errors, use `miss.pipe` or handle the `error` event manually.
-
-#### original module
-
-`miss.concat` is provided by [`require('concat-stream')`](https://www.npmjs.com/package/concat-stream)
-
-#### example
-
-```js
-var fs = require('fs')
-
-var readStream = fs.createReadStream('cat.png')
-var concatStream = miss.concat(gotPicture)
-
-function callback (err) {
- if (err) {
- console.error(err)
- process.exit(1)
- }
-}
-
-miss.pipe(readStream, concatStream, callback)
-
-function gotPicture(imageBuffer) {
- // imageBuffer is all of `cat.png` as a node.js Buffer
-}
-
-function handleError(err) {
- // handle your error appropriately here, e.g.:
- console.error(err) // print the error to STDERR
- process.exit(1) // exit program with non-zero exit code
-}
-```
-
-### finished
-
-##### `miss.finished(stream, cb)`
-
-Waits for `stream` to finish or error and then calls `cb` with `(err)`. `cb` will only be called once. `err` will be null if the stream finished without error, or else it will be populated with the error from the streams `error` event.
-
-This function is useful for simplifying stream handling code as it lets you handle success or error conditions in a single code path. It's used internally `miss.pipe`.
-
-#### original module
-
-`miss.finished` is provided by [`require('end-of-stream')`](https://www.npmjs.com/package/end-of-stream)
-
-#### example
-
-```js
-var copySource = fs.createReadStream('./movie.mp4')
-var copyDest = fs.createWriteStream('./movie-copy.mp4')
-
-copySource.pipe(copyDest)
-
-miss.finished(copyDest, function(err) {
- if (err) return console.log('write failed', err)
- console.log('write success')
-})
-```
-
-### parallel
-
-##### `miss.parallel(concurrency, each)`
-
-This works like `through` except you can process items in parallel, while still preserving the original input order.
-
-This is handy if you wanna take advantage of node's async I/O and process streams of items in batches. With this module you can build your very own streaming parallel job queue.
-
-Note that `miss.parallel` preserves input ordering, if you don't need that then you can use [through2-concurrent](https://github.com/almost/through2-concurrent) instead, which is very similar to this otherwise.
-
-#### original module
-
-`miss.parallel` is provided by [`require('parallel-transform')`](https://npmjs.org/parallel-transform)
-
-#### example
-
-This example fetches the GET HTTP headers for a stream of input URLs 5 at a time in parallel.
-
-```js
-function getResponse (item, cb) {
- var r = request(item.url)
- r.on('error', function (err) {
- cb(err)
- })
- r.on('response', function (re) {
- cb(null, {url: item.url, date: new Date(), status: re.statusCode, headers: re.headers})
- r.abort()
- })
-}
-
-miss.pipe(
- fs.createReadStream('./urls.txt'), // one url per line
- split(),
- miss.parallel(5, getResponse),
- miss.through(function (row, enc, next) {
- console.log(JSON.stringify(row))
- next()
- })
-)
-```
-
-## see also
-
-- [substack/stream-handbook](https://github.com/substack/stream-handbook)
-- [nodejs.org/api/stream.html](https://nodejs.org/api/stream.html)
-- [awesome-nodejs-streams](https://github.com/thejmazz/awesome-nodejs-streams)
-
-## license
-
-Licensed under the BSD 2-clause license.
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/package.json b/deps/npm/node_modules/npm-profile/node_modules/cacache/package.json
deleted file mode 100644
index 1f53946239..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/package.json
+++ /dev/null
@@ -1,137 +0,0 @@
-{
- "_from": "cacache@^10.0.0",
- "_id": "cacache@10.0.4",
- "_inBundle": false,
- "_integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==",
- "_location": "/npm-profile/cacache",
- "_phantomChildren": {
- "concat-stream": "1.6.2",
- "duplexify": "3.6.0",
- "end-of-stream": "1.4.1",
- "flush-write-stream": "1.0.3",
- "from2": "2.3.0",
- "parallel-transform": "1.1.0",
- "pump": "2.0.1",
- "pumpify": "1.5.1",
- "stream-each": "1.2.2",
- "through2": "2.0.3"
- },
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "cacache@^10.0.0",
- "name": "cacache",
- "escapedName": "cacache",
- "rawSpec": "^10.0.0",
- "saveSpec": null,
- "fetchSpec": "^10.0.0"
- },
- "_requiredBy": [
- "/npm-profile/make-fetch-happen"
- ],
- "_resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz",
- "_shasum": "6452367999eff9d4188aefd9a14e9d7c6a263460",
- "_spec": "cacache@^10.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen",
- "author": {
- "name": "Kat Marchán",
- "email": "kzm@sykosomatic.org"
- },
- "bugs": {
- "url": "https://github.com/zkat/cacache/issues"
- },
- "bundleDependencies": false,
- "cache-version": {
- "content": "2",
- "index": "5"
- },
- "config": {
- "nyc": {
- "exclude": [
- "node_modules/**",
- "test/**"
- ]
- }
- },
- "contributors": [
- {
- "name": "Charlotte Spencer",
- "email": "charlottelaspencer@gmail.com"
- },
- {
- "name": "Rebecca Turner",
- "email": "me@re-becca.org"
- }
- ],
- "dependencies": {
- "bluebird": "^3.5.1",
- "chownr": "^1.0.1",
- "glob": "^7.1.2",
- "graceful-fs": "^4.1.11",
- "lru-cache": "^4.1.1",
- "mississippi": "^2.0.0",
- "mkdirp": "^0.5.1",
- "move-concurrently": "^1.0.1",
- "promise-inflight": "^1.0.1",
- "rimraf": "^2.6.2",
- "ssri": "^5.2.4",
- "unique-filename": "^1.1.0",
- "y18n": "^4.0.0"
- },
- "deprecated": false,
- "description": "Fast, fault-tolerant, cross-platform, disk-based, data-agnostic, content-addressable cache.",
- "devDependencies": {
- "benchmark": "^2.1.4",
- "chalk": "^2.3.1",
- "cross-env": "^5.1.3",
- "nyc": "^11.4.1",
- "require-inject": "^1.4.2",
- "safe-buffer": "^5.1.1",
- "standard": "^10.0.3",
- "standard-version": "^4.3.0",
- "tacks": "^1.2.2",
- "tap": "^11.1.0",
- "weallbehave": "^1.2.0",
- "weallcontribute": "^1.0.8"
- },
- "files": [
- "*.js",
- "lib",
- "locales"
- ],
- "homepage": "https://github.com/zkat/cacache#readme",
- "keywords": [
- "cache",
- "caching",
- "content-addressable",
- "sri",
- "sri hash",
- "subresource integrity",
- "cache",
- "storage",
- "store",
- "file store",
- "filesystem",
- "disk cache",
- "disk storage"
- ],
- "license": "ISC",
- "main": "index.js",
- "name": "cacache",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/zkat/cacache.git"
- },
- "scripts": {
- "benchmarks": "node test/benchmarks",
- "postrelease": "npm publish && git push --follow-tags",
- "prerelease": "npm t",
- "pretest": "standard",
- "release": "standard-version -s",
- "test": "cross-env CACACHE_UPDATE_LOCALE_FILES=true nyc --all -- tap -J test/*.js",
- "test-docker": "docker run -it --rm --name pacotest -v \"$PWD\":/tmp -w /tmp node:latest npm test",
- "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
- "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
- },
- "version": "10.0.4"
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/put.js b/deps/npm/node_modules/npm-profile/node_modules/cacache/put.js
deleted file mode 100644
index fe1293e5e7..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/put.js
+++ /dev/null
@@ -1,71 +0,0 @@
-'use strict'
-
-const index = require('./lib/entry-index')
-const memo = require('./lib/memoization')
-const write = require('./lib/content/write')
-const to = require('mississippi').to
-
-module.exports = putData
-function putData (cache, key, data, opts) {
- opts = opts || {}
- return write(cache, data, opts).then(res => {
- // TODO - stop modifying opts
- opts.size = res.size
- return index.insert(cache, key, res.integrity, opts).then(entry => {
- if (opts.memoize) {
- memo.put(cache, entry, data, opts)
- }
- return res.integrity
- })
- })
-}
-
-module.exports.stream = putStream
-function putStream (cache, key, opts) {
- opts = opts || {}
- let integrity
- let size
- const contentStream = write.stream(
- cache, opts
- ).on('integrity', int => {
- integrity = int
- }).on('size', s => {
- size = s
- })
- let memoData
- let memoTotal = 0
- const stream = to((chunk, enc, cb) => {
- contentStream.write(chunk, enc, () => {
- if (opts.memoize) {
- if (!memoData) { memoData = [] }
- memoData.push(chunk)
- memoTotal += chunk.length
- }
- cb()
- })
- }, cb => {
- contentStream.end(() => {
- // TODO - stop modifying `opts`
- opts.size = size
- index.insert(cache, key, integrity, opts).then(entry => {
- if (opts.memoize) {
- memo.put(cache, entry, Buffer.concat(memoData, memoTotal), opts)
- }
- stream.emit('integrity', integrity)
- cb()
- })
- })
- })
- let erred = false
- stream.once('error', err => {
- if (erred) { return }
- erred = true
- contentStream.emit('error', err)
- })
- contentStream.once('error', err => {
- if (erred) { return }
- erred = true
- stream.emit('error', err)
- })
- return stream
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/rm.js b/deps/npm/node_modules/npm-profile/node_modules/cacache/rm.js
deleted file mode 100644
index e71a1d27b4..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/rm.js
+++ /dev/null
@@ -1,28 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const index = require('./lib/entry-index')
-const memo = require('./lib/memoization')
-const path = require('path')
-const rimraf = BB.promisify(require('rimraf'))
-const rmContent = require('./lib/content/rm')
-
-module.exports = entry
-module.exports.entry = entry
-function entry (cache, key) {
- memo.clearMemoized()
- return index.delete(cache, key)
-}
-
-module.exports.content = content
-function content (cache, integrity) {
- memo.clearMemoized()
- return rmContent(cache, integrity)
-}
-
-module.exports.all = all
-function all (cache) {
- memo.clearMemoized()
- return rimraf(path.join(cache, '*(content-*|index-*)'))
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/cacache/verify.js b/deps/npm/node_modules/npm-profile/node_modules/cacache/verify.js
deleted file mode 100644
index db7763d7af..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/cacache/verify.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict'
-
-module.exports = require('./lib/verify')
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/CHANGELOG.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/CHANGELOG.md
deleted file mode 100644
index f91df12721..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/CHANGELOG.md
+++ /dev/null
@@ -1,509 +0,0 @@
-# Change Log
-
-All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
-
-<a name="2.6.0"></a>
-# [2.6.0](https://github.com/zkat/make-fetch-happen/compare/v2.5.0...v2.6.0) (2017-11-14)
-
-
-### Bug Fixes
-
-* **integrity:** disable node-fetch compress when checking integrity (#42) ([a7cc74c](https://github.com/zkat/make-fetch-happen/commit/a7cc74c))
-
-
-### Features
-
-* **onretry:** Add `options.onRetry` (#48) ([f90ccff](https://github.com/zkat/make-fetch-happen/commit/f90ccff))
-
-
-
-<a name="2.5.0"></a>
-# [2.5.0](https://github.com/zkat/make-fetch-happen/compare/v2.4.13...v2.5.0) (2017-08-24)
-
-
-### Bug Fixes
-
-* **agent:** support timeout durations greater than 30 seconds ([04875ae](https://github.com/zkat/make-fetch-happen/commit/04875ae)), closes [#35](https://github.com/zkat/make-fetch-happen/issues/35)
-
-
-### Features
-
-* **cache:** export cache deletion functionality (#40) ([3da4250](https://github.com/zkat/make-fetch-happen/commit/3da4250))
-
-
-
-<a name="2.4.13"></a>
-## [2.4.13](https://github.com/zkat/make-fetch-happen/compare/v2.4.12...v2.4.13) (2017-06-29)
-
-
-### Bug Fixes
-
-* **deps:** bump other deps for bugfixes ([eab8297](https://github.com/zkat/make-fetch-happen/commit/eab8297))
-* **proxy:** bump proxy deps with bugfixes (#32) ([632f860](https://github.com/zkat/make-fetch-happen/commit/632f860)), closes [#32](https://github.com/zkat/make-fetch-happen/issues/32)
-
-
-
-<a name="2.4.12"></a>
-## [2.4.12](https://github.com/zkat/make-fetch-happen/compare/v2.4.11...v2.4.12) (2017-06-06)
-
-
-### Bug Fixes
-
-* **cache:** encode x-local-cache-etc headers to be header-safe ([dc9fb1b](https://github.com/zkat/make-fetch-happen/commit/dc9fb1b))
-
-
-
-<a name="2.4.11"></a>
-## [2.4.11](https://github.com/zkat/make-fetch-happen/compare/v2.4.10...v2.4.11) (2017-06-05)
-
-
-### Bug Fixes
-
-* **deps:** bump deps with ssri fix ([bef1994](https://github.com/zkat/make-fetch-happen/commit/bef1994))
-
-
-
-<a name="2.4.10"></a>
-## [2.4.10](https://github.com/zkat/make-fetch-happen/compare/v2.4.9...v2.4.10) (2017-05-31)
-
-
-### Bug Fixes
-
-* **deps:** bump dep versions with bugfixes ([0af4003](https://github.com/zkat/make-fetch-happen/commit/0af4003))
-* **proxy:** use auth parameter for proxy authentication (#30) ([c687306](https://github.com/zkat/make-fetch-happen/commit/c687306))
-
-
-
-<a name="2.4.9"></a>
-## [2.4.9](https://github.com/zkat/make-fetch-happen/compare/v2.4.8...v2.4.9) (2017-05-25)
-
-
-### Bug Fixes
-
-* **cache:** use the passed-in promise for resolving cache stuff ([4c46257](https://github.com/zkat/make-fetch-happen/commit/4c46257))
-
-
-
-<a name="2.4.8"></a>
-## [2.4.8](https://github.com/zkat/make-fetch-happen/compare/v2.4.7...v2.4.8) (2017-05-25)
-
-
-### Bug Fixes
-
-* **cache:** pass uid/gid/Promise through to cache ([a847c92](https://github.com/zkat/make-fetch-happen/commit/a847c92))
-
-
-
-<a name="2.4.7"></a>
-## [2.4.7](https://github.com/zkat/make-fetch-happen/compare/v2.4.6...v2.4.7) (2017-05-24)
-
-
-### Bug Fixes
-
-* **deps:** pull in various fixes from deps ([fc2a587](https://github.com/zkat/make-fetch-happen/commit/fc2a587))
-
-
-
-<a name="2.4.6"></a>
-## [2.4.6](https://github.com/zkat/make-fetch-happen/compare/v2.4.5...v2.4.6) (2017-05-24)
-
-
-### Bug Fixes
-
-* **proxy:** choose agent for http(s)-proxy by protocol of destUrl ([ea4832a](https://github.com/zkat/make-fetch-happen/commit/ea4832a))
-* **proxy:** make socks proxy working ([1de810a](https://github.com/zkat/make-fetch-happen/commit/1de810a))
-* **proxy:** revert previous proxy solution ([563b0d8](https://github.com/zkat/make-fetch-happen/commit/563b0d8))
-
-
-
-<a name="2.4.5"></a>
-## [2.4.5](https://github.com/zkat/make-fetch-happen/compare/v2.4.4...v2.4.5) (2017-05-24)
-
-
-### Bug Fixes
-
-* **proxy:** use the destination url when determining agent ([1a714e7](https://github.com/zkat/make-fetch-happen/commit/1a714e7))
-
-
-
-<a name="2.4.4"></a>
-## [2.4.4](https://github.com/zkat/make-fetch-happen/compare/v2.4.3...v2.4.4) (2017-05-23)
-
-
-### Bug Fixes
-
-* **redirect:** handle redirects explicitly (#27) ([4c4af54](https://github.com/zkat/make-fetch-happen/commit/4c4af54))
-
-
-
-<a name="2.4.3"></a>
-## [2.4.3](https://github.com/zkat/make-fetch-happen/compare/v2.4.2...v2.4.3) (2017-05-06)
-
-
-### Bug Fixes
-
-* **redirect:** redirects now delete authorization if hosts fail to match ([c071805](https://github.com/zkat/make-fetch-happen/commit/c071805))
-
-
-
-<a name="2.4.2"></a>
-## [2.4.2](https://github.com/zkat/make-fetch-happen/compare/v2.4.1...v2.4.2) (2017-05-04)
-
-
-### Bug Fixes
-
-* **cache:** reduce race condition window by checking for content ([24544b1](https://github.com/zkat/make-fetch-happen/commit/24544b1))
-* **match:** Rewrite the conditional stream logic (#25) ([66bba4b](https://github.com/zkat/make-fetch-happen/commit/66bba4b))
-
-
-
-<a name="2.4.1"></a>
-## [2.4.1](https://github.com/zkat/make-fetch-happen/compare/v2.4.0...v2.4.1) (2017-04-28)
-
-
-### Bug Fixes
-
-* **memoization:** missed spots + allow passthrough of memo objs ([ac0cd12](https://github.com/zkat/make-fetch-happen/commit/ac0cd12))
-
-
-
-<a name="2.4.0"></a>
-# [2.4.0](https://github.com/zkat/make-fetch-happen/compare/v2.3.0...v2.4.0) (2017-04-28)
-
-
-### Bug Fixes
-
-* **memoize:** cacache had a broken memoizer ([8a9ed4c](https://github.com/zkat/make-fetch-happen/commit/8a9ed4c))
-
-
-### Features
-
-* **memoization:** only slurp stuff into memory if opts.memoize is not false ([0744adc](https://github.com/zkat/make-fetch-happen/commit/0744adc))
-
-
-
-<a name="2.3.0"></a>
-# [2.3.0](https://github.com/zkat/make-fetch-happen/compare/v2.2.6...v2.3.0) (2017-04-27)
-
-
-### Features
-
-* **agent:** added opts.strictSSL and opts.localAddress ([c35015a](https://github.com/zkat/make-fetch-happen/commit/c35015a))
-* **proxy:** Added opts.noProxy and NO_PROXY support ([f45c915](https://github.com/zkat/make-fetch-happen/commit/f45c915))
-
-
-
-<a name="2.2.6"></a>
-## [2.2.6](https://github.com/zkat/make-fetch-happen/compare/v2.2.5...v2.2.6) (2017-04-26)
-
-
-### Bug Fixes
-
-* **agent:** check uppercase & lowercase proxy env (#24) ([acf2326](https://github.com/zkat/make-fetch-happen/commit/acf2326)), closes [#22](https://github.com/zkat/make-fetch-happen/issues/22)
-* **deps:** switch to node-fetch-npm and stop bundling ([3db603b](https://github.com/zkat/make-fetch-happen/commit/3db603b))
-
-
-
-<a name="2.2.5"></a>
-## [2.2.5](https://github.com/zkat/make-fetch-happen/compare/v2.2.4...v2.2.5) (2017-04-23)
-
-
-### Bug Fixes
-
-* **deps:** bump cacache and use its size feature ([926c1d3](https://github.com/zkat/make-fetch-happen/commit/926c1d3))
-
-
-
-<a name="2.2.4"></a>
-## [2.2.4](https://github.com/zkat/make-fetch-happen/compare/v2.2.3...v2.2.4) (2017-04-18)
-
-
-### Bug Fixes
-
-* **integrity:** hash verification issues fixed ([07f9402](https://github.com/zkat/make-fetch-happen/commit/07f9402))
-
-
-
-<a name="2.2.3"></a>
-## [2.2.3](https://github.com/zkat/make-fetch-happen/compare/v2.2.2...v2.2.3) (2017-04-18)
-
-
-### Bug Fixes
-
-* **staleness:** responses older than 8h were never stale :< ([b54dd75](https://github.com/zkat/make-fetch-happen/commit/b54dd75))
-* **warning:** remove spurious warning, make format more spec-compliant ([2e4f6bb](https://github.com/zkat/make-fetch-happen/commit/2e4f6bb))
-
-
-
-<a name="2.2.2"></a>
-## [2.2.2](https://github.com/zkat/make-fetch-happen/compare/v2.2.1...v2.2.2) (2017-04-12)
-
-
-### Bug Fixes
-
-* **retry:** stop retrying 404s ([6fafd53](https://github.com/zkat/make-fetch-happen/commit/6fafd53))
-
-
-
-<a name="2.2.1"></a>
-## [2.2.1](https://github.com/zkat/make-fetch-happen/compare/v2.2.0...v2.2.1) (2017-04-10)
-
-
-### Bug Fixes
-
-* **deps:** move test-only deps to devDeps ([2daaf80](https://github.com/zkat/make-fetch-happen/commit/2daaf80))
-
-
-
-<a name="2.2.0"></a>
-# [2.2.0](https://github.com/zkat/make-fetch-happen/compare/v2.1.0...v2.2.0) (2017-04-09)
-
-
-### Bug Fixes
-
-* **cache:** treat caches as private ([57b7dc2](https://github.com/zkat/make-fetch-happen/commit/57b7dc2))
-
-
-### Features
-
-* **retry:** accept shorthand retry settings ([dfed69d](https://github.com/zkat/make-fetch-happen/commit/dfed69d))
-
-
-
-<a name="2.1.0"></a>
-# [2.1.0](https://github.com/zkat/make-fetch-happen/compare/v2.0.4...v2.1.0) (2017-04-09)
-
-
-### Features
-
-* **cache:** cache now obeys Age and a variety of other things (#13) ([7b9652d](https://github.com/zkat/make-fetch-happen/commit/7b9652d))
-
-
-
-<a name="2.0.4"></a>
-## [2.0.4](https://github.com/zkat/make-fetch-happen/compare/v2.0.3...v2.0.4) (2017-04-09)
-
-
-### Bug Fixes
-
-* **agent:** accept Request as fetch input, not just strings ([b71669a](https://github.com/zkat/make-fetch-happen/commit/b71669a))
-
-
-
-<a name="2.0.3"></a>
-## [2.0.3](https://github.com/zkat/make-fetch-happen/compare/v2.0.2...v2.0.3) (2017-04-09)
-
-
-### Bug Fixes
-
-* **deps:** seriously ([c29e7e7](https://github.com/zkat/make-fetch-happen/commit/c29e7e7))
-
-
-
-<a name="2.0.2"></a>
-## [2.0.2](https://github.com/zkat/make-fetch-happen/compare/v2.0.1...v2.0.2) (2017-04-09)
-
-
-### Bug Fixes
-
-* **deps:** use bundleDeps instead ([c36ebf0](https://github.com/zkat/make-fetch-happen/commit/c36ebf0))
-
-
-
-<a name="2.0.1"></a>
-## [2.0.1](https://github.com/zkat/make-fetch-happen/compare/v2.0.0...v2.0.1) (2017-04-09)
-
-
-### Bug Fixes
-
-* **deps:** make sure node-fetch tarball included in release ([3bf49d1](https://github.com/zkat/make-fetch-happen/commit/3bf49d1))
-
-
-
-<a name="2.0.0"></a>
-# [2.0.0](https://github.com/zkat/make-fetch-happen/compare/v1.7.0...v2.0.0) (2017-04-09)
-
-
-### Bug Fixes
-
-* **deps:** manually pull in newer node-fetch to avoid babel prod dep ([66e5e87](https://github.com/zkat/make-fetch-happen/commit/66e5e87))
-* **retry:** be more specific about when we retry ([a47b782](https://github.com/zkat/make-fetch-happen/commit/a47b782))
-
-
-### Features
-
-* **agent:** add ca/cert/key support to auto-agent (#15) ([57585a7](https://github.com/zkat/make-fetch-happen/commit/57585a7))
-
-
-### BREAKING CHANGES
-
-* **agent:** pac proxies are no longer supported.
-* **retry:** Retry logic has changes.
-
-* 404s, 420s, and 429s all retry now.
-* ENOTFOUND no longer retries.
-* Only ECONNRESET, ECONNREFUSED, EADDRINUSE, ETIMEDOUT, and `request-timeout` errors are retried.
-
-
-
-<a name="1.7.0"></a>
-# [1.7.0](https://github.com/zkat/make-fetch-happen/compare/v1.6.0...v1.7.0) (2017-04-08)
-
-
-### Features
-
-* **cache:** add useful headers to inform users about cached data ([9bd7b00](https://github.com/zkat/make-fetch-happen/commit/9bd7b00))
-
-
-
-<a name="1.6.0"></a>
-# [1.6.0](https://github.com/zkat/make-fetch-happen/compare/v1.5.1...v1.6.0) (2017-04-06)
-
-
-### Features
-
-* **agent:** better, keepalive-supporting, default http agents ([16277f6](https://github.com/zkat/make-fetch-happen/commit/16277f6))
-
-
-
-<a name="1.5.1"></a>
-## [1.5.1](https://github.com/zkat/make-fetch-happen/compare/v1.5.0...v1.5.1) (2017-04-05)
-
-
-### Bug Fixes
-
-* **cache:** bump cacache for its fixed error messages ([2f2b916](https://github.com/zkat/make-fetch-happen/commit/2f2b916))
-* **cache:** fix handling of errors in cache reads ([5729222](https://github.com/zkat/make-fetch-happen/commit/5729222))
-
-
-
-<a name="1.5.0"></a>
-# [1.5.0](https://github.com/zkat/make-fetch-happen/compare/v1.4.0...v1.5.0) (2017-04-04)
-
-
-### Features
-
-* **retry:** retry requests on 408 timeouts, too ([8d8b5bd](https://github.com/zkat/make-fetch-happen/commit/8d8b5bd))
-
-
-
-<a name="1.4.0"></a>
-# [1.4.0](https://github.com/zkat/make-fetch-happen/compare/v1.3.1...v1.4.0) (2017-04-04)
-
-
-### Bug Fixes
-
-* **cache:** stop relying on BB.catch ([2b04494](https://github.com/zkat/make-fetch-happen/commit/2b04494))
-
-
-### Features
-
-* **retry:** report retry attempt number as extra header ([fd50927](https://github.com/zkat/make-fetch-happen/commit/fd50927))
-
-
-
-<a name="1.3.1"></a>
-## [1.3.1](https://github.com/zkat/make-fetch-happen/compare/v1.3.0...v1.3.1) (2017-04-04)
-
-
-### Bug Fixes
-
-* **cache:** pretend cache entry is missing on ENOENT ([9c2bb26](https://github.com/zkat/make-fetch-happen/commit/9c2bb26))
-
-
-
-<a name="1.3.0"></a>
-# [1.3.0](https://github.com/zkat/make-fetch-happen/compare/v1.2.1...v1.3.0) (2017-04-04)
-
-
-### Bug Fixes
-
-* **cache:** if metadata is missing for some odd reason, ignore the entry ([a021a6b](https://github.com/zkat/make-fetch-happen/commit/a021a6b))
-
-
-### Features
-
-* **cache:** add special headers when request was loaded straight from cache ([8a7dbd1](https://github.com/zkat/make-fetch-happen/commit/8a7dbd1))
-* **cache:** allow configuring algorithms to be calculated on insertion ([bf4a0f2](https://github.com/zkat/make-fetch-happen/commit/bf4a0f2))
-
-
-
-<a name="1.2.1"></a>
-## [1.2.1](https://github.com/zkat/make-fetch-happen/compare/v1.2.0...v1.2.1) (2017-04-03)
-
-
-### Bug Fixes
-
-* **integrity:** update cacache and ssri and change EBADCHECKSUM -> EINTEGRITY ([b6cf6f6](https://github.com/zkat/make-fetch-happen/commit/b6cf6f6))
-
-
-
-<a name="1.2.0"></a>
-# [1.2.0](https://github.com/zkat/make-fetch-happen/compare/v1.1.0...v1.2.0) (2017-04-03)
-
-
-### Features
-
-* **integrity:** full Subresource Integrity support (#10) ([a590159](https://github.com/zkat/make-fetch-happen/commit/a590159))
-
-
-
-<a name="1.1.0"></a>
-# [1.1.0](https://github.com/zkat/make-fetch-happen/compare/v1.0.1...v1.1.0) (2017-04-01)
-
-
-### Features
-
-* **opts:** fetch.defaults() for default options ([522a65e](https://github.com/zkat/make-fetch-happen/commit/522a65e))
-
-
-
-<a name="1.0.1"></a>
-## [1.0.1](https://github.com/zkat/make-fetch-happen/compare/v1.0.0...v1.0.1) (2017-04-01)
-
-
-
-<a name="1.0.0"></a>
-# 1.0.0 (2017-04-01)
-
-
-### Bug Fixes
-
-* **cache:** default on cache-control header ([b872a2c](https://github.com/zkat/make-fetch-happen/commit/b872a2c))
-* standard stuff and cache matching ([753f2c2](https://github.com/zkat/make-fetch-happen/commit/753f2c2))
-* **agent:** nudge around things with opts.agent ([ed62b57](https://github.com/zkat/make-fetch-happen/commit/ed62b57))
-* **agent:** {agent: false} has special behavior ([b8cc923](https://github.com/zkat/make-fetch-happen/commit/b8cc923))
-* **cache:** invalidation on non-GET ([fe78fac](https://github.com/zkat/make-fetch-happen/commit/fe78fac))
-* **cache:** make force-cache and only-if-cached work as expected ([f50e9df](https://github.com/zkat/make-fetch-happen/commit/f50e9df))
-* **cache:** more spec compliance ([d5a56db](https://github.com/zkat/make-fetch-happen/commit/d5a56db))
-* **cache:** only cache 200 gets ([0abb25a](https://github.com/zkat/make-fetch-happen/commit/0abb25a))
-* **cache:** only load cache code if cache opt is a string ([250fcd5](https://github.com/zkat/make-fetch-happen/commit/250fcd5))
-* **cache:** oops ([e3fa15a](https://github.com/zkat/make-fetch-happen/commit/e3fa15a))
-* **cache:** refactored warning removal into main file ([5b0a9f9](https://github.com/zkat/make-fetch-happen/commit/5b0a9f9))
-* **cache:** req constructor no longer needed in Cache ([5b74cbc](https://github.com/zkat/make-fetch-happen/commit/5b74cbc))
-* **cache:** standard fetch api calls cacheMode "cache" ([6fba805](https://github.com/zkat/make-fetch-happen/commit/6fba805))
-* **cache:** was using wrong method for non-GET/HEAD cache invalidation ([810763a](https://github.com/zkat/make-fetch-happen/commit/810763a))
-* **caching:** a bunch of cache-related fixes ([8ebda1d](https://github.com/zkat/make-fetch-happen/commit/8ebda1d))
-* **deps:** `cacache[@6](https://github.com/6).3.0` - race condition fixes ([9528442](https://github.com/zkat/make-fetch-happen/commit/9528442))
-* **freshness:** fix regex for cacheControl matching ([070db86](https://github.com/zkat/make-fetch-happen/commit/070db86))
-* **freshness:** fixed default freshness heuristic value ([5d29e88](https://github.com/zkat/make-fetch-happen/commit/5d29e88))
-* **logging:** remove console.log calls ([a1d0a47](https://github.com/zkat/make-fetch-happen/commit/a1d0a47))
-* **method:** node-fetch guarantees uppercase ([a1d68d6](https://github.com/zkat/make-fetch-happen/commit/a1d68d6))
-* **opts:** simplified opts handling ([516fd6e](https://github.com/zkat/make-fetch-happen/commit/516fd6e))
-* **proxy:** pass proxy option directly to ProxyAgent ([3398460](https://github.com/zkat/make-fetch-happen/commit/3398460))
-* **retry:** false -> {retries: 0} ([297fbb6](https://github.com/zkat/make-fetch-happen/commit/297fbb6))
-* **retry:** only retry put if body is not a stream ([a24e599](https://github.com/zkat/make-fetch-happen/commit/a24e599))
-* **retry:** skip retries if body is a stream for ANY method ([780c0f8](https://github.com/zkat/make-fetch-happen/commit/780c0f8))
-
-
-### Features
-
-* **api:** initial implementation -- can make and cache requests ([7d55b49](https://github.com/zkat/make-fetch-happen/commit/7d55b49))
-* **fetch:** injectable cache, and retry support ([87b84bf](https://github.com/zkat/make-fetch-happen/commit/87b84bf))
-
-
-### BREAKING CHANGES
-
-* **cache:** opts.cache -> opts.cacheManager; opts.cacheMode -> opts.cache
-* **fetch:** opts.cache accepts a Cache-like obj or a path. Requests are now retried.
-* **api:** actual api implemented
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/LICENSE b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/LICENSE
deleted file mode 100644
index c05cb09586..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/LICENSE
+++ /dev/null
@@ -1,3 +0,0 @@
-To the extent possible under law, maintainers for this project have waived all copyright and related or neighboring rights to this project.
-
-For more information on this waiver, see: https://creativecommons.org/publicdomain/zero/1.0/
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/README.md
deleted file mode 100644
index 4d12d8dae7..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/README.md
+++ /dev/null
@@ -1,404 +0,0 @@
-# make-fetch-happen [![npm version](https://img.shields.io/npm/v/make-fetch-happen.svg)](https://npm.im/make-fetch-happen) [![license](https://img.shields.io/npm/l/make-fetch-happen.svg)](https://npm.im/make-fetch-happen) [![Travis](https://img.shields.io/travis/zkat/make-fetch-happen.svg)](https://travis-ci.org/zkat/make-fetch-happen) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/make-fetch-happen?svg=true)](https://ci.appveyor.com/project/zkat/make-fetch-happen) [![Coverage Status](https://coveralls.io/repos/github/zkat/make-fetch-happen/badge.svg?branch=latest)](https://coveralls.io/github/zkat/make-fetch-happen?branch=latest)
-
-
-[`make-fetch-happen`](https://github.com/zkat/make-fetch-happen) is a Node.js
-library that wraps [`node-fetch-npm`](https://github.com/npm/node-fetch-npm) with additional
-features [`node-fetch`](https://github.com/bitinn/node-fetch) doesn't intend to include, including HTTP Cache support, request
-pooling, proxies, retries, [and more](#features)!
-
-## Install
-
-`$ npm install --save make-fetch-happen`
-
-## Table of Contents
-
-* [Example](#example)
-* [Features](#features)
-* [Contributing](#contributing)
-* [API](#api)
- * [`fetch`](#fetch)
- * [`fetch.defaults`](#fetch-defaults)
- * [`node-fetch` options](#node-fetch-options)
- * [`make-fetch-happen` options](#extra-options)
- * [`opts.cacheManager`](#opts-cache-manager)
- * [`opts.cache`](#opts-cache)
- * [`opts.proxy`](#opts-proxy)
- * [`opts.noProxy`](#opts-no-proxy)
- * [`opts.ca, opts.cert, opts.key`](#https-opts)
- * [`opts.maxSockets`](#opts-max-sockets)
- * [`opts.retry`](#opts-retry)
- * [`opts.onRetry`](#opts-onretry)
- * [`opts.integrity`](#opts-integrity)
-* [Message From Our Sponsors](#wow)
-
-### Example
-
-```javascript
-const fetch = require('make-fetch-happen').defaults({
- cacheManager: './my-cache' // path where cache will be written (and read)
-})
-
-fetch('https://registry.npmjs.org/make-fetch-happen').then(res => {
- return res.json() // download the body as JSON
-}).then(body => {
- console.log(`got ${body.name} from web`)
- return fetch('https://registry.npmjs.org/make-fetch-happen', {
- cache: 'no-cache' // forces a conditional request
- })
-}).then(res => {
- console.log(res.status) // 304! cache validated!
- return res.json().then(body => {
- console.log(`got ${body.name} from cache`)
- })
-})
-```
-
-### Features
-
-* Builds around [`node-fetch`](https://npm.im/node-fetch) for the core [`fetch` API](https://fetch.spec.whatwg.org) implementation
-* Request pooling out of the box
-* Quite fast, really
-* Automatic HTTP-semantics-aware request retries
-* Cache-fallback automatic "offline mode"
-* Proxy support (http, https, socks, socks4, socks5)
-* Built-in request caching following full HTTP caching rules (`Cache-Control`, `ETag`, `304`s, cache fallback on error, etc).
-* Customize cache storage with any [Cache API](https://developer.mozilla.org/en-US/docs/Web/API/Cache)-compliant `Cache` instance. Cache to Redis!
-* Node.js Stream support
-* Transparent gzip and deflate support
-* [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) support
-* Literally punches nazis
-* (PENDING) Range request caching and resuming
-
-### Contributing
-
-The make-fetch-happen team enthusiastically welcomes contributions and project participation! There's a bunch of things you can do if you want to contribute! The [Contributor Guide](CONTRIBUTING.md) has all the information you need for everything from reporting bugs to contributing entire new features. Please don't hesitate to jump in if you'd like to, or even ask us questions if something isn't clear.
-
-All participants and maintainers in this project are expected to follow [Code of Conduct](CODE_OF_CONDUCT.md), and just generally be excellent to each other.
-
-Please refer to the [Changelog](CHANGELOG.md) for project history details, too.
-
-Happy hacking!
-
-### API
-
-#### <a name="fetch"></a> `> fetch(uriOrRequest, [opts]) -> Promise<Response>`
-
-This function implements most of the [`fetch` API](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch): given a `uri` string or a `Request` instance, it will fire off an http request and return a Promise containing the relevant response.
-
-If `opts` is provided, the [`node-fetch`-specific options](#node-fetch-options) will be passed to that library. There are also [additional options](#extra-options) specific to make-fetch-happen that add various features, such as HTTP caching, integrity verification, proxy support, and more.
-
-##### Example
-
-```javascript
-fetch('https://google.com').then(res => res.buffer())
-```
-
-#### <a name="fetch-defaults"></a> `> fetch.defaults([defaultUrl], [defaultOpts])`
-
-Returns a new `fetch` function that will call `make-fetch-happen` using `defaultUrl` and `defaultOpts` as default values to any calls.
-
-A defaulted `fetch` will also have a `.defaults()` method, so they can be chained.
-
-##### Example
-
-```javascript
-const fetch = require('make-fetch-happen').defaults({
- cacheManager: './my-local-cache'
-})
-
-fetch('https://registry.npmjs.org/make-fetch-happen') // will always use the cache
-```
-
-#### <a name="node-fetch-options"></a> `> node-fetch options`
-
-The following options for `node-fetch` are used as-is:
-
-* method
-* body
-* redirect
-* follow
-* timeout
-* compress
-* size
-
-These other options are modified or augmented by make-fetch-happen:
-
-* headers - Default `User-Agent` set to make-fetch happen. `Connection` is set to `keep-alive` or `close` automatically depending on `opts.agent`.
-* agent
- * If agent is null, an http or https Agent will be automatically used. By default, these will be `http.globalAgent` and `https.globalAgent`.
- * If [`opts.proxy`](#opts-proxy) is provided and `opts.agent` is null, the agent will be set to an appropriate proxy-handling agent.
- * If `opts.agent` is an object, it will be used as the request-pooling agent argument for this request.
- * If `opts.agent` is `false`, it will be passed as-is to the underlying request library. This causes a new Agent to be spawned for every request.
-
-For more details, see [the documentation for `node-fetch` itself](https://github.com/bitinn/node-fetch#options).
-
-#### <a name="extra-options"></a> `> make-fetch-happen options`
-
-make-fetch-happen augments the `node-fetch` API with additional features available through extra options. The following extra options are available:
-
-* [`opts.cacheManager`](#opts-cache-manager) - Cache target to read/write
-* [`opts.cache`](#opts-cache) - `fetch` cache mode. Controls cache *behavior*.
-* [`opts.proxy`](#opts-proxy) - Proxy agent
-* [`opts.noProxy`](#opts-no-proxy) - Domain segments to disable proxying for.
-* [`opts.ca, opts.cert, opts.key, opts.strictSSL`](#https-opts)
-* [`opts.localAddress`](#opts-local-address)
-* [`opts.maxSockets`](#opts-max-sockets)
-* [`opts.retry`](#opts-retry) - Request retry settings
-* [`opts.onRetry`](#opts-onretry) - a function called whenever a retry is attempted
-* [`opts.integrity`](#opts-integrity) - [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) metadata.
-
-#### <a name="opts-cache-manager"></a> `> opts.cacheManager`
-
-Either a `String` or a `Cache`. If the former, it will be assumed to be a `Path` to be used as the cache root for [`cacache`](https://npm.im/cacache).
-
-If an object is provided, it will be assumed to be a compliant [`Cache` instance](https://developer.mozilla.org/en-US/docs/Web/API/Cache). Only `Cache.match()`, `Cache.put()`, and `Cache.delete()` are required. Options objects will not be passed in to `match()` or `delete()`.
-
-By implementing this API, you can customize the storage backend for make-fetch-happen itself -- for example, you could implement a cache that uses `redis` for caching, or simply keeps everything in memory. Most of the caching logic exists entirely on the make-fetch-happen side, so the only thing you need to worry about is reading, writing, and deleting, as well as making sure `fetch.Response` objects are what gets returned.
-
-You can refer to `cache.js` in the make-fetch-happen source code for a reference implementation.
-
-**NOTE**: Requests will not be cached unless their response bodies are consumed. You will need to use one of the `res.json()`, `res.buffer()`, etc methods on the response, or drain the `res.body` stream, in order for it to be written.
-
-The default cache manager also adds the following headers to cached responses:
-
-* `X-Local-Cache`: Path to the cache the content was found in
-* `X-Local-Cache-Key`: Unique cache entry key for this response
-* `X-Local-Cache-Hash`: Specific integrity hash for the cached entry
-* `X-Local-Cache-Time`: UTCString of the cache insertion time for the entry
-
-Using [`cacache`](https://npm.im/cacache), a call like this may be used to
-manually fetch the cached entry:
-
-```javascript
-const h = response.headers
-cacache.get(h.get('x-local-cache'), h.get('x-local-cache-key'))
-
-// grab content only, directly:
-cacache.get.byDigest(h.get('x-local-cache'), h.get('x-local-cache-hash'))
-```
-
-##### Example
-
-```javascript
-fetch('https://registry.npmjs.org/make-fetch-happen', {
- cacheManager: './my-local-cache'
-}) // -> 200-level response will be written to disk
-
-fetch('https://npm.im/cacache', {
- cacheManager: new MyCustomRedisCache(process.env.PORT)
-}) // -> 200-level response will be written to redis
-```
-
-A possible (minimal) implementation for `MyCustomRedisCache`:
-
-```javascript
-const bluebird = require('bluebird')
-const redis = require("redis")
-bluebird.promisifyAll(redis.RedisClient.prototype)
-class MyCustomRedisCache {
- constructor (opts) {
- this.redis = redis.createClient(opts)
- }
- match (req) {
- return this.redis.getAsync(req.url).then(res => {
- if (res) {
- const parsed = JSON.parse(res)
- return new fetch.Response(parsed.body, {
- url: req.url,
- headers: parsed.headers,
- status: 200
- })
- }
- })
- }
- put (req, res) {
- return res.buffer().then(body => {
- return this.redis.setAsync(req.url, JSON.stringify({
- body: body,
- headers: res.headers.raw()
- }))
- }).then(() => {
- // return the response itself
- return res
- })
- }
- 'delete' (req) {
- return this.redis.unlinkAsync(req.url)
- }
-}
-```
-
-#### <a name="opts-cache"></a> `> opts.cache`
-
-This option follows the standard `fetch` API cache option. This option will do nothing if [`opts.cacheManager`](#opts-cache-manager) is null. The following values are accepted (as strings):
-
-* `default` - Fetch will inspect the HTTP cache on the way to the network. If there is a fresh response it will be used. If there is a stale response a conditional request will be created, and a normal request otherwise. It then updates the HTTP cache with the response. If the revalidation request fails (for example, on a 500 or if you're offline), the stale response will be returned.
-* `no-store` - Fetch behaves as if there is no HTTP cache at all.
-* `reload` - Fetch behaves as if there is no HTTP cache on the way to the network. Ergo, it creates a normal request and updates the HTTP cache with the response.
-* `no-cache` - Fetch creates a conditional request if there is a response in the HTTP cache and a normal request otherwise. It then updates the HTTP cache with the response.
-* `force-cache` - Fetch uses any response in the HTTP cache matching the request, not paying attention to staleness. If there was no response, it creates a normal request and updates the HTTP cache with the response.
-* `only-if-cached` - Fetch uses any response in the HTTP cache matching the request, not paying attention to staleness. If there was no response, it returns a network error. (Can only be used when request’s mode is "same-origin". Any cached redirects will be followed assuming request’s redirect mode is "follow" and the redirects do not violate request’s mode.)
-
-(Note: option descriptions are taken from https://fetch.spec.whatwg.org/#http-network-or-cache-fetch)
-
-##### Example
-
-```javascript
-const fetch = require('make-fetch-happen').defaults({
- cacheManager: './my-cache'
-})
-
-// Will error with ENOTCACHED if we haven't already cached this url
-fetch('https://registry.npmjs.org/make-fetch-happen', {
- cache: 'only-if-cached'
-})
-
-// Will refresh any local content and cache the new response
-fetch('https://registry.npmjs.org/make-fetch-happen', {
- cache: 'reload'
-})
-
-// Will use any local data, even if stale. Otherwise, will hit network.
-fetch('https://registry.npmjs.org/make-fetch-happen', {
- cache: 'force-cache'
-})
-```
-
-#### <a name="opts-proxy"></a> `> opts.proxy`
-
-A string or `url.parse`-d URI to proxy through. Different Proxy handlers will be
-used depending on the proxy's protocol.
-
-Additionally, `process.env.HTTP_PROXY`, `process.env.HTTPS_PROXY`, and
-`process.env.PROXY` are used if present and no `opts.proxy` value is provided.
-
-(Pending) `process.env.NO_PROXY` may also be configured to skip proxying requests for all, or specific domains.
-
-##### Example
-
-```javascript
-fetch('https://registry.npmjs.org/make-fetch-happen', {
- proxy: 'https://corporate.yourcompany.proxy:4445'
-})
-
-fetch('https://registry.npmjs.org/make-fetch-happen', {
- proxy: {
- protocol: 'https:',
- hostname: 'corporate.yourcompany.proxy',
- port: 4445
- }
-})
-```
-
-#### <a name="opts-no-proxy"></a> `> opts.noProxy`
-
-If present, should be a comma-separated string or an array of domain extensions
-that a proxy should _not_ be used for.
-
-This option may also be provided through `process.env.NO_PROXY`.
-
-#### <a name="https-opts"></a> `> opts.ca, opts.cert, opts.key, opts.strictSSL`
-
-These values are passed in directly to the HTTPS agent and will be used for both
-proxied and unproxied outgoing HTTPS requests. They mostly correspond to the
-same options the `https` module accepts, which will be themselves passed to
-`tls.connect()`. `opts.strictSSL` corresponds to `rejectUnauthorized`.
-
-#### <a name="opts-local-address"></a> `> opts.localAddress`
-
-Passed directly to `http` and `https` request calls. Determines the local
-address to bind to.
-
-#### <a name="opts-max-sockets"></a> `> opts.maxSockets`
-
-Default: 15
-
-Maximum number of active concurrent sockets to use for the underlying
-Http/Https/Proxy agents. This setting applies once per spawned agent.
-
-15 is probably a _pretty good value_ for most use-cases, and balances speed
-with, uh, not knocking out people's routers. 🤓
-
-#### <a name="opts-retry"></a> `> opts.retry`
-
-An object that can be used to tune request retry settings. Retries will only be attempted on the following conditions:
-
-* Request method is NOT `POST` AND
-* Request status is one of: `408`, `420`, `429`, or any status in the 500-range. OR
-* Request errored with `ECONNRESET`, `ECONNREFUSED`, `EADDRINUSE`, `ETIMEDOUT`, or the `fetch` error `request-timeout`.
-
-The following are worth noting as explicitly not retried:
-
-* `getaddrinfo ENOTFOUND` and will be assumed to be either an unreachable domain or the user will be assumed offline. If a response is cached, it will be returned immediately.
-* `ECONNRESET` currently has no support for restarting. It will eventually be supported but requires a bit more juggling due to streaming.
-
-If `opts.retry` is `false`, it is equivalent to `{retries: 0}`
-
-If `opts.retry` is a number, it is equivalent to `{retries: num}`
-
-The following retry options are available if you want more control over it:
-
-* retries
-* factor
-* minTimeout
-* maxTimeout
-* randomize
-
-For details on what each of these do, refer to the [`retry`](https://npm.im/retry) documentation.
-
-##### Example
-
-```javascript
-fetch('https://flaky.site.com', {
- retry: {
- retries: 10,
- randomize: true
- }
-})
-
-fetch('http://reliable.site.com', {
- retry: false
-})
-
-fetch('http://one-more.site.com', {
- retry: 3
-})
-```
-
-#### <a name="opts-onretry"></a> `> opts.onRetry`
-
-A function called whenever a retry is attempted.
-
-##### Example
-
-```javascript
-fetch('https://flaky.site.com', {
- onRetry() {
- console.log('we will retry!')
- }
-})
-```
-
-#### <a name="opts-integrity"></a> `> opts.integrity`
-
-Matches the response body against the given [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) metadata. If verification fails, the request will fail with an `EINTEGRITY` error.
-
-`integrity` may either be a string or an [`ssri`](https://npm.im/ssri) `Integrity`-like.
-
-##### Example
-
-```javascript
-fetch('https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-1.0.0.tgz', {
- integrity: 'sha1-o47j7zAYnedYFn1dF/fR9OV3z8Q='
-}) // -> ok
-
-fetch('https://malicious-registry.org/make-fetch-happen/-/make-fetch-happen-1.0.0.tgz', {
- integrity: 'sha1-o47j7zAYnedYFn1dF/fR9OV3z8Q='
-}) // Error: EINTEGRITY
-```
-
-### <a name="wow"></a> Message From Our Sponsors
-
-![](stop.gif)
-
-![](happening.gif)
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/agent.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/agent.js
deleted file mode 100644
index 69bfab6647..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/agent.js
+++ /dev/null
@@ -1,171 +0,0 @@
-'use strict'
-const LRU = require('lru-cache')
-const url = require('url')
-
-let AGENT_CACHE = new LRU({ max: 50 })
-let HttpsAgent
-let HttpAgent
-
-module.exports = getAgent
-
-function getAgent (uri, opts) {
- const parsedUri = url.parse(typeof uri === 'string' ? uri : uri.url)
- const isHttps = parsedUri.protocol === 'https:'
- const pxuri = getProxyUri(uri, opts)
-
- const key = [
- `https:${isHttps}`,
- pxuri
- ? `proxy:${pxuri.protocol}//${pxuri.host}:${pxuri.port}`
- : '>no-proxy<',
- `local-address:${opts.localAddress || '>no-local-address<'}`,
- `strict-ssl:${isHttps ? !!opts.strictSSL : '>no-strict-ssl<'}`,
- `ca:${(isHttps && opts.ca) || '>no-ca<'}`,
- `cert:${(isHttps && opts.cert) || '>no-cert<'}`,
- `key:${(isHttps && opts.key) || '>no-key<'}`
- ].join(':')
-
- if (opts.agent != null) { // `agent: false` has special behavior!
- return opts.agent
- }
-
- if (AGENT_CACHE.peek(key)) {
- return AGENT_CACHE.get(key)
- }
-
- if (pxuri) {
- const proxy = getProxy(pxuri, opts, isHttps)
- AGENT_CACHE.set(key, proxy)
- return proxy
- }
-
- if (isHttps && !HttpsAgent) {
- HttpsAgent = require('agentkeepalive').HttpsAgent
- } else if (!isHttps && !HttpAgent) {
- HttpAgent = require('agentkeepalive')
- }
-
- // If opts.timeout is zero, set the agentTimeout to zero as well. A timeout
- // of zero disables the timeout behavior (OS limits still apply). Else, if
- // opts.timeout is a non-zero value, set it to timeout + 1, to ensure that
- // the node-fetch-npm timeout will always fire first, giving us more
- // consistent errors.
- const agentTimeout = opts.timeout === 0 ? 0 : opts.timeout + 1
-
- const agent = isHttps ? new HttpsAgent({
- maxSockets: opts.maxSockets || 15,
- ca: opts.ca,
- cert: opts.cert,
- key: opts.key,
- localAddress: opts.localAddress,
- rejectUnauthorized: opts.strictSSL,
- timeout: agentTimeout
- }) : new HttpAgent({
- maxSockets: opts.maxSockets || 15,
- localAddress: opts.localAddress,
- timeout: agentTimeout
- })
- AGENT_CACHE.set(key, agent)
- return agent
-}
-
-function checkNoProxy (uri, opts) {
- const host = url.parse(uri).hostname.split('.').reverse()
- let noproxy = (opts.noProxy || getProcessEnv('no_proxy'))
- if (typeof noproxy === 'string') {
- noproxy = noproxy.split(/\s*,\s*/g)
- }
- return noproxy && noproxy.some(no => {
- const noParts = no.split('.').filter(x => x).reverse()
- if (!noParts.length) { return false }
- for (let i = 0; i < noParts.length; i++) {
- if (host[i] !== noParts[i]) {
- return false
- }
- }
- return true
- })
-}
-
-module.exports.getProcessEnv = getProcessEnv
-
-function getProcessEnv (env) {
- if (!env) { return }
-
- let value
-
- if (Array.isArray(env)) {
- for (let e of env) {
- value = process.env[e] ||
- process.env[e.toUpperCase()] ||
- process.env[e.toLowerCase()]
- if (typeof value !== 'undefined') { break }
- }
- }
-
- if (typeof env === 'string') {
- value = process.env[env] ||
- process.env[env.toUpperCase()] ||
- process.env[env.toLowerCase()]
- }
-
- return value
-}
-
-function getProxyUri (uri, opts) {
- const protocol = url.parse(uri).protocol
-
- const proxy = opts.proxy || (
- protocol === 'https:' && getProcessEnv('https_proxy')
- ) || (
- protocol === 'http:' && getProcessEnv(['https_proxy', 'http_proxy', 'proxy'])
- )
- if (!proxy) { return null }
-
- const parsedProxy = (typeof proxy === 'string') ? url.parse(proxy) : proxy
-
- return !checkNoProxy(uri, opts) && parsedProxy
-}
-
-let HttpProxyAgent
-let HttpsProxyAgent
-let SocksProxyAgent
-function getProxy (proxyUrl, opts, isHttps) {
- let popts = {
- host: proxyUrl.hostname,
- port: proxyUrl.port,
- protocol: proxyUrl.protocol,
- path: proxyUrl.path,
- auth: proxyUrl.auth,
- ca: opts.ca,
- cert: opts.cert,
- key: opts.key,
- timeout: opts.timeout === 0 ? 0 : opts.timeout + 1,
- localAddress: opts.localAddress,
- maxSockets: opts.maxSockets || 15,
- rejectUnauthorized: opts.strictSSL
- }
-
- if (proxyUrl.protocol === 'http:' || proxyUrl.protocol === 'https:') {
- if (!isHttps) {
- if (!HttpProxyAgent) {
- HttpProxyAgent = require('http-proxy-agent')
- }
-
- return new HttpProxyAgent(popts)
- } else {
- if (!HttpsProxyAgent) {
- HttpsProxyAgent = require('https-proxy-agent')
- }
-
- return new HttpsProxyAgent(popts)
- }
- }
- if (proxyUrl.protocol.startsWith('socks')) {
- if (!SocksProxyAgent) {
- SocksProxyAgent = require('socks-proxy-agent')
- }
-
- return new SocksProxyAgent(popts)
- }
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/cache.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/cache.js
deleted file mode 100644
index edb9b3d036..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/cache.js
+++ /dev/null
@@ -1,257 +0,0 @@
-'use strict'
-
-const cacache = require('cacache')
-const fetch = require('node-fetch-npm')
-const pipe = require('mississippi').pipe
-const ssri = require('ssri')
-const through = require('mississippi').through
-const to = require('mississippi').to
-const url = require('url')
-const stream = require('stream')
-
-const MAX_MEM_SIZE = 5 * 1024 * 1024 // 5MB
-
-function cacheKey (req) {
- const parsed = url.parse(req.url)
- return `make-fetch-happen:request-cache:${
- url.format({
- protocol: parsed.protocol,
- slashes: parsed.slashes,
- host: parsed.host,
- hostname: parsed.hostname,
- pathname: parsed.pathname
- })
- }`
-}
-
-// This is a cacache-based implementation of the Cache standard,
-// using node-fetch.
-// docs: https://developer.mozilla.org/en-US/docs/Web/API/Cache
-//
-module.exports = class Cache {
- constructor (path, opts) {
- this._path = path
- this._uid = opts && opts.uid
- this._gid = opts && opts.gid
- this.Promise = (opts && opts.Promise) || Promise
- }
-
- // Returns a Promise that resolves to the response associated with the first
- // matching request in the Cache object.
- match (req, opts) {
- opts = opts || {}
- const key = cacheKey(req)
- return cacache.get.info(this._path, key).then(info => {
- return info && cacache.get.hasContent(
- this._path, info.integrity, opts
- ).then(exists => exists && info)
- }).then(info => {
- if (info && info.metadata && matchDetails(req, {
- url: info.metadata.url,
- reqHeaders: new fetch.Headers(info.metadata.reqHeaders),
- resHeaders: new fetch.Headers(info.metadata.resHeaders),
- cacheIntegrity: info.integrity,
- integrity: opts && opts.integrity
- })) {
- const resHeaders = new fetch.Headers(info.metadata.resHeaders)
- addCacheHeaders(resHeaders, this._path, key, info.integrity, info.time)
- if (req.method === 'HEAD') {
- return new fetch.Response(null, {
- url: req.url,
- headers: resHeaders,
- status: 200
- })
- }
- let body
- const cachePath = this._path
- // avoid opening cache file handles until a user actually tries to
- // read from it.
- if (opts.memoize !== false && info.size > MAX_MEM_SIZE) {
- body = new stream.PassThrough()
- const realRead = body._read
- body._read = function (size) {
- body._read = realRead
- pipe(
- cacache.get.stream.byDigest(cachePath, info.integrity, {
- memoize: opts.memoize
- }),
- body,
- err => body.emit(err))
- return realRead.call(this, size)
- }
- } else {
- let readOnce = false
- // cacache is much faster at bulk reads
- body = new stream.Readable({
- read () {
- if (readOnce) return this.push(null)
- readOnce = true
- cacache.get.byDigest(cachePath, info.integrity, {
- memoize: opts.memoize
- }).then(data => {
- this.push(data)
- this.push(null)
- }, err => this.emit('error', err))
- }
- })
- }
- return this.Promise.resolve(new fetch.Response(body, {
- url: req.url,
- headers: resHeaders,
- status: 200,
- size: info.size
- }))
- }
- })
- }
-
- // Takes both a request and its response and adds it to the given cache.
- put (req, response, opts) {
- opts = opts || {}
- const size = response.headers.get('content-length')
- const fitInMemory = !!size && opts.memoize !== false && size < MAX_MEM_SIZE
- const ckey = cacheKey(req)
- const cacheOpts = {
- algorithms: opts.algorithms,
- metadata: {
- url: req.url,
- reqHeaders: req.headers.raw(),
- resHeaders: response.headers.raw()
- },
- uid: this._uid,
- gid: this._gid,
- size,
- memoize: fitInMemory && opts.memoize
- }
- if (req.method === 'HEAD' || response.status === 304) {
- // Update metadata without writing
- return cacache.get.info(this._path, ckey).then(info => {
- // Providing these will bypass content write
- cacheOpts.integrity = info.integrity
- addCacheHeaders(
- response.headers, this._path, ckey, info.integrity, info.time
- )
- return new this.Promise((resolve, reject) => {
- pipe(
- cacache.get.stream.byDigest(this._path, info.integrity, cacheOpts),
- cacache.put.stream(this._path, cacheKey(req), cacheOpts),
- err => err ? reject(err) : resolve(response)
- )
- })
- }).then(() => response)
- }
- let buf = []
- let bufSize = 0
- let cacheTargetStream = false
- const cachePath = this._path
- let cacheStream = to((chunk, enc, cb) => {
- if (!cacheTargetStream) {
- if (fitInMemory) {
- cacheTargetStream =
- to({highWaterMark: MAX_MEM_SIZE}, (chunk, enc, cb) => {
- buf.push(chunk)
- bufSize += chunk.length
- cb()
- }, done => {
- cacache.put(
- cachePath,
- cacheKey(req),
- Buffer.concat(buf, bufSize),
- cacheOpts
- ).then(
- () => done(),
- done
- )
- })
- } else {
- cacheTargetStream =
- cacache.put.stream(cachePath, cacheKey(req), cacheOpts)
- }
- }
- cacheTargetStream.write(chunk, enc, cb)
- }, done => {
- cacheTargetStream ? cacheTargetStream.end(done) : done()
- })
- const oldBody = response.body
- const newBody = through({highWaterMark: fitInMemory && MAX_MEM_SIZE})
- response.body = newBody
- oldBody.once('error', err => newBody.emit('error', err))
- newBody.once('error', err => oldBody.emit('error', err))
- cacheStream.once('error', err => newBody.emit('error', err))
- pipe(oldBody, to((chunk, enc, cb) => {
- cacheStream.write(chunk, enc, () => {
- newBody.write(chunk, enc, cb)
- })
- }, done => {
- cacheStream.end(() => {
- newBody.end(() => {
- done()
- })
- })
- }), err => err && newBody.emit('error', err))
- return response
- }
-
- // Finds the Cache entry whose key is the request, and if found, deletes the
- // Cache entry and returns a Promise that resolves to true. If no Cache entry
- // is found, it returns false.
- 'delete' (req, opts) {
- opts = opts || {}
- if (typeof opts.memoize === 'object') {
- if (opts.memoize.reset) {
- opts.memoize.reset()
- } else if (opts.memoize.clear) {
- opts.memoize.clear()
- } else {
- Object.keys(opts.memoize).forEach(k => {
- opts.memoize[k] = null
- })
- }
- }
- return cacache.rm.entry(
- this._path,
- cacheKey(req)
- // TODO - true/false
- ).then(() => false)
- }
-}
-
-function matchDetails (req, cached) {
- const reqUrl = url.parse(req.url)
- const cacheUrl = url.parse(cached.url)
- const vary = cached.resHeaders.get('Vary')
- // https://tools.ietf.org/html/rfc7234#section-4.1
- if (vary) {
- if (vary.match(/\*/)) {
- return false
- } else {
- const fieldsMatch = vary.split(/\s*,\s*/).every(field => {
- return cached.reqHeaders.get(field) === req.headers.get(field)
- })
- if (!fieldsMatch) {
- return false
- }
- }
- }
- if (cached.integrity) {
- const cachedSri = ssri.parse(cached.cacheIntegrity)
- const sri = ssri.parse(cached.integrity)
- const algo = sri.pickAlgorithm()
- if (cachedSri[algo] && !sri[algo].some(hash => {
- // cachedSri always has exactly one item per algorithm
- return cachedSri[algo][0].digest === hash.digest
- })) {
- return false
- }
- }
- reqUrl.hash = null
- cacheUrl.hash = null
- return url.format(reqUrl) === url.format(cacheUrl)
-}
-
-function addCacheHeaders (resHeaders, path, key, hash, time) {
- resHeaders.set('X-Local-Cache', encodeURIComponent(path))
- resHeaders.set('X-Local-Cache-Key', encodeURIComponent(key))
- resHeaders.set('X-Local-Cache-Hash', encodeURIComponent(hash))
- resHeaders.set('X-Local-Cache-Time', new Date(time).toUTCString())
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/index.js
deleted file mode 100644
index 0f2c164e19..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/index.js
+++ /dev/null
@@ -1,482 +0,0 @@
-'use strict'
-
-let Cache
-const url = require('url')
-const CachePolicy = require('http-cache-semantics')
-const fetch = require('node-fetch-npm')
-const pkg = require('./package.json')
-const retry = require('promise-retry')
-let ssri
-const Stream = require('stream')
-const getAgent = require('./agent')
-const setWarning = require('./warning')
-
-const isURL = /^https?:/
-const USER_AGENT = `${pkg.name}/${pkg.version} (+https://npm.im/${pkg.name})`
-
-const RETRY_ERRORS = [
- 'ECONNRESET', // remote socket closed on us
- 'ECONNREFUSED', // remote host refused to open connection
- 'EADDRINUSE', // failed to bind to a local port (proxy?)
- 'ETIMEDOUT' // someone in the transaction is WAY TOO SLOW
- // Known codes we do NOT retry on:
- // ENOTFOUND (getaddrinfo failure. Either bad hostname, or offline)
-]
-
-const RETRY_TYPES = [
- 'request-timeout'
-]
-
-// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch
-module.exports = cachingFetch
-cachingFetch.defaults = function (_uri, _opts) {
- const fetch = this
- if (typeof _uri === 'object') {
- _opts = _uri
- _uri = null
- }
-
- function defaultedFetch (uri, opts) {
- const finalOpts = Object.assign({}, _opts || {}, opts || {})
- return fetch(uri || _uri, finalOpts)
- }
-
- defaultedFetch.defaults = fetch.defaults
- defaultedFetch.delete = fetch.delete
- return defaultedFetch
-}
-
-cachingFetch.delete = cacheDelete
-function cacheDelete (uri, opts) {
- opts = configureOptions(opts)
- if (opts.cacheManager) {
- const req = new fetch.Request(uri, {
- method: opts.method,
- headers: opts.headers
- })
- return opts.cacheManager.delete(req, opts)
- }
-}
-
-function initializeCache (opts) {
- if (typeof opts.cacheManager === 'string') {
- if (!Cache) {
- // Default cacache-based cache
- Cache = require('./cache')
- }
-
- opts.cacheManager = new Cache(opts.cacheManager, opts)
- }
-
- opts.cache = opts.cache || 'default'
-
- if (opts.cache === 'default' && isHeaderConditional(opts.headers)) {
- // If header list contains `If-Modified-Since`, `If-None-Match`,
- // `If-Unmodified-Since`, `If-Match`, or `If-Range`, fetch will set cache
- // mode to "no-store" if it is "default".
- opts.cache = 'no-store'
- }
-}
-
-function configureOptions (_opts) {
- const opts = Object.assign({}, _opts || {})
- opts.method = (opts.method || 'GET').toUpperCase()
-
- if (opts.retry && typeof opts.retry === 'number') {
- opts.retry = { retries: opts.retry }
- }
-
- if (opts.retry === false) {
- opts.retry = { retries: 0 }
- }
-
- if (opts.cacheManager) {
- initializeCache(opts)
- }
-
- return opts
-}
-
-function initializeSsri () {
- if (!ssri) {
- ssri = require('ssri')
- }
-}
-
-function cachingFetch (uri, _opts) {
- const opts = configureOptions(_opts)
-
- if (opts.integrity) {
- initializeSsri()
- // if verifying integrity, node-fetch must not decompress
- opts.compress = false
- }
-
- const isCachable = (opts.method === 'GET' || opts.method === 'HEAD') &&
- opts.cacheManager &&
- opts.cache !== 'no-store' &&
- opts.cache !== 'reload'
-
- if (isCachable) {
- const req = new fetch.Request(uri, {
- method: opts.method,
- headers: opts.headers
- })
-
- return opts.cacheManager.match(req, opts).then(res => {
- if (res) {
- const warningCode = (res.headers.get('Warning') || '').match(/^\d+/)
- if (warningCode && +warningCode >= 100 && +warningCode < 200) {
- // https://tools.ietf.org/html/rfc7234#section-4.3.4
- //
- // If a stored response is selected for update, the cache MUST:
- //
- // * delete any Warning header fields in the stored response with
- // warn-code 1xx (see Section 5.5);
- //
- // * retain any Warning header fields in the stored response with
- // warn-code 2xx;
- //
- res.headers.delete('Warning')
- }
-
- if (opts.cache === 'default' && !isStale(req, res)) {
- return res
- }
-
- if (opts.cache === 'default' || opts.cache === 'no-cache') {
- return conditionalFetch(req, res, opts)
- }
-
- if (opts.cache === 'force-cache' || opts.cache === 'only-if-cached') {
- // 112 Disconnected operation
- // SHOULD be included if the cache is intentionally disconnected from
- // the rest of the network for a period of time.
- // (https://tools.ietf.org/html/rfc2616#section-14.46)
- setWarning(res, 112, 'Disconnected operation')
- return res
- }
- }
-
- if (!res && opts.cache === 'only-if-cached') {
- const errorMsg = `request to ${
- uri
- } failed: cache mode is 'only-if-cached' but no cached response available.`
-
- const err = new Error(errorMsg)
- err.code = 'ENOTCACHED'
- throw err
- }
-
- // Missing cache entry, or mode is default (if stale), reload, no-store
- return remoteFetch(req.url, opts)
- })
- }
-
- return remoteFetch(uri, opts)
-}
-
-function iterableToObject (iter) {
- const obj = {}
- for (let k of iter.keys()) {
- obj[k] = iter.get(k)
- }
- return obj
-}
-
-function makePolicy (req, res) {
- const _req = {
- url: req.url,
- method: req.method,
- headers: iterableToObject(req.headers)
- }
- const _res = {
- status: res.status,
- headers: iterableToObject(res.headers)
- }
-
- return new CachePolicy(_req, _res, { shared: false })
-}
-
-// https://tools.ietf.org/html/rfc7234#section-4.2
-function isStale (req, res) {
- if (!res) {
- return null
- }
-
- const _req = {
- url: req.url,
- method: req.method,
- headers: iterableToObject(req.headers)
- }
-
- const policy = makePolicy(req, res)
-
- const responseTime = res.headers.get('x-local-cache-time') ||
- res.headers.get('date') ||
- 0
-
- policy._responseTime = new Date(responseTime)
-
- const bool = !policy.satisfiesWithoutRevalidation(_req)
- return bool
-}
-
-function mustRevalidate (res) {
- return (res.headers.get('cache-control') || '').match(/must-revalidate/i)
-}
-
-function conditionalFetch (req, cachedRes, opts) {
- const _req = {
- url: req.url,
- method: req.method,
- headers: Object.assign({}, opts.headers || {})
- }
-
- const policy = makePolicy(req, cachedRes)
- opts.headers = policy.revalidationHeaders(_req)
-
- return remoteFetch(req.url, opts)
- .then(condRes => {
- const revalidatedPolicy = policy.revalidatedPolicy(_req, {
- status: condRes.status,
- headers: iterableToObject(condRes.headers)
- })
-
- if (condRes.status >= 500 && !mustRevalidate(cachedRes)) {
- // 111 Revalidation failed
- // MUST be included if a cache returns a stale response because an
- // attempt to revalidate the response failed, due to an inability to
- // reach the server.
- // (https://tools.ietf.org/html/rfc2616#section-14.46)
- setWarning(cachedRes, 111, 'Revalidation failed')
- return cachedRes
- }
-
- if (condRes.status === 304) { // 304 Not Modified
- condRes.body = cachedRes.body
- return opts.cacheManager.put(req, condRes, opts)
- .then(newRes => {
- newRes.headers = new fetch.Headers(revalidatedPolicy.policy.responseHeaders())
- return newRes
- })
- }
-
- return condRes
- })
- .then(res => res)
- .catch(err => {
- if (mustRevalidate(cachedRes)) {
- throw err
- } else {
- // 111 Revalidation failed
- // MUST be included if a cache returns a stale response because an
- // attempt to revalidate the response failed, due to an inability to
- // reach the server.
- // (https://tools.ietf.org/html/rfc2616#section-14.46)
- setWarning(cachedRes, 111, 'Revalidation failed')
- // 199 Miscellaneous warning
- // The warning text MAY include arbitrary information to be presented to
- // a human user, or logged. A system receiving this warning MUST NOT take
- // any automated action, besides presenting the warning to the user.
- // (https://tools.ietf.org/html/rfc2616#section-14.46)
- setWarning(
- cachedRes,
- 199,
- `Miscellaneous Warning ${err.code}: ${err.message}`
- )
-
- return cachedRes
- }
- })
-}
-
-function remoteFetchHandleIntegrity (res, integrity) {
- const oldBod = res.body
- const newBod = ssri.integrityStream({
- integrity
- })
- oldBod.pipe(newBod)
- res.body = newBod
- oldBod.once('error', err => {
- newBod.emit('error', err)
- })
- newBod.once('error', err => {
- oldBod.emit('error', err)
- })
-}
-
-function remoteFetch (uri, opts) {
- const agent = getAgent(uri, opts)
- const headers = Object.assign({
- 'connection': agent ? 'keep-alive' : 'close',
- 'user-agent': USER_AGENT
- }, opts.headers || {})
-
- const reqOpts = {
- agent,
- body: opts.body,
- compress: opts.compress,
- follow: opts.follow,
- headers: new fetch.Headers(headers),
- method: opts.method,
- redirect: 'manual',
- size: opts.size,
- counter: opts.counter,
- timeout: opts.timeout
- }
-
- return retry(
- (retryHandler, attemptNum) => {
- const req = new fetch.Request(uri, reqOpts)
- return fetch(req)
- .then(res => {
- res.headers.set('x-fetch-attempts', attemptNum)
-
- if (opts.integrity) {
- remoteFetchHandleIntegrity(res, opts.integrity)
- }
-
- const isStream = req.body instanceof Stream
-
- if (opts.cacheManager) {
- const isMethodGetHead = req.method === 'GET' ||
- req.method === 'HEAD'
-
- const isCachable = opts.cache !== 'no-store' &&
- isMethodGetHead &&
- makePolicy(req, res).storable() &&
- res.status === 200 // No other statuses should be stored!
-
- if (isCachable) {
- return opts.cacheManager.put(req, res, opts)
- }
-
- if (!isMethodGetHead) {
- return opts.cacheManager.delete(req).then(() => {
- if (res.status >= 500 && req.method !== 'POST' && !isStream) {
- if (typeof opts.onRetry === 'function') {
- opts.onRetry(res)
- }
-
- return retryHandler(res)
- }
-
- return res
- })
- }
- }
-
- const isRetriable = req.method !== 'POST' &&
- !isStream && (
- res.status === 408 || // Request Timeout
- res.status === 420 || // Enhance Your Calm (usually Twitter rate-limit)
- res.status === 429 || // Too Many Requests ("standard" rate-limiting)
- res.status >= 500 // Assume server errors are momentary hiccups
- )
-
- if (isRetriable) {
- if (typeof opts.onRetry === 'function') {
- opts.onRetry(res)
- }
-
- return retryHandler(res)
- }
-
- if (!fetch.isRedirect(res.status) || opts.redirect === 'manual') {
- return res
- }
-
- // handle redirects - matches behavior of npm-fetch: https://github.com/bitinn/node-fetch
- if (opts.redirect === 'error') {
- const err = new Error(`redirect mode is set to error: ${uri}`)
- err.code = 'ENOREDIRECT'
- throw err
- }
-
- if (!res.headers.get('location')) {
- const err = new Error(`redirect location header missing at: ${uri}`)
- err.code = 'EINVALIDREDIRECT'
- throw err
- }
-
- if (req.counter >= req.follow) {
- const err = new Error(`maximum redirect reached at: ${uri}`)
- err.code = 'EMAXREDIRECT'
- throw err
- }
-
- const resolvedUrl = url.resolve(req.url, res.headers.get('location'))
- let redirectURL = url.parse(resolvedUrl)
-
- if (isURL.test(res.headers.get('location'))) {
- redirectURL = url.parse(res.headers.get('location'))
- }
-
- // Remove authorization if changing hostnames (but not if just
- // changing ports or protocols). This matches the behavior of request:
- // https://github.com/request/request/blob/b12a6245/lib/redirect.js#L134-L138
- if (url.parse(req.url).hostname !== redirectURL.hostname) {
- req.headers.delete('authorization')
- }
-
- // for POST request with 301/302 response, or any request with 303 response,
- // use GET when following redirect
- if (res.status === 303 ||
- ((res.status === 301 || res.status === 302) && req.method === 'POST')) {
- opts.method = 'GET'
- opts.body = null
- req.headers.delete('content-length')
- }
-
- opts.headers = {}
- req.headers.forEach((value, name) => {
- opts.headers[name] = value
- })
-
- opts.counter = ++req.counter
- return cachingFetch(resolvedUrl, opts)
- })
- .catch(err => {
- const code = err.code === 'EPROMISERETRY' ? err.retried.code : err.code
-
- const isRetryError = RETRY_ERRORS.indexOf(code) === -1 &&
- RETRY_TYPES.indexOf(err.type) === -1
-
- if (req.method === 'POST' || isRetryError) {
- throw err
- }
-
- if (typeof opts.onRetry === 'function') {
- opts.onRetry(err)
- }
-
- return retryHandler(err)
- })
- },
- opts.retry
- ).catch(err => {
- if (err.status >= 400) {
- return err
- }
-
- throw err
- })
-}
-
-function isHeaderConditional (headers) {
- if (!headers || typeof headers !== 'object') {
- return false
- }
-
- const modifiers = [
- 'if-modified-since',
- 'if-none-match',
- 'if-unmodified-since',
- 'if-match',
- 'if-range'
- ]
-
- return Object.keys(headers)
- .some(h => modifiers.indexOf(h.toLowerCase()) !== -1)
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/package.json
deleted file mode 100644
index aab75e9601..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/package.json
+++ /dev/null
@@ -1,95 +0,0 @@
-{
- "_from": "make-fetch-happen@^2.5.0",
- "_id": "make-fetch-happen@2.6.0",
- "_inBundle": false,
- "_integrity": "sha512-FFq0lNI0ax+n9IWzWpH8A4JdgYiAp2DDYIZ3rsaav8JDe8I+72CzK6PQW/oom15YDZpV5bYW/9INd6nIJ2ZfZw==",
- "_location": "/npm-profile/make-fetch-happen",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "make-fetch-happen@^2.5.0",
- "name": "make-fetch-happen",
- "escapedName": "make-fetch-happen",
- "rawSpec": "^2.5.0",
- "saveSpec": null,
- "fetchSpec": "^2.5.0"
- },
- "_requiredBy": [
- "/npm-profile"
- ],
- "_resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-2.6.0.tgz",
- "_shasum": "8474aa52198f6b1ae4f3094c04e8370d35ea8a38",
- "_spec": "make-fetch-happen@^2.5.0",
- "_where": "/Users/rebecca/code/npm/node_modules/npm-profile",
- "author": {
- "name": "Kat Marchán",
- "email": "kzm@sykosomatic.org"
- },
- "bugs": {
- "url": "https://github.com/zkat/make-fetch-happen/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "agentkeepalive": "^3.3.0",
- "cacache": "^10.0.0",
- "http-cache-semantics": "^3.8.0",
- "http-proxy-agent": "^2.0.0",
- "https-proxy-agent": "^2.1.0",
- "lru-cache": "^4.1.1",
- "mississippi": "^1.2.0",
- "node-fetch-npm": "^2.0.2",
- "promise-retry": "^1.1.1",
- "socks-proxy-agent": "^3.0.1",
- "ssri": "^5.0.0"
- },
- "deprecated": false,
- "description": "Opinionated, caching, retrying fetch client",
- "devDependencies": {
- "bluebird": "^3.5.0",
- "mkdirp": "^0.5.1",
- "nock": "^9.0.14",
- "npmlog": "^4.1.2",
- "nyc": "^11.0.3",
- "require-inject": "^1.4.2",
- "rimraf": "^2.5.4",
- "safe-buffer": "^5.1.1",
- "standard": "^10.0.1",
- "standard-version": "^4.2.0",
- "tacks": "^1.2.6",
- "tap": "^10.7.0",
- "weallbehave": "^1.0.0",
- "weallcontribute": "^1.0.7"
- },
- "files": [
- "*.js",
- "lib"
- ],
- "homepage": "https://github.com/zkat/make-fetch-happen#readme",
- "keywords": [
- "http",
- "request",
- "fetch",
- "mean girls",
- "caching",
- "cache",
- "subresource integrity"
- ],
- "license": "CC0-1.0",
- "main": "index.js",
- "name": "make-fetch-happen",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/zkat/make-fetch-happen.git"
- },
- "scripts": {
- "postrelease": "npm publish && git push --follow-tags",
- "prerelease": "npm t",
- "pretest": "standard lib test *.js",
- "release": "standard-version -s",
- "test": "nyc --all -- tap --timeout=35 -J test/*.js",
- "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
- "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
- },
- "version": "2.6.0"
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/warning.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/warning.js
deleted file mode 100644
index b8f13cf831..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/warning.js
+++ /dev/null
@@ -1,24 +0,0 @@
-const url = require('url')
-
-module.exports = setWarning
-
-function setWarning (reqOrRes, code, message, replace) {
- // Warning = "Warning" ":" 1#warning-value
- // warning-value = warn-code SP warn-agent SP warn-text [SP warn-date]
- // warn-code = 3DIGIT
- // warn-agent = ( host [ ":" port ] ) | pseudonym
- // ; the name or pseudonym of the server adding
- // ; the Warning header, for use in debugging
- // warn-text = quoted-string
- // warn-date = <"> HTTP-date <">
- // (https://tools.ietf.org/html/rfc2616#section-14.46)
- const host = url.parse(reqOrRes.url).host
- const jsonMessage = JSON.stringify(message)
- const jsonDate = JSON.stringify(new Date().toUTCString())
- const header = replace ? 'set' : 'append'
-
- reqOrRes.headers[header](
- 'Warning',
- `${code} ${host} ${jsonMessage} ${jsonDate}`
- )
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/mississippi/index.js b/deps/npm/node_modules/npm-profile/node_modules/mississippi/index.js
deleted file mode 100644
index d635b29c56..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/mississippi/index.js
+++ /dev/null
@@ -1,10 +0,0 @@
-module.exports.pipe = require('pump')
-module.exports.each = require('stream-each')
-module.exports.pipeline = require('pumpify')
-module.exports.duplex = require('duplexify')
-module.exports.through = require('through2')
-module.exports.concat = require('concat-stream')
-module.exports.finished = require('end-of-stream')
-module.exports.from = require('from2')
-module.exports.to = require('flush-write-stream')
-module.exports.parallel = require('parallel-transform')
diff --git a/deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/.travis.yml b/deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/.travis.yml
deleted file mode 100644
index 17f94330e7..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/.travis.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-language: node_js
-node_js:
- - "0.10"
-
-script: "npm test"
diff --git a/deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/LICENSE b/deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/LICENSE
deleted file mode 100644
index 757562ec59..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Mathias Buus
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/README.md b/deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/README.md
deleted file mode 100644
index 5029b27d68..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/README.md
+++ /dev/null
@@ -1,56 +0,0 @@
-# pump
-
-pump is a small node module that pipes streams together and destroys all of them if one of them closes.
-
-```
-npm install pump
-```
-
-[![build status](http://img.shields.io/travis/mafintosh/pump.svg?style=flat)](http://travis-ci.org/mafintosh/pump)
-
-## What problem does it solve?
-
-When using standard `source.pipe(dest)` source will _not_ be destroyed if dest emits close or an error.
-You are also not able to provide a callback to tell when then pipe has finished.
-
-pump does these two things for you
-
-## Usage
-
-Simply pass the streams you want to pipe together to pump and add an optional callback
-
-``` js
-var pump = require('pump')
-var fs = require('fs')
-
-var source = fs.createReadStream('/dev/random')
-var dest = fs.createWriteStream('/dev/null')
-
-pump(source, dest, function(err) {
- console.log('pipe finished', err)
-})
-
-setTimeout(function() {
- dest.destroy() // when dest is closed pump will destroy source
-}, 1000)
-```
-
-You can use pump to pipe more than two streams together as well
-
-``` js
-var transform = someTransformStream()
-
-pump(source, transform, anotherTransform, dest, function(err) {
- console.log('pipe finished', err)
-})
-```
-
-If `source`, `transform`, `anotherTransform` or `dest` closes all of them will be destroyed.
-
-## License
-
-MIT
-
-## Related
-
-`pump` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/index.js b/deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/index.js
deleted file mode 100644
index f0c639a8c8..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/index.js
+++ /dev/null
@@ -1,80 +0,0 @@
-var once = require('once')
-var eos = require('end-of-stream')
-var fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes
-
-var noop = function () {}
-
-var isFn = function (fn) {
- return typeof fn === 'function'
-}
-
-var isFS = function (stream) {
- if (!fs) return false // browser
- return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close)
-}
-
-var isRequest = function (stream) {
- return stream.setHeader && isFn(stream.abort)
-}
-
-var destroyer = function (stream, reading, writing, callback) {
- callback = once(callback)
-
- var closed = false
- stream.on('close', function () {
- closed = true
- })
-
- eos(stream, {readable: reading, writable: writing}, function (err) {
- if (err) return callback(err)
- closed = true
- callback()
- })
-
- var destroyed = false
- return function (err) {
- if (closed) return
- if (destroyed) return
- destroyed = true
-
- if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks
- if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want
-
- if (isFn(stream.destroy)) return stream.destroy()
-
- callback(err || new Error('stream was destroyed'))
- }
-}
-
-var call = function (fn) {
- fn()
-}
-
-var pipe = function (from, to) {
- return from.pipe(to)
-}
-
-var pump = function () {
- var streams = Array.prototype.slice.call(arguments)
- var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop
-
- if (Array.isArray(streams[0])) streams = streams[0]
- if (streams.length < 2) throw new Error('pump requires two streams per minimum')
-
- var error
- var destroys = streams.map(function (stream, i) {
- var reading = i < streams.length - 1
- var writing = i > 0
- return destroyer(stream, reading, writing, function (err) {
- if (!error) error = err
- if (err) destroys.forEach(call)
- if (reading) return
- destroys.forEach(call)
- callback(error)
- })
- })
-
- return streams.reduce(pipe)
-}
-
-module.exports = pump
diff --git a/deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/package.json b/deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/package.json
deleted file mode 100644
index 7ccf3e707f..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/package.json
+++ /dev/null
@@ -1,59 +0,0 @@
-{
- "_from": "pump@^1.0.0",
- "_id": "pump@1.0.3",
- "_inBundle": false,
- "_integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==",
- "_location": "/npm-profile/mississippi/pump",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "pump@^1.0.0",
- "name": "pump",
- "escapedName": "pump",
- "rawSpec": "^1.0.0",
- "saveSpec": null,
- "fetchSpec": "^1.0.0"
- },
- "_requiredBy": [
- "/npm-profile/mississippi"
- ],
- "_resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz",
- "_shasum": "5dfe8311c33bbf6fc18261f9f34702c47c08a954",
- "_spec": "pump@^1.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/npm-profile/node_modules/mississippi",
- "author": {
- "name": "Mathias Buus Madsen",
- "email": "mathiasbuus@gmail.com"
- },
- "browser": {
- "fs": false
- },
- "bugs": {
- "url": "https://github.com/mafintosh/pump/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "end-of-stream": "^1.1.0",
- "once": "^1.3.1"
- },
- "deprecated": false,
- "description": "pipe streams together and close all of them if one of them closes",
- "homepage": "https://github.com/mafintosh/pump#readme",
- "keywords": [
- "streams",
- "pipe",
- "destroy",
- "callback"
- ],
- "license": "MIT",
- "name": "pump",
- "repository": {
- "type": "git",
- "url": "git://github.com/mafintosh/pump.git"
- },
- "scripts": {
- "test": "node test.js"
- },
- "version": "1.0.3"
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/test-browser.js b/deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/test-browser.js
deleted file mode 100644
index 80e852c7dc..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/test-browser.js
+++ /dev/null
@@ -1,58 +0,0 @@
-var stream = require('stream')
-var pump = require('./index')
-
-var rs = new stream.Readable()
-var ws = new stream.Writable()
-
-rs._read = function (size) {
- this.push(Buffer(size).fill('abc'))
-}
-
-ws._write = function (chunk, encoding, cb) {
- setTimeout(function () {
- cb()
- }, 100)
-}
-
-var toHex = function () {
- var reverse = new (require('stream').Transform)()
-
- reverse._transform = function (chunk, enc, callback) {
- reverse.push(chunk.toString('hex'))
- callback()
- }
-
- return reverse
-}
-
-var wsClosed = false
-var rsClosed = false
-var callbackCalled = false
-
-var check = function () {
- if (wsClosed && rsClosed && callbackCalled) console.log('done')
-}
-
-ws.on('finish', function () {
- wsClosed = true
- check()
-})
-
-rs.on('end', function () {
- rsClosed = true
- check()
-})
-
-pump(rs, toHex(), toHex(), toHex(), ws, function () {
- callbackCalled = true
- check()
-})
-
-setTimeout(function () {
- rs.push(null)
- rs.emit('close')
-}, 1000)
-
-setTimeout(function () {
- if (!check()) throw new Error('timeout')
-}, 5000)
diff --git a/deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/test.js b/deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/test.js
deleted file mode 100644
index 64e772ca5b..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/mississippi/node_modules/pump/test.js
+++ /dev/null
@@ -1,46 +0,0 @@
-var pump = require('./index')
-
-var rs = require('fs').createReadStream('/dev/random')
-var ws = require('fs').createWriteStream('/dev/null')
-
-var toHex = function () {
- var reverse = new (require('stream').Transform)()
-
- reverse._transform = function (chunk, enc, callback) {
- reverse.push(chunk.toString('hex'))
- callback()
- }
-
- return reverse
-}
-
-var wsClosed = false
-var rsClosed = false
-var callbackCalled = false
-
-var check = function () {
- if (wsClosed && rsClosed && callbackCalled) process.exit(0)
-}
-
-ws.on('close', function () {
- wsClosed = true
- check()
-})
-
-rs.on('close', function () {
- rsClosed = true
- check()
-})
-
-pump(rs, toHex(), toHex(), toHex(), ws, function () {
- callbackCalled = true
- check()
-})
-
-setTimeout(function () {
- rs.destroy()
-}, 1000)
-
-setTimeout(function () {
- throw new Error('timeout')
-}, 5000)
diff --git a/deps/npm/node_modules/npm-profile/node_modules/mississippi/package.json b/deps/npm/node_modules/npm-profile/node_modules/mississippi/package.json
deleted file mode 100644
index e2bbca0693..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/mississippi/package.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- "_from": "mississippi@^1.2.0",
- "_id": "mississippi@1.3.1",
- "_inBundle": false,
- "_integrity": "sha512-/6rB8YXFbAtsUVRphIRQqB0+9c7VaPHCjVtvto+JqwVxgz8Zz+I+f68/JgQ+Pb4VlZb2svA9OtdXnHHsZz7ltg==",
- "_location": "/npm-profile/mississippi",
- "_phantomChildren": {
- "end-of-stream": "1.4.1",
- "once": "1.4.0"
- },
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "mississippi@^1.2.0",
- "name": "mississippi",
- "escapedName": "mississippi",
- "rawSpec": "^1.2.0",
- "saveSpec": null,
- "fetchSpec": "^1.2.0"
- },
- "_requiredBy": [
- "/npm-profile/make-fetch-happen"
- ],
- "_resolved": "https://registry.npmjs.org/mississippi/-/mississippi-1.3.1.tgz",
- "_shasum": "2a8bb465e86550ac8b36a7b6f45599171d78671e",
- "_spec": "mississippi@^1.2.0",
- "_where": "/Users/rebecca/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen",
- "author": {
- "name": "max ogden"
- },
- "bugs": {
- "url": "https://github.com/maxogden/mississippi/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "concat-stream": "^1.5.0",
- "duplexify": "^3.4.2",
- "end-of-stream": "^1.1.0",
- "flush-write-stream": "^1.0.0",
- "from2": "^2.1.0",
- "parallel-transform": "^1.1.0",
- "pump": "^1.0.0",
- "pumpify": "^1.3.3",
- "stream-each": "^1.1.0",
- "through2": "^2.0.0"
- },
- "deprecated": false,
- "description": "a collection of useful streams",
- "devDependencies": {},
- "homepage": "https://github.com/maxogden/mississippi#readme",
- "license": "BSD-2-Clause",
- "main": "index.js",
- "name": "mississippi",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/maxogden/mississippi.git"
- },
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "version": "1.3.1"
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/mississippi/readme.md b/deps/npm/node_modules/npm-profile/node_modules/mississippi/readme.md
deleted file mode 100644
index ed71403a86..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/mississippi/readme.md
+++ /dev/null
@@ -1,399 +0,0 @@
-# mississippi
-
-a collection of useful stream utility modules. learn how the modules work using this and then pick the ones you want and use them individually
-
-the goal of the modules included in mississippi is to make working with streams easy without sacrificing speed, error handling or composability.
-
-## usage
-
-```js
-var miss = require('mississippi')
-```
-
-## methods
-
-- [pipe](#pipe)
-- [each](#each)
-- [pipeline](#pipeline)
-- [duplex](#duplex)
-- [through](#through)
-- [from](#from)
-- [to](#to)
-- [concat](#concat)
-- [finished](#finished)
-- [parallel](#parallel)
-
-### pipe
-
-##### `miss.pipe(stream1, stream2, stream3, ..., cb)`
-
-Pipes streams together and destroys all of them if one of them closes. Calls `cb` with `(error)` if there was an error in any of the streams.
-
-When using standard `source.pipe(destination)` the source will _not_ be destroyed if the destination emits close or error. You are also not able to provide a callback to tell when the pipe has finished.
-
-`miss.pipe` does these two things for you, ensuring you handle stream errors 100% of the time (unhandled errors are probably the most common bug in most node streams code)
-
-#### original module
-
-`miss.pipe` is provided by [`require('pump')`](https://www.npmjs.com/package/pump)
-
-#### example
-
-```js
-// lets do a simple file copy
-var fs = require('fs')
-
-var read = fs.createReadStream('./original.zip')
-var write = fs.createWriteStream('./copy.zip')
-
-// use miss.pipe instead of read.pipe(write)
-miss.pipe(read, write, function (err) {
- if (err) return console.error('Copy error!', err)
- console.log('Copied successfully')
-})
-```
-
-### each
-
-##### `miss.each(stream, each, [done])`
-
-Iterate the data in `stream` one chunk at a time. Your `each` function will be called with `(data, next)` where data is a data chunk and next is a callback. Call `next` when you are ready to consume the next chunk.
-
-Optionally you can call `next` with an error to destroy the stream. You can also pass the optional third argument, `done`, which is a function that will be called with `(err)` when the stream ends. The `err` argument will be populated with an error if the stream emitted an error.
-
-#### original module
-
-`miss.each` is provided by [`require('stream-each')`](https://www.npmjs.com/package/stream-each)
-
-#### example
-
-```js
-var fs = require('fs')
-var split = require('split2')
-
-var newLineSeparatedNumbers = fs.createReadStream('numbers.txt')
-
-var pipeline = miss.pipeline(newLineSeparatedNumbers, split())
-miss.each(pipeline, eachLine, done)
-var sum = 0
-
-function eachLine (line, next) {
- sum += parseInt(line.toString())
- next()
-}
-
-function done (err) {
- if (err) throw err
- console.log('sum is', sum)
-}
-```
-
-### pipeline
-
-##### `var pipeline = miss.pipeline(stream1, stream2, stream3, ...)`
-
-Builds a pipeline from all the transform streams passed in as arguments by piping them together and returning a single stream object that lets you write to the first stream and read from the last stream.
-
-If any of the streams in the pipeline emits an error or gets destroyed, or you destroy the stream it returns, all of the streams will be destroyed and cleaned up for you.
-
-#### original module
-
-`miss.pipeline` is provided by [`require('pumpify')`](https://www.npmjs.com/package/pumpify)
-
-#### example
-
-```js
-// first create some transform streams (note: these two modules are fictional)
-var imageResize = require('image-resizer-stream')({width: 400})
-var pngOptimizer = require('png-optimizer-stream')({quality: 60})
-
-// instead of doing a.pipe(b), use pipelin
-var resizeAndOptimize = miss.pipeline(imageResize, pngOptimizer)
-// `resizeAndOptimize` is a transform stream. when you write to it, it writes
-// to `imageResize`. when you read from it, it reads from `pngOptimizer`.
-// it handles piping all the streams together for you
-
-// use it like any other transform stream
-var fs = require('fs')
-
-var read = fs.createReadStream('./image.png')
-var write = fs.createWriteStream('./resized-and-optimized.png')
-
-miss.pipe(read, resizeAndOptimize, write, function (err) {
- if (err) return console.error('Image processing error!', err)
- console.log('Image processed successfully')
-})
-```
-
-### duplex
-
-##### `var duplex = miss.duplex([writable, readable, opts])`
-
-Take two separate streams, a writable and a readable, and turn them into a single [duplex (readable and writable) stream](https://nodejs.org/api/stream.html#stream_class_stream_duplex).
-
-The returned stream will emit data from the readable. When you write to it it writes to the writable.
-
-You can either choose to supply the writable and the readable at the time you create the stream, or you can do it later using the `.setWritable` and `.setReadable` methods and data written to the stream in the meantime will be buffered for you.
-
-#### original module
-
-`miss.duplex` is provided by [`require('duplexify')`](https://www.npmjs.com/package/duplexify)
-
-#### example
-
-```js
-// lets spawn a process and take its stdout and stdin and combine them into 1 stream
-var child = require('child_process')
-
-// @- tells it to read from stdin, --data-binary sets 'raw' binary mode
-var curl = child.spawn('curl -X POST --data-binary @- http://foo.com')
-
-// duplexCurl will write to stdin and read from stdout
-var duplexCurl = miss.duplex(curl.stdin, curl.stdout)
-```
-
-### through
-
-##### `var transformer = miss.through([options, transformFunction, flushFunction])`
-
-Make a custom [transform stream](https://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform).
-
-The `options` object is passed to the internal transform stream and can be used to create an `objectMode` stream (or use the shortcut `miss.through.obj([...])`)
-
-The `transformFunction` is called when data is available for the writable side and has the signature `(chunk, encoding, cb)`. Within the function, add data to the readable side any number of times with `this.push(data)`. Call `cb()` to indicate processing of the `chunk` is complete. Or to easily emit a single error or chunk, call `cb(err, chunk)`
-
-The `flushFunction`, with signature `(cb)`, is called just before the stream is complete and should be used to wrap up stream processing.
-
-#### original module
-
-`miss.through` is provided by [`require('through2')`](https://www.npmjs.com/package/through2)
-
-#### example
-
-```js
-var fs = require('fs')
-
-var read = fs.createReadStream('./boring_lowercase.txt')
-var write = fs.createWriteStream('./AWESOMECASE.TXT')
-
-// Leaving out the options object
-var uppercaser = miss.through(
- function (chunk, enc, cb) {
- cb(null, chunk.toString().toUpperCase())
- },
- function (cb) {
- cb(null, 'ONE LAST BIT OF UPPERCASE')
- }
-)
-
-miss.pipe(read, uppercaser, write, function (err) {
- if (err) return console.error('Trouble uppercasing!')
- console.log('Splendid uppercasing!')
-})
-```
-
-### from
-
-##### `miss.from([opts], read)`
-
-Make a custom [readable stream](https://nodejs.org/docs/latest/api/stream.html#stream_class_stream_readable).
-
-`opts` contains the options to pass on to the ReadableStream constructor e.g. for creating a readable object stream (or use the shortcut `miss.from.obj([...])`).
-
-Returns a readable stream that calls `read(size, next)` when data is requested from the stream.
-
-- `size` is the recommended amount of data (in bytes) to retrieve.
-- `next(err, chunk)` should be called when you're ready to emit more data.
-
-#### original module
-
-`miss.from` is provided by [`require('from2')`](https://www.npmjs.com/package/from2)
-
-#### example
-
-```js
-
-
-function fromString(string) {
- return miss.from(function(size, next) {
- // if there's no more content
- // left in the string, close the stream.
- if (string.length <= 0) return next(null, null)
-
- // Pull in a new chunk of text,
- // removing it from the string.
- var chunk = string.slice(0, size)
- string = string.slice(size)
-
- // Emit "chunk" from the stream.
- next(null, chunk)
- })
-}
-
-// pipe "hello world" out
-// to stdout.
-fromString('hello world').pipe(process.stdout)
-```
-
-### to
-
-##### `miss.to([options], write, [flush])`
-
-Make a custom [writable stream](https://nodejs.org/docs/latest/api/stream.html#stream_class_stream_writable).
-
-`opts` contains the options to pass on to the WritableStream constructor e.g. for creating a writable object stream (or use the shortcut `miss.to.obj([...])`).
-
-Returns a writable stream that calls `write(data, enc, cb)` when data is written to the stream.
-
-- `data` is the received data to write the destination.
-- `enc` encoding of the piece of data received.
-- `cb(err, data)` should be called when you're ready to write more data, or encountered an error.
-
-`flush(cb)` is called before `finish` is emitted and allows for cleanup steps to occur.
-
-#### original module
-
-`miss.to` is provided by [`require('flush-write-stream')`](https://www.npmjs.com/package/flush-write-stream)
-
-#### example
-
-```js
-var ws = miss.to(write, flush)
-
-ws.on('finish', function () {
- console.log('finished')
-})
-
-ws.write('hello')
-ws.write('world')
-ws.end()
-
-function write (data, enc, cb) {
- // i am your normal ._write method
- console.log('writing', data.toString())
- cb()
-}
-
-function flush (cb) {
- // i am called before finish is emitted
- setTimeout(cb, 1000) // wait 1 sec
-}
-```
-
-If you run the above it will produce the following output
-
-```
-writing hello
-writing world
-(nothing happens for 1 sec)
-finished
-```
-
-### concat
-
-##### `var concat = miss.concat(cb)`
-
-Returns a writable stream that concatenates all data written to the stream and calls a callback with the single result.
-
-Calling `miss.concat(cb)` returns a writable stream. `cb` is called when the writable stream is finished, e.g. when all data is done being written to it. `cb` is called with a single argument, `(data)`, which will contain the result of concatenating all the data written to the stream.
-
-Note that `miss.concat` will not handle stream errors for you. To handle errors, use `miss.pipe` or handle the `error` event manually.
-
-#### original module
-
-`miss.concat` is provided by [`require('concat-stream')`](https://www.npmjs.com/package/concat-stream)
-
-#### example
-
-```js
-var fs = require('fs')
-
-var readStream = fs.createReadStream('cat.png')
-var concatStream = miss.concat(gotPicture)
-
-function callback (err) {
- if (err) {
- console.error(err)
- process.exit(1)
- }
-}
-
-miss.pipe(readStream, concatStream, callback)
-
-function gotPicture(imageBuffer) {
- // imageBuffer is all of `cat.png` as a node.js Buffer
-}
-
-function handleError(err) {
- // handle your error appropriately here, e.g.:
- console.error(err) // print the error to STDERR
- process.exit(1) // exit program with non-zero exit code
-}
-```
-
-### finished
-
-##### `miss.finished(stream, cb)`
-
-Waits for `stream` to finish or error and then calls `cb` with `(err)`. `cb` will only be called once. `err` will be null if the stream finished without error, or else it will be populated with the error from the streams `error` event.
-
-This function is useful for simplifying stream handling code as it lets you handle success or error conditions in a single code path. It's used internally `miss.pipe`.
-
-#### original module
-
-`miss.finished` is provided by [`require('end-of-stream')`](https://www.npmjs.com/package/end-of-stream)
-
-#### example
-
-```js
-var copySource = fs.createReadStream('./movie.mp4')
-var copyDest = fs.createWriteStream('./movie-copy.mp4')
-
-copySource.pipe(copyDest)
-
-miss.finished(copyDest, function(err) {
- if (err) return console.log('write failed', err)
- console.log('write success')
-})
-```
-
-### parallel
-
-##### `miss.parallel(concurrency, each)`
-
-This works like `through` except you can process items in parallel, while still preserving the original input order.
-
-This is handy if you wanna take advantage of node's async I/O and process streams of items in batches. With this module you can build your very own streaming parallel job queue.
-
-Note that `miss.parallel` preserves input ordering, if you don't need that then you can use [through2-concurrent](https://github.com/almost/through2-concurrent) instead, which is very similar to this otherwise.
-
-#### original module
-
-`miss.parallel` is provided by [`require('parallel-transform')`](https://npmjs.org/parallel-transform)
-
-#### example
-
-This example fetches the GET HTTP headers for a stream of input URLs 5 at a time in parallel.
-
-```js
-function getResponse (item, cb) {
- var r = request(item.url)
- r.on('error', function (err) {
- cb(err)
- })
- r.on('response', function (re) {
- cb(null, {url: item.url, date: new Date(), status: re.statusCode, headers: re.headers})
- r.abort()
- })
-}
-
-miss.pipe(
- fs.createReadStream('./urls.txt'), // one url per line
- split(),
- miss.parallel(5, getResponse),
- miss.through(function (row, enc, next) {
- console.log(JSON.stringify(row))
- next()
- })
-)
-```
diff --git a/deps/npm/node_modules/npm-profile/node_modules/pump/LICENSE b/deps/npm/node_modules/npm-profile/node_modules/pump/LICENSE
deleted file mode 100644
index 757562ec59..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/pump/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Mathias Buus
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/pump/README.md b/deps/npm/node_modules/npm-profile/node_modules/pump/README.md
deleted file mode 100644
index 5029b27d68..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/pump/README.md
+++ /dev/null
@@ -1,56 +0,0 @@
-# pump
-
-pump is a small node module that pipes streams together and destroys all of them if one of them closes.
-
-```
-npm install pump
-```
-
-[![build status](http://img.shields.io/travis/mafintosh/pump.svg?style=flat)](http://travis-ci.org/mafintosh/pump)
-
-## What problem does it solve?
-
-When using standard `source.pipe(dest)` source will _not_ be destroyed if dest emits close or an error.
-You are also not able to provide a callback to tell when then pipe has finished.
-
-pump does these two things for you
-
-## Usage
-
-Simply pass the streams you want to pipe together to pump and add an optional callback
-
-``` js
-var pump = require('pump')
-var fs = require('fs')
-
-var source = fs.createReadStream('/dev/random')
-var dest = fs.createWriteStream('/dev/null')
-
-pump(source, dest, function(err) {
- console.log('pipe finished', err)
-})
-
-setTimeout(function() {
- dest.destroy() // when dest is closed pump will destroy source
-}, 1000)
-```
-
-You can use pump to pipe more than two streams together as well
-
-``` js
-var transform = someTransformStream()
-
-pump(source, transform, anotherTransform, dest, function(err) {
- console.log('pipe finished', err)
-})
-```
-
-If `source`, `transform`, `anotherTransform` or `dest` closes all of them will be destroyed.
-
-## License
-
-MIT
-
-## Related
-
-`pump` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/npm-profile/node_modules/pump/index.js b/deps/npm/node_modules/npm-profile/node_modules/pump/index.js
deleted file mode 100644
index d9ca0335cb..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/pump/index.js
+++ /dev/null
@@ -1,82 +0,0 @@
-var once = require('once')
-var eos = require('end-of-stream')
-var fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes
-
-var noop = function () {}
-var ancient = /^v?\.0/.test(process.version)
-
-var isFn = function (fn) {
- return typeof fn === 'function'
-}
-
-var isFS = function (stream) {
- if (!ancient) return false // newer node version do not need to care about fs is a special way
- if (!fs) return false // browser
- return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close)
-}
-
-var isRequest = function (stream) {
- return stream.setHeader && isFn(stream.abort)
-}
-
-var destroyer = function (stream, reading, writing, callback) {
- callback = once(callback)
-
- var closed = false
- stream.on('close', function () {
- closed = true
- })
-
- eos(stream, {readable: reading, writable: writing}, function (err) {
- if (err) return callback(err)
- closed = true
- callback()
- })
-
- var destroyed = false
- return function (err) {
- if (closed) return
- if (destroyed) return
- destroyed = true
-
- if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks
- if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want
-
- if (isFn(stream.destroy)) return stream.destroy()
-
- callback(err || new Error('stream was destroyed'))
- }
-}
-
-var call = function (fn) {
- fn()
-}
-
-var pipe = function (from, to) {
- return from.pipe(to)
-}
-
-var pump = function () {
- var streams = Array.prototype.slice.call(arguments)
- var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop
-
- if (Array.isArray(streams[0])) streams = streams[0]
- if (streams.length < 2) throw new Error('pump requires two streams per minimum')
-
- var error
- var destroys = streams.map(function (stream, i) {
- var reading = i < streams.length - 1
- var writing = i > 0
- return destroyer(stream, reading, writing, function (err) {
- if (!error) error = err
- if (err) destroys.forEach(call)
- if (reading) return
- destroys.forEach(call)
- callback(error)
- })
- })
-
- streams.reduce(pipe)
-}
-
-module.exports = pump
diff --git a/deps/npm/node_modules/npm-profile/node_modules/pump/package.json b/deps/npm/node_modules/npm-profile/node_modules/pump/package.json
deleted file mode 100644
index 7dcd7007a8..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/pump/package.json
+++ /dev/null
@@ -1,59 +0,0 @@
-{
- "_from": "pump@^2.0.1",
- "_id": "pump@2.0.1",
- "_inBundle": false,
- "_integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==",
- "_location": "/npm-profile/pump",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "pump@^2.0.1",
- "name": "pump",
- "escapedName": "pump",
- "rawSpec": "^2.0.1",
- "saveSpec": null,
- "fetchSpec": "^2.0.1"
- },
- "_requiredBy": [
- "/npm-profile/cacache/mississippi"
- ],
- "_resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz",
- "_shasum": "12399add6e4cf7526d973cbc8b5ce2e2908b3909",
- "_spec": "pump@^2.0.1",
- "_where": "/Users/rebecca/code/npm/node_modules/npm-profile/node_modules/cacache/node_modules/mississippi",
- "author": {
- "name": "Mathias Buus Madsen",
- "email": "mathiasbuus@gmail.com"
- },
- "browser": {
- "fs": false
- },
- "bugs": {
- "url": "https://github.com/mafintosh/pump/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "end-of-stream": "^1.1.0",
- "once": "^1.3.1"
- },
- "deprecated": false,
- "description": "pipe streams together and close all of them if one of them closes",
- "homepage": "https://github.com/mafintosh/pump#readme",
- "keywords": [
- "streams",
- "pipe",
- "destroy",
- "callback"
- ],
- "license": "MIT",
- "name": "pump",
- "repository": {
- "type": "git",
- "url": "git://github.com/mafintosh/pump.git"
- },
- "scripts": {
- "test": "node test-browser.js && node test-node.js"
- },
- "version": "2.0.1"
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/pump/test-browser.js b/deps/npm/node_modules/npm-profile/node_modules/pump/test-browser.js
deleted file mode 100644
index 75ea4a292e..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/pump/test-browser.js
+++ /dev/null
@@ -1,62 +0,0 @@
-var stream = require('stream')
-var pump = require('./index')
-
-var rs = new stream.Readable()
-var ws = new stream.Writable()
-
-rs._read = function (size) {
- this.push(Buffer(size).fill('abc'))
-}
-
-ws._write = function (chunk, encoding, cb) {
- setTimeout(function () {
- cb()
- }, 100)
-}
-
-var toHex = function () {
- var reverse = new (require('stream').Transform)()
-
- reverse._transform = function (chunk, enc, callback) {
- reverse.push(chunk.toString('hex'))
- callback()
- }
-
- return reverse
-}
-
-var wsClosed = false
-var rsClosed = false
-var callbackCalled = false
-
-var check = function () {
- if (wsClosed && rsClosed && callbackCalled) {
- console.log('test-browser.js passes')
- clearTimeout(timeout)
- }
-}
-
-ws.on('finish', function () {
- wsClosed = true
- check()
-})
-
-rs.on('end', function () {
- rsClosed = true
- check()
-})
-
-pump(rs, toHex(), toHex(), toHex(), ws, function () {
- callbackCalled = true
- check()
-})
-
-setTimeout(function () {
- rs.push(null)
- rs.emit('close')
-}, 1000)
-
-var timeout = setTimeout(function () {
- check()
- throw new Error('timeout')
-}, 5000)
diff --git a/deps/npm/node_modules/npm-profile/node_modules/pump/test-node.js b/deps/npm/node_modules/npm-profile/node_modules/pump/test-node.js
deleted file mode 100644
index 034a65414d..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/pump/test-node.js
+++ /dev/null
@@ -1,53 +0,0 @@
-var pump = require('./index')
-
-var rs = require('fs').createReadStream('/dev/random')
-var ws = require('fs').createWriteStream('/dev/null')
-
-var toHex = function () {
- var reverse = new (require('stream').Transform)()
-
- reverse._transform = function (chunk, enc, callback) {
- reverse.push(chunk.toString('hex'))
- callback()
- }
-
- return reverse
-}
-
-var wsClosed = false
-var rsClosed = false
-var callbackCalled = false
-
-var check = function () {
- if (wsClosed && rsClosed && callbackCalled) {
- console.log('test-node.js passes')
- clearTimeout(timeout)
- }
-}
-
-ws.on('close', function () {
- wsClosed = true
- check()
-})
-
-rs.on('close', function () {
- rsClosed = true
- check()
-})
-
-var res = pump(rs, toHex(), toHex(), toHex(), ws, function () {
- callbackCalled = true
- check()
-})
-
-if (res) {
- process.exit(1)
-}
-
-setTimeout(function () {
- rs.destroy()
-}, 1000)
-
-var timeout = setTimeout(function () {
- throw new Error('timeout')
-}, 5000)
diff --git a/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/.npmignore b/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/.npmignore
deleted file mode 100644
index 6bcbf6f77d..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/.npmignore
+++ /dev/null
@@ -1,5 +0,0 @@
-.git*
-.idea*
-node_modules/
-npm-debug.log
-coverage \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/.travis.yml b/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/.travis.yml
deleted file mode 100644
index 9d67de5878..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/.travis.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-language: node_js
-node_js:
- - 0.10
- - 0.12
- - 4
- - 6
- - stable
-
-script: "npm run coverage"
-# Send coverage data to Coveralls
-after_script: "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js" \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/LICENSE b/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/LICENSE
deleted file mode 100644
index b2442a9e71..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2013 Josh Glazebrook
-
-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/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/README.md b/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/README.md
deleted file mode 100644
index 178ce8827f..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/README.md
+++ /dev/null
@@ -1,307 +0,0 @@
-smart-buffer [![Build Status](https://travis-ci.org/JoshGlazebrook/smart-buffer.svg?branch=master)](https://travis-ci.org/JoshGlazebrook/smart-buffer) [![Coverage Status](https://coveralls.io/repos/github/JoshGlazebrook/smart-buffer/badge.svg?branch=master)](https://coveralls.io/github/JoshGlazebrook/smart-buffer?branch=master)
-=============
-
-smart-buffer is a light Buffer wrapper that takes away the need to keep track of what position to read and write data to and from the underlying Buffer. It also adds null terminating string operations and **grows** as you add more data.
-
-
-### What it's useful for:
-
-I created smart-buffer because I wanted to simplify the process of using Buffer for building and reading network packets to send over a socket. Rather than having to keep track of which position I need to write a UInt16 to after adding a string of variable length, I simply don't have to.
-
-Key Features:
-* Proxies all of the Buffer write and read functions.
-* Keeps track of read and write positions for you.
-* Grows the internal Buffer as you add data to it.
-* Useful string operations. (Null terminating strings)
-* Allows for inserting values at specific points in the internal Buffer.
-
-#### Note:
-smart-buffer can be used for writing to an underlying buffer as well as reading from it. It however does not function correctly if you're mixing both read and write operations with each other.
-
-## Installing:
-
-`npm install smart-buffer`
-
-## Using smart-buffer
-
-### Example
-
-Say you were building a packet that had to conform to the following protocol:
-
-`[PacketType:2][PacketLength:2][Data:XX]`
-
-To build this packet using the vanilla Buffer class, you would have to count up the length of the data payload beforehand. You would also need to keep track of the current "cursor" position in your Buffer so you write everything in the right places. With smart-buffer you don't have to do either of those things.
-
-```javascript
-function createLoginPacket(username, password, age, country) {
- var packet = new SmartBuffer();
- packet.writeUInt16LE(0x0060); // Login Packet Type/ID
- packet.writeStringNT(username);
- packet.writeStringNT(password);
- packet.writeUInt8(age);
- packet.writeStringNT(country);
- packet.writeUInt16LE(packet.length - 2, 2);
-
- return packet.toBuffer();
-}
-```
-With the above function, you now can do this:
-```javascript
-var login = createLoginPacket("Josh", "secret123", 22, "United States");
-
-// <Buffer 60 00 1e 00 4a 6f 73 68 00 73 65 63 72 65 74 31 32 33 00 16 55 6e 69 74 65 64 20 53 74 61 74 65 73 00>
-```
-Notice that the `[PacketLength:2]` part of the packet was inserted after we had added everything else, and as shown in the Buffer dump above, is in the correct location along with everything else.
-
-Reading back the packet we created above is just as easy:
-```javascript
-
-var reader = new SmartBuffer(login);
-
-var logininfo = {
- packetType: reader.readUInt16LE(),
- packetLength: reader.readUInt16LE(),
- username: reader.readStringNT(),
- password: reader.readStringNT(),
- age: reader.readUInt8(),
- country: reader.readStringNT()
-};
-
-/*
-{
- packetType: 96, (0x0060)
- packetLength: 30,
- username: 'Josh',
- password: 'secret123',
- age: 22,
- country: 'United States'
-};
-*/
-```
-
-# Api Reference:
-
-### Constructing a smart-buffer
-
-smart-buffer has a few different constructor signatures you can use. By default, utf8 encoding is used, and the internal Buffer length will be 4096. When reading from a Buffer, smart-buffer does NOT make a copy of the Buffer. It reads from the Buffer it was given.
-
-```javascript
-var SmartBuffer = require('smart-buffer');
-
-// Reading from an existing Buffer:
-var reader = new SmartBuffer(buffer);
-var reader = new SmartBuffer(buffer, 'ascii');
-
-// Writing to a new Buffer:
-var writer = new SmartBuffer(); // Defaults to utf8, 4096 length internal Buffer.
-var writer = new SmartBuffer(1024); // Defaults to utf8, 1024 length internal Buffer.
-var writer = new SmartBuffer('ascii'); // Sets to ascii encoding, 4096 length internal buffer.
-var writer = new SmartBuffer(1024, 'ascii'); // Sets to ascii encoding, 1024 length internal buffer.
-```
-
-## Reading Data
-
-smart-buffer supports all of the common read functions you will find in the vanilla Buffer class. The only difference is, you do not need to specify which location to start reading from. This is possible because as you read data out of a smart-buffer, it automatically progresses an internal read offset/position to know where to pick up from on the next read.
-
-## Reading Numeric Values
-
-When numeric values, you simply need to call the function you want, and the data is returned.
-
-Supported Operations:
-* readInt8
-* readInt16BE
-* readInt16LE
-* readInt32BE
-* readInt32LE
-* readUInt8
-* readUInt16BE
-* readUInt16LE
-* readUInt32BE
-* readUInt32LE
-* readFloatBE
-* readFloatLE
-* readDoubleBE
-* readDoubleLE
-
-```javascript
-var reader = new SmartBuffer(somebuffer);
-var num = reader.readInt8();
-```
-
-## Reading String Values
-
-When reading String values, you can either choose to read a null terminated string, or a string of a specified length.
-
-### SmartBuffer.readStringNT( [encoding] )
-> `String` **String encoding to use** - Defaults to the encoding set in the constructor, or utf8.
-
-returns `String`
-
-> Note: When readStringNT is called and there is no null character found, smart-buffer will read to the end of the internal Buffer.
-
-### SmartBuffer.readString( [length], [encoding] )
-### SmartBuffer.readString( [length] )
-### SmartBuffer.readString( [encoding] )
-> `Number` **Length of the string to read**
-
-> `String` **String encoding to use** - Defaults to the encoding set in the constructor, or utf8.
-
-returns `String`
-
-> Note: When readString is called without a specified length, smart-buffer will read to the end of the internal Buffer.
-
-
-
-## Reading Buffer Values
-
-### SmartBuffer.readBuffer( length )
-> `Number` **Length of data to read into a Buffer**
-
-returns `Buffer`
-
-> Note: This function uses `slice` to retrieve the Buffer.
-
-
-### SmartBuffer.readBufferNT()
-
-returns `Buffer`
-
-> Note: This reads the next sequence of bytes in the buffer until a null (0x00) value is found. (Null terminated buffer)
-> Note: This function uses `slice` to retrieve the Buffer.
-
-
-## Writing Data
-
-smart-buffer supports all of the common write functions you will find in the vanilla Buffer class. The only difference is, you do not need to specify which location to write to in your Buffer by default. You do however have the option of **inserting** a piece of data into your smart-buffer at a given location.
-
-
-## Writing Numeric Values
-
-
-For numeric values, you simply need to call the function you want, and the data is written at the end of the internal Buffer's current write position. You can specify a offset/position to **insert** the given value at, but keep in mind this does not override data at the given position. This feature also does not work properly when inserting a value beyond the current internal length of the smart-buffer (length being the .length property of the smart-buffer instance you're writing to)
-
-Supported Operations:
-* writeInt8
-* writeInt16BE
-* writeInt16LE
-* writeInt32BE
-* writeInt32LE
-* writeUInt8
-* writeUInt16BE
-* writeUInt16LE
-* writeUInt32BE
-* writeUInt32LE
-* writeFloatBE
-* writeFloatLE
-* writeDoubleBE
-* writeDoubleLE
-
-The following signature is the same for all the above functions:
-
-### SmartBuffer.writeInt8( value, [offset] )
-> `Number` **A valid Int8 number**
-
-> `Number` **The position to insert this value at**
-
-returns this
-
-> Note: All write operations return `this` to allow for chaining.
-
-## Writing String Values
-
-When reading String values, you can either choose to write a null terminated string, or a non null terminated string.
-
-### SmartBuffer.writeStringNT( value, [offset], [encoding] )
-### SmartBuffer.writeStringNT( value, [offset] )
-### SmartBuffer.writeStringNT( value, [encoding] )
-> `String` **String value to write**
-
-> `Number` **The position to insert this String at**
-
-> `String` **The String encoding to use.** - Defaults to the encoding set in the constructor, or utf8.
-
-returns this
-
-### SmartBuffer.writeString( value, [offset], [encoding] )
-### SmartBuffer.writeString( value, [offset] )
-### SmartBuffer.writeString( value, [encoding] )
-> `String` **String value to write**
-
-> `Number` **The position to insert this String at**
-
-> `String` **The String encoding to use** - Defaults to the encoding set in the constructor, or utf8.
-
-returns this
-
-
-## Writing Buffer Values
-
-### SmartBuffer.writeBuffer( value, [offset] )
-> `Buffer` **Buffer value to write**
-
-> `Number` **The position to insert this Buffer's content at**
-
-returns this
-
-### SmartBuffer.writeBufferNT( value, [offset] )
-> `Buffer` **Buffer value to write**
-
-> `Number` **The position to insert this Buffer's content at**
-
-returns this
-
-
-## Utility Functions
-
-### SmartBuffer.clear()
-Resets the SmartBuffer to its default state where it can be reused for reading or writing.
-
-### SmartBuffer.remaining()
-
-returns `Number` The amount of data left to read based on the current read Position.
-
-### SmartBuffer.skip( value )
-> `Number` **The amount of bytes to skip ahead**
-
-Skips the read position ahead by the given value.
-
-returns this
-
-### SmartBuffer.rewind( value )
-> `Number` **The amount of bytes to reward backwards**
-
-Rewinds the read position backwards by the given value.
-
-returns this
-
-### SmartBuffer.skipTo( position )
-> `Number` **The point to skip the read position to**
-
-Moves the read position to the given point.
-returns this
-
-### SmartBuffer.toBuffer()
-
-returns `Buffer` A Buffer containing the contents of the internal Buffer.
-
-> Note: This uses the slice function.
-
-### SmartBuffer.toString( [encoding] )
-> `String` **The String encoding to use** - Defaults to the encoding set in the constructor, or utf8.
-
-returns `String` The internal Buffer in String representation.
-
-### SmartBuffer.destroy()
-Attempts to destroy the smart-buffer.
-
-returns this
-
-## Properties
-
-### SmartBuffer.length
-
-returns `Number` **The length of the data that is being tracked in the internal Buffer** - Does NOT return the absolute length of the internal Buffer being written to.
-
-## License
-
-This work is licensed under the [MIT license](http://en.wikipedia.org/wiki/MIT_License). \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/build/smartbuffer.js b/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/build/smartbuffer.js
deleted file mode 100644
index ef53b9fd4d..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/build/smartbuffer.js
+++ /dev/null
@@ -1,726 +0,0 @@
-"use strict";
-// The default Buffer size if one is not provided.
-const DEFAULT_SMARTBUFFER_SIZE = 4096;
-// The default string encoding to use for reading/writing strings.
-const DEFAULT_SMARTBUFFER_ENCODING = 'utf8';
-class SmartBuffer {
- /**
- * Creates a new SmartBuffer instance.
- *
- * @param arg1 { Number | BufferEncoding | Buffer | SmartBufferOptions }
- * @param arg2 { BufferEncoding }
- */
- constructor(arg1, arg2) {
- this.length = 0;
- this.encoding = DEFAULT_SMARTBUFFER_ENCODING;
- this.writeOffset = 0;
- this.readOffset = 0;
- // Initial buffer size provided
- if (typeof arg1 === 'number') {
- if (Number.isFinite(arg1) && Number.isInteger(arg1) && arg1 > 0) {
- this.buff = Buffer.allocUnsafe(arg1);
- }
- else {
- throw new Error('Invalid size provided. Size must be a valid integer greater than zero.');
- }
- }
- else if (typeof arg1 === 'string') {
- if (Buffer.isEncoding(arg1)) {
- this.buff = Buffer.allocUnsafe(DEFAULT_SMARTBUFFER_SIZE);
- this.encoding = arg1;
- }
- else {
- throw new Error('Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.');
- }
- }
- else if (arg1 instanceof Buffer) {
- this.buff = arg1;
- this.length = arg1.length;
- }
- else if (SmartBuffer.isSmartBufferOptions(arg1)) {
- // Checks for encoding
- if (arg1.encoding) {
- if (Buffer.isEncoding(arg1.encoding)) {
- this.encoding = arg1.encoding;
- }
- else {
- throw new Error('Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.');
- }
- }
- // Checks for initial size length
- if (arg1.size) {
- if (Number.isFinite(arg1.size) && Number.isInteger(arg1.size) && arg1.size > 0) {
- this.buff = Buffer.allocUnsafe(arg1.size);
- }
- else {
- throw new Error('Invalid size provided. Size must be a valid integer greater than zero.');
- }
- }
- else if (arg1.buff) {
- if (arg1.buff instanceof Buffer) {
- this.buff = arg1.buff;
- this.length = arg1.buff.length;
- }
- else {
- throw new Error('Invalid buffer provided in SmartBufferOptions.');
- }
- }
- else {
- this.buff = Buffer.allocUnsafe(DEFAULT_SMARTBUFFER_SIZE);
- }
- }
- else if (typeof arg1 === 'object') {
- throw new Error('Invalid object supplied to SmartBuffer constructor.');
- }
- else {
- this.buff = Buffer.allocUnsafe(DEFAULT_SMARTBUFFER_SIZE);
- }
- // Check for encoding (Buffer, Encoding) constructor.
- if (typeof arg2 === 'string') {
- if (Buffer.isEncoding(arg2)) {
- this.encoding = arg2;
- }
- else {
- throw new Error('Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.');
- }
- }
- }
- /**
- * Creates a new SmartBuffer instance with the provided internal Buffer size and optional encoding.
- *
- * @param size { Number } The size of the internal Buffer.
- * @param encoding { String } The BufferEncoding to use for strings.
- *
- * @return { SmartBuffer }
- */
- static fromSize(size, encoding) {
- return new this({
- size: size,
- encoding: encoding
- });
- }
- /**
- * Creates a new SmartBuffer instance with the provided Buffer and optional encoding.
- *
- * @param buffer { Buffer } The Buffer to use as the internal Buffer value.
- * @param encoding { String } The BufferEncoding to use for strings.
- *
- * @return { SmartBuffer }
- */
- static fromBuffer(buff, encoding) {
- return new this({
- buff: buff,
- encoding: encoding
- });
- }
- /**
- * Creates a new SmartBuffer instance with the provided SmartBufferOptions options.
- *
- * @param options { SmartBufferOptions } The options to use when creating the SmartBuffer instance.
- */
- static fromOptions(options) {
- return new this(options);
- }
- /**
- * Ensures that the internal Buffer is large enough to write data.
- *
- * @param minLength { Number } The minimum length of the data that needs to be written.
- * @param offset { Number } The offset of the data to be written.
- */
- ensureWriteable(minLength, offset) {
- const offsetVal = typeof offset === 'number' ? offset : 0;
- // Ensure there is enough internal Buffer capacity.
- this.ensureCapacity(this.length + minLength + offsetVal);
- // If offset is provided, copy data into appropriate location in regards to the offset.
- if (typeof offset === 'number') {
- this.buff.copy(this.buff, offsetVal + minLength, offsetVal, this.buff.length);
- }
- // Adjust instance length.
- this.length = Math.max(this.length + minLength, offsetVal + minLength);
- }
- /**
- * Ensures that the internal Buffer is large enough to write at least the given amount of data.
- *
- * @param minLength { Number } The minimum length of the data needs to be written.
- */
- ensureCapacity(minLength) {
- const oldLength = this.buff.length;
- if (minLength > oldLength) {
- let data = this.buff;
- let newLength = (oldLength * 3) / 2 + 1;
- if (newLength < minLength) {
- newLength = minLength;
- }
- this.buff = Buffer.allocUnsafe(newLength);
- data.copy(this.buff, 0, 0, oldLength);
- }
- }
- /**
- * Reads a numeric number value using the provided function.
- *
- * @param func { Function(offset: number) => number } The function to read data on the internal Buffer with.
- * @param byteSize { Number } The number of bytes read.
- *
- * @param { Number }
- */
- readNumberValue(func, byteSize) {
- // Call Buffer.readXXXX();
- const value = func.call(this.buff, this.readOffset);
- // Adjust internal read offset
- this.readOffset += byteSize;
- return value;
- }
- /**
- * Writes a numeric number value using the provided function.
- *
- * @param func { Function(offset: number, offset?) => number} The function to write data on the internal Buffer with.
- * @param byteSize { Number } The number of bytes written.
- * @param value { Number } The number value to write.
- * @param offset { Number } the offset to write the number at.
- *
- */
- writeNumberValue(func, byteSize, value, offset) {
- const offsetVal = typeof offset === 'number' ? offset : this.writeOffset;
- // Ensure there is enough internal Buffer capacity. (raw offset is passed)
- this.ensureWriteable(byteSize, offset);
- // Call buffer.writeXXXX();
- func.call(this.buff, value, offsetVal);
- // Adjusts internal write offset
- this.writeOffset += byteSize;
- }
- // Signed integers
- /**
- * Reads an Int8 value from the current read position.
- *
- * @return { Number }
- */
- readInt8() {
- return this.readNumberValue(Buffer.prototype.readUInt8, 1);
- }
- /**
- * Reads an Int16BE value from the current read position.
- *
- * @return { Number }
- */
- readInt16BE() {
- return this.readNumberValue(Buffer.prototype.readUInt16BE, 2);
- }
- /**
- * Reads an Int16LE value from the current read position.
- *
- * @return { Number }
- */
- readInt16LE() {
- return this.readNumberValue(Buffer.prototype.readUInt16LE, 2);
- }
- /**
- * Reads an Int32BE value from the current read position.
- *
- * @return { Number }
- */
- readInt32BE() {
- return this.readNumberValue(Buffer.prototype.readUInt32BE, 4);
- }
- /**
- * Reads an Int32LE value from the current read position.
- *
- * @return { Number }
- */
- readInt32LE() {
- return this.readNumberValue(Buffer.prototype.readUInt32LE, 4);
- }
- /**
- * Writes an Int8 value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeInt8(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeInt8, 1, value, offset);
- return this;
- }
- /**
- * Writes an Int16BE value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeInt16BE(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeInt16BE, 2, value, offset);
- return this;
- }
- /**
- * Writes an Int16LE value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeInt16LE(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeInt16LE, 2, value, offset);
- return this;
- }
- /**
- * Writes an Int32BE value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeInt32BE(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeInt32BE, 4, value, offset);
- return this;
- }
- /**
- * Writes an Int32LE value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeInt32LE(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeInt32LE, 4, value, offset);
- return this;
- }
- // Unsigned Integers
- /**
- * Reads an UInt8 value from the current read position.
- *
- * @return { Number }
- */
- readUInt8() {
- return this.readNumberValue(Buffer.prototype.readUInt8, 1);
- }
- /**
- * Reads an UInt16BE value from the current read position.
- *
- * @return { Number }
- */
- readUInt16BE() {
- return this.readNumberValue(Buffer.prototype.readUInt16BE, 2);
- }
- /**
- * Reads an UInt16LE value from the current read position.
- *
- * @return { Number }
- */
- readUInt16LE() {
- return this.readNumberValue(Buffer.prototype.readUInt16LE, 2);
- }
- /**
- * Reads an UInt32BE value from the current read position.
- *
- * @return { Number }
- */
- readUInt32BE() {
- return this.readNumberValue(Buffer.prototype.readUInt32BE, 4);
- }
- /**
- * Reads an UInt32LE value from the current read position.
- *
- * @return { Number }
- */
- readUInt32LE() {
- return this.readNumberValue(Buffer.prototype.readUInt32LE, 4);
- }
- /**
- * Writes an UInt8 value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeUInt8(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeUInt8, 1, value, offset);
- return this;
- }
- /**
- * Writes an UInt16BE value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeUInt16BE(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeUInt16BE, 2, value, offset);
- return this;
- }
- /**
- * Writes an UInt16LE value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeUInt16LE(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeUInt16LE, 2, value, offset);
- return this;
- }
- /**
- * Writes an UInt32BE value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeUInt32BE(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeUInt32BE, 4, value, offset);
- return this;
- }
- /**
- * Writes an UInt32LE value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeUInt32LE(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeUInt32LE, 4, value, offset);
- return this;
- }
- // Floating Point
- /**
- * Reads an FloatBE value from the current read position.
- *
- * @return { Number }
- */
- readFloatBE() {
- return this.readNumberValue(Buffer.prototype.readFloatBE, 4);
- }
- /**
- * Reads an FloatLE value from the current read position.
- *
- * @return { Number }
- */
- readFloatLE() {
- return this.readNumberValue(Buffer.prototype.readFloatLE, 4);
- }
- /**
- * Writes a FloatBE value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeFloatBE(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeFloatBE, 4, value, offset);
- return this;
- }
- /**
- * Writes a FloatLE value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeFloatLE(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeFloatLE, 4, value, offset);
- return this;
- }
- // Double Floating Point
- /**
- * Reads an DoublEBE value from the current read position.
- *
- * @return { Number }
- */
- readDoubleBE() {
- return this.readNumberValue(Buffer.prototype.readDoubleBE, 8);
- }
- /**
- * Reads an DoubleLE value from the current read position.
- *
- * @return { Number }
- */
- readDoubleLE() {
- return this.readNumberValue(Buffer.prototype.readDoubleLE, 8);
- }
- /**
- * Writes a DoubleBE value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeDoubleBE(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeDoubleBE, 8, value, offset);
- return this;
- }
- /**
- * Writes a DoubleLE value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeDoubleLE(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeDoubleLE, 8, value, offset);
- return this;
- }
- // Strings
- /**
- * Reads a String from the current read position.
- *
- * @param length { Number } The number of bytes to read as a String.
- * @param encoding { String } The BufferEncoding to use for the string (Defaults to instance level encoding).
- *
- * @return { String }
- */
- readString(length, encoding) {
- const lengthVal = Math.min(length, this.length - this.readOffset) || this.length - this.readOffset;
- const value = this.buff.slice(this.readOffset, this.readOffset + lengthVal).toString(encoding || this.encoding);
- this.readOffset += lengthVal;
- return value;
- }
- /**
- * Writes a String to the current write position.
- *
- * @param value { String } The String value to write.
- * @param arg2 { Number | String } The offset to write the string to, or the BufferEncoding to use.
- * @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding).
- */
- writeString(value, arg2, encoding) {
- let offsetVal = this.writeOffset;
- let encodingVal = this.encoding;
- // Check for offset
- if (typeof arg2 === 'number') {
- offsetVal = arg2;
- }
- else if (typeof arg2 === 'string') {
- if (Buffer.isEncoding(arg2)) {
- encodingVal = arg2;
- }
- else {
- throw new Error('Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.');
- }
- }
- // Check for encoding (third param)
- if (typeof encoding === 'string') {
- if (Buffer.isEncoding(encoding)) {
- encodingVal = encoding;
- }
- else {
- throw new Error('Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.');
- }
- }
- // Calculate bytelength of string.
- const byteLength = Buffer.byteLength(value, encodingVal);
- // Ensure there is enough internal Buffer capacity.
- this.ensureWriteable(byteLength, offsetVal);
- // Write value
- this.buff.write(value, offsetVal, byteLength, encodingVal);
- // Increment internal Buffer write offset;
- this.writeOffset += byteLength;
- return this;
- }
- /**
- * Reads a null-terminated String from the current read position.
- *
- * @param encoding { String } The BufferEncoding to use for the string (Defaults to instance level encoding).
- *
- * @return { String }
- */
- readStringNT(encoding) {
- // Set null character position to the end SmartBuffer instance.
- let nullPos = this.length;
- // Find next null character (if one is not found, default from above is used)
- for (let i = this.readOffset; i < this.length; i++) {
- if (this.buff[i] === 0x00) {
- nullPos = i;
- break;
- }
- }
- // Read string value
- const value = this.buff.slice(this.readOffset, nullPos);
- // Increment internal Buffer read offset
- this.readOffset = nullPos + 1;
- return value.toString(encoding || this.encoding);
- }
- /**
- * Writes a null-terminated String to the current write position.
- *
- * @param value { String } The String value to write.
- * @param arg2 { Number | String } The offset to write the string to, or the BufferEncoding to use.
- * @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding).
- */
- writeStringNT(value, offset, encoding) {
- // Write Values
- this.writeString(value, offset, encoding);
- this.writeUInt8(0x00, (typeof offset === 'number' ? offset + value.length : this.writeOffset));
- }
- // Buffers
- /**
- * Reads a Buffer from the internal read position.
- *
- * @param length { Number } The length of data to read as a Buffer.
- *
- * @return { Buffer }
- */
- readBuffer(length) {
- const lengthVal = typeof length === 'number' ? length : this.length;
- const endPoint = Math.min(this.length, this.readOffset + lengthVal);
- // Read buffer value
- const value = this.buff.slice(this.readOffset, endPoint);
- // Increment internal Buffer read offset
- this.readOffset = endPoint;
- return value;
- }
- /**
- * Writes a Buffer to the current write position.
- *
- * @param value { Buffer } The Buffer to write.
- * @param offset { Number } The offset to write the Buffer to.
- */
- writeBuffer(value, offset) {
- const offsetVal = typeof offset === 'number' ? offset : this.writeOffset;
- // Ensure there is enough internal Buffer capacity.
- this.ensureWriteable(value.length, offsetVal);
- // Write buffer value
- value.copy(this.buff, offsetVal);
- // Increment internal Buffer write offset
- this.writeOffset += value.length;
- return this;
- }
- /**
- * Reads a null-terminated Buffer from the current read poisiton.
- *
- * @return { Buffer }
- */
- readBufferNT() {
- // Set null character position to the end SmartBuffer instance.
- let nullPos = this.length;
- // Find next null character (if one is not found, default from above is used)
- for (let i = this.readOffset; i < this.length; i++) {
- if (this.buff[i] === 0x00) {
- nullPos = i;
- break;
- }
- }
- // Read value
- const value = this.buff.slice(this.readOffset, nullPos);
- // Increment internal Buffer read offset
- this.readOffset = nullPos + 1;
- return value;
- }
- /**
- * Writes a null-terminated Buffer to the current write position.
- *
- * @param value { Buffer } The Buffer to write.
- * @param offset { Number } The offset to write the Buffer to.
- */
- writeBufferNT(value, offset) {
- // Write Values
- this.writeBuffer(value, offset);
- this.writeUInt8(0, (typeof offset === 'number' ? offset + value.length : this.writeOffset));
- return this;
- }
- /**
- * Clears the SmartBuffer instance to its original empty state.
- */
- clear() {
- this.writeOffset = 0;
- this.readOffset = 0;
- this.length = 0;
- }
- /**
- * Gets the remaining data left to be read from the SmartBuffer instance.
- *
- * @return { Number }
- */
- remaining() {
- return this.length - this.readOffset;
- }
- /**
- * Moves the read offset forward.
- *
- * @param amount { Number } The amount to move the read offset forward by.
- */
- skip(amount) {
- if (this.readOffset + amount > this.length) {
- throw new Error('Target position is beyond the bounds of the SmartBuffer size.');
- }
- this.readOffset += amount;
- }
- /**
- * Moves the read offset backwards.
- *
- * @param amount { Number } The amount to move the read offset backwards by.
- */
- rewind(amount) {
- if (this.readOffset - amount < 0) {
- throw new Error('Target position is beyond the bounds of the SmartBuffer size.');
- }
- this.readOffset -= amount;
- }
- /**
- * Moves the read offset to a specific position.
- *
- * @param position { Number } The position to move the read offset to.
- */
- skipTo(position) {
- this.moveTo(position);
- }
- /**
- * Moves the read offset to a specific position.
- *
- * @param position { Number } The position to move the read offset to.
- */
- moveTo(position) {
- if (position > this.length) {
- throw new Error('Target position is beyond the bounds of the SmartBuffer size.');
- }
- this.readOffset = position;
- }
- /**
- * Gets the value of the internal managed Buffer
- *
- * @param { Buffer }
- */
- toBuffer() {
- return this.buff.slice(0, this.length);
- }
- /**
- * Gets the String value of the internal managed Buffer
- *
- * @param encoding { String } The BufferEncoding to display the Buffer as (defaults to instance level encoding).
- */
- toString(encoding) {
- const encodingVal = typeof encoding === 'string' ? encoding : this.encoding;
- if (Buffer.isEncoding(encodingVal)) {
- return this.buff.toString(encodingVal, 0, this.length);
- }
- else {
- throw new Error('Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.');
- }
- }
- /**
- * Destroys the SmartBuffer instance.
- */
- destroy() {
- this.clear();
- }
- /**
- * Type checking function that determines if an object is a SmartBufferOptions object.
- */
- static isSmartBufferOptions(options) {
- const castOptions = options;
- return castOptions && (castOptions.encoding !== undefined || castOptions.size !== undefined || castOptions.buff !== undefined);
- }
-}
-module.exports = SmartBuffer;
-//# sourceMappingURL=smartbuffer.js.map \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/build/smartbuffer.js.map b/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/build/smartbuffer.js.map
deleted file mode 100644
index 60af067a2c..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/build/smartbuffer.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"smartbuffer.js","sourceRoot":"","sources":["../src/smartbuffer.ts"],"names":[],"mappings":";AAaA,kDAAkD;AAClD,MAAM,wBAAwB,GAAG,IAAI,CAAC;AAEtC,mEAAmE;AACnE,MAAM,4BAA4B,GAAG,MAAM,CAAC;AAE5C;IASI;;;;;OAKG;IACH,YAAY,IAA4D,EAAE,IAAqB;QAbxF,WAAM,GAAW,CAAC,CAAC;QACnB,aAAQ,GAAmB,4BAA4B,CAAC;QAEvD,gBAAW,GAAW,CAAC,CAAC;QACxB,eAAU,GAAW,CAAC,CAAC;QAW3B,+BAA+B;QAC/B,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;YAE3B,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC;gBAC9D,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACzC,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,MAAM,IAAI,KAAK,CAAC,wEAAwE,CAAC,CAAC;YAC9F,CAAC;QAEL,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;YAClC,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC1B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC;gBACzD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;YACzB,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,MAAM,IAAI,KAAK,CAAC,kGAAkG,CAAC,CAAC;YACxH,CAAC;QAEL,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,YAAY,MAAM,CAAC,CAAC,CAAC;YAChC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC9B,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAEhD,sBAAsB;YACtB,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAChB,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;oBACnC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;gBAClC,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,MAAM,IAAK,KAAK,CAAC,kGAAkG,CAAC,CAAC;gBACzH,CAAC;YACL,CAAC;YAED,iCAAiC;YACjC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;gBACZ,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC;oBAC7E,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC9C,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,MAAM,IAAI,KAAK,CAAC,wEAAwE,CAAC,CAAC;gBAC9F,CAAC;YAEL,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;gBACnB,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,YAAY,MAAM,CAAC,CAAC,CAAC;oBAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;oBACtB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;gBACnC,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;gBACtE,CAAC;YACL,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC;YAC7D,CAAC;QACL,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;QAC3E,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC;QAC7D,CAAC;QAED,qDAAqD;QACrD,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;YAC3B,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;YACzB,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,MAAM,IAAI,KAAK,CAAC,kGAAkG,CAAC,CAAC;YACxH,CAAC;QACL,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,QAAQ,CAAC,IAAY,EAAE,QAAyB;QAC1D,MAAM,CAAC,IAAI,IAAI,CAAC;YACZ,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,QAAQ;SACrB,CAAC,CAAC;IACP,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,UAAU,CAAC,IAAY,EAAE,QAAyB;QAC5D,MAAM,CAAC,IAAI,IAAI,CAAC;YACZ,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,QAAQ;SACrB,CAAC,CAAC;IACP,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,WAAW,CAAC,OAA2B;QACjD,MAAM,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAED;;;;;OAKG;IACK,eAAe,CAAC,SAAiB,EAAE,MAAe;QACtD,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG,CAAC,CAAC;QAE1D,mDAAmD;QACnD,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC,CAAC;QAEzD,uFAAuF;QACvF,EAAE,CAAC,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC;YAC7B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAClF,CAAC;QAED,0BAA0B;QAC1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC,CAAC;IAC3E,CAAC;IAGD;;;;OAIG;IACK,cAAc,CAAC,SAAiB;QACpC,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;QAEnC,EAAE,CAAC,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC;YACxB,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;YACrB,IAAI,SAAS,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACxC,EAAE,CAAC,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC;gBACxB,SAAS,GAAG,SAAS,CAAC;YAC1B,CAAC;YACD,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;YAE1C,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC;QAC1C,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACK,eAAe,CAAC,IAAgC,EAAE,QAAgB;QACtE,0BAA0B;QAC1B,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAEpD,8BAA8B;QAC9B,IAAI,CAAC,UAAU,IAAI,QAAQ,CAAC;QAE5B,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAED;;;;;;;;OAQG;IACK,gBAAgB,CAAC,IAAgD,EAAE,QAAgB,EAAE,KAAa,EAAE,MAAe;QACvH,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC;QAEzE,0EAA0E;QAC1E,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAEvC,2BAA2B;QAC3B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;QAEvC,gCAAgC;QAChC,IAAI,CAAC,WAAW,IAAI,QAAQ,CAAC;IACjC,CAAC;IAGD,kBAAkB;IAElB;;;;OAIG;IACH,QAAQ;QACJ,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IAC/D,CAAC;IAED;;;;OAIG;IACH,WAAW;QACP,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;OAIG;IACH,WAAW;QACP,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;OAIG;IACH,WAAW;QACP,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;OAIG;IACH,WAAW;QACP,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,KAAa,EAAE,MAAe;QACpC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACpE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,CAAC,KAAa,EAAE,MAAe;QACvC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACvE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,CAAC,KAAa,EAAE,MAAe;QACvC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACvE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,CAAC,KAAa,EAAE,MAAe;QACvC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACvE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,CAAC,KAAa,EAAE,MAAe;QACvC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACvE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED,oBAAoB;IAEpB;;;;OAIG;IACH,SAAS;QACL,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IAC/D,CAAC;IAED;;;;OAIG;IACH,YAAY;QACR,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;OAIG;IACH,YAAY;QACR,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;OAIG;IACH,YAAY;QACR,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;OAIG;IACH,YAAY;QACR,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;OAOG;IACH,UAAU,CAAC,KAAa,EAAE,MAAe;QACrC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACrE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACH,aAAa,CAAC,KAAa,EAAE,MAAe;QACxC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACxE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACH,aAAa,CAAC,KAAa,EAAE,MAAe;QACxC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACxE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACH,aAAa,CAAC,KAAa,EAAE,MAAe;QACxC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACxE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACH,aAAa,CAAC,KAAa,EAAE,MAAe;QACxC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACxE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED,iBAAiB;IAGjB;;;;OAIG;IACH,WAAW;QACP,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IACjE,CAAC;IAED;;;;OAIG;IACH,WAAW;QACP,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,CAAC,KAAa,EAAE,MAAe;QACvC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACvE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,CAAC,KAAa,EAAE,MAAe;QACvC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACvE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAGD,wBAAwB;IAExB;;;;OAIG;IACH,YAAY;QACR,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;OAIG;IACH,YAAY;QACR,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;OAOG;IACH,aAAa,CAAC,KAAa,EAAE,MAAe;QACxC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACxE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACH,aAAa,CAAC,KAAa,EAAE,MAAe;QACxC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACxE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAGD,UAAU;IAEV;;;;;;;OAOG;IACH,UAAU,CAAC,MAAe,EAAE,QAAyB;QACjD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;QACnG,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC,QAAQ,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC;QAEhH,IAAI,CAAC,UAAU,IAAI,SAAS,CAAC;QAC7B,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAED;;;;;;OAMG;IACH,WAAW,CAAC,KAAa,EAAE,IAA8B,EAAE,QAAyB;QAChF,IAAI,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC;QACjC,IAAI,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC;QAEhC,mBAAmB;QACnB,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;YAC3B,SAAS,GAAG,IAAI,CAAC;QAErB,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;YAClC,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC1B,WAAW,GAAG,IAAI,CAAC;YACvB,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,MAAM,IAAI,KAAK,CAAC,kGAAkG,CAAC,CAAC;YACxH,CAAC;QACL,CAAC;QAED,mCAAmC;QACnC,EAAE,CAAC,CAAC,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC;YAC/B,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBAC9B,WAAW,GAAG,QAAQ,CAAC;YAC3B,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,MAAM,IAAI,KAAK,CAAC,kGAAkG,CAAC,CAAC;YACxH,CAAC;QACL,CAAC;QAED,kCAAkC;QAClC,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAEzD,mDAAmD;QACnD,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;QAE5C,cAAc;QACd,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;QAE3D,0CAA0C;QAC1C,IAAI,CAAC,WAAW,IAAI,UAAU,CAAC;QAC/B,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;OAMG;IACH,YAAY,CAAC,QAAyB;QAElC,+DAA+D;QAC/D,IAAI,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;QAE1B,6EAA6E;QAC7E,GAAG,CAAA,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAChD,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;gBACxB,OAAO,GAAG,CAAC,CAAC;gBACZ,KAAK,CAAC;YACV,CAAC;QACL,CAAC;QAED,oBAAoB;QACpB,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAExD,wCAAwC;QACxC,IAAI,CAAC,UAAU,GAAG,OAAO,GAAG,CAAC,CAAC;QAE9B,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC;IACrD,CAAC;IAED;;;;;;OAMG;IACH,aAAa,CAAC,KAAa,EAAE,MAAgC,EAAE,QAAyB;QACpF,eAAe;QACf,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC1C,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,OAAO,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IACnG,CAAC;IAED,UAAU;IAEV;;;;;;OAMG;IACH,UAAU,CAAC,MAAe;QACtB,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QACpE,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;QAEpE,oBAAoB;QACpB,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAEzD,wCAAwC;QACxC,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC;QAC3B,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAED;;;;;OAKG;IACH,WAAW,CAAC,KAAa,EAAE,MAAe;QACtC,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC;QAEzE,mDAAmD;QACnD,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAE9C,qBAAqB;QACrB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAEjC,yCAAyC;QACzC,IAAI,CAAC,WAAW,IAAI,KAAK,CAAC,MAAM,CAAC;QACjC,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;OAIG;IACH,YAAY;QACR,+DAA+D;QAC/D,IAAI,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;QAE1B,6EAA6E;QAC7E,GAAG,CAAA,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAChD,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;gBACxB,OAAO,GAAG,CAAC,CAAC;gBACZ,KAAK,CAAC;YACV,CAAC;QACL,CAAC;QAED,aAAa;QACb,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAExD,wCAAwC;QACxC,IAAI,CAAC,UAAU,GAAG,OAAO,GAAG,CAAC,CAAC;QAC9B,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAED;;;;;OAKG;IACH,aAAa,CAAC,KAAa,EAAE,MAAe;QACxC,eAAe;QACf,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,OAAO,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;QAE5F,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,KAAK;QACD,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;QACrB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IACpB,CAAC;IAED;;;;OAIG;IACH,SAAS;QACL,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;IACzC,CAAC;IAED;;;;OAIG;IACH,IAAI,CAAC,MAAc;QACf,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;QACrF,CAAC;QAED,IAAI,CAAC,UAAU,IAAI,MAAM,CAAC;IAC9B,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,MAAc;QACjB,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;QACrF,CAAC;QAED,IAAI,CAAC,UAAU,IAAI,MAAM,CAAC;IAC9B,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,QAAgB;QACnB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC1B,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,QAAgB;QACnB,EAAE,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;QACrF,CAAC;QAED,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC;IAC/B,CAAC;IAED;;;;OAIG;IACH,QAAQ;QACJ,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;IAED;;;;OAIG;IACH,QAAQ,CAAC,QAAyB;QAC9B,MAAM,WAAW,GAAG,OAAO,QAAQ,KAAK,QAAQ,GAAG,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAE5E,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YACjC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC3D,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,IAAI,KAAK,CAAC,kGAAkG,CAAC,CAAC;QACxH,CAAC;IACL,CAAC;IAED;;OAEG;IACH,OAAO;QACH,IAAI,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,oBAAoB,CAAC,OAA2B;QACnD,MAAM,WAAW,GAAwB,OAAQ,CAAC;QAElD,MAAM,CAAC,WAAW,IAAI,CAAC,WAAW,CAAC,QAAQ,KAAK,SAAS,IAAI,WAAW,CAAC,IAAI,KAAK,SAAS,IAAI,WAAW,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;IACnI,CAAC;CACJ;AAGD,iBAAS,WAAW,CAAC"} \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/lib/smart-buffer.js b/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/lib/smart-buffer.js
deleted file mode 100644
index ea69cfc09a..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/lib/smart-buffer.js
+++ /dev/null
@@ -1,371 +0,0 @@
-var SmartBuffer = (function () {
-
- /**
- * Constructor for SmartBuffer.
- * @param arg1 {Buffer || Number || String} Buffer to read from, or expected size to write to, or encoding to use.
- * @param arg2 {String} Encoding to use for writing and reading strings. Defaults to utf8. If encoding is given in arg1, this is ignored.
- * @constructor
- *
- * There are a few ways to construct a SmartBuffer:
- *
- * SmartBuffer() - Defaults to utf8, 4096 pre-set internal Buffer length.
- * SmartBuffer(size) - Defaults to utf8, sets internal Buffer length to the size given.
- * SmartBuffer(encoding) - Sets the given encoding, defaults to 4096 pre-set internal Buffer length.
- * SmartBuffer(Buffer) - Defaults to utf8, sets the internal Buffer to the given buffer (same memory).
- * SmartBuffer(Buffer, encoding) - Sets the given encoding, sets the internal Buffer to the given buffer (same memory).
- *
- */
- function SmartBuffer(arg1, arg2) {
- var type;
- switch (type = typeof arg1) {
- case 'number':
- if (isFinite(arg1) && arg1 > 0) {
- this.buff = new Buffer(Math.ceil(arg1));
- this.length = 0;
- } else {
- throw new Error('When specifying a size, it must be a valid number above zero.');
- }
- break;
-
- case 'string':
- if (Buffer.isEncoding(arg1)) {
- this.buff = new Buffer(4096);
- this.length = 0;
- this.encoding = arg1;
- } else {
- throw new Error('Invalid Encoding');
- }
- break;
-
- case 'object':
- if (Buffer.isBuffer(arg1)) {
- this.buff = arg1;
- this.length = arg1.length;
- } else {
- throw new TypeError('First argument must be a Buffer, Number representing the size, or a String representing the encoding.');
- }
- break;
-
- default:
- this.buff = new Buffer(4096);
- this.length = 0;
- break;
- }
-
- if (typeof this.encoding === 'undefined') {
- if (typeof arg2 === 'string') {
- if (Buffer.isEncoding(arg2)) {
- this.encoding = arg2;
- } else {
- throw new Error('Invalid Encoding');
- }
- }
- }
-
- this._readOffset = 0;
- this._writeOffset = 0;
- }
-
-
- SmartBuffer.prototype._ensureWritable = function (len, offset) {
- this._ensureCapacity(this.length + len + (typeof offset === 'number' ? offset : 0));
-
- if (typeof offset === 'number') {
- this.buff.copy(this.buff, offset + len, offset, this.buff.length);
- }
- this.length = Math.max(this.length + len, (typeof offset === 'number' ? offset : 0) + len);
- };
-
- SmartBuffer.prototype._ensureCapacity = function (minlen) {
- var oldlen = this.buff.length;
-
- if (minlen > oldlen) {
- var data = this.buff;
- var newlen = (oldlen * 3) / 2 + 1;
- if (newlen < minlen)
- newlen = minlen;
- this.buff = new Buffer(newlen);
- data.copy(this.buff, 0, 0, oldlen);
- }
- };
-
-
- var makeReader = function (func, size) {
- return function () {
- var ret = func.call(this.buff, this._readOffset);
- this._readOffset += size;
- return ret;
- }
- };
-
- var makeWriter = function (func, size) {
- return function (value, offset) {
- this._ensureWritable(size, offset);
- func.call(this.buff, value, typeof offset === 'number' ? offset : this._writeOffset);
- this._writeOffset += size;
- return this;
- }
- };
-
-
- /*
- Read Operations
- */
-
- SmartBuffer.prototype.readInt8 = makeReader(Buffer.prototype.readInt8, 1);
- SmartBuffer.prototype.readInt16BE = makeReader(Buffer.prototype.readInt16BE, 2);
- SmartBuffer.prototype.readInt16LE = makeReader(Buffer.prototype.readInt16LE, 2);
- SmartBuffer.prototype.readInt32BE = makeReader(Buffer.prototype.readInt32BE, 4);
- SmartBuffer.prototype.readInt32LE = makeReader(Buffer.prototype.readInt32LE, 4);
-
- SmartBuffer.prototype.readUInt8 = makeReader(Buffer.prototype.readUInt8, 1);
- SmartBuffer.prototype.readUInt16BE = makeReader(Buffer.prototype.readUInt16BE, 2);
- SmartBuffer.prototype.readUInt16LE = makeReader(Buffer.prototype.readUInt16LE, 2);
- SmartBuffer.prototype.readUInt32BE = makeReader(Buffer.prototype.readUInt32BE, 4);
- SmartBuffer.prototype.readUInt32LE = makeReader(Buffer.prototype.readUInt32LE, 4);
-
- SmartBuffer.prototype.readFloatBE = makeReader(Buffer.prototype.readFloatBE, 4);
- SmartBuffer.prototype.readFloatLE = makeReader(Buffer.prototype.readFloatLE, 4);
-
- SmartBuffer.prototype.readDoubleBE = makeReader(Buffer.prototype.readDoubleBE, 8);
- SmartBuffer.prototype.readDoubleLE = makeReader(Buffer.prototype.readDoubleLE, 8);
-
-
- /**
- * Reads a string of the given length.
- * @param length {Number} The length of the string to read. (Defaults to the length of the remaining data)
- * @param encoding {String} The encoding to use. (Defaults to encoding set in constructor, or utf8)
- * @returns {string} The string.
- */
- SmartBuffer.prototype.readString = function (length, encoding) {
- var len = Math.min(length, this.length - this._readOffset) || (this.length - this._readOffset);
- var ret = this.buff.slice(this._readOffset, this._readOffset + len).toString(encoding || this.encoding);
- this._readOffset += len;
- return ret;
- };
-
- /**
- * Reads a null terminated string from the underlying buffer.
- * @param encoding {String} Encoding to use. Defaults to encoding set in constructor, or utf8.
- * @returns {string}
- */
- SmartBuffer.prototype.readStringNT = function (encoding) {
- var nullpos = this.length;
- for (var i = this._readOffset; i < this.length; i++) {
- if (this.buff[i] == 0x00) {
- nullpos = i;
- break;
- }
- }
-
- var result = this.buff.slice(this._readOffset, nullpos);
- this._readOffset = nullpos + 1;
-
- return result.toString(encoding || this.encoding);
- };
-
-
- /**
- * Reads a specified number of bytes.
- * @param len {Number} Numbers of bytes to read. (Defaults to the remaining data length)
- * @returns {Buffer} Buffer containing the read bytes.
- */
- SmartBuffer.prototype.readBuffer = function (len) {
- var endpoint = Math.min(this.length, this._readOffset + (typeof len === 'number' ? len : this.length));
- var ret = this.buff.slice(this._readOffset, endpoint);
- this._readOffset = endpoint;
- return ret;
- };
-
- /**
- * Reads a null terminated sequence of bytes from the underlying buffer.
- * @returns {Buffer} Buffer containing the read bytes.
- */
- SmartBuffer.prototype.readBufferNT = function () {
- var nullpos = this.length;
- for (var i = this._readOffset; i < this.length; i++) {
- if (this.buff[i] == 0x00) {
- nullpos = i;
- break;
- }
- }
-
- var ret = this.buff.slice(this._readOffset, nullpos);
- this._readOffset = nullpos + 1;
-
- return ret;
- };
-
-
- /*
- Write Operations
- */
-
-
- SmartBuffer.prototype.writeInt8 = makeWriter(Buffer.prototype.writeInt8, 1);
- SmartBuffer.prototype.writeInt16BE = makeWriter(Buffer.prototype.writeInt16BE, 2);
- SmartBuffer.prototype.writeInt16LE = makeWriter(Buffer.prototype.writeInt16LE, 2);
- SmartBuffer.prototype.writeInt32BE = makeWriter(Buffer.prototype.writeInt32BE, 4);
- SmartBuffer.prototype.writeInt32LE = makeWriter(Buffer.prototype.writeInt32LE, 4);
-
- SmartBuffer.prototype.writeUInt8 = makeWriter(Buffer.prototype.writeUInt8, 1);
- SmartBuffer.prototype.writeUInt16BE = makeWriter(Buffer.prototype.writeUInt16BE, 2);
- SmartBuffer.prototype.writeUInt16LE = makeWriter(Buffer.prototype.writeUInt16LE, 2);
- SmartBuffer.prototype.writeUInt32BE = makeWriter(Buffer.prototype.writeUInt32BE, 4);
- SmartBuffer.prototype.writeUInt32LE = makeWriter(Buffer.prototype.writeUInt32LE, 4);
-
- SmartBuffer.prototype.writeFloatBE = makeWriter(Buffer.prototype.writeFloatBE, 4);
- SmartBuffer.prototype.writeFloatLE = makeWriter(Buffer.prototype.writeFloatLE, 4);
-
- SmartBuffer.prototype.writeDoubleBE = makeWriter(Buffer.prototype.writeDoubleBE, 8);
- SmartBuffer.prototype.writeDoubleLE = makeWriter(Buffer.prototype.writeDoubleLE, 8);
-
-
- /**
- * Writes a string to the underlying buffer.
- * @param value {String} The string to write.
- * @param offset {Number} The offset to write the string to. (Encoding can also be set here in place of offset)
- * @param encoding {String} The encoding to use. (Defaults to encoding set in constructor, or to utf8)
- * @returns {*}
- */
- SmartBuffer.prototype.writeString = function (value, offset, encoding) {
- var len, _offset, type = typeof offset;
-
- if (type === 'number') {
- _offset = offset;
- } else if (type === 'string') {
- encoding = offset;
- offset = this._writeOffset;
- } else {
- encoding = undefined;
- offset = this._writeOffset;
- }
-
- len = Buffer.byteLength(value, encoding || this.encoding);
- this._ensureWritable(len, _offset);
-
- this.buff.write(value, offset, len, encoding || this.encoding);
- this._writeOffset += len;
- return this;
- };
-
- /**
- * Writes a null terminated string to the underlying buffer.
- * @param value {String} The string to write.
- * @param offset {Number} The offset to write the string to. (Encoding can also be set here in place of offset)
- * @param encoding {String} The encoding to use. (Defaults to encoding set in constructor, or to utf8)
- * @returns {*}
- */
- SmartBuffer.prototype.writeStringNT = function (value, offset, encoding) {
- this.writeString(value, offset, encoding);
- this.writeUInt8(0x00, (typeof offset === 'number' ? offset + value.length : this._writeOffset));
- return this;
- };
-
- /**
- * Writes a Buffer to the underlying buffer.
- * @param value {Buffer} The buffer to write.
- * @param offset {Number} The offset to write the Buffer to.
- * @returns {*}
- */
- SmartBuffer.prototype.writeBuffer = function (value, offset) {
- var len = value.length;
- this._ensureWritable(len, offset);
- value.copy(this.buff, typeof offset === 'number' ? offset : this._writeOffset);
- this._writeOffset += len;
- return this;
- };
-
- /**
- * Writes a null terminated Buffer to the underlying buffer.
- * @param value {Buffer} The buffer to write.
- * @param offset {Number} The offset to write the Buffer to.
- * @returns {*}
- */
- SmartBuffer.prototype.writeBufferNT = function (value, offset) {
- this.writeBuffer(value, offset);
- this.writeUInt8(0x00, (typeof offset === 'number' ? offset + value.length : this._writeOffset));
-
- return this;
- };
-
-
- /**
- * Resets the Endless Buffer.
- */
- SmartBuffer.prototype.clear = function () {
- this._writeOffset = 0;
- this._readOffset = 0;
- this.length = 0;
- };
-
- /**
- * Gets the remaining number of bytes to be read from the existing Buffer.
- * @returns {number} The number of bytes remaining.
- */
- SmartBuffer.prototype.remaining = function () {
- return this.length - this._readOffset;
- };
-
- /**
- * Skips the read position forward by the amount of given.
- * @param amount {Number} The amount of bytes to skip forward.
- */
- SmartBuffer.prototype.skip = function (amount) {
- if (this._readOffset + amount > this.length)
- throw new Error('Target position is beyond the bounds of the data.');
-
- this._readOffset += amount;
- };
-
- /**
- * Rewinds the read position backward by the amount given.
- * @param amount {Number} The amount of bytes to reverse backward.
- */
- SmartBuffer.prototype.rewind = function (amount) {
- if (this._readOffset - amount < 0)
- throw new Error('Target position is beyond the bounds of the data.');
-
- this._readOffset -= amount;
- };
-
- /**
- * Skips the read position to the given position.
- * @param position {Number} The position to skip to.
- */
- SmartBuffer.prototype.skipTo = function (position) {
- if (position < 0 || position > this.length)
- throw new Error('Target position is beyond the bounds of the data.');
-
- this._readOffset = position;
- };
-
- /**
- * Gets the underlying Buffer.
- * @returns {*}
- */
- SmartBuffer.prototype.toBuffer = function () {
- return this.buff.slice(0, this.length);
- };
-
- /**
- * Gets a string representation of the underlying Buffer.
- * @param encoding {String} Encoding to use. (Defaults to encoding set in constructor, or utf8.)
- * @returns {*}
- */
- SmartBuffer.prototype.toString = function (encoding) {
- return this.buff.toString(encoding || this.encoding, 0, this.length);
- };
-
- /**
- * Destroys the underlying Buffer, and resets the SmartBuffer.
- */
- SmartBuffer.prototype.destroy = function () {
- delete this.buff;
- this.clear();
- };
-
- return SmartBuffer;
-})();
-
-module.exports = SmartBuffer; \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/package.json b/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/package.json
deleted file mode 100644
index ab74107cb0..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/package.json
+++ /dev/null
@@ -1,70 +0,0 @@
-{
- "_from": "smart-buffer@^1.0.13",
- "_id": "smart-buffer@1.1.15",
- "_inBundle": false,
- "_integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=",
- "_location": "/npm-profile/smart-buffer",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "smart-buffer@^1.0.13",
- "name": "smart-buffer",
- "escapedName": "smart-buffer",
- "rawSpec": "^1.0.13",
- "saveSpec": null,
- "fetchSpec": "^1.0.13"
- },
- "_requiredBy": [
- "/npm-profile/socks"
- ],
- "_resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz",
- "_shasum": "7f114b5b65fab3e2a35aa775bb12f0d1c649bf16",
- "_spec": "smart-buffer@^1.0.13",
- "_where": "/Users/rebecca/code/npm/node_modules/npm-profile/node_modules/socks",
- "author": {
- "name": "Josh Glazebrook"
- },
- "bugs": {
- "url": "https://github.com/JoshGlazebrook/smart-buffer/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "A smarter Buffer that keeps track of its own read and write positions while growing endlessly.",
- "devDependencies": {
- "chai": "^3.5.0",
- "coveralls": "^2.11.15",
- "istanbul": "^0.4.3",
- "mocha": "^3.2.0",
- "mocha-lcov-reporter": "^1.2.0"
- },
- "engines": {
- "node": ">= 0.10.15",
- "npm": ">= 1.3.5"
- },
- "homepage": "https://github.com/JoshGlazebrook/smart-buffer/",
- "keywords": [
- "buffer",
- "smart",
- "serialize",
- "packet",
- "network",
- "cursor",
- "simple"
- ],
- "license": "MIT",
- "main": "lib/smart-buffer.js",
- "name": "smart-buffer",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/JoshGlazebrook/smart-buffer.git"
- },
- "scripts": {
- "coverage": "istanbul cover node_modules/mocha/bin/_mocha recursive test",
- "fullcoverage": "istanbul -include-all-sources cover node_modules/mocha/bin/_mocha recursive test",
- "test": "mocha test/smart-buffer.test.js"
- },
- "typings": "typings/index",
- "version": "1.1.15"
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/test/smart-buffer.test.js b/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/test/smart-buffer.test.js
deleted file mode 100644
index 0897d54c2f..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/test/smart-buffer.test.js
+++ /dev/null
@@ -1,410 +0,0 @@
-var SmartBuffer = require('../lib/smart-buffer.js');
-var assert = require('chai').assert;
-
-
-describe('Constructing a SmartBuffer', function () {
- describe('Constructing with an existing Buffer', function () {
- var buff = new Buffer([0xAA, 0xBB, 0xCC, 0xDD, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99]);
- var reader = new SmartBuffer(buff);
-
- it('should have the exact same internal Buffer when constructed with a Buffer', function () {
- assert.strictEqual(reader.buff, buff);
- });
-
- it('should return a buffer with the same content', function () {
- assert.deepEqual(reader.toBuffer(), buff);
- });
- });
-
- describe('Constructing with an existing Buffer and setting the encoding', function () {
- var buff = new Buffer([0xAA, 0xBB, 0xCC, 0xDD, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99]);
- var reader = new SmartBuffer(buff, 'ascii');
-
- it('should have the exact same internal Buffer', function () {
- assert.strictEqual(reader.buff, buff);
- });
-
- it('should have the same encoding that was set', function () {
- assert.strictEqual(reader.encoding, 'ascii');
- });
- });
-
- describe('Constructing with a specified size', function () {
- var size = 128;
- var reader = new SmartBuffer(size);
-
- it('should have an internal Buffer with the same length as the size defined in the constructor', function () {
- assert.strictEqual(reader.buff.length, size);
- });
- });
-
- describe('Constructing with a specified encoding', function () {
- var encoding = 'utf8';
-
- it('should have an internal encoding with the encoding given to the constructor (1st argument)', function () {
- var reader = new SmartBuffer(encoding);
- assert.strictEqual(reader.encoding, encoding);
- });
-
- it('should have an internal encoding with the encoding given to the constructor (2nd argument)', function () {
- var reader = new SmartBuffer(1024, encoding);
- assert.strictEqual(reader.encoding, encoding);
- });
-
- });
-
- describe('Constructing with invalid parameters', function () {
- it('should throw an exception when given an invalid number size', function () {
- assert.throws(function () {
- var reader = new SmartBuffer(-100);
- }, Error);
- });
-
- it('should throw an exception when give a invalid encoding', function () {
- assert.throws(function () {
- var reader = new SmartBuffer('invalid');
- }, Error);
-
- assert.throws(function () {
- var reader = new SmartBuffer(1024, 'invalid');
- }, Error);
- });
-
- it('should throw and exception when given an object that is not a Buffer', function () {
- assert.throws(function () {
- var reader = new SmartBuffer(null);
- }, TypeError);
- });
- });
-});
-
-
-describe('Reading/Writing To/From SmartBuffer', function () {
- /**
- * Technically, if one of these works, they all should. But they're all here anyways.
- */
-
- describe('Numeric Values', function () {
- var reader = new SmartBuffer();
- reader.writeInt8(0x44);
- reader.writeUInt8(0xFF);
- reader.writeInt16BE(0x6699);
- reader.writeInt16LE(0x6699);
- reader.writeUInt16BE(0xFFDD);
- reader.writeUInt16LE(0xFFDD);
- reader.writeInt32BE(0x77889900);
- reader.writeInt32LE(0x77889900);
- reader.writeUInt32BE(0xFFDDCCBB);
- reader.writeUInt32LE(0xFFDDCCBB);
- reader.writeFloatBE(1.234);
- reader.writeFloatLE(1.234);
- reader.writeDoubleBE(1.234567890);
- reader.writeDoubleLE(1.234567890);
-
- it('should equal the correct values that were written above', function () {
- assert.strictEqual(reader.readInt8(), 0x44);
- assert.strictEqual(reader.readUInt8(), 0xFF);
- assert.strictEqual(reader.readInt16BE(), 0x6699);
- assert.strictEqual(reader.readInt16LE(), 0x6699);
- assert.strictEqual(reader.readUInt16BE(), 0xFFDD);
- assert.strictEqual(reader.readUInt16LE(), 0xFFDD);
- assert.strictEqual(reader.readInt32BE(), 0x77889900);
- assert.strictEqual(reader.readInt32LE(), 0x77889900);
- assert.strictEqual(reader.readUInt32BE(), 0xFFDDCCBB);
- assert.strictEqual(reader.readUInt32LE(), 0xFFDDCCBB);
- assert.closeTo(reader.readFloatBE(), 1.234, 0.001);
- assert.closeTo(reader.readFloatLE(), 1.234, 0.001);
- assert.closeTo(reader.readDoubleBE(), 1.234567890, 0.001);
- assert.closeTo(reader.readDoubleLE(), 1.234567890, 0.001);
- });
-
- });
-
- describe('Basic String Values', function () {
- var reader = new SmartBuffer();
- reader.writeStringNT('hello');
- reader.writeString('world');
- reader.writeStringNT('✎✏✎✏✎✏');
-
- it('should equal the correct strings that were written above', function () {
- assert.strictEqual(reader.readStringNT(), 'hello');
- assert.strictEqual(reader.readString(5), 'world');
- assert.strictEqual(reader.readStringNT(), '✎✏✎✏✎✏');
- });
- });
-
- describe('Mixed Encoding Strings', function () {
- var reader = new SmartBuffer('ascii');
- reader.writeStringNT('some ascii text');
- reader.writeStringNT('ѕσмє υтƒ8 тєχт', 'utf8');
-
- it('should equal the correct strings that were written above', function () {
- assert.strictEqual(reader.readStringNT(), 'some ascii text');
- assert.strictEqual(reader.readStringNT('utf8'), 'ѕσмє υтƒ8 тєχт');
- });
- });
-
- describe('Null/non-null terminating strings', function () {
- var reader = new SmartBuffer();
- reader.writeString('hello\0test\0bleh');
-
- it('should equal hello', function () {
- assert.strictEqual(reader.readStringNT(), 'hello');
- });
-
- it('should equal: test', function () {
- assert.strictEqual(reader.readString(4), 'test');
- });
-
- it('should have a length of zero', function () {
- assert.strictEqual(reader.readStringNT().length, 0);
- });
-
- it('should equal: bleh', function () {
- assert.strictEqual(reader.readStringNT(), 'bleh');
- });
-
-
- });
-
- describe('Reading string without specifying length', function () {
- var str = 'hello123';
- var writer = new SmartBuffer();
- writer.writeString(str);
-
- var reader = new SmartBuffer(writer.toBuffer());
-
- assert.strictEqual(reader.readString(), str);
- });
-
- describe('Write string as specific position', function () {
- var str = 'hello123';
- var writer = new SmartBuffer();
- writer.writeString(str, 10);
-
- var reader = new SmartBuffer(writer.toBuffer());
-
- reader.skipTo(10);
- it('Should read the correct string from the original position it was written to.', function () {
- assert.strictEqual(reader.readString(), str);
- });
-
-
- });
-
- describe('Buffer Values', function () {
- describe('Writing buffer to position 0', function () {
- var buff = new SmartBuffer();
- var frontBuff = new Buffer([1, 2, 3, 4, 5, 6]);
- buff.writeStringNT('hello');
- buff.writeBuffer(frontBuff, 0);
-
- it('should write the buffer to the front of the smart buffer instance', function () {
- var readBuff = buff.readBuffer(frontBuff.length);
- assert.deepEqual(readBuff, frontBuff);
- });
- });
-
- describe('Writing null terminated buffer to position 0', function () {
- var buff = new SmartBuffer();
- var frontBuff = new Buffer([1, 2, 3, 4, 5, 6]);
- buff.writeStringNT('hello');
- buff.writeBufferNT(frontBuff, 0);
-
- console.log(buff);
-
- it('should write the buffer to the front of the smart buffer instance', function () {
- var readBuff = buff.readBufferNT();
- console.log(readBuff);
- assert.deepEqual(readBuff, frontBuff);
- });
- });
-
- describe('Explicit lengths', function () {
- var buff = new Buffer([0x01, 0x02, 0x04, 0x08, 0x16, 0x32, 0x64]);
- var reader = new SmartBuffer();
- reader.writeBuffer(buff);
-
- it('should equal the buffer that was written above.', function () {
- assert.deepEqual(reader.readBuffer(7), buff);
- });
- });
-
- describe('Implicit lengths', function () {
- var buff = new Buffer([0x01, 0x02, 0x04, 0x08, 0x16, 0x32, 0x64]);
- var reader = new SmartBuffer();
- reader.writeBuffer(buff);
-
- it('should equal the buffer that was written above.', function () {
- assert.deepEqual(reader.readBuffer(), buff);
- });
- });
-
- describe('Null Terminated Buffer Reading', function () {
- var buff = new SmartBuffer();
- buff.writeBuffer(new Buffer([0x01, 0x02, 0x03, 0x04, 0x00, 0x01, 0x02, 0x03]));
-
- var read1 = buff.readBufferNT();
- var read2 = buff.readBufferNT();
-
- it('Should return a length of 4 for the four bytes before the first null in the buffer.', function () {
- assert.equal(read1.length, 4);
- });
-
- it('Should return a length of 3 for the three bytes after the first null in the buffer after reading to end.', function () {
- assert.equal(read2.length, 3);
- });
- });
-
- describe('Null Terminated Buffer Writing', function () {
- var buff = new SmartBuffer();
- buff.writeBufferNT(new Buffer([0x01, 0x02, 0x03, 0x04]));
-
- var read1 = buff.readBufferNT();
-
- it('Should read the correct null terminated buffer data.', function () {
- assert.equal(read1.length, 4);
- });
-
- })
-
- });
-
- describe('Inserting values into specific positions', function () {
- var reader = new SmartBuffer();
-
- reader.writeUInt16LE(0x0060);
- reader.writeStringNT('something');
- reader.writeUInt32LE(8485934);
- reader.writeUInt16LE(6699);
- reader.writeStringNT('else');
- reader.writeUInt16LE(reader.length - 2, 2);
-
-
- it('should equal the size of the remaining data in the buffer', function () {
- reader.readUInt16LE();
- var size = reader.readUInt16LE();
- assert.strictEqual(reader.remaining(), size);
- });
- });
-
- describe('Adding more data to the buffer than the internal buffer currently allows.', function () {
- it('Should automatically adjust internal buffer size when needed', function () {
- var writer = new SmartBuffer();
- var largeBuff = new Buffer(10000);
-
- writer.writeBuffer(largeBuff);
-
- assert.strictEqual(writer.length, largeBuff.length);
- });
- });
-
-});
-
-describe('Skipping around data', function () {
- var writer = new SmartBuffer();
- writer.writeStringNT('hello');
- writer.writeUInt16LE(6699);
- writer.writeStringNT('world!');
-
- it('Should equal the UInt16 that was written above', function () {
- var reader = new SmartBuffer(writer.toBuffer());
- reader.skip(6);
- assert.strictEqual(reader.readUInt16LE(), 6699);
- reader.skipTo(0);
- assert.strictEqual(reader.readStringNT(), 'hello');
- reader.rewind(6);
- assert.strictEqual(reader.readStringNT(), 'hello');
- });
-
- it('Should throw an error when attempting to skip more bytes than actually exist.', function () {
- var reader = new SmartBuffer(writer.toBuffer());
-
- assert.throws(function () {
- reader.skip(10000);
- });
- });
-
- it('Should throw an error when attempting to skip to a position that does not exist.', function () {
- var reader = new SmartBuffer(writer.toBuffer());
-
- assert.throws(function () {
- reader.skipTo(10000);
- });
- });
-
- it('Should throw an error when attempting to rewind past the start of the buffer.', function () {
- var buff = new SmartBuffer();
- assert.throws(function () {
- buff.rewind(10000);
- });
- });
-});
-
-describe('Automatic internal buffer resizing', function () {
- var writer;
-
- it('Should not throw an error when adding data that is larger than current buffer size (internal resize algo fails)', function () {
- var str = 'String larger than one byte';
- writer = new SmartBuffer(1);
- writer.writeString(str);
-
- assert.strictEqual(writer.buff.length, str.length);
-
- });
-
- it('Should not throw an error when adding data that is larger than current buffer size (internal resize algo succeeds)', function () {
- writer = new SmartBuffer(100);
- var buff = new Buffer(105);
-
- writer.writeBuffer(buff);
-
- // Test internal array growth algo.
- assert.strictEqual(writer.buff.length, (100 * 3 / 2 + 1));
- });
-});
-
-describe('Clearing the buffer', function () {
- var writer = new SmartBuffer();
- writer.writeString('somedata');
-
- it('Should contain some data.', function () {
- assert.notStrictEqual(writer.length, 0);
- });
-
- it('Should contain zero data after being cleared.', function () {
- writer.clear();
- assert.strictEqual(writer.length, 0);
- });
-});
-
-describe('Displaying the buffer as a string', function () {
- var buff = new Buffer([1, 2, 3, 4]);
- var sbuff = new SmartBuffer(buff);
-
- var str = buff.toString();
- var str64 = buff.toString('base64');
-
- it('Should return a valid string representing the internal buffer', function () {
- assert.strictEqual(str, sbuff.toString());
- });
-
- it('Should return a valid base64 string representing the internal buffer', function () {
- assert.strictEqual(str64, sbuff.toString('base64'));
- });
-});
-
-describe('Destroying the buffer', function () {
- var writer = new SmartBuffer();
- writer.writeString('hello123');
-
- writer.destroy();
-
- it('Should have a length of zero when buffer is destroyed', function () {
- assert.strictEqual(0, writer.length);
- });
-
- it('Should have no internal buff property when buffer is destroyed', function () {
- assert.notProperty(writer, 'buff');
- });
-}); \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/typings/index.d.ts b/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/typings/index.d.ts
deleted file mode 100644
index b567f1e97c..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/smart-buffer/typings/index.d.ts
+++ /dev/null
@@ -1,383 +0,0 @@
-// Type definitions for smart-buffer
-// Project: https://github.com/JoshGlazebrook/smart-buffer
-// Definitions by: Josh Glazebrook <https://github.com/JoshGlazebrook>
-
-
-
-declare class SmartBuffer {
- /**
- * Creates a new SmartBuffer instance (defaults to utf8 encoding)
- */
- constructor();
-
- /**
- * Creates a new SmartBuffer instance
- *
- * @param arg1 { Number } The size the underlying buffer instance should be instantiated to (defaults to 4096)
- * @param arg2 { String } The string encoding to use for reading/writing strings (defaults to utf8)
- */
- constructor(size: number, encoding?: string);
-
- /**
- * Creates a new SmartBuffer instance
- *
- * @param arg1 { String } The string encoding to use for reading/writing strings (defaults to utf8)
- */
- constructor(encoding?: string);
-
- /**
- * Creates a new SmartBuffer instance
- *
- * @param arg1 { Buffer } An existing buffer instance to copy to this smart buffer instance
- * @param arg2 { String } The string encoding to use for reading/writing strings (defaults to utf8)
- */
- constructor(buffer: Buffer, encoding?: string)
-
-
-
- // Signed number readers
-
- /**
- * Reads a 8-bit signed integer
- */
- readInt8(): number;
-
- /**
- * Reads a 16-bit signed integer (big endian)
- */
- readInt16BE(): number;
-
- /**
- * Reads a 16-bit signed integer (little endian)
- */
- readInt16LE(): number;
-
- /**
- * Reads a 32-bit signed integer (big endian)
- */
- readInt32BE(): number;
-
- /**
- * Reads a 32-bit signed integer (little endian)
- */
- readInt32LE(): number;
-
- // Unsigned number readers
-
- /**
- * Reads a 8-bit unsigned integer
- */
- readUInt8(): number;
-
- /**
- * Reads a 16-bit unsigned integer (big endian)
- */
- readUInt16BE(): number;
-
- /**
- * Reads a 16-bit unsigned integer (little endian)
- */
- readUInt16LE(): number;
-
- /**
- * Reads a 32-bit unsigned integer (big endian)
- */
- readUInt32BE(): number;
-
- /**
- * Reads a 32-bit unsigned integer (little endian)
- */
- readUInt32LE(): number;
-
- // Floating point readers
-
- /**
- * Reads a float (big endian)
- */
- readFloatBE(): number;
-
- /**
- * Reads a float (little endian)
- */
- readFloatLE(): number;
-
- /**
- * Reads a double (big endian)
- */
- readDoubleBE(): number;
-
- /**
- * Reads a double (little endian)
- */
- readDoubleLE(): number;
-
- // String readers
-
- /**
- * Reads a string
- *
- * @param length { Number } The length of the string to read
- * @param encoding { Number} The encoding to use (defaults to instance level encoding)
- */
- readString(length?: number, encoding?: string): string;
-
- /**
- * Reads a null terminated string
- *
- * @param encoding The encoding to use (defaults to instance level encoding)
- */
- readStringNT(encoding?: string): string;
-
- // Buffer readers
-
- /**
- * Reads binary data into a Buffer
- *
- * @param len { Number } The amount of data to read
- */
- readBuffer(len?: number): Buffer;
-
- /**
- * Reads null terminated binary data into a Buffer
- */
- readBufferNT(): Buffer;
-
-
- // Signed number writers
-
- /**
- * Writes a 8-bit signed integer value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeInt8(value: number, offset?: number): this;
-
- /**
- * Writes a 16-bit signed integer (big endian) value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeInt16BE(value: number, offset?: number): this;
-
- /**
- * Writes a 16-bit signed integer (little endian) value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeInt16LE(value: number, offset?: number): this;
-
- /**
- * Writes a 32-bit signed integer (big endian) value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeInt32BE(value: number, offset?: number): this;
-
- /**
- * Writes a 32-bit signed integer (little endian) value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeInt32LE(value: number, offset?: number): this;
-
- // Unsigned number writers
-
- /**
- * Writes a 8-bit unsigned integer value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeUInt8(value: number, offset?: number): this;
-
- /**
- * Writes a 16-bit unsigned integer (big endian) value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeUInt16BE(value: number, offset?: number): this;
-
- /**
- * Writes a 16-bit unsigned integer (little endian) value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeUInt16LE(value: number, offset?: number): this;
-
- /**
- * Writes a 32-bit unsigned integer (big endian) value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeUInt32BE(value: number, offset?: number): this;
-
- /**
- * Writes a 32-bit unsigned integer (little endian) value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeUInt32LE(value: number, offset?: number): this;
-
- // Floating point writers
-
- /**
- * Writes a float (big endian) value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeFloatBE(value: number, offset?: number): this;
-
- /**
- * Writes a float (little endian) value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeFloatLE(value: number, offset?: number): this;
-
- /**
- * Writes a double (big endian) value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeDoubleBE(value: number, offset?: number): this;
-
- /**
- * Writes a double (little endian) value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeDoubleLE(value: number, offset?: number): this;
-
- // String writers
-
- /**
- * Writes a string
- *
- * @param value { String } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- /**
- * Writes a string
- *
- * @param value { String } The value to write to the buffer
- * @param offset { String } The encoding to use when writing the string (defaults to instance level encoding)
- */
- /**
- * Writes a string
- *
- * @param value { String } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- * @param encoding { String } The encoding to use when writing the string (defaults to instance level encoding)
- */
- writeString(value: string, offset?: number | string, encoding?: string): this;
-
- /**
- * Writes a null terminated string
- *
- * @param value { String } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- /**
- * Writes a null terminated string
- *
- * @param value { String } The value to write to the buffer
- * @param offset { String } The encoding to use when writing the string (defaults to instance level encoding)
- */
- /**
- * Writes a null terminated string
- *
- * @param value { String } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- * @param encoding { String } The encoding to use when writing the string (defaults to instance level encoding)
- */
- writeStringNT(value: string, offset?: number | string, encoding?: string): this;
-
- // Buffer writers
-
- /**
- * Writes a Buffer
- *
- * @param value { Buffer } The Buffer to write to the smart buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeBuffer(value: Buffer, offset?: number): this;
-
- /**
- * Writes a Buffer with null termination
- *
- * @param value { Buffer } The buffer to write to the smart buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeBufferNT(value: Buffer, offset?: number): this;
-
-
- // Misc Functions
-
- /**
- * Clears the smart buffer
- */
- clear();
-
- /**
- * Gets the number of bytes that remain to be read
- */
- remaining(): number;
-
- /**
- * Increases the read offset position
- *
- * @param amount { Number } The amount to increase the read offset position by
- */
- skip(amount: number);
-
- /**
- * Changes the read offset position
- *
- * @param position { Number } The position to change the read offset to
- */
- skipTo(position: number);
-
- /**
- * Decreases the read offset position
- *
- * @param amount { Number } The amount to decrease the read offset position by
- */
- rewind(amount: number);
-
- /**
- * Gets the underlying Buffer instance
- */
- toBuffer(): Buffer;
-
- /**
- * Gets the string representation of the underlying Buffer
- *
- * @param encoding { String } The encoding to use (defaults to instance level encoding)
- */
- toString(encoding?: string): string;
-
- /**
- * Destroys the smart buffer instance
- */
- destroy();
-
- /**
- * Gets the current length of the smart buffer instance
- */
- length: number;
-}
-
-export = SmartBuffer; \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/.npmignore b/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/.npmignore
deleted file mode 100644
index 07e6e472cc..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-/node_modules
diff --git a/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/.travis.yml b/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/.travis.yml
deleted file mode 100644
index 805d3d50d2..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/.travis.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-sudo: false
-
-language: node_js
-
-node_js:
- - "4"
- - "5"
- - "6"
- - "7"
- - "8"
-
-install:
- - PATH="`npm bin`:`npm bin -g`:$PATH"
- # Install dependencies and build
- - npm install
-
-script:
- # Output useful info for debugging
- - node --version
- - npm --version
- # Run tests
- - npm test
diff --git a/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/History.md b/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/History.md
deleted file mode 100644
index b0266b5e35..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/History.md
+++ /dev/null
@@ -1,96 +0,0 @@
-
-3.0.1 / 2017-09-18
-==================
-
- * update "agent-base" to v4.1.0
-
-3.0.0 / 2017-06-13
-==================
-
- * [BREAKING] drop support for Node < 4
- * update deps, remove `extend` dependency
- * rename `socks-proxy-agent.js` to `index.js`
-
-2.1.1 / 2017-06-13
-==================
-
- * fix a bug where `close` would emit before `end`
- * use "raw-body" module for tests
- * prettier
-
-2.1.0 / 2017-05-24
-==================
-
- * DRY post-lookup logic
- * Fix an error in readme (#13, @599316527)
- * travis: test node v5
- * travis: test iojs v1, 2, 3 and node.js v4
- * test: use ssl-cert-snakeoil cert files
- * Authentication support (#9, @baryshev)
-
-2.0.0 / 2015-07-10
-==================
-
- * API CHANGE! Removed `secure` boolean second argument in constructor
- * upgrade to "agent-base" v2 API
- * package: update "extend" to v3
-
-1.0.2 / 2015-07-01
-==================
-
- * remove "v4a" from description
- * socks-proxy-agent: cast `port` to a Number
- * travis: attempt to make node v0.8 work
- * travis: test node v0.12, don't test v0.11
- * test: pass `rejectUnauthorized` as a proxy opt
- * test: catch http.ClientRequest errors
- * test: add self-signed SSL server cert files
- * test: refactor to use local SOCKS, HTTP and HTTPS servers
- * README: use SVG for Travis-CI badge
-
-1.0.1 / 2015-03-01
-==================
-
- * switched from using "socks-client" to "socks" (#5, @JoshGlazebrook)
-
-1.0.0 / 2015-02-11
-==================
-
- * add client-side DNS lookup logic for 4 and 5 version socks proxies
- * remove dead `onproxyconnect()` code function
- * use a switch statement to decide the socks `version`
- * refactor to use "socks-client" instead of "rainbowsocks"
- * package: remove "rainbowsocks" dependency
- * package: allow any "mocha" v2
-
-0.1.2 / 2014-06-11
-==================
-
- * package: update "rainbowsocks" to v0.1.2
- * travis: don't test node v0.9
-
-0.1.1 / 2014-04-09
-==================
-
- * package: update outdated dependencies
- * socks-proxy-agent: pass `secure` flag when no `new`
- * socks-proxy-agent: small code cleanup
-
-0.1.0 / 2013-11-19
-==================
-
- * add .travis.yml file
- * socks-proxy-agent: properly mix in the proxy options
- * socks-proxy-agent: coerce the `secureEndpoint` into a Boolean
- * socks-proxy-agent: use "extend" module
- * socks-proxy-agent: update to "agent-base" v1 API
-
-0.0.2 / 2013-07-24
-==================
-
- * socks-proxy-agent: properly set the `defaultPort` property
-
-0.0.1 / 2013-07-11
-==================
-
- * Initial release
diff --git a/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/README.md b/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/README.md
deleted file mode 100644
index 30d33500af..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/README.md
+++ /dev/null
@@ -1,134 +0,0 @@
-socks-proxy-agent
-================
-### A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS
-[![Build Status](https://travis-ci.org/TooTallNate/node-socks-proxy-agent.svg?branch=master)](https://travis-ci.org/TooTallNate/node-socks-proxy-agent)
-
-This module provides an `http.Agent` implementation that connects to a
-specified SOCKS proxy server, and can be used with the built-in `http`
-or `https` modules.
-
-It can also be used in conjunction with the `ws` module to establish a WebSocket
-connection over a SOCKS proxy. See the "Examples" section below.
-
-Installation
-------------
-
-Install with `npm`:
-
-``` bash
-$ npm install socks-proxy-agent
-```
-
-
-Examples
---------
-
-#### `http` module example
-
-``` js
-var url = require('url');
-var http = require('http');
-var SocksProxyAgent = require('socks-proxy-agent');
-
-// SOCKS proxy to connect to
-var proxy = process.env.socks_proxy || 'socks://127.0.0.1:9050';
-console.log('using proxy server %j', proxy);
-
-// HTTP endpoint for the proxy to connect to
-var endpoint = process.argv[2] || 'http://nodejs.org/api/';
-console.log('attempting to GET %j', endpoint);
-var opts = url.parse(endpoint);
-
-// create an instance of the `SocksProxyAgent` class with the proxy server information
-var agent = new SocksProxyAgent(proxy);
-opts.agent = agent;
-
-http.get(opts, function (res) {
- console.log('"response" event!', res.headers);
- res.pipe(process.stdout);
-});
-```
-
-#### `https` module example
-
-``` js
-var url = require('url');
-var https = require('https');
-var SocksProxyAgent = require('socks-proxy-agent');
-
-// SOCKS proxy to connect to
-var proxy = process.env.socks_proxy || 'socks://127.0.0.1:9050';
-console.log('using proxy server %j', proxy);
-
-// HTTP endpoint for the proxy to connect to
-var endpoint = process.argv[2] || 'https://encrypted.google.com/';
-console.log('attempting to GET %j', endpoint);
-var opts = url.parse(endpoint);
-
-// create an instance of the `SocksProxyAgent` class with the proxy server information
-// NOTE: the `true` second argument! Means to use TLS encryption on the socket
-var agent = new SocksProxyAgent(proxy, true);
-opts.agent = agent;
-
-https.get(opts, function (res) {
- console.log('"response" event!', res.headers);
- res.pipe(process.stdout);
-});
-```
-
-#### `ws` WebSocket connection example
-
-``` js
-var WebSocket = require('ws');
-var SocksProxyAgent = require('socks-proxy-agent');
-
-// SOCKS proxy to connect to
-var proxy = process.env.socks_proxy || 'socks://127.0.0.1:9050';
-console.log('using proxy server %j', proxy);
-
-// WebSocket endpoint for the proxy to connect to
-var endpoint = process.argv[2] || 'ws://echo.websocket.org';
-console.log('attempting to connect to WebSocket %j', endpoint);
-
-// create an instance of the `SocksProxyAgent` class with the proxy server information
-var agent = new SocksProxyAgent(proxy);
-
-// initiate the WebSocket connection
-var socket = new WebSocket(endpoint, { agent: agent });
-
-socket.on('open', function () {
- console.log('"open" event!');
- socket.send('hello world');
-});
-
-socket.on('message', function (data, flags) {
- console.log('"message" event! %j %j', data, flags);
- socket.close();
-});
-```
-
-License
--------
-
-(The MIT License)
-
-Copyright (c) 2013 Nathan Rajlich &lt;nathan@tootallnate.net&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/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/index.js b/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/index.js
deleted file mode 100644
index 3dac18d564..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/index.js
+++ /dev/null
@@ -1,141 +0,0 @@
-/**
- * Module dependencies.
- */
-
-var tls; // lazy-loaded...
-var url = require('url');
-var dns = require('dns');
-var Agent = require('agent-base');
-var SocksClient = require('socks');
-var inherits = require('util').inherits;
-
-/**
- * Module exports.
- */
-
-module.exports = SocksProxyAgent;
-
-/**
- * The `SocksProxyAgent`.
- *
- * @api public
- */
-
-function SocksProxyAgent(opts) {
- if (!(this instanceof SocksProxyAgent)) return new SocksProxyAgent(opts);
- if ('string' == typeof opts) opts = url.parse(opts);
- if (!opts)
- throw new Error(
- 'a SOCKS proxy server `host` and `port` must be specified!'
- );
- Agent.call(this, opts);
-
- var proxy = Object.assign({}, opts);
-
- // prefer `hostname` over `host`, because of `url.parse()`
- proxy.host = proxy.hostname || proxy.host;
-
- // SOCKS doesn't *technically* have a default port, but this is
- // the same default that `curl(1)` uses
- proxy.port = +proxy.port || 1080;
-
- if (proxy.host && proxy.path) {
- // if both a `host` and `path` are specified then it's most likely the
- // result of a `url.parse()` call... we need to remove the `path` portion so
- // that `net.connect()` doesn't attempt to open that as a unix socket file.
- delete proxy.path;
- delete proxy.pathname;
- }
-
- // figure out if we want socks v4 or v5, based on the "protocol" used.
- // Defaults to 5.
- proxy.lookup = false;
- switch (proxy.protocol) {
- case 'socks4:':
- proxy.lookup = true;
- // pass through
- case 'socks4a:':
- proxy.version = 4;
- break;
- case 'socks5:':
- proxy.lookup = true;
- // pass through
- case 'socks:': // no version specified, default to 5h
- case 'socks5h:':
- proxy.version = 5;
- break;
- default:
- throw new TypeError(
- 'A "socks" protocol must be specified! Got: ' + proxy.protocol
- );
- }
-
- if (proxy.auth) {
- var auth = proxy.auth.split(':');
- proxy.authentication = { username: auth[0], password: auth[1] };
- proxy.userid = auth[0];
- }
- this.proxy = proxy;
-}
-inherits(SocksProxyAgent, Agent);
-
-/**
- * Initiates a SOCKS connection to the specified SOCKS proxy server,
- * which in turn connects to the specified remote host and port.
- *
- * @api public
- */
-
-SocksProxyAgent.prototype.callback = function connect(req, opts, fn) {
- var proxy = this.proxy;
-
- // called once the SOCKS proxy has connected to the specified remote endpoint
- function onhostconnect(err, socket) {
- if (err) return fn(err);
- var s = socket;
- if (opts.secureEndpoint) {
- // since the proxy is connecting to an SSL server, we have
- // to upgrade this socket connection to an SSL connection
- if (!tls) tls = require('tls');
- opts.socket = socket;
- opts.servername = opts.host;
- opts.host = null;
- opts.hostname = null;
- opts.port = null;
- s = tls.connect(opts);
- }
- socket.resume();
- fn(null, s);
- }
-
- // called for the `dns.lookup()` callback
- function onlookup(err, ip) {
- if (err) return fn(err);
- options.target.host = ip;
- SocksClient.createConnection(options, onhostconnect);
- }
-
- var options = {
- proxy: {
- ipaddress: proxy.host,
- port: +proxy.port,
- type: proxy.version
- },
- target: {
- port: +opts.port
- },
- command: 'connect'
- };
- if (proxy.authentication) {
- options.proxy.authentication = proxy.authentication;
- options.proxy.userid = proxy.userid;
- }
-
- if (proxy.lookup) {
- // client-side DNS resolution for "4" and "5" socks proxy versions
- dns.lookup(opts.host, onlookup);
- } else {
- // proxy hostname DNS resolution for "4a" and "5h" socks proxy servers
- onlookup(null, opts.host);
- }
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/package.json b/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/package.json
deleted file mode 100644
index 85bd19497e..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/package.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "_from": "socks-proxy-agent@^3.0.1",
- "_id": "socks-proxy-agent@3.0.1",
- "_inBundle": false,
- "_integrity": "sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA==",
- "_location": "/npm-profile/socks-proxy-agent",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "socks-proxy-agent@^3.0.1",
- "name": "socks-proxy-agent",
- "escapedName": "socks-proxy-agent",
- "rawSpec": "^3.0.1",
- "saveSpec": null,
- "fetchSpec": "^3.0.1"
- },
- "_requiredBy": [
- "/npm-profile/make-fetch-happen"
- ],
- "_resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz",
- "_shasum": "2eae7cf8e2a82d34565761539a7f9718c5617659",
- "_spec": "socks-proxy-agent@^3.0.1",
- "_where": "/Users/rebecca/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen",
- "author": {
- "name": "Nathan Rajlich",
- "email": "nathan@tootallnate.net",
- "url": "http://n8.io/"
- },
- "bugs": {
- "url": "https://github.com/TooTallNate/node-socks-proxy-agent/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "agent-base": "^4.1.0",
- "socks": "^1.1.10"
- },
- "deprecated": false,
- "description": "A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS",
- "devDependencies": {
- "mocha": "^3.4.2",
- "raw-body": "^2.2.0",
- "socksv5": "0.0.6"
- },
- "homepage": "https://github.com/TooTallNate/node-socks-proxy-agent#readme",
- "keywords": [
- "socks",
- "socks4",
- "socks4a",
- "proxy",
- "http",
- "https",
- "agent"
- ],
- "license": "MIT",
- "main": "./index.js",
- "name": "socks-proxy-agent",
- "repository": {
- "type": "git",
- "url": "git://github.com/TooTallNate/node-socks-proxy-agent.git"
- },
- "scripts": {
- "test": "mocha --reporter spec"
- },
- "version": "3.0.1"
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/test/ssl-cert-snakeoil.key b/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/test/ssl-cert-snakeoil.key
deleted file mode 100644
index fd12501220..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/test/ssl-cert-snakeoil.key
+++ /dev/null
@@ -1,15 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIICWwIBAAKBgQCzURxIqzer0ACAbX/lHdsn4Gd9PLKrf7EeDYfIdV0HZKPD8WDr
-bBx2/fBu0OW2sjnzv/SVZbJ0DAuPE/p0+eT0qb2qC10iz9iTD7ribd7gxhirVb8y
-b3fBjXsxc8V8p4Ny1LcvNSqCjwUbJqdRogfoJeTiqPM58z5sNzuv5iq7iwIDAQAB
-AoGAPMQy4olrP0UotlzlJ36bowLP70ffgHCwU+/f4NWs5fF78c3du0oSx1w820Dd
-Z7E0JF8bgnlJJTxjumPZz0RUCugrEHBKJmzEz3cxF5E3+7NvteZcjKn9D67RrM5x
-1/uSZ9cqKE9cYvY4fSuHx18diyZ4axR/wB1Pea2utjjDM+ECQQDb9ZbmmaWMiRpQ
-5Up+loxP7BZNPsEVsm+DVJmEFbaFgGfncWBqSIqnPNjMwTwj0OigTwCAEGPkfRVW
-T0pbYWCxAkEA0LK7SCTwzyDmhASUalk0x+3uCAA6ryFdwJf/wd8TRAvVOmkTEldX
-uJ7ldLvfrONYO3v56uKTU/SoNdZYzKtO+wJAX2KM4ctXYy5BXztPpr2acz4qHa1N
-Bh+vBAC34fOYhyQ76r3b1btHhWZ5jbFuZwm9F2erC94Ps5IaoqcX07DSwQJAPKGw
-h2U0EPkd/3zVIZCJJQya+vgWFIs9EZcXVtvYXQyTBkVApTN66MhBIYjzkub5205J
-bVQmOV37AKklY1DhwQJAA1wos0cYxro02edzatxd0DIR2r4qqOqLkw6BhYHhq6HJ
-ZvIcQkHqdSXzdETFc01I1znDGGIrJHcnvKWgBPoEUg==
------END RSA PRIVATE KEY-----
diff --git a/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/test/ssl-cert-snakeoil.pem b/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/test/ssl-cert-snakeoil.pem
deleted file mode 100644
index b115a5e914..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/test/ssl-cert-snakeoil.pem
+++ /dev/null
@@ -1,12 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIB1TCCAT4CCQDV5mPlzm9+izANBgkqhkiG9w0BAQUFADAvMS0wKwYDVQQDEyQ3
-NTI3YmQ3Ny1hYjNlLTQ3NGItYWNlNy1lZWQ2MDUzOTMxZTcwHhcNMTUwNzA2MjI0
-NTA3WhcNMjUwNzAzMjI0NTA3WjAvMS0wKwYDVQQDEyQ3NTI3YmQ3Ny1hYjNlLTQ3
-NGItYWNlNy1lZWQ2MDUzOTMxZTcwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB
-ALNRHEirN6vQAIBtf+Ud2yfgZ308sqt/sR4Nh8h1XQdko8PxYOtsHHb98G7Q5bay
-OfO/9JVlsnQMC48T+nT55PSpvaoLXSLP2JMPuuJt3uDGGKtVvzJvd8GNezFzxXyn
-g3LUty81KoKPBRsmp1GiB+gl5OKo8znzPmw3O6/mKruLAgMBAAEwDQYJKoZIhvcN
-AQEFBQADgYEACzoHUF8UV2Z6541Q2wKEA0UFUzmUjf/E1XwBO+1P15ZZ64uw34B4
-1RwMPtAo9RY/PmICTWtNxWGxkzwb2JtDWtnxVER/lF8k2XcXPE76fxTHJF/BKk9J
-QU8OTD1dd9gHCBviQB9TqntRZ5X7axjtuWjb2umY+owBYzAHZkp1HKI=
------END CERTIFICATE-----
diff --git a/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/test/test.js b/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/test/test.js
deleted file mode 100644
index 968ef650fb..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/socks-proxy-agent/test/test.js
+++ /dev/null
@@ -1,144 +0,0 @@
-
-/**
- * Module dependencies.
- */
-
-var fs = require('fs');
-var url = require('url');
-var http = require('http');
-var https = require('https');
-var assert = require('assert');
-var socks = require('socksv5');
-var getRawBody = require('raw-body');
-var SocksProxyAgent = require('../');
-
-describe('SocksProxyAgent', function () {
- var httpServer, httpPort;
- var httpsServer, httpsPort;
- var socksServer, socksPort;
-
- before(function (done) {
- // setup SOCKS proxy server
- socksServer = socks.createServer(function(info, accept, deny) {
- accept();
- });
- socksServer.listen(0, '127.0.0.1', function() {
- socksPort = socksServer.address().port;
- //console.log('SOCKS server listening on port %d', socksPort);
- done();
- });
- socksServer.useAuth(socks.auth.None());
- //socksServer.useAuth(socks.auth.UserPassword(function(user, password, cb) {
- // cb(user === 'nodejs' && password === 'rules!');
- //}));
- });
-
- before(function (done) {
- // setup target HTTP server
- httpServer = http.createServer();
- httpServer.listen(function () {
- httpPort = httpServer.address().port;
- done();
- });
- });
-
- before(function (done) {
- // setup target SSL HTTPS server
- var options = {
- key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'),
- cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem')
- };
- httpsServer = https.createServer(options);
- httpsServer.listen(function () {
- httpsPort = httpsServer.address().port;
- done();
- });
- });
-
- after(function (done) {
- socksServer.once('close', function () { done(); });
- socksServer.close();
- });
-
- after(function (done) {
- httpServer.once('close', function () { done(); });
- httpServer.close();
- });
-
- after(function (done) {
- httpsServer.once('close', function () { done(); });
- httpsServer.close();
- });
-
- describe('constructor', function () {
- it('should throw an Error if no "proxy" argument is given', function () {
- assert.throws(function () {
- new SocksProxyAgent();
- });
- });
- it('should accept a "string" proxy argument', function () {
- var agent = new SocksProxyAgent('socks://127.0.0.1:' + socksPort);
- assert.equal('127.0.0.1', agent.proxy.host);
- assert.equal(socksPort, agent.proxy.port);
- });
- it('should accept a `url.parse()` result object argument', function () {
- var opts = url.parse('socks://127.0.0.1:' + socksPort);
- var agent = new SocksProxyAgent(opts);
- assert.equal('127.0.0.1', agent.proxy.host);
- assert.equal(socksPort, agent.proxy.port);
- });
- });
-
- describe('"http" module', function () {
- it('should work against an HTTP endpoint', function (done) {
- httpServer.once('request', function (req, res) {
- assert.equal('/foo', req.url);
- res.statusCode = 404;
- res.end(JSON.stringify(req.headers));
- });
-
- var agent = new SocksProxyAgent('socks://127.0.0.1:' + socksPort);
- var opts = url.parse('http://127.0.0.1:' + httpPort + '/foo');
- opts.agent = agent;
- opts.headers = { foo: 'bar' };
- var req = http.get(opts, function (res) {
- assert.equal(404, res.statusCode);
- getRawBody(res, 'utf8', function (err, buf) {
- if (err) return done(err);
- var data = JSON.parse(buf);
- assert.equal('bar', data.foo);
- done();
- });
- });
- req.once('error', done);
- });
- });
-
- describe('"https" module', function () {
- it('should work against an HTTPS endpoint', function (done) {
- httpsServer.once('request', function (req, res) {
- assert.equal('/foo', req.url);
- res.statusCode = 404;
- res.end(JSON.stringify(req.headers));
- });
-
- var agent = new SocksProxyAgent('socks://127.0.0.1:' + socksPort);
- var opts = url.parse('https://127.0.0.1:' + httpsPort + '/foo');
- opts.agent = agent;
- opts.rejectUnauthorized = false;
-
- opts.headers = { foo: 'bar' };
- var req = https.get(opts, function (res) {
- assert.equal(404, res.statusCode);
- getRawBody(res, 'utf8', function (err, buf) {
- if (err) return done(err);
- var data = JSON.parse(buf);
- assert.equal('bar', data.foo);
- done();
- });
- });
- req.once('error', done);
- });
- });
-
-});
diff --git a/deps/npm/node_modules/npm-profile/node_modules/socks/.npmignore b/deps/npm/node_modules/npm-profile/node_modules/socks/.npmignore
deleted file mode 100644
index 7deddced8b..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/socks/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-node_modules
-.git*
-.idea
-npm-debug.log \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/socks/LICENSE b/deps/npm/node_modules/npm-profile/node_modules/socks/LICENSE
deleted file mode 100644
index b2442a9e71..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/socks/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2013 Josh Glazebrook
-
-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/deps/npm/node_modules/npm-profile/node_modules/socks/README.md b/deps/npm/node_modules/npm-profile/node_modules/socks/README.md
deleted file mode 100644
index 890b7deb6a..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/socks/README.md
+++ /dev/null
@@ -1,339 +0,0 @@
-socks
-=============
-
-socks is a full client implementation of the SOCKS 4, 4a, and 5 protocols in an easy to use node.js module.
-
-### Notice
-As of February 26th, 2015, socks is the new home of the socks-client package.
-
-### Why socks?
-
-There is not any other SOCKS proxy client library on npm that supports all three variants of the SOCKS protocol. Nor are there any that support the BIND and associate features that some versions of the SOCKS protocol supports.
-
-Key Features:
-* Supports SOCKS 4, 4a, and 5 protocols
-* Supports the connect method (simple tcp connections of SOCKS) (Client -> SOCKS Server -> Target Server)
-* Supports the BIND method (4, 4a, 5)
-* Supports the associate (UDP forwarding) method (5)
-* Simple and easy to use (one function call to make any type of SOCKS connection)
-
-## Installing:
-
-`npm install socks`
-
-### Getting Started Example
-
-For this example, say you wanted to grab the html of google's home page.
-
-```javascript
-var Socks = require('socks');
-
-var options = {
- proxy: {
- ipaddress: "202.101.228.108", // Random public proxy
- port: 1080,
- type: 5 // type is REQUIRED. Valid types: [4, 5] (note 4 also works for 4a)
- },
- target: {
- host: "google.com", // can be an ip address or domain (4a and 5 only)
- port: 80
- },
- command: 'connect' // This defaults to connect, so it's optional if you're not using BIND or Associate.
-};
-
-Socks.createConnection(options, function(err, socket, info) {
- if (err)
- console.log(err);
- else {
- // Connection has been established, we can start sending data now:
- socket.write("GET / HTTP/1.1\nHost: google.com\n\n");
- socket.on('data', function(data) {
- console.log(data.length);
- console.log(data);
- });
-
- // PLEASE NOTE: sockets need to be resumed before any data will come in or out as they are paused right before this callback is fired.
- socket.resume();
-
- // 569
- // <Buffer 48 54 54 50 2f 31 2e 31 20 33 30 31 20 4d 6f 76 65 64 20 50 65...
- }
-});
-```
-
-### BIND Example:
-
-When sending the BIND command to a SOCKS proxy server, this will cause the proxy server to open up a new tcp port. Once this port is open, you, another client, application, etc, can then connect to the SOCKS proxy on that tcp port and communications will be forwarded to each connection through the proxy itself.
-
-```javascript
-var options = {
- proxy: {
- ipaddress: "202.101.228.108",
- port: 1080,
- type: 4,
- command: "bind" // Since we are using bind, we must specify it here.
- },
- target: {
- host: "1.2.3.4", // When using bind, it's best to give an estimation of the ip that will be connecting to the newly opened tcp port on the proxy server.
- port: 1080
- }
-};
-
-Socks.createConnection(options, function(err, socket, info) {
- if (err)
- console.log(err);
- else {
- // BIND request has completed.
- // info object contains the remote ip and newly opened tcp port to connect to.
- console.log(info);
-
- // { port: 1494, host: '202.101.228.108' }
-
- socket.on('data', function(data) {
- console.log(data.length);
- console.log(data);
- });
-
- // Remember to resume the socket stream.
- socket.resume();
- }
-});
-
-```
-At this point, your original connection to the proxy server remains open, and no data will be received until a tcp connection is made to the given endpoint in the info object.
-
-For an example, I am going to connect to the endpoint with telnet:
-
-```
-Joshs-MacBook-Pro:~ Josh$ telnet 202.101.228.108 1494
- Trying 202.101.228.108...
- Connected to 202.101.228.108.
- Escape character is '^]'.
- hello
- aaaaaaaaa
-```
-
-Note that this connection to the newly bound port does not need to go through the SOCKS handshake.
-
-Back at our original connection we see that we have received some new data:
-
-```
-8
-<Buffer 00 5a ca 61 43 a8 09 01> // This first piece of information can be ignored.
-
-7
-<Buffer 68 65 6c 6c 6f 0d 0a> // Hello <\r\n (enter key)>
-
-11
-<Buffer 61 61 61 61 61 61 61 61 61 0d 0a> // aaaaaaaaa <\r\n (enter key)>
-```
-
-As you can see the data entered in the telnet terminal is routed through the SOCKS proxy and back to the original connection that was made to the proxy.
-
-**Note** Please pay close attention to the first piece of data that was received.
-
-```
-<Buffer 00 5a ca 61 43 a8 09 01>
-
- [005a] [PORT:2} [IP:4]
-```
-
-This piece of data is technically part of the SOCKS BIND specifications, but because of my design decisions that were made in an effort to keep this library simple to use, you will need to make sure to ignore and/or deal with this initial packet that is received when a connection is made to the newly opened port.
-
-### Associate Example:
-The associate command sets up a UDP relay for the remote SOCKS proxy server to relay UDP packets to the remote host of your choice.
-
-```javascript
-var options = {
- proxy: {
- ipaddress: "202.101.228.108",
- port: 1080,
- type: 5,
- command: "associate" // Since we are using associate, we must specify it here.
- },
- target: {
- // When using associate, either set the ip and port to 0.0.0.0:0 or the expected source of incoming udp packets.
- // Note: Some SOCKS servers MAY block associate requests with 0.0.0.0:0 endpoints.
- // Note: ipv4, ipv6, and hostnames are supported here.
- host: "0.0.0.0",
- port: 0
- }
-};
-
-
-Socks.createConnection(options, function(err, socket, info) {
- if (err)
- console.log(err);
- else {
- // Associate request has completed.
- // info object contains the remote ip and udp port to send UDP packets to.
- console.log(info);
- // { port: 42803, host: '202.101.228.108' }
-
- var udp = new dgram.Socket('udp4');
-
- // In this example we are going to send "Hello" to 1.2.3.4:2323 through the SOCKS proxy.
-
- var pack = Socks.createUDPFrame({ host: "1.2.3.4", port: 2323}, new Buffer("hello"));
-
- // Send Packet to Proxy UDP endpoint given in the info object.
- udp.send(pack, 0, pack.length, info.port, info.host);
- }
-});
-
-```
-Now assuming that the associate request went through correctly. Anything that is typed in the stdin will first be sent to the SOCKS proxy on the endpoint that was provided in the info object. Once the SOCKS proxy receives it, it will then forward on the actual UDP packet to the host you you wanted.
-
-
-1.2.3.4:2323 should now receive our relayed UDP packet from 202.101.228.108 (SOCKS proxy)
-```
-// <Buffer 68 65 6c 6c 6f>
-```
-
-## Using socks as an HTTP Agent
-
-You can use socks as a http agent which will relay all your http
-connections through the socks server.
-
-The object that `Socks.Agent` accepts is the same as `Socks.createConnection`, you don't need to set a target since you have to define it in `http.request` or `http.get` methods.
-
-The second argument is a boolean which indicates whether the remote endpoint requires TLS.
-
-```javascript
-var socksAgent = new Socks.Agent({
- proxy: {
- ipaddress: "202.101.228.108",
- port: 1080,
- type: 5,
- }},
- true, // we are connecting to a HTTPS server, false for HTTP server
- false // rejectUnauthorized option passed to tls.connect(). Only when secure is set to true
-);
-
-http.get({ hostname: 'google.com', port: '443', agent: socksAgent}, function (res) {
- // Connection header by default is keep-alive, we have to manually end the socket
- socksAgent.encryptedSocket.end();
-});
-```
-
-# Api Reference:
-
-There are only three exported functions that you will ever need to use.
-
-### Socks.createConnection( options, callback(err, socket, info) )
-> `Object` **Object containing options to use when creating this connection**
-
-> `function` **Callback that is called when connection completes or errors**
-
-Options:
-
-```javascript
-var options = {
-
- // Information about proxy server
- proxy: {
- // IP Address of Proxy (Required)
- ipaddress: "1.2.3.4",
-
- // TCP Port of Proxy (Required)
- port: 1080,
-
- // Proxy Type [4, 5] (Required)
- // Note: 4 works for both 4 and 4a.
- type: 4,
-
- // SOCKS Connection Type (Optional)
- // - defaults to 'connect'
-
- // 'connect' - establishes a regular SOCKS connection to the target host.
- // 'bind' - establishes an open tcp port on the SOCKS for another client to connect to.
- // 'associate' - establishes a udp association relay on the SOCKS server.
- command: "connect",
-
-
- // SOCKS 4 Specific:
-
- // UserId used when making a SOCKS 4/4a request. (Optional)
- userid: "someuserid",
-
- // SOCKS 5 Specific:
-
- // Authentication used for SOCKS 5 (when it's required) (Optional)
- authentication: {
- username: "Josh",
- password: "somepassword"
- }
- },
-
- // Information about target host and/or expected client of a bind association. (Required)
- target: {
- // When using 'connect': IP Address or hostname (4a and 5 only) of a target to connect to.
- // When using 'bind': IP Address of the expected client that will connect to the newly open tcp port.
- // When using 'associate': IP Address and Port of the expected client that will send UDP packets to this UDP association relay.
-
- // Note:
- // When using SOCKS 4, only an ipv4 address can be used.
- // When using SOCKS 4a, an ipv4 address OR a hostname can be used.
- // When using SOCKS 5, ipv4, ipv6, or a hostname can be used.
- host: "1.2.3.4",
-
- // TCP port of target to connect to.
- port: 1080
- },
-
- // Amount of time to wait for a connection to be established. (Optional)
- // - defaults to 10000ms (10 seconds)
- timeout: 10000
-};
-```
-Callback:
-
-```javascript
-
-// err: If an error occurs, err will be an Error object, otherwise null.
-// socket: Socket with established connection to your target host.
-// info: If using BIND or associate, this will be the remote endpoint to use.
-
-function(err, socket, info) {
- // Hopefully no errors :-)
-}
-```
-
-### Socks.createUDPFrame( target, data, [frame] )
-> `Object` **Target host object containing destination for UDP packet**
-
-> `Buffer` **Data Buffer to send in the UDP packet**
-
-> `Number` **Frame number in UDP packet. (defaults to 0)**
-
-Creates a UDP packet frame for using with UDP association relays.
-
-returns `Buffer` The completed UDP packet container to be sent to the proxy for forwarding.
-
-target:
-```javascript
-
-// Target host information for where the UDP packet should be sent.
-var target =
- {
- // ipv4, ipv6, or hostname for where to have the proxy send the UDP packet.
- host: "1.2.3.4",
-
- // udpport for where to send the UDP packet.
- port: 2323
- }
-
-```
-
-### Socks.Agent( options, tls) )
-> `Object` **Object containing options to use when creating this connection (see above in createConnection)**
-
-> `boolean` **Boolean indicating if we upgrade the connection to TLS on the socks server**
-
-
-# Further Reading:
-Please read the SOCKS 5 specifications for more information on how to use BIND and Associate.
-http://www.ietf.org/rfc/rfc1928.txt
-
-# License
-This work is licensed under the [MIT license](http://en.wikipedia.org/wiki/MIT_License).
diff --git a/deps/npm/node_modules/npm-profile/node_modules/socks/examples/associate.js b/deps/npm/node_modules/npm-profile/node_modules/socks/examples/associate.js
deleted file mode 100644
index 82d6afa97b..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/socks/examples/associate.js
+++ /dev/null
@@ -1,33 +0,0 @@
-var Socks = require('../index.js');
-var dgram = require('dgram');
-
-var options = {
- proxy: {
- ipaddress: "202.101.228.108",
- port: 1080,
- type: 5,
- command: 'associate'
- },
-
- target: {
- host: "0.0.0.0",
- port: 0
- }
-};
-
-Socks.createConnection(options, function(err, socket, info) {
- if (err)
- console.log(err);
- else {
- console.log("Connected");
-
- // Associate request completed.
- // Now we can send properly formed UDP packet frames to this endpoint for forwarding:
- console.log(info);
- // { port: 4381, host: '202.101.228.108' }
-
- var udp = new dgram.Socket('udp4');
- var packet = SocksClient.createUDPFrame({ host: "1.2.3.4", port: 5454}, new Buffer("Hello"));
- udp.send(packet, 0, packet.length, info.port, info.host);
- }
-}); \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/socks/examples/bind.js b/deps/npm/node_modules/npm-profile/node_modules/socks/examples/bind.js
deleted file mode 100644
index 4410dd1def..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/socks/examples/bind.js
+++ /dev/null
@@ -1,30 +0,0 @@
-var Socks = require('../index.js');
-
-var options = {
- proxy: {
- ipaddress: "202.101.228.108",
- port: 1080,
- type: 5,
- command: 'bind'
- },
-
- target: {
- host: "0.0.0.0",
- port: 0
- }
-};
-
-Socks.createConnection(options, function(err, socket, info) {
- if (err)
- console.log(err);
- else {
- console.log("Connected");
-
- // BIND request completed, now a tcp client should connect to this endpoint:
- console.log(info);
- // { port: 3334, host: '202.101.228.108' }
-
- // Resume! You need to!
- socket.resume();
- }
-}); \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/socks/examples/connect.js b/deps/npm/node_modules/npm-profile/node_modules/socks/examples/connect.js
deleted file mode 100644
index 528ad4d416..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/socks/examples/connect.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var Socks = require('../index.js');
-
-var options = {
- proxy: {
- ipaddress: "31.193.133.9",
- port: 1081,
- type: 5 // (4 or 5)
- },
-
- target: {
- host: "173.194.33.103", // (google.com)
- port: 80
- }
-};
-
-Socks.createConnection(options, function (err, socket, info) {
- if (err)
- console.log(err);
- else {
- console.log("Connected");
-
- socket.on('data', function (data) {
- // do something with incoming data
- });
-
- // Please remember that sockets need to be resumed before any data will come in.
- socket.resume();
-
- // We can do whatever we want with the socket now.
- }
-}); \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/socks/index.js b/deps/npm/node_modules/npm-profile/node_modules/socks/index.js
deleted file mode 100644
index 29331d4a1c..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/socks/index.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var SocksClient = require('./lib/socks-client.js');
-var SocksAgent = require('./lib/socks-agent.js');
-
-exports.createConnection = SocksClient.createConnection;
-exports.createUDPFrame = SocksClient.createUDPFrame;
-exports.Agent = SocksAgent.Agent;
diff --git a/deps/npm/node_modules/npm-profile/node_modules/socks/lib/socks-agent.js b/deps/npm/node_modules/npm-profile/node_modules/socks/lib/socks-agent.js
deleted file mode 100644
index db1c301ec9..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/socks/lib/socks-agent.js
+++ /dev/null
@@ -1,108 +0,0 @@
-var tls = require('tls');
-var inherits = require('util').inherits;
-var EventEmitter = require('events').EventEmitter;
-var SocksClient = require('./socks-client.js');
-
-function SocksAgent(options, secure, rejectUnauthorized) {
- this.options = options;
- this.secure = secure || false;
- this.rejectUnauthorized = rejectUnauthorized;
-
- if (this.rejectUnauthorized === undefined) {
- this.rejectUnauthorized = true;
- }
-}
-
-inherits(SocksAgent, EventEmitter);
-
-SocksAgent.prototype.createConnection = function(req, opts, fn) {
- var handler = fn, host, self = this;
-
- this.options.target = this.options.target || {};
-
- if (!this.options.target.host) {
- this.options.target.host = opts.host;
- }
-
- if (!this.options.target.port) {
- this.options.target.port = opts.port;
- }
-
- host = this.options.target.host;
-
- if (this.secure) {
- handler = function(err, socket, info) {
- var options, cleartext;
-
- if (err) {
- return fn(err);
- }
-
- // save encrypted socket
- self.encryptedSocket = socket;
-
- options = {
- socket: socket,
- servername: host,
- rejectUnauthorized: self.rejectUnauthorized
- };
-
- cleartext = tls.connect(options, function (err) {
- return fn(err, this);
- });
- cleartext.on('error', fn);
-
- socket.resume();
- }
- }
-
- SocksClient.createConnection(this.options, handler);
-};
-
-/**
- * @see https://www.npmjs.com/package/agent-base
- */
-SocksAgent.prototype.addRequest = function(req, host, port, localAddress) {
- var opts;
- if ('object' === typeof host) {
- // >= v0.11.x API
- opts = host;
- if (opts.host && opts.path) {
- // if both a `host` and `path` are specified then it's most likely the
- // result of a `url.parse()` call... we need to remove the `path` portion so
- // that `net.connect()` doesn't attempt to open that as a unix socket file.
- delete opts.path;
- }
- } else {
- // <= v0.10.x API
- opts = { host: host, port: port };
- if (null !== localAddress) {
- opts.localAddress = localAddress;
- }
- }
-
- var sync = true;
-
- this.createConnection(req, opts, function (err, socket) {
- function emitErr () {
- req.emit('error', err);
- }
- if (err) {
- if (sync) {
- // need to defer the "error" event, when sync, because by now the `req`
- // instance hasn't event been passed back to the user yet...
- process.nextTick(emitErr);
- } else {
- emitErr();
- }
- } else {
- req.onSocket(socket);
- //have to resume this socket when node 12
- socket.resume();
- }
- });
-
- sync = false;
-};
-
-exports.Agent = SocksAgent;
diff --git a/deps/npm/node_modules/npm-profile/node_modules/socks/lib/socks-client.js b/deps/npm/node_modules/npm-profile/node_modules/socks/lib/socks-client.js
deleted file mode 100644
index 4a31f62c32..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/socks/lib/socks-client.js
+++ /dev/null
@@ -1,306 +0,0 @@
-var net = require('net');
-var ip = require('ip');
-var SmartBuffer = require('smart-buffer');
-
-(function () {
-
- var COMMAND = {
- Connect: 0x01,
- Bind: 0x02,
- Associate: 0x03
- };
-
- var SOCKS4_RESPONSE = {
- Granted: 0x5A,
- Failed: 0x5B,
- Rejected: 0x5C,
- RejectedIdent: 0x5D
- };
-
- var SOCKS5_AUTH = {
- NoAuth: 0x00,
- GSSApi: 0x01,
- UserPass: 0x02
- };
-
- var SOCKS5_RESPONSE = {
- Granted: 0x00,
- Failure: 0x01,
- NotAllowed: 0x02,
- NetworkUnreachable: 0x03,
- HostUnreachable: 0x04,
- ConnectionRefused: 0x05,
- TTLExpired: 0x06,
- CommandNotSupported: 0x07,
- AddressNotSupported: 0x08
- };
-
-
- exports.createConnection = function (options, callback) {
- var socket = new net.Socket(), finished = false, buff = new SmartBuffer();
-
- // Defaults
- options.timeout = options.timeout || 10000;
- options.proxy.command = commandFromString(options.proxy.command);
- options.proxy.userid = options.proxy.userid || "";
-
- var auth = options.proxy.authentication || {};
- auth.username = auth.username || "";
- auth.password = auth.password || "";
-
- options.proxy.authentication = auth;
-
- // Connect & negotiation timeout
- function onTimeout() {
- finish(new Error("Connection Timed Out"), socket, null, callback);
- }
- socket.setTimeout(options.timeout, onTimeout);
-
- // Socket events
- socket.once('close', function () {
- finish(new Error("Socket Closed"), socket, null, callback);
- });
-
- socket.once('error', function (err) {
- });
-
- socket.once('connect', function () {
- if (options.proxy.type === 4) {
- negotiateSocks4(options, socket, callback);
- } else if (options.proxy.type === 5) {
- negotiateSocks5(options, socket, callback);
- } else {
- throw new Error("Please specify a proxy type in options.proxy.type");
- }
- });
-
- socket.connect(options.proxy.port, options.proxy.ipaddress);
-
-
- // 4/4a (connect, bind) - Supports domains & ipaddress
- function negotiateSocks4(options, socket, callback) {
- buff.writeUInt8(0x04);
- buff.writeUInt8(options.proxy.command);
- buff.writeUInt16BE(options.target.port);
-
- // ipv4 or domain?
- if (net.isIPv4(options.target.host)) {
- buff.writeBuffer(ip.toBuffer(options.target.host));
- buff.writeStringNT(options.proxy.userid);
- } else {
- buff.writeUInt8(0x00);
- buff.writeUInt8(0x00);
- buff.writeUInt8(0x00);
- buff.writeUInt8(0x01);
- buff.writeStringNT(options.proxy.userid);
- buff.writeStringNT(options.target.host);
- }
-
- socket.once('data', receivedResponse);
- socket.write(buff.toBuffer());
-
- function receivedResponse(data) {
- socket.pause();
- if (data.length === 8 && data[1] === SOCKS4_RESPONSE.Granted) {
-
- if (options.proxy.command === COMMAND.Bind) {
- buff.clear();
- buff.writeBuffer(data);
- buff.skip(2);
-
- var info = {
- port: buff.readUInt16BE(),
- host: buff.readUInt32BE()
- };
-
- if (info.host === 0) {
- info.host = options.proxy.ipaddress;
- } else {
- info.host = ip.fromLong(info.host);
- }
-
- finish(null, socket, info, callback);
- } else {
- finish(null, socket, null, callback);
- }
-
- } else {
- finish(new Error("Rejected (" + data[1] + ")"), socket, null, callback);
- }
- }
- }
-
- // Socks 5 (connect, bind, associate) - Supports domains and ipv4, ipv6.
- function negotiateSocks5(options, socket, callback) {
- buff.writeUInt8(0x05);
- buff.writeUInt8(2);
- buff.writeUInt8(SOCKS5_AUTH.NoAuth);
- buff.writeUInt8(SOCKS5_AUTH.UserPass);
-
- socket.once('data', handshake);
- socket.write(buff.toBuffer());
-
- function handshake(data) {
- if (data.length !== 2) {
- finish(new Error("Negotiation Error"), socket, null, callback);
- } else if (data[0] !== 0x05) {
- finish(new Error("Negotiation Error (invalid version)"), socket, null, callback);
- } else if (data[1] === 0xFF) {
- finish(new Error("Negotiation Error (unacceptable authentication)"), socket, null, callback);
- } else {
- if (data[1] === SOCKS5_AUTH.NoAuth) {
- sendRequest();
- } else if (data[1] === SOCKS5_AUTH.UserPass) {
- sendAuthentication(options.proxy.authentication);
- } else {
- finish(new Error("Negotiation Error (unknown authentication type)"), socket, null, callback);
- }
- }
- }
-
- function sendAuthentication(authinfo) {
- buff.clear();
- buff.writeUInt8(0x01);
- buff.writeUInt8(Buffer.byteLength(authinfo.username));
- buff.writeString(authinfo.username);
- buff.writeUInt8(Buffer.byteLength(authinfo.password));
- buff.writeString(authinfo.password);
-
- socket.once('data', authenticationResponse);
- socket.write(buff.toBuffer());
-
- function authenticationResponse(data) {
- if (data.length === 2 && data[1] === 0x00) {
- sendRequest();
- } else {
- finish(new Error("Negotiation Error (authentication failed)"), socket, null, callback);
- }
- }
- }
-
- function sendRequest() {
- buff.clear();
- buff.writeUInt8(0x05);
- buff.writeUInt8(options.proxy.command);
- buff.writeUInt8(0x00);
-
- // ipv4, ipv6, domain?
- if (net.isIPv4(options.target.host)) {
- buff.writeUInt8(0x01);
- buff.writeBuffer(ip.toBuffer(options.target.host));
- } else if (net.isIPv6(options.target.host)) {
- buff.writeUInt8(0x04);
- buff.writeBuffer(ip.toBuffer(options.target.host));
- } else {
- buff.writeUInt8(0x03);
- buff.writeUInt8(options.target.host.length);
- buff.writeString(options.target.host);
- }
- buff.writeUInt16BE(options.target.port);
-
- socket.once('data', receivedResponse);
- socket.write(buff.toBuffer());
- }
-
- function receivedResponse(data) {
- socket.pause();
- if (data.length < 4) {
- finish(new Error("Negotiation Error"), socket, null, callback);
- } else if (data[0] === 0x05 && data[1] === SOCKS5_RESPONSE.Granted) {
- if (options.proxy.command === COMMAND.Connect) {
- finish(null, socket, null, callback);
- } else if (options.proxy.command === COMMAND.Bind || options.proxy.command === COMMAND.Associate) {
- buff.clear();
- buff.writeBuffer(data);
- buff.skip(3);
-
- var info = {};
- var addrtype = buff.readUInt8();
-
- try {
-
- if (addrtype === 0x01) {
- info.host = buff.readUInt32BE();
- if (info.host === 0)
- info.host = options.proxy.ipaddress;
- else
- info.host = ip.fromLong(info.host);
- } else if (addrtype === 0x03) {
- var len = buff.readUInt8();
- info.host = buff.readString(len);
- } else if (addrtype === 0x04) {
- info.host = buff.readBuffer(16);
- } else {
- finish(new Error("Negotiation Error (invalid host address)"), socket, null, callback);
- }
- info.port = buff.readUInt16BE();
-
- finish(null, socket, info, callback);
- } catch (ex) {
- finish(new Error("Negotiation Error (missing data)"), socket, null, callback);
- }
- }
- } else {
- finish(new Error("Negotiation Error (" + data[1] + ")"), socket, null, callback);
- }
- }
- }
-
- function finish(err, socket, info, callback) {
- socket.setTimeout(0, onTimeout);
- if (!finished) {
- finished = true;
-
- if (buff instanceof SmartBuffer)
- buff.destroy();
-
- if (err && socket instanceof net.Socket) {
- socket.removeAllListeners('close');
- socket.removeAllListeners('timeout');
- socket.removeAllListeners('data');
- socket.destroy();
- socket = null;
- }
-
- callback(err, socket, info);
- }
- }
-
- function commandFromString(str) {
- var result = COMMAND.Connect;
-
- if (str === "connect") {
- result = COMMAND.Connect;
- } else if (str === 'associate') {
- result = COMMAND.Associate;
- } else if (str === 'bind') {
- result = COMMAND.Bind;
- }
-
- return result;
- }
- };
-
-
- exports.createUDPFrame = function (target, data, frame) {
- var buff = new SmartBuffer();
- buff.writeUInt16BE(0);
- buff.writeUInt8(frame || 0x00);
-
- if (net.isIPv4(target.host)) {
- buff.writeUInt8(0x01);
- buff.writeUInt32BE(ip.toLong(target.host));
- } else if (net.isIPv6(target.host)) {
- buff.writeUInt8(0x04);
- buff.writeBuffer(ip.toBuffer(target.host));
- } else {
- buff.writeUInt8(0x03);
- buff.writeUInt8(Buffer.byteLength(target.host));
- buff.writeString(target.host);
- }
-
- buff.writeUInt16BE(target.port);
- buff.writeBuffer(data);
- return buff.toBuffer();
- };
-})();
diff --git a/deps/npm/node_modules/npm-profile/node_modules/socks/package.json b/deps/npm/node_modules/npm-profile/node_modules/socks/package.json
deleted file mode 100644
index fcd2d16852..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/socks/package.json
+++ /dev/null
@@ -1,68 +0,0 @@
-{
- "_from": "socks@^1.1.10",
- "_id": "socks@1.1.10",
- "_inBundle": false,
- "_integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=",
- "_location": "/npm-profile/socks",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "socks@^1.1.10",
- "name": "socks",
- "escapedName": "socks",
- "rawSpec": "^1.1.10",
- "saveSpec": null,
- "fetchSpec": "^1.1.10"
- },
- "_requiredBy": [
- "/npm-profile/socks-proxy-agent"
- ],
- "_resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz",
- "_shasum": "5b8b7fc7c8f341c53ed056e929b7bf4de8ba7b5a",
- "_spec": "socks@^1.1.10",
- "_where": "/Users/rebecca/code/npm/node_modules/npm-profile/node_modules/socks-proxy-agent",
- "author": {
- "name": "Josh Glazebrook"
- },
- "bugs": {
- "url": "https://github.com/JoshGlazebrook/socks/issues"
- },
- "bundleDependencies": false,
- "contributors": [
- {
- "name": "Samuel Gordalina"
- }
- ],
- "dependencies": {
- "ip": "^1.1.4",
- "smart-buffer": "^1.0.13"
- },
- "deprecated": false,
- "description": "A SOCKS proxy client supporting SOCKS 4, 4a, and 5. (also supports BIND/Associate)",
- "engines": {
- "node": ">= 0.10.0",
- "npm": ">= 1.3.5"
- },
- "homepage": "https://github.com/JoshGlazebrook/socks",
- "keywords": [
- "socks",
- "proxy",
- "client",
- "tor",
- "bind",
- "associate",
- "socks 4",
- "socks 4a",
- "socks 5",
- "agent"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "socks",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/JoshGlazebrook/socks.git"
- },
- "version": "1.1.10"
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/ssri/CHANGELOG.md b/deps/npm/node_modules/npm-profile/node_modules/ssri/CHANGELOG.md
deleted file mode 100644
index 5c06894881..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/ssri/CHANGELOG.md
+++ /dev/null
@@ -1,256 +0,0 @@
-# Change Log
-
-All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
-
-<a name="5.3.0"></a>
-# [5.3.0](https://github.com/zkat/ssri/compare/v5.2.4...v5.3.0) (2018-03-13)
-
-
-### Features
-
-* **checkData:** optionally throw when checkData fails ([bf26b84](https://github.com/zkat/ssri/commit/bf26b84))
-
-
-
-<a name="5.2.4"></a>
-## [5.2.4](https://github.com/zkat/ssri/compare/v5.2.3...v5.2.4) (2018-02-16)
-
-
-
-<a name="5.2.3"></a>
-## [5.2.3](https://github.com/zkat/ssri/compare/v5.2.2...v5.2.3) (2018-02-16)
-
-
-### Bug Fixes
-
-* **hashes:** filter hash priority list by available hashes ([2fa30b8](https://github.com/zkat/ssri/commit/2fa30b8))
-* **integrityStream:** dedupe algorithms to generate ([d56c654](https://github.com/zkat/ssri/commit/d56c654))
-
-
-
-<a name="5.2.2"></a>
-## [5.2.2](https://github.com/zkat/ssri/compare/v5.2.1...v5.2.2) (2018-02-14)
-
-
-### Bug Fixes
-
-* **security:** tweak strict SRI regex ([#10](https://github.com/zkat/ssri/issues/10)) ([d0ebcdc](https://github.com/zkat/ssri/commit/d0ebcdc))
-
-
-
-<a name="5.2.1"></a>
-## [5.2.1](https://github.com/zkat/ssri/compare/v5.2.0...v5.2.1) (2018-02-06)
-
-
-
-<a name="5.2.0"></a>
-# [5.2.0](https://github.com/zkat/ssri/compare/v5.1.0...v5.2.0) (2018-02-06)
-
-
-### Features
-
-* **match:** add integrity.match() ([3c49cc4](https://github.com/zkat/ssri/commit/3c49cc4))
-
-
-
-<a name="5.1.0"></a>
-# [5.1.0](https://github.com/zkat/ssri/compare/v5.0.0...v5.1.0) (2018-01-18)
-
-
-### Bug Fixes
-
-* **checkStream:** integrityStream now takes opts.integrity algos into account ([d262910](https://github.com/zkat/ssri/commit/d262910))
-
-
-### Features
-
-* **sha3:** do some guesswork about upcoming sha3 ([7fdd9df](https://github.com/zkat/ssri/commit/7fdd9df))
-
-
-
-<a name="5.0.0"></a>
-# [5.0.0](https://github.com/zkat/ssri/compare/v4.1.6...v5.0.0) (2017-10-23)
-
-
-### Features
-
-* **license:** relicense to ISC (#9) ([c82983a](https://github.com/zkat/ssri/commit/c82983a))
-
-
-### BREAKING CHANGES
-
-* **license:** the license has been changed from CC0-1.0 to ISC.
-
-
-
-<a name="4.1.6"></a>
-## [4.1.6](https://github.com/zkat/ssri/compare/v4.1.5...v4.1.6) (2017-06-07)
-
-
-### Bug Fixes
-
-* **checkStream:** make sure to pass all opts through ([0b1bcbe](https://github.com/zkat/ssri/commit/0b1bcbe))
-
-
-
-<a name="4.1.5"></a>
-## [4.1.5](https://github.com/zkat/ssri/compare/v4.1.4...v4.1.5) (2017-06-05)
-
-
-### Bug Fixes
-
-* **integrityStream:** stop crashing if opts.algorithms and opts.integrity have an algo mismatch ([fb1293e](https://github.com/zkat/ssri/commit/fb1293e))
-
-
-
-<a name="4.1.4"></a>
-## [4.1.4](https://github.com/zkat/ssri/compare/v4.1.3...v4.1.4) (2017-05-31)
-
-
-### Bug Fixes
-
-* **node:** older versions of node[@4](https://github.com/4) do not support base64buffer string parsing ([513df4e](https://github.com/zkat/ssri/commit/513df4e))
-
-
-
-<a name="4.1.3"></a>
-## [4.1.3](https://github.com/zkat/ssri/compare/v4.1.2...v4.1.3) (2017-05-24)
-
-
-### Bug Fixes
-
-* **check:** handle various bad hash corner cases better ([c2c262b](https://github.com/zkat/ssri/commit/c2c262b))
-
-
-
-<a name="4.1.2"></a>
-## [4.1.2](https://github.com/zkat/ssri/compare/v4.1.1...v4.1.2) (2017-04-18)
-
-
-### Bug Fixes
-
-* **stream:** _flush can be called multiple times. use on("end") ([b1c4805](https://github.com/zkat/ssri/commit/b1c4805))
-
-
-
-<a name="4.1.1"></a>
-## [4.1.1](https://github.com/zkat/ssri/compare/v4.1.0...v4.1.1) (2017-04-12)
-
-
-### Bug Fixes
-
-* **pickAlgorithm:** error if pickAlgorithm() is used in an empty Integrity ([fab470e](https://github.com/zkat/ssri/commit/fab470e))
-
-
-
-<a name="4.1.0"></a>
-# [4.1.0](https://github.com/zkat/ssri/compare/v4.0.0...v4.1.0) (2017-04-07)
-
-
-### Features
-
-* adding ssri.create for a crypto style interface (#2) ([96f52ad](https://github.com/zkat/ssri/commit/96f52ad))
-
-
-
-<a name="4.0.0"></a>
-# [4.0.0](https://github.com/zkat/ssri/compare/v3.0.2...v4.0.0) (2017-04-03)
-
-
-### Bug Fixes
-
-* **integrity:** should have changed the error code before. oops ([8381afa](https://github.com/zkat/ssri/commit/8381afa))
-
-
-### BREAKING CHANGES
-
-* **integrity:** EBADCHECKSUM -> EINTEGRITY for verification errors
-
-
-
-<a name="3.0.2"></a>
-## [3.0.2](https://github.com/zkat/ssri/compare/v3.0.1...v3.0.2) (2017-04-03)
-
-
-
-<a name="3.0.1"></a>
-## [3.0.1](https://github.com/zkat/ssri/compare/v3.0.0...v3.0.1) (2017-04-03)
-
-
-### Bug Fixes
-
-* **package.json:** really should have these in the keywords because search ([a6ac6d0](https://github.com/zkat/ssri/commit/a6ac6d0))
-
-
-
-<a name="3.0.0"></a>
-# [3.0.0](https://github.com/zkat/ssri/compare/v2.0.0...v3.0.0) (2017-04-03)
-
-
-### Bug Fixes
-
-* **hashes:** IntegrityMetadata -> Hash ([d04aa1f](https://github.com/zkat/ssri/commit/d04aa1f))
-
-
-### Features
-
-* **check:** return IntegrityMetadata on check success ([2301e74](https://github.com/zkat/ssri/commit/2301e74))
-* **fromHex:** ssri.fromHex to make it easier to generate them from hex valus ([049b89e](https://github.com/zkat/ssri/commit/049b89e))
-* **hex:** utility function for getting hex version of digest ([a9f021c](https://github.com/zkat/ssri/commit/a9f021c))
-* **hexDigest:** added hexDigest method to Integrity objects too ([85208ba](https://github.com/zkat/ssri/commit/85208ba))
-* **integrity:** add .isIntegrity and .isIntegrityMetadata ([1b29e6f](https://github.com/zkat/ssri/commit/1b29e6f))
-* **integrityStream:** new stream that can both generate and check streamed data ([fd23e1b](https://github.com/zkat/ssri/commit/fd23e1b))
-* **parse:** allow parsing straight into a single IntegrityMetadata object ([c8ddf48](https://github.com/zkat/ssri/commit/c8ddf48))
-* **pickAlgorithm:** Intergrity#pickAlgorithm() added ([b97a796](https://github.com/zkat/ssri/commit/b97a796))
-* **size:** calculate and update stream sizes ([02ed1ad](https://github.com/zkat/ssri/commit/02ed1ad))
-
-
-### BREAKING CHANGES
-
-* **hashes:** `.isIntegrityMetadata` is now `.isHash`. Also, any references to `IntegrityMetadata` now refer to `Hash`.
-* **integrityStream:** createCheckerStream has been removed and replaced with a general-purpose integrityStream.
-
-To convert existing createCheckerStream code, move the `sri` argument into `opts.integrity` in integrityStream. All other options should be the same.
-* **check:** `checkData`, `checkStream`, and `createCheckerStream` now yield a whole IntegrityMetadata instance representing the first successful hash match.
-
-
-
-<a name="2.0.0"></a>
-# [2.0.0](https://github.com/zkat/ssri/compare/v1.0.0...v2.0.0) (2017-03-24)
-
-
-### Bug Fixes
-
-* **strict-mode:** make regexes more rigid ([122a32c](https://github.com/zkat/ssri/commit/122a32c))
-
-
-### Features
-
-* **api:** added serialize alias for unparse ([999b421](https://github.com/zkat/ssri/commit/999b421))
-* **concat:** add Integrity#concat() ([cae12c7](https://github.com/zkat/ssri/commit/cae12c7))
-* **pickAlgo:** pick the strongest algorithm provided, by default ([58c18f7](https://github.com/zkat/ssri/commit/58c18f7))
-* **strict-mode:** strict SRI support ([3f0b64c](https://github.com/zkat/ssri/commit/3f0b64c))
-* **stringify:** replaced unparse/serialize with stringify ([4acad30](https://github.com/zkat/ssri/commit/4acad30))
-* **verification:** add opts.pickAlgorithm ([f72e658](https://github.com/zkat/ssri/commit/f72e658))
-
-
-### BREAKING CHANGES
-
-* **pickAlgo:** ssri will prioritize specific hashes now
-* **stringify:** serialize and unparse have been removed. Use ssri.stringify instead.
-* **strict-mode:** functions that accepted an optional `sep` argument now expect `opts.sep`.
-
-
-
-<a name="1.0.0"></a>
-# 1.0.0 (2017-03-23)
-
-
-### Features
-
-* **api:** implemented initial api ([4fbb16b](https://github.com/zkat/ssri/commit/4fbb16b))
-
-
-### BREAKING CHANGES
-
-* **api:** Initial API established.
diff --git a/deps/npm/node_modules/npm-profile/node_modules/ssri/LICENSE.md b/deps/npm/node_modules/npm-profile/node_modules/ssri/LICENSE.md
deleted file mode 100644
index 8d28acf866..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/ssri/LICENSE.md
+++ /dev/null
@@ -1,16 +0,0 @@
-ISC License
-
-Copyright (c) npm, Inc.
-
-Permission to use, copy, modify, and/or distribute this software for
-any purpose with or without fee is hereby granted, provided that the
-above copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER DISCLAIMS
-ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
-COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
-OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
-USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/npm-profile/node_modules/ssri/README.md b/deps/npm/node_modules/npm-profile/node_modules/ssri/README.md
deleted file mode 100644
index a6c07e7409..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/ssri/README.md
+++ /dev/null
@@ -1,488 +0,0 @@
-# ssri [![npm version](https://img.shields.io/npm/v/ssri.svg)](https://npm.im/ssri) [![license](https://img.shields.io/npm/l/ssri.svg)](https://npm.im/ssri) [![Travis](https://img.shields.io/travis/zkat/ssri.svg)](https://travis-ci.org/zkat/ssri) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/ssri?svg=true)](https://ci.appveyor.com/project/zkat/ssri) [![Coverage Status](https://coveralls.io/repos/github/zkat/ssri/badge.svg?branch=latest)](https://coveralls.io/github/zkat/ssri?branch=latest)
-
-[`ssri`](https://github.com/zkat/ssri), short for Standard Subresource
-Integrity, is a Node.js utility for parsing, manipulating, serializing,
-generating, and verifying [Subresource
-Integrity](https://w3c.github.io/webappsec/specs/subresourceintegrity/) hashes.
-
-## Install
-
-`$ npm install --save ssri`
-
-## Table of Contents
-
-* [Example](#example)
-* [Features](#features)
-* [Contributing](#contributing)
-* [API](#api)
- * Parsing & Serializing
- * [`parse`](#parse)
- * [`stringify`](#stringify)
- * [`Integrity#concat`](#integrity-concat)
- * [`Integrity#toString`](#integrity-to-string)
- * [`Integrity#toJSON`](#integrity-to-json)
- * [`Integrity#match`](#integrity-match)
- * [`Integrity#pickAlgorithm`](#integrity-pick-algorithm)
- * [`Integrity#hexDigest`](#integrity-hex-digest)
- * Integrity Generation
- * [`fromHex`](#from-hex)
- * [`fromData`](#from-data)
- * [`fromStream`](#from-stream)
- * [`create`](#create)
- * Integrity Verification
- * [`checkData`](#check-data)
- * [`checkStream`](#check-stream)
- * [`integrityStream`](#integrity-stream)
-
-### Example
-
-```javascript
-const ssri = require('ssri')
-
-const integrity = 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo'
-
-// Parsing and serializing
-const parsed = ssri.parse(integrity)
-ssri.stringify(parsed) // === integrity (works on non-Integrity objects)
-parsed.toString() // === integrity
-
-// Async stream functions
-ssri.checkStream(fs.createReadStream('./my-file'), integrity).then(...)
-ssri.fromStream(fs.createReadStream('./my-file')).then(sri => {
- sri.toString() === integrity
-})
-fs.createReadStream('./my-file').pipe(ssri.createCheckerStream(sri))
-
-// Sync data functions
-ssri.fromData(fs.readFileSync('./my-file')) // === parsed
-ssri.checkData(fs.readFileSync('./my-file'), integrity) // => 'sha512'
-```
-
-### Features
-
-* Parses and stringifies SRI strings.
-* Generates SRI strings from raw data or Streams.
-* Strict standard compliance.
-* `?foo` metadata option support.
-* Multiple entries for the same algorithm.
-* Object-based integrity hash manipulation.
-* Small footprint: no dependencies, concise implementation.
-* Full test coverage.
-* Customizable algorithm picker.
-
-### Contributing
-
-The ssri team enthusiastically welcomes contributions and project participation!
-There's a bunch of things you can do if you want to contribute! The [Contributor
-Guide](CONTRIBUTING.md) has all the information you need for everything from
-reporting bugs to contributing entire new features. Please don't hesitate to
-jump in if you'd like to, or even ask us questions if something isn't clear.
-
-### API
-
-#### <a name="parse"></a> `> ssri.parse(sri, [opts]) -> Integrity`
-
-Parses `sri` into an `Integrity` data structure. `sri` can be an integrity
-string, an `Hash`-like with `digest` and `algorithm` fields and an optional
-`options` field, or an `Integrity`-like object. The resulting object will be an
-`Integrity` instance that has this shape:
-
-```javascript
-{
- 'sha1': [{algorithm: 'sha1', digest: 'deadbeef', options: []}],
- 'sha512': [
- {algorithm: 'sha512', digest: 'c0ffee', options: []},
- {algorithm: 'sha512', digest: 'bad1dea', options: ['foo']}
- ],
-}
-```
-
-If `opts.single` is truthy, a single `Hash` object will be returned. That is, a
-single object that looks like `{algorithm, digest, options}`, as opposed to a
-larger object with multiple of these.
-
-If `opts.strict` is truthy, the resulting object will be filtered such that
-it strictly follows the Subresource Integrity spec, throwing away any entries
-with any invalid components. This also means a restricted set of algorithms
-will be used -- the spec limits them to `sha256`, `sha384`, and `sha512`.
-
-Strict mode is recommended if the integrity strings are intended for use in
-browsers, or in other situations where strict adherence to the spec is needed.
-
-##### Example
-
-```javascript
-ssri.parse('sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo') // -> Integrity object
-```
-
-#### <a name="stringify"></a> `> ssri.stringify(sri, [opts]) -> String`
-
-This function is identical to [`Integrity#toString()`](#integrity-to-string),
-except it can be used on _any_ object that [`parse`](#parse) can handle -- that
-is, a string, an `Hash`-like, or an `Integrity`-like.
-
-The `opts.sep` option defines the string to use when joining multiple entries
-together. To be spec-compliant, this _must_ be whitespace. The default is a
-single space (`' '`).
-
-If `opts.strict` is true, the integrity string will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-// Useful for cleaning up input SRI strings:
-ssri.stringify('\n\rsha512-foo\n\t\tsha384-bar')
-// -> 'sha512-foo sha384-bar'
-
-// Hash-like: only a single entry.
-ssri.stringify({
- algorithm: 'sha512',
- digest:'9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==',
- options: ['foo']
-})
-// ->
-// 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo'
-
-// Integrity-like: full multi-entry syntax. Similar to output of `ssri.parse`
-ssri.stringify({
- 'sha512': [
- {
- algorithm: 'sha512',
- digest:'9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==',
- options: ['foo']
- }
- ]
-})
-// ->
-// 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo'
-```
-
-#### <a name="integrity-concat"></a> `> Integrity#concat(otherIntegrity, [opts]) -> Integrity`
-
-Concatenates an `Integrity` object with another IntegrityLike, or an integrity
-string.
-
-This is functionally equivalent to concatenating the string format of both
-integrity arguments, and calling [`ssri.parse`](#ssri-parse) on the new string.
-
-If `opts.strict` is true, the new `Integrity` will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-// This will combine the integrity checks for two different versions of
-// your index.js file so you can use a single integrity string and serve
-// either of these to clients, from a single `<script>` tag.
-const desktopIntegrity = ssri.fromData(fs.readFileSync('./index.desktop.js'))
-const mobileIntegrity = ssri.fromData(fs.readFileSync('./index.mobile.js'))
-
-// Note that browsers (and ssri) will succeed as long as ONE of the entries
-// for the *prioritized* algorithm succeeds. That is, in order for this fallback
-// to work, both desktop and mobile *must* use the same `algorithm` values.
-desktopIntegrity.concat(mobileIntegrity)
-```
-
-#### <a name="integrity-to-string"></a> `> Integrity#toString([opts]) -> String`
-
-Returns the string representation of an `Integrity` object. All hash entries
-will be concatenated in the string by `opts.sep`, which defaults to `' '`.
-
-If you want to serialize an object that didn't from from an `ssri` function,
-use [`ssri.stringify()`](#stringify).
-
-If `opts.strict` is true, the integrity string will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-const integrity = 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo'
-
-ssri.parse(integrity).toString() === integrity
-```
-
-#### <a name="integrity-to-json"></a> `> Integrity#toJSON() -> String`
-
-Returns the string representation of an `Integrity` object. All hash entries
-will be concatenated in the string by `' '`.
-
-This is a convenience method so you can pass an `Integrity` object directly to `JSON.stringify`.
-For more info check out [toJSON() behavior on mdn](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON%28%29_behavior).
-
-##### Example
-
-```javascript
-const integrity = '"sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo"'
-
-JSON.stringify(ssri.parse(integrity)) === integrity
-```
-
-#### <a name="integrity-match"></a> `> Integrity#match(sri, [opts]) -> Hash | false`
-
-Returns the matching (truthy) hash if `Integrity` matches the argument passed as
-`sri`, which can be anything that [`parse`](#parse) will accept. `opts` will be
-passed through to `parse` and [`pickAlgorithm()`](#integrity-pick-algorithm).
-
-##### Example
-
-```javascript
-const integrity = 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A=='
-
-ssri.parse(integrity).match(integrity)
-// Hash {
-// digest: '9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A=='
-// algorithm: 'sha512'
-// }
-
-ssri.parse(integrity).match('sha1-deadbeef')
-// false
-```
-
-#### <a name="integrity-pick-algorithm"></a> `> Integrity#pickAlgorithm([opts]) -> String`
-
-Returns the "best" algorithm from those available in the integrity object.
-
-If `opts.pickAlgorithm` is provided, it will be passed two algorithms as
-arguments. ssri will prioritize whichever of the two algorithms is returned by
-this function. Note that the function may be called multiple times, and it
-**must** return one of the two algorithms provided. By default, ssri will make
-a best-effort to pick the strongest/most reliable of the given algorithms. It
-may intentionally deprioritize algorithms with known vulnerabilities.
-
-##### Example
-
-```javascript
-ssri.parse('sha1-WEakDigEST sha512-yzd8ELD1piyANiWnmdnpCL5F52f10UfUdEkHywVZeqTt0ymgrxR63Qz0GB7TKPoeeZQmWCaz7T1').pickAlgorithm() // sha512
-```
-
-#### <a name="integrity-hex-digest"></a> `> Integrity#hexDigest() -> String`
-
-`Integrity` is assumed to be either a single-hash `Integrity` instance, or a
-`Hash` instance. Returns its `digest`, converted to a hex representation of the
-base64 data.
-
-##### Example
-
-```javascript
-ssri.parse('sha1-deadbeef').hexDigest() // '75e69d6de79f'
-```
-
-#### <a name="from-hex"></a> `> ssri.fromHex(hexDigest, algorithm, [opts]) -> Integrity`
-
-Creates an `Integrity` object with a single entry, based on a hex-formatted
-hash. This is a utility function to help convert existing shasums to the
-Integrity format, and is roughly equivalent to something like:
-
-```javascript
-algorithm + '-' + Buffer.from(hexDigest, 'hex').toString('base64')
-```
-
-`opts.options` may optionally be passed in: it must be an array of option
-strings that will be added to all generated integrity hashes generated by
-`fromData`. This is a loosely-specified feature of SRIs, and currently has no
-specified semantics besides being `?`-separated. Use at your own risk, and
-probably avoid if your integrity strings are meant to be used with browsers.
-
-If `opts.strict` is true, the integrity object will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-If `opts.single` is true, a single `Hash` object will be returned.
-
-##### Example
-
-```javascript
-ssri.fromHex('75e69d6de79f', 'sha1').toString() // 'sha1-deadbeef'
-```
-
-#### <a name="from-data"></a> `> ssri.fromData(data, [opts]) -> Integrity`
-
-Creates an `Integrity` object from either string or `Buffer` data, calculating
-all the requested hashes and adding any specified options to the object.
-
-`opts.algorithms` determines which algorithms to generate hashes for. All
-results will be included in a single `Integrity` object. The default value for
-`opts.algorithms` is `['sha512']`. All algorithm strings must be hashes listed
-in `crypto.getHashes()` for the host Node.js platform.
-
-`opts.options` may optionally be passed in: it must be an array of option
-strings that will be added to all generated integrity hashes generated by
-`fromData`. This is a loosely-specified feature of SRIs, and currently has no
-specified semantics besides being `?`-separated. Use at your own risk, and
-probably avoid if your integrity strings are meant to be used with browsers.
-
-If `opts.strict` is true, the integrity object will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-const integrityObj = ssri.fromData('foobarbaz', {
- algorithms: ['sha256', 'sha384', 'sha512']
-})
-integrity.toString('\n')
-// ->
-// sha256-l981iLWj8kurw4UbNy8Lpxqdzd7UOxS50Glhv8FwfZ0=
-// sha384-irnCxQ0CfQhYGlVAUdwTPC9bF3+YWLxlaDGM4xbYminxpbXEq+D+2GCEBTxcjES9
-// sha512-yzd8ELD1piyANiWnmdnpCL5F52f10UfUdEkHywVZeqTt0ymgrxR63Qz0GB7TKPoeeZQmWCaz7T1+9vBnypkYWg==
-```
-
-#### <a name="from-stream"></a> `> ssri.fromStream(stream, [opts]) -> Promise<Integrity>`
-
-Returns a Promise of an Integrity object calculated by reading data from
-a given `stream`.
-
-It accepts both `opts.algorithms` and `opts.options`, which are documented as
-part of [`ssri.fromData`](#from-data).
-
-Additionally, `opts.Promise` may be passed in to inject a Promise library of
-choice. By default, ssri will use Node's built-in Promises.
-
-If `opts.strict` is true, the integrity object will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-ssri.fromStream(fs.createReadStream('index.js'), {
- algorithms: ['sha1', 'sha512']
-}).then(integrity => {
- return ssri.checkStream(fs.createReadStream('index.js'), integrity)
-}) // succeeds
-```
-
-#### <a name="create"></a> `> ssri.create([opts]) -> <Hash>`
-
-Returns a Hash object with `update(<Buffer or string>[,enc])` and `digest()` methods.
-
-
-The Hash object provides the same methods as [crypto class Hash](https://nodejs.org/dist/latest-v6.x/docs/api/crypto.html#crypto_class_hash).
-`digest()` accepts no arguments and returns an Integrity object calculated by reading data from
-calls to update.
-
-It accepts both `opts.algorithms` and `opts.options`, which are documented as
-part of [`ssri.fromData`](#from-data).
-
-If `opts.strict` is true, the integrity object will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-const integrity = ssri.create().update('foobarbaz').digest()
-integrity.toString()
-// ->
-// sha512-yzd8ELD1piyANiWnmdnpCL5F52f10UfUdEkHywVZeqTt0ymgrxR63Qz0GB7TKPoeeZQmWCaz7T1+9vBnypkYWg==
-```
-
-#### <a name="check-data"></a> `> ssri.checkData(data, sri, [opts]) -> Hash|false`
-
-Verifies `data` integrity against an `sri` argument. `data` may be either a
-`String` or a `Buffer`, and `sri` can be any subresource integrity
-representation that [`ssri.parse`](#parse) can handle.
-
-If verification succeeds, `checkData` will return the name of the algorithm that
-was used for verification (a truthy value). Otherwise, it will return `false`.
-
-If `opts.pickAlgorithm` is provided, it will be used by
-[`Integrity#pickAlgorithm`](#integrity-pick-algorithm) when deciding which of
-the available digests to match against.
-
-If `opts.error` is true, and verification fails, `checkData` will throw either
-an `EBADSIZE` or an `EINTEGRITY` error, instead of just returning false.
-
-##### Example
-
-```javascript
-const data = fs.readFileSync('index.js')
-ssri.checkData(data, ssri.fromData(data)) // -> 'sha512'
-ssri.checkData(data, 'sha256-l981iLWj8kurw4UbNy8Lpxqdzd7UOxS50Glhv8FwfZ0')
-ssri.checkData(data, 'sha1-BaDDigEST') // -> false
-ssri.checkData(data, 'sha1-BaDDigEST', {error: true}) // -> Error! EINTEGRITY
-```
-
-#### <a name="check-stream"></a> `> ssri.checkStream(stream, sri, [opts]) -> Promise<Hash>`
-
-Verifies the contents of `stream` against an `sri` argument. `stream` will be
-consumed in its entirety by this process. `sri` can be any subresource integrity
-representation that [`ssri.parse`](#parse) can handle.
-
-`checkStream` will return a Promise that either resolves to the
-`Hash` that succeeded verification, or, if the verification fails
-or an error happens with `stream`, the Promise will be rejected.
-
-If the Promise is rejected because verification failed, the returned error will
-have `err.code` as `EINTEGRITY`.
-
-If `opts.size` is given, it will be matched against the stream size. An error
-with `err.code` `EBADSIZE` will be returned by a rejection if the expected size
-and actual size fail to match.
-
-If `opts.pickAlgorithm` is provided, it will be used by
-[`Integrity#pickAlgorithm`](#integrity-pick-algorithm) when deciding which of
-the available digests to match against.
-
-##### Example
-
-```javascript
-const integrity = ssri.fromData(fs.readFileSync('index.js'))
-
-ssri.checkStream(
- fs.createReadStream('index.js'),
- integrity
-)
-// ->
-// Promise<{
-// algorithm: 'sha512',
-// digest: 'sha512-yzd8ELD1piyANiWnmdnpCL5F52f10UfUdEkHywVZeqTt0ymgrxR63Qz0GB7TKPoeeZQmWCaz7T1'
-// }>
-
-ssri.checkStream(
- fs.createReadStream('index.js'),
- 'sha256-l981iLWj8kurw4UbNy8Lpxqdzd7UOxS50Glhv8FwfZ0'
-) // -> Promise<Hash>
-
-ssri.checkStream(
- fs.createReadStream('index.js'),
- 'sha1-BaDDigEST'
-) // -> Promise<Error<{code: 'EINTEGRITY'}>>
-```
-
-#### <a name="integrity-stream"></a> `> integrityStream([opts]) -> IntegrityStream`
-
-Returns a `Transform` stream that data can be piped through in order to generate
-and optionally check data integrity for piped data. When the stream completes
-successfully, it emits `size` and `integrity` events, containing the total
-number of bytes processed and a calculated `Integrity` instance based on stream
-data, respectively.
-
-If `opts.algorithms` is passed in, the listed algorithms will be calculated when
-generating the final `Integrity` instance. The default is `['sha512']`.
-
-If `opts.single` is passed in, a single `Hash` instance will be returned.
-
-If `opts.integrity` is passed in, it should be an `integrity` value understood
-by [`parse`](#parse) that the stream will check the data against. If
-verification succeeds, the integrity stream will emit a `verified` event whose
-value is a single `Hash` object that is the one that succeeded verification. If
-verification fails, the stream will error with an `EINTEGRITY` error code.
-
-If `opts.size` is given, it will be matched against the stream size. An error
-with `err.code` `EBADSIZE` will be emitted by the stream if the expected size
-and actual size fail to match.
-
-If `opts.pickAlgorithm` is provided, it will be passed two algorithms as
-arguments. ssri will prioritize whichever of the two algorithms is returned by
-this function. Note that the function may be called multiple times, and it
-**must** return one of the two algorithms provided. By default, ssri will make
-a best-effort to pick the strongest/most reliable of the given algorithms. It
-may intentionally deprioritize algorithms with known vulnerabilities.
-
-##### Example
-
-```javascript
-const integrity = ssri.fromData(fs.readFileSync('index.js'))
-fs.createReadStream('index.js')
-.pipe(ssri.integrityStream({integrity}))
-```
diff --git a/deps/npm/node_modules/npm-profile/node_modules/ssri/index.js b/deps/npm/node_modules/npm-profile/node_modules/ssri/index.js
deleted file mode 100644
index ff7881f7cb..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/ssri/index.js
+++ /dev/null
@@ -1,379 +0,0 @@
-'use strict'
-
-const Buffer = require('safe-buffer').Buffer
-
-const crypto = require('crypto')
-const Transform = require('stream').Transform
-
-const SPEC_ALGORITHMS = ['sha256', 'sha384', 'sha512']
-
-const BASE64_REGEX = /^[a-z0-9+/]+(?:=?=?)$/i
-const SRI_REGEX = /^([^-]+)-([^?]+)([?\S*]*)$/
-const STRICT_SRI_REGEX = /^([^-]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)*$/
-const VCHAR_REGEX = /^[\x21-\x7E]+$/
-
-class Hash {
- get isHash () { return true }
- constructor (hash, opts) {
- const strict = !!(opts && opts.strict)
- this.source = hash.trim()
- // 3.1. Integrity metadata (called "Hash" by ssri)
- // https://w3c.github.io/webappsec-subresource-integrity/#integrity-metadata-description
- const match = this.source.match(
- strict
- ? STRICT_SRI_REGEX
- : SRI_REGEX
- )
- if (!match) { return }
- if (strict && !SPEC_ALGORITHMS.some(a => a === match[1])) { return }
- this.algorithm = match[1]
- this.digest = match[2]
-
- const rawOpts = match[3]
- this.options = rawOpts ? rawOpts.slice(1).split('?') : []
- }
- hexDigest () {
- return this.digest && Buffer.from(this.digest, 'base64').toString('hex')
- }
- toJSON () {
- return this.toString()
- }
- toString (opts) {
- if (opts && opts.strict) {
- // Strict mode enforces the standard as close to the foot of the
- // letter as it can.
- if (!(
- // The spec has very restricted productions for algorithms.
- // https://www.w3.org/TR/CSP2/#source-list-syntax
- SPEC_ALGORITHMS.some(x => x === this.algorithm) &&
- // Usually, if someone insists on using a "different" base64, we
- // leave it as-is, since there's multiple standards, and the
- // specified is not a URL-safe variant.
- // https://www.w3.org/TR/CSP2/#base64_value
- this.digest.match(BASE64_REGEX) &&
- // Option syntax is strictly visual chars.
- // https://w3c.github.io/webappsec-subresource-integrity/#grammardef-option-expression
- // https://tools.ietf.org/html/rfc5234#appendix-B.1
- (this.options || []).every(opt => opt.match(VCHAR_REGEX))
- )) {
- return ''
- }
- }
- const options = this.options && this.options.length
- ? `?${this.options.join('?')}`
- : ''
- return `${this.algorithm}-${this.digest}${options}`
- }
-}
-
-class Integrity {
- get isIntegrity () { return true }
- toJSON () {
- return this.toString()
- }
- toString (opts) {
- opts = opts || {}
- let sep = opts.sep || ' '
- if (opts.strict) {
- // Entries must be separated by whitespace, according to spec.
- sep = sep.replace(/\S+/g, ' ')
- }
- return Object.keys(this).map(k => {
- return this[k].map(hash => {
- return Hash.prototype.toString.call(hash, opts)
- }).filter(x => x.length).join(sep)
- }).filter(x => x.length).join(sep)
- }
- concat (integrity, opts) {
- const other = typeof integrity === 'string'
- ? integrity
- : stringify(integrity, opts)
- return parse(`${this.toString(opts)} ${other}`, opts)
- }
- hexDigest () {
- return parse(this, {single: true}).hexDigest()
- }
- match (integrity, opts) {
- const other = parse(integrity, opts)
- const algo = other.pickAlgorithm(opts)
- return (
- this[algo] &&
- other[algo] &&
- this[algo].find(hash =>
- other[algo].find(otherhash =>
- hash.digest === otherhash.digest
- )
- )
- ) || false
- }
- pickAlgorithm (opts) {
- const pickAlgorithm = (opts && opts.pickAlgorithm) || getPrioritizedHash
- const keys = Object.keys(this)
- if (!keys.length) {
- throw new Error(`No algorithms available for ${
- JSON.stringify(this.toString())
- }`)
- }
- return keys.reduce((acc, algo) => {
- return pickAlgorithm(acc, algo) || acc
- })
- }
-}
-
-module.exports.parse = parse
-function parse (sri, opts) {
- opts = opts || {}
- if (typeof sri === 'string') {
- return _parse(sri, opts)
- } else if (sri.algorithm && sri.digest) {
- const fullSri = new Integrity()
- fullSri[sri.algorithm] = [sri]
- return _parse(stringify(fullSri, opts), opts)
- } else {
- return _parse(stringify(sri, opts), opts)
- }
-}
-
-function _parse (integrity, opts) {
- // 3.4.3. Parse metadata
- // https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata
- if (opts.single) {
- return new Hash(integrity, opts)
- }
- return integrity.trim().split(/\s+/).reduce((acc, string) => {
- const hash = new Hash(string, opts)
- if (hash.algorithm && hash.digest) {
- const algo = hash.algorithm
- if (!acc[algo]) { acc[algo] = [] }
- acc[algo].push(hash)
- }
- return acc
- }, new Integrity())
-}
-
-module.exports.stringify = stringify
-function stringify (obj, opts) {
- if (obj.algorithm && obj.digest) {
- return Hash.prototype.toString.call(obj, opts)
- } else if (typeof obj === 'string') {
- return stringify(parse(obj, opts), opts)
- } else {
- return Integrity.prototype.toString.call(obj, opts)
- }
-}
-
-module.exports.fromHex = fromHex
-function fromHex (hexDigest, algorithm, opts) {
- const optString = (opts && opts.options && opts.options.length)
- ? `?${opts.options.join('?')}`
- : ''
- return parse(
- `${algorithm}-${
- Buffer.from(hexDigest, 'hex').toString('base64')
- }${optString}`, opts
- )
-}
-
-module.exports.fromData = fromData
-function fromData (data, opts) {
- opts = opts || {}
- const algorithms = opts.algorithms || ['sha512']
- const optString = opts.options && opts.options.length
- ? `?${opts.options.join('?')}`
- : ''
- return algorithms.reduce((acc, algo) => {
- const digest = crypto.createHash(algo).update(data).digest('base64')
- const hash = new Hash(
- `${algo}-${digest}${optString}`,
- opts
- )
- if (hash.algorithm && hash.digest) {
- const algo = hash.algorithm
- if (!acc[algo]) { acc[algo] = [] }
- acc[algo].push(hash)
- }
- return acc
- }, new Integrity())
-}
-
-module.exports.fromStream = fromStream
-function fromStream (stream, opts) {
- opts = opts || {}
- const P = opts.Promise || Promise
- const istream = integrityStream(opts)
- return new P((resolve, reject) => {
- stream.pipe(istream)
- stream.on('error', reject)
- istream.on('error', reject)
- let sri
- istream.on('integrity', s => { sri = s })
- istream.on('end', () => resolve(sri))
- istream.on('data', () => {})
- })
-}
-
-module.exports.checkData = checkData
-function checkData (data, sri, opts) {
- opts = opts || {}
- sri = parse(sri, opts)
- if (!Object.keys(sri).length) {
- if (opts.error) {
- throw Object.assign(
- new Error('No valid integrity hashes to check against'), {
- code: 'EINTEGRITY'
- }
- )
- } else {
- return false
- }
- }
- const algorithm = sri.pickAlgorithm(opts)
- const digest = crypto.createHash(algorithm).update(data).digest('base64')
- const newSri = parse({algorithm, digest})
- const match = newSri.match(sri, opts)
- if (match || !opts.error) {
- return match
- } else if (typeof opts.size === 'number' && (data.length !== opts.size)) {
- const err = new Error(`data size mismatch when checking ${sri}.\n Wanted: ${opts.size}\n Found: ${data.length}`)
- err.code = 'EBADSIZE'
- err.found = data.length
- err.expected = opts.size
- err.sri = sri
- throw err
- } else {
- const err = new Error(`Integrity checksum failed when using ${algorithm}: Wanted ${sri}, but got ${newSri}. (${data.length} bytes)`)
- err.code = 'EINTEGRITY'
- err.found = newSri
- err.expected = sri
- err.algorithm = algorithm
- err.sri = sri
- throw err
- }
-}
-
-module.exports.checkStream = checkStream
-function checkStream (stream, sri, opts) {
- opts = opts || {}
- const P = opts.Promise || Promise
- const checker = integrityStream(Object.assign({}, opts, {
- integrity: sri
- }))
- return new P((resolve, reject) => {
- stream.pipe(checker)
- stream.on('error', reject)
- checker.on('error', reject)
- let sri
- checker.on('verified', s => { sri = s })
- checker.on('end', () => resolve(sri))
- checker.on('data', () => {})
- })
-}
-
-module.exports.integrityStream = integrityStream
-function integrityStream (opts) {
- opts = opts || {}
- // For verification
- const sri = opts.integrity && parse(opts.integrity, opts)
- const goodSri = sri && Object.keys(sri).length
- const algorithm = goodSri && sri.pickAlgorithm(opts)
- const digests = goodSri && sri[algorithm]
- // Calculating stream
- const algorithms = Array.from(
- new Set(
- (opts.algorithms || ['sha512'])
- .concat(algorithm ? [algorithm] : [])
- )
- )
- const hashes = algorithms.map(crypto.createHash)
- let streamSize = 0
- const stream = new Transform({
- transform (chunk, enc, cb) {
- streamSize += chunk.length
- hashes.forEach(h => h.update(chunk, enc))
- cb(null, chunk, enc)
- }
- }).on('end', () => {
- const optString = (opts.options && opts.options.length)
- ? `?${opts.options.join('?')}`
- : ''
- const newSri = parse(hashes.map((h, i) => {
- return `${algorithms[i]}-${h.digest('base64')}${optString}`
- }).join(' '), opts)
- // Integrity verification mode
- const match = goodSri && newSri.match(sri, opts)
- if (typeof opts.size === 'number' && streamSize !== opts.size) {
- const err = new Error(`stream size mismatch when checking ${sri}.\n Wanted: ${opts.size}\n Found: ${streamSize}`)
- err.code = 'EBADSIZE'
- err.found = streamSize
- err.expected = opts.size
- err.sri = sri
- stream.emit('error', err)
- } else if (opts.integrity && !match) {
- const err = new Error(`${sri} integrity checksum failed when using ${algorithm}: wanted ${digests} but got ${newSri}. (${streamSize} bytes)`)
- err.code = 'EINTEGRITY'
- err.found = newSri
- err.expected = digests
- err.algorithm = algorithm
- err.sri = sri
- stream.emit('error', err)
- } else {
- stream.emit('size', streamSize)
- stream.emit('integrity', newSri)
- match && stream.emit('verified', match)
- }
- })
- return stream
-}
-
-module.exports.create = createIntegrity
-function createIntegrity (opts) {
- opts = opts || {}
- const algorithms = opts.algorithms || ['sha512']
- const optString = opts.options && opts.options.length
- ? `?${opts.options.join('?')}`
- : ''
-
- const hashes = algorithms.map(crypto.createHash)
-
- return {
- update: function (chunk, enc) {
- hashes.forEach(h => h.update(chunk, enc))
- return this
- },
- digest: function (enc) {
- const integrity = algorithms.reduce((acc, algo) => {
- const digest = hashes.shift().digest('base64')
- const hash = new Hash(
- `${algo}-${digest}${optString}`,
- opts
- )
- if (hash.algorithm && hash.digest) {
- const algo = hash.algorithm
- if (!acc[algo]) { acc[algo] = [] }
- acc[algo].push(hash)
- }
- return acc
- }, new Integrity())
-
- return integrity
- }
- }
-}
-
-const NODE_HASHES = new Set(crypto.getHashes())
-
-// This is a Best Effort™ at a reasonable priority for hash algos
-const DEFAULT_PRIORITY = [
- 'md5', 'whirlpool', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512',
- // TODO - it's unclear _which_ of these Node will actually use as its name
- // for the algorithm, so we guesswork it based on the OpenSSL names.
- 'sha3',
- 'sha3-256', 'sha3-384', 'sha3-512',
- 'sha3_256', 'sha3_384', 'sha3_512'
-].filter(algo => NODE_HASHES.has(algo))
-
-function getPrioritizedHash (algo1, algo2) {
- return DEFAULT_PRIORITY.indexOf(algo1.toLowerCase()) >= DEFAULT_PRIORITY.indexOf(algo2.toLowerCase())
- ? algo1
- : algo2
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/ssri/package.json b/deps/npm/node_modules/npm-profile/node_modules/ssri/package.json
deleted file mode 100644
index 2de76dcbeb..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/ssri/package.json
+++ /dev/null
@@ -1,90 +0,0 @@
-{
- "_from": "ssri@^5.0.0",
- "_id": "ssri@5.3.0",
- "_inBundle": false,
- "_integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==",
- "_location": "/npm-profile/ssri",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "ssri@^5.0.0",
- "name": "ssri",
- "escapedName": "ssri",
- "rawSpec": "^5.0.0",
- "saveSpec": null,
- "fetchSpec": "^5.0.0"
- },
- "_requiredBy": [
- "/npm-profile/cacache",
- "/npm-profile/make-fetch-happen"
- ],
- "_resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz",
- "_shasum": "ba3872c9c6d33a0704a7d71ff045e5ec48999d06",
- "_spec": "ssri@^5.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen",
- "author": {
- "name": "Kat Marchán",
- "email": "kzm@sykosomatic.org"
- },
- "bugs": {
- "url": "https://github.com/zkat/ssri/issues"
- },
- "bundleDependencies": false,
- "config": {
- "nyc": {
- "exclude": [
- "node_modules/**",
- "test/**"
- ]
- }
- },
- "dependencies": {
- "safe-buffer": "^5.1.1"
- },
- "deprecated": false,
- "description": "Standard Subresource Integrity library -- parses, serializes, generates, and verifies integrity metadata according to the SRI spec.",
- "devDependencies": {
- "nyc": "^11.4.1",
- "standard": "^10.0.3",
- "standard-version": "^4.3.0",
- "tap": "^11.1.0",
- "weallbehave": "^1.2.0",
- "weallcontribute": "^1.0.8"
- },
- "files": [
- "*.js"
- ],
- "homepage": "https://github.com/zkat/ssri#readme",
- "keywords": [
- "w3c",
- "web",
- "security",
- "integrity",
- "checksum",
- "hashing",
- "subresource integrity",
- "sri",
- "sri hash",
- "sri string",
- "sri generator",
- "html"
- ],
- "license": "ISC",
- "main": "index.js",
- "name": "ssri",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/zkat/ssri.git"
- },
- "scripts": {
- "postrelease": "npm publish && git push --follow-tags",
- "prerelease": "npm t",
- "pretest": "standard",
- "release": "standard-version -s",
- "test": "tap -J --coverage test/*.js",
- "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
- "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
- },
- "version": "5.3.0"
-}
diff --git a/deps/npm/node_modules/npm-profile/package.json b/deps/npm/node_modules/npm-profile/package.json
index d3ed888138..d158b71863 100644
--- a/deps/npm/node_modules/npm-profile/package.json
+++ b/deps/npm/node_modules/npm-profile/package.json
@@ -1,62 +1,27 @@
{
- "_args": [
- [
- "npm-profile@3.0.1",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "npm-profile@3.0.1",
- "_id": "npm-profile@3.0.1",
+ "_from": "npm-profile@3.0.2",
+ "_id": "npm-profile@3.0.2",
"_inBundle": false,
- "_integrity": "sha512-U/jvnERvBRYgIdHkPURsa8mjLCOiImdA8fw1FzzCF//PKro4w1QANCmXiQex8f/Id1h939lqOiUT+ywKL0AG4Q==",
+ "_integrity": "sha512-rEJOFR6PbwOvvhGa2YTNOJQKNuc6RovJ6T50xPU7pS9h/zKPNCJ+VHZY2OFXyZvEi+UQYtHRTp8O/YM3tUD20A==",
"_location": "/npm-profile",
- "_phantomChildren": {
- "agent-base": "4.2.0",
- "agentkeepalive": "3.4.1",
- "bluebird": "3.5.1",
- "chownr": "1.0.1",
- "concat-stream": "1.6.2",
- "duplexify": "3.6.0",
- "end-of-stream": "1.4.1",
- "flush-write-stream": "1.0.3",
- "from2": "2.3.0",
- "glob": "7.1.2",
- "graceful-fs": "4.1.11",
- "http-cache-semantics": "3.8.1",
- "http-proxy-agent": "2.1.0",
- "https-proxy-agent": "2.2.1",
- "ip": "1.1.5",
- "lru-cache": "4.1.3",
- "mkdirp": "0.5.1",
- "move-concurrently": "1.0.1",
- "node-fetch-npm": "2.0.2",
- "once": "1.4.0",
- "parallel-transform": "1.1.0",
- "promise-inflight": "1.0.1",
- "promise-retry": "1.1.1",
- "pumpify": "1.5.1",
- "rimraf": "2.6.2",
- "safe-buffer": "5.1.2",
- "stream-each": "1.2.2",
- "through2": "2.0.3",
- "unique-filename": "1.1.0",
- "y18n": "4.0.0"
- },
+ "_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "npm-profile@3.0.1",
+ "raw": "npm-profile@3.0.2",
"name": "npm-profile",
"escapedName": "npm-profile",
- "rawSpec": "3.0.1",
+ "rawSpec": "3.0.2",
"saveSpec": null,
- "fetchSpec": "3.0.1"
+ "fetchSpec": "3.0.2"
},
"_requiredBy": [
+ "#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/npm-profile/-/npm-profile-3.0.1.tgz",
- "_spec": "3.0.1",
+ "_resolved": "https://registry.npmjs.org/npm-profile/-/npm-profile-3.0.2.tgz",
+ "_shasum": "58d568f1b56ef769602fd0aed8c43fa0e0de0f57",
+ "_spec": "npm-profile@3.0.2",
"_where": "/Users/rebecca/code/npm",
"author": {
"name": "Rebecca Turner",
@@ -66,10 +31,12 @@
"bugs": {
"url": "https://github.com/npm/npm-profile/issues"
},
+ "bundleDependencies": false,
"dependencies": {
- "aproba": "^1.1.2",
- "make-fetch-happen": "^2.5.0"
+ "aproba": "^1.1.2 || 2",
+ "make-fetch-happen": "^2.5.0 || 3 || 4"
},
+ "deprecated": false,
"description": "Library for updating an npmjs.com profile",
"files": [
"CHANGELOG.md",
@@ -84,5 +51,5 @@
"type": "git",
"url": "git+https://github.com/npm/npm-profile.git"
},
- "version": "3.0.1"
+ "version": "3.0.2"
}
diff --git a/deps/npm/node_modules/performance-now/.travis.yml b/deps/npm/node_modules/performance-now/.travis.yml
index 1543c1990e..2ca91f2895 100644
--- a/deps/npm/node_modules/performance-now/.travis.yml
+++ b/deps/npm/node_modules/performance-now/.travis.yml
@@ -1,6 +1,4 @@
language: node_js
node_js:
- - "node"
- - "6"
- - "4"
- - "0.12"
+ - "0.10"
+ - "0.8" \ No newline at end of file
diff --git a/deps/npm/node_modules/performance-now/Makefile b/deps/npm/node_modules/performance-now/Makefile
new file mode 100644
index 0000000000..e57557e346
--- /dev/null
+++ b/deps/npm/node_modules/performance-now/Makefile
@@ -0,0 +1,25 @@
+build:
+ mkdir -p lib
+ rm -rf lib/*
+ node_modules/.bin/coffee --compile --output lib/ src/
+
+watch:
+ node_modules/.bin/coffee --watch --compile --output lib/ src/
+
+test:
+ node_modules/.bin/mocha
+
+jumpstart:
+ curl -u 'meryn' https://api.github.com/user/repos -d '{"name":"performance-now", "description":"Implements performance.now (based on process.hrtime).","private":false}'
+ mkdir -p src
+ touch src/performance-now.coffee
+ mkdir -p test
+ touch test/performance-now.coffee
+ npm install
+ git init
+ git remote add origin git@github.com:meryn/performance-now
+ git add .
+ git commit -m "jumpstart commit."
+ git push -u origin master
+
+.PHONY: test \ No newline at end of file
diff --git a/deps/npm/node_modules/performance-now/README.md b/deps/npm/node_modules/performance-now/README.md
index 28080f856a..a8f84ad7d6 100644
--- a/deps/npm/node_modules/performance-now/README.md
+++ b/deps/npm/node_modules/performance-now/README.md
@@ -1,16 +1,12 @@
-# performance-now [![Build Status](https://travis-ci.org/braveg1rl/performance-now.png?branch=master)](https://travis-ci.org/braveg1rl/performance-now) [![Dependency Status](https://david-dm.org/braveg1rl/performance-now.png)](https://david-dm.org/braveg1rl/performance-now)
+# performance-now [![Build Status](https://travis-ci.org/meryn/performance-now.png?branch=master)](https://travis-ci.org/meryn/performance-now) [![Dependency Status](https://david-dm.org/meryn/performance-now.png)](https://david-dm.org/meryn/performance-now)
Implements a function similar to `performance.now` (based on `process.hrtime`).
-Modern browsers have a `window.performance` object with - among others - a `now` method which gives time in milliseconds, but with sub-millisecond precision. This module offers the same function based on the Node.js native `process.hrtime` function.
+Modern browsers have a `window.performance` object with - among others - a `now` method which gives time in miliseconds, but with sub-milisecond precision. This module offers the same function based on the Node.js native `process.hrtime` function.
-Using `process.hrtime` means that the reported time will be monotonically increasing, and not subject to clock-drift.
-
-According to the [High Resolution Time specification](http://www.w3.org/TR/hr-time/), the number of milliseconds reported by `performance.now` should be relative to the value of `performance.timing.navigationStart`.
-
-In the current version of the module (2.0) the reported time is relative to the time the current Node process has started (inferred from `process.uptime()`).
+According to the [High Resolution Time specification](http://www.w3.org/TR/hr-time/), the number of miliseconds reported by `performance.now` should be relative to the value of `performance.timing.navigationStart`. For this module, it's relative to when the time when this module got loaded. Right after requiring this module for the first time, the reported time is expected to have a near-zero value.
-Version 1.0 reported a different time. The reported time was relative to the time the module was loaded (i.e. the time it was first `require`d). If you need this functionality, version 1.0 is still available on NPM.
+Using `process.hrtime` means that the reported time will be monotonically increasing, and not subject to clock-drift.
## Example usage
@@ -18,13 +14,17 @@ Version 1.0 reported a different time. The reported time was relative to the tim
var now = require("performance-now")
var start = now()
var end = now()
-console.log(start.toFixed(3)) // the number of milliseconds the current node process is running
+console.log(start.toFixed(3)) // ~ 0.05 on my system
console.log((start-end).toFixed(3)) // ~ 0.002 on my system
```
Running the now function two times right after each other yields a time difference of a few microseconds. Given this overhead, I think it's best to assume that the precision of intervals computed with this method is not higher than 10 microseconds, if you don't know the exact overhead on your own system.
+## Credits
+
+The initial structure of this module was generated by [Jumpstart](https://github.com/meryn/jumpstart), using the [Jumpstart Black Coffee](https://github.com/meryn/jumpstart-black-coffee) template.
+
## License
performance-now is released under the [MIT License](http://opensource.org/licenses/MIT).
-Copyright (c) 2017 Braveg1rl
+Copyright (c) 2013 Meryn Stol \ No newline at end of file
diff --git a/deps/npm/node_modules/performance-now/lib/performance-now.js b/deps/npm/node_modules/performance-now/lib/performance-now.js
index 37f569da1e..e95d6a821b 100644
--- a/deps/npm/node_modules/performance-now/lib/performance-now.js
+++ b/deps/npm/node_modules/performance-now/lib/performance-now.js
@@ -1,6 +1,6 @@
-// Generated by CoffeeScript 1.12.2
+// Generated by CoffeeScript 1.7.1
(function() {
- var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;
+ var getNanoSeconds, hrtime, loadTime;
if ((typeof performance !== "undefined" && performance !== null) && performance.now) {
module.exports = function() {
@@ -8,7 +8,7 @@
};
} else if ((typeof process !== "undefined" && process !== null) && process.hrtime) {
module.exports = function() {
- return (getNanoSeconds() - nodeLoadTime) / 1e6;
+ return (getNanoSeconds() - loadTime) / 1e6;
};
hrtime = process.hrtime;
getNanoSeconds = function() {
@@ -16,9 +16,7 @@
hr = hrtime();
return hr[0] * 1e9 + hr[1];
};
- moduleLoadTime = getNanoSeconds();
- upTime = process.uptime() * 1e9;
- nodeLoadTime = moduleLoadTime - upTime;
+ loadTime = getNanoSeconds();
} else if (Date.now) {
module.exports = function() {
return Date.now() - loadTime;
@@ -32,5 +30,3 @@
}
}).call(this);
-
-//# sourceMappingURL=performance-now.js.map
diff --git a/deps/npm/node_modules/performance-now/lib/performance-now.js.map b/deps/npm/node_modules/performance-now/lib/performance-now.js.map
deleted file mode 100644
index bef83626d8..0000000000
--- a/deps/npm/node_modules/performance-now/lib/performance-now.js.map
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "version": 3,
- "file": "performance-now.js",
- "sourceRoot": "..",
- "sources": [
- "src/performance-now.coffee"
- ],
- "names": [],
- "mappings": ";AAAA;AAAA,MAAA;;EAAA,IAAG,4DAAA,IAAiB,WAAW,CAAC,GAAhC;IACE,MAAM,CAAC,OAAP,GAAiB,SAAA;aAAG,WAAW,CAAC,GAAZ,CAAA;IAAH,EADnB;GAAA,MAEK,IAAG,oDAAA,IAAa,OAAO,CAAC,MAAxB;IACH,MAAM,CAAC,OAAP,GAAiB,SAAA;aAAG,CAAC,cAAA,CAAA,CAAA,GAAmB,YAApB,CAAA,GAAoC;IAAvC;IACjB,MAAA,GAAS,OAAO,CAAC;IACjB,cAAA,GAAiB,SAAA;AACf,UAAA;MAAA,EAAA,GAAK,MAAA,CAAA;aACL,EAAG,CAAA,CAAA,CAAH,GAAQ,GAAR,GAAc,EAAG,CAAA,CAAA;IAFF;IAGjB,cAAA,GAAiB,cAAA,CAAA;IACjB,MAAA,GAAS,OAAO,CAAC,MAAR,CAAA,CAAA,GAAmB;IAC5B,YAAA,GAAe,cAAA,GAAiB,OAR7B;GAAA,MASA,IAAG,IAAI,CAAC,GAAR;IACH,MAAM,CAAC,OAAP,GAAiB,SAAA;aAAG,IAAI,CAAC,GAAL,CAAA,CAAA,GAAa;IAAhB;IACjB,QAAA,GAAW,IAAI,CAAC,GAAL,CAAA,EAFR;GAAA,MAAA;IAIH,MAAM,CAAC,OAAP,GAAiB,SAAA;aAAO,IAAA,IAAA,CAAA,CAAM,CAAC,OAAP,CAAA,CAAJ,GAAuB;IAA1B;IACjB,QAAA,GAAe,IAAA,IAAA,CAAA,CAAM,CAAC,OAAP,CAAA,EALZ;;AAXL"
-} \ No newline at end of file
diff --git a/deps/npm/node_modules/performance-now/license.txt b/deps/npm/node_modules/performance-now/license.txt
index 0bf51b460f..d4facc3039 100644
--- a/deps/npm/node_modules/performance-now/license.txt
+++ b/deps/npm/node_modules/performance-now/license.txt
@@ -1,4 +1,4 @@
-Copyright (c) 2013 Braveg1rl
+Copyright (c) 2013 Meryn Stol
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:
diff --git a/deps/npm/node_modules/performance-now/package.json b/deps/npm/node_modules/performance-now/package.json
index ef3c7d69e4..66aa0df451 100644
--- a/deps/npm/node_modules/performance-now/package.json
+++ b/deps/npm/node_modules/performance-now/package.json
@@ -1,48 +1,43 @@
{
- "_from": "performance-now@^2.1.0",
- "_id": "performance-now@2.1.0",
+ "_from": "performance-now@^0.2.0",
+ "_id": "performance-now@0.2.0",
"_inBundle": false,
- "_integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
+ "_integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=",
"_location": "/performance-now",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "performance-now@^2.1.0",
+ "raw": "performance-now@^0.2.0",
"name": "performance-now",
"escapedName": "performance-now",
- "rawSpec": "^2.1.0",
+ "rawSpec": "^0.2.0",
"saveSpec": null,
- "fetchSpec": "^2.1.0"
+ "fetchSpec": "^0.2.0"
},
"_requiredBy": [
"/request"
],
- "_resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
- "_shasum": "6309f4e0e5fa913ec1c69307ae364b4b377c9e7b",
- "_spec": "performance-now@^2.1.0",
- "_where": "/Users/rebecca/code/npm/node_modules/request",
+ "_resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz",
+ "_shasum": "33ef30c5c77d4ea21c5a53869d91b56d8f2555e5",
+ "_spec": "performance-now@^0.2.0",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/request",
"author": {
- "name": "Braveg1rl",
- "email": "braveg1rl@outlook.com"
+ "name": "Meryn Stol",
+ "email": "merynstol@gmail.com"
},
"bugs": {
- "url": "https://github.com/braveg1rl/performance-now/issues"
+ "url": "https://github.com/meryn/performance-now/issues"
},
"bundleDependencies": false,
"dependencies": {},
"deprecated": false,
"description": "Implements performance.now (based on process.hrtime).",
"devDependencies": {
- "bluebird": "^3.4.7",
- "call-delayed": "^1.0.0",
- "chai": "^3.5.0",
- "chai-increasing": "^1.2.0",
- "coffee-script": "~1.12.2",
- "mocha": "~3.2.0",
- "pre-commit": "^1.2.2"
+ "coffee-script": "~1.7.1",
+ "mocha": "~1.21.0"
},
- "homepage": "https://github.com/braveg1rl/performance-now",
+ "homepage": "https://github.com/meryn/performance-now",
"keywords": [],
"license": "MIT",
"main": "lib/performance-now.js",
@@ -51,15 +46,12 @@
"private": false,
"repository": {
"type": "git",
- "url": "git://github.com/braveg1rl/performance-now.git"
+ "url": "git://github.com/meryn/performance-now.git"
},
"scripts": {
- "build": "mkdir -p lib && rm -rf lib/* && node_modules/.bin/coffee --compile -m --output lib/ src/",
"prepublish": "npm test",
- "pretest": "npm run build",
- "test": "mocha",
- "watch": "coffee --watch --compile --output lib/ src/"
+ "pretest": "make build",
+ "test": "make test"
},
- "typings": "src/index.d.ts",
- "version": "2.1.0"
+ "version": "0.2.0"
}
diff --git a/deps/npm/node_modules/performance-now/src/index.d.ts b/deps/npm/node_modules/performance-now/src/index.d.ts
deleted file mode 100644
index 68dca8eddc..0000000000
--- a/deps/npm/node_modules/performance-now/src/index.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-// This file describes the package to typescript.
-
-/**
- * Returns the number of milliseconds since the page was loaded (if browser)
- * or the node process was started.
- */
-declare function now(): number;
-export = now;
diff --git a/deps/npm/node_modules/performance-now/src/performance-now.coffee b/deps/npm/node_modules/performance-now/src/performance-now.coffee
index a8e075a40f..e752fc5e1c 100644
--- a/deps/npm/node_modules/performance-now/src/performance-now.coffee
+++ b/deps/npm/node_modules/performance-now/src/performance-now.coffee
@@ -1,14 +1,12 @@
if performance? and performance.now
module.exports = -> performance.now()
else if process? and process.hrtime
- module.exports = -> (getNanoSeconds() - nodeLoadTime) / 1e6
+ module.exports = -> (getNanoSeconds() - loadTime) / 1e6
hrtime = process.hrtime
getNanoSeconds = ->
hr = hrtime()
hr[0] * 1e9 + hr[1]
- moduleLoadTime = getNanoSeconds()
- upTime = process.uptime() * 1e9
- nodeLoadTime = moduleLoadTime - upTime
+ loadTime = getNanoSeconds()
else if Date.now
module.exports = -> Date.now() - loadTime
loadTime = Date.now()
diff --git a/deps/npm/node_modules/performance-now/test/performance-now.coffee b/deps/npm/node_modules/performance-now/test/performance-now.coffee
index c99e95cd2c..c17ddd2424 100644
--- a/deps/npm/node_modules/performance-now/test/performance-now.coffee
+++ b/deps/npm/node_modules/performance-now/test/performance-now.coffee
@@ -1,43 +1,38 @@
-chai = require "chai"
-chai.use(require "chai-increasing")
-{assert,expect} = chai
-Bluebird = require "bluebird"
-
-now = require "../"
-
-getUptime = -> process.uptime() * 1e3
+assert = require "assert"
+delay = (ms, fn) -> setTimeout fn, ms
+now = undefined
describe "now", ->
- it "reported time differs at most 1ms from a freshly reported uptime", ->
- assert.isAtMost Math.abs(now()-getUptime()), 1
+ it "initially gives a near zero (< 20 ms) time ", ->
+ now = require "../"
+ assert now() < 20
+
+ it "gives a positive time", ->
+ assert now() > 0
it "two subsequent calls return an increasing number", ->
- assert.isBelow now(), now()
+ a = now()
+ b = now()
+ assert now() < now()
it "has less than 10 microseconds overhead", ->
- assert.isBelow Math.abs(now() - now()), 0.010
-
- it "can be called 1 million times in under 1 second (averaging under 1 microsecond per call)", ->
- @timeout 1000
- now() for [0...1e6]
- undefined
-
- it "for 10,000 numbers, number n is never bigger than number n-1", ->
- stamps = (now() for [1...10000])
- expect(stamps).to.be.increasing
-
- it "shows that at least 0.2 ms has passed after a timeout of 1 ms", ->
- earlier = now()
- Bluebird.resolve().delay(1).then -> assert.isAbove (now()-earlier), 0.2
-
- it "shows that at most 3 ms has passed after a timeout of 1 ms", ->
- earlier = now()
- Bluebird.resolve().delay(1).then -> assert.isBelow (now()-earlier), 3
-
- it "shows that at least 190ms ms has passed after a timeout of 200ms", ->
- earlier = now()
- Bluebird.resolve().delay(200).then -> assert.isAbove (now()-earlier), 190
-
- it "shows that at most 220 ms has passed after a timeout of 200ms", ->
- earlier = now()
- Bluebird.resolve().delay(200).then -> assert.isBelow (now()-earlier), 220
+ Math.abs(now() - now()) < 0.010
+
+ it "can do 1,000,000 calls really quickly", ->
+ now() for i in [0...1000000]
+
+ it "shows that at least 990 ms has passed after a timeout of 1 second", (done) ->
+ a = now()
+ delay 1000, ->
+ b = now()
+ diff = b - a
+ return done new Error "Diff (#{diff}) lower than 990." if diff < 990
+ return done null
+
+ it "shows that not more than 1020 ms has passed after a timeout of 1 second", (done) ->
+ a = now()
+ delay 1000, ->
+ b = now()
+ diff = b - a
+ return done new Error "Diff (#{diff}) higher than 1020." if diff > 1020
+ return done null \ No newline at end of file
diff --git a/deps/npm/node_modules/performance-now/test/scripts.coffee b/deps/npm/node_modules/performance-now/test/scripts.coffee
deleted file mode 100644
index 16312f185c..0000000000
--- a/deps/npm/node_modules/performance-now/test/scripts.coffee
+++ /dev/null
@@ -1,27 +0,0 @@
-Bluebird = require "bluebird"
-exec = require("child_process").execSync
-{assert} = require "chai"
-
-describe "scripts/initital-value.coffee (module.uptime(), expressed in milliseconds)", ->
- result = exec("./test/scripts/initial-value.coffee").toString().trim()
- it "printed #{result}", ->
- it "printed a value above 100", -> assert.isAbove result, 100
- it "printed a value below 350", -> assert.isBelow result, 350
-
-describe "scripts/delayed-require.coffee (sum of uptime and 250 ms delay`)", ->
- result = exec("./test/scripts/delayed-require.coffee").toString().trim()
- it "printed #{result}", ->
- it "printed a value above 350", -> assert.isAbove result, 350
- it "printed a value below 600", -> assert.isBelow result, 600
-
-describe "scripts/delayed-call.coffee (sum of uptime and 250 ms delay`)", ->
- result = exec("./test/scripts/delayed-call.coffee").toString().trim()
- it "printed #{result}", ->
- it "printed a value above 350", -> assert.isAbove result, 350
- it "printed a value below 600", -> assert.isBelow result, 600
-
-describe "scripts/difference.coffee", ->
- result = exec("./test/scripts/difference.coffee").toString().trim()
- it "printed #{result}", ->
- it "printed a value above 0.005", -> assert.isAbove result, 0.005
- it "printed a value below 0.07", -> assert.isBelow result, 0.07
diff --git a/deps/npm/node_modules/performance-now/test/scripts/delayed-call.coffee b/deps/npm/node_modules/performance-now/test/scripts/delayed-call.coffee
deleted file mode 100755
index 0c3bab5949..0000000000
--- a/deps/npm/node_modules/performance-now/test/scripts/delayed-call.coffee
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env ./node_modules/.bin/coffee
-
-###
-Expected output is a number above 350 and below 600.
-The time reported is relative to the time the node.js process was started
-this is approximately at `(Date.now() process.uptime() * 1000)`
-###
-
-delay = require "call-delayed"
-now = require "../../lib/performance-now"
-delay 250, -> console.log now().toFixed 3
diff --git a/deps/npm/node_modules/performance-now/test/scripts/delayed-require.coffee b/deps/npm/node_modules/performance-now/test/scripts/delayed-require.coffee
deleted file mode 100755
index 3ddee952f2..0000000000
--- a/deps/npm/node_modules/performance-now/test/scripts/delayed-require.coffee
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env ./node_modules/.bin/coffee
-
-###
-Expected output is a number above 350 and below 600.
-The time reported is relative to the time the node.js process was started
-this is approximately at `(Date.now() process.uptime() * 1000)`
-###
-
-delay = require "call-delayed"
-delay 250, ->
- now = require "../../lib/performance-now"
- console.log now().toFixed 3
diff --git a/deps/npm/node_modules/performance-now/test/scripts/difference.coffee b/deps/npm/node_modules/performance-now/test/scripts/difference.coffee
deleted file mode 100755
index 0b5edf6c6b..0000000000
--- a/deps/npm/node_modules/performance-now/test/scripts/difference.coffee
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env ./node_modules/.bin/coffee
-
-# Expected output is above 0.005 and below 0.07.
-
-now = require('../../lib/performance-now')
-console.log -(now() - now()).toFixed 3
diff --git a/deps/npm/node_modules/performance-now/test/scripts/initial-value.coffee b/deps/npm/node_modules/performance-now/test/scripts/initial-value.coffee
deleted file mode 100755
index 19ef4e0f3e..0000000000
--- a/deps/npm/node_modules/performance-now/test/scripts/initial-value.coffee
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env ./node_modules/.bin/coffee
-
-###
-Expected output is a number above 100 and below 350.
-The time reported is relative to the time the node.js process was started
-this is approximately at `(Date.now() process.uptime() * 1000)`
-###
-
-now = require '../../lib/performance-now'
-console.log now().toFixed 3
diff --git a/deps/npm/node_modules/qs/.editorconfig b/deps/npm/node_modules/qs/.editorconfig
deleted file mode 100644
index b2654e7ac5..0000000000
--- a/deps/npm/node_modules/qs/.editorconfig
+++ /dev/null
@@ -1,30 +0,0 @@
-root = true
-
-[*]
-indent_style = space
-indent_size = 4
-end_of_line = lf
-charset = utf-8
-trim_trailing_whitespace = true
-insert_final_newline = true
-max_line_length = 140
-
-[test/*]
-max_line_length = off
-
-[*.md]
-max_line_length = off
-
-[*.json]
-max_line_length = off
-
-[Makefile]
-max_line_length = off
-
-[CHANGELOG.md]
-indent_style = space
-indent_size = 2
-
-[LICENSE]
-indent_size = 2
-max_line_length = off
diff --git a/deps/npm/node_modules/qs/.jscs.json b/deps/npm/node_modules/qs/.jscs.json
new file mode 100644
index 0000000000..7296cbab09
--- /dev/null
+++ b/deps/npm/node_modules/qs/.jscs.json
@@ -0,0 +1,175 @@
+{
+ "es3": true,
+
+ "additionalRules": [],
+
+ "requireSemicolons": true,
+
+ "disallowMultipleSpaces": true,
+
+ "disallowIdentifierNames": [],
+
+ "requireCurlyBraces": {
+ "allExcept": [],
+ "keywords": ["if", "else", "for", "while", "do", "try", "catch"]
+ },
+
+ "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"],
+
+ "disallowSpaceAfterKeywords": [],
+
+ "disallowSpaceBeforeComma": true,
+ "disallowSpaceAfterComma": false,
+ "disallowSpaceBeforeSemicolon": true,
+
+ "disallowNodeTypes": [
+ "DebuggerStatement",
+ "ForInStatement",
+ "LabeledStatement",
+ "SwitchCase",
+ "SwitchStatement",
+ "WithStatement"
+ ],
+
+ "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] },
+
+ "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },
+ "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
+ "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
+ "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
+ "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
+
+ "requireSpaceBetweenArguments": true,
+
+ "disallowSpacesInsideParentheses": true,
+
+ "disallowSpacesInsideArrayBrackets": true,
+
+ "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] },
+
+ "disallowSpaceAfterObjectKeys": true,
+
+ "requireCommaBeforeLineBreak": true,
+
+ "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
+ "requireSpaceAfterPrefixUnaryOperators": [],
+
+ "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
+ "requireSpaceBeforePostfixUnaryOperators": [],
+
+ "disallowSpaceBeforeBinaryOperators": [],
+ "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
+
+ "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
+ "disallowSpaceAfterBinaryOperators": [],
+
+ "disallowImplicitTypeConversion": ["binary", "string"],
+
+ "disallowKeywords": ["with", "eval"],
+
+ "requireKeywordsOnNewLine": [],
+ "disallowKeywordsOnNewLine": ["else"],
+
+ "requireLineFeedAtFileEnd": true,
+
+ "disallowTrailingWhitespace": true,
+
+ "disallowTrailingComma": true,
+
+ "excludeFiles": ["node_modules/**", "vendor/**"],
+
+ "disallowMultipleLineStrings": true,
+
+ "requireDotNotation": { "allExcept": ["keywords"] },
+
+ "requireParenthesesAroundIIFE": true,
+
+ "validateLineBreaks": "LF",
+
+ "validateQuoteMarks": {
+ "escape": true,
+ "mark": "'"
+ },
+
+ "disallowOperatorBeforeLineBreak": [],
+
+ "requireSpaceBeforeKeywords": [
+ "do",
+ "for",
+ "if",
+ "else",
+ "switch",
+ "case",
+ "try",
+ "catch",
+ "finally",
+ "while",
+ "with",
+ "return"
+ ],
+
+ "validateAlignedFunctionParameters": {
+ "lineBreakAfterOpeningBraces": true,
+ "lineBreakBeforeClosingBraces": true
+ },
+
+ "requirePaddingNewLinesBeforeExport": true,
+
+ "validateNewlineAfterArrayElements": {
+ "maximum": 1
+ },
+
+ "requirePaddingNewLinesAfterUseStrict": true,
+
+ "disallowArrowFunctions": true,
+
+ "disallowMultiLineTernary": true,
+
+ "validateOrderInObjectKeys": "asc-insensitive",
+
+ "disallowIdenticalDestructuringNames": true,
+
+ "disallowNestedTernaries": { "maxLevel": 1 },
+
+ "requireSpaceAfterComma": { "allExcept": ["trailing"] },
+ "requireAlignedMultilineParams": false,
+
+ "requireSpacesInGenerator": {
+ "afterStar": true
+ },
+
+ "disallowSpacesInGenerator": {
+ "beforeStar": true
+ },
+
+ "disallowVar": false,
+
+ "requireArrayDestructuring": false,
+
+ "requireEnhancedObjectLiterals": false,
+
+ "requireObjectDestructuring": false,
+
+ "requireEarlyReturn": false,
+
+ "requireCapitalizedConstructorsNew": {
+ "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"]
+ },
+
+ "requireImportAlphabetized": false,
+
+ "requireSpaceBeforeObjectValues": true,
+ "requireSpaceBeforeDestructuredValues": true,
+
+ "disallowSpacesInsideTemplateStringPlaceholders": true,
+
+ "disallowArrayDestructuringReturn": false,
+
+ "requireNewlineBeforeSingleStatementsInIf": false,
+
+ "disallowUnusedVariables": true,
+
+ "requireSpacesInsideImportedObjectBraces": true,
+
+ "requireUseStrict": true
+}
diff --git a/deps/npm/node_modules/qs/CHANGELOG.md b/deps/npm/node_modules/qs/CHANGELOG.md
index fe52320912..85e69b0a22 100644
--- a/deps/npm/node_modules/qs/CHANGELOG.md
+++ b/deps/npm/node_modules/qs/CHANGELOG.md
@@ -1,29 +1,3 @@
-## **6.5.2**
-- [Fix] use `safer-buffer` instead of `Buffer` constructor
-- [Refactor] utils: `module.exports` one thing, instead of mutating `exports` (#230)
-- [Dev Deps] update `browserify`, `eslint`, `iconv-lite`, `safer-buffer`, `tape`, `browserify`
-
-## **6.5.1**
-- [Fix] Fix parsing & compacting very deep objects (#224)
-- [Refactor] name utils functions
-- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`
-- [Tests] up to `node` `v8.4`; use `nvm install-latest-npm` so newer npm doesn’t break older node
-- [Tests] Use precise dist for Node.js 0.6 runtime (#225)
-- [Tests] make 0.6 required, now that it’s passing
-- [Tests] on `node` `v8.2`; fix npm on node 0.6
-
-## **6.5.0**
-- [New] add `utils.assign`
-- [New] pass default encoder/decoder to custom encoder/decoder functions (#206)
-- [New] `parse`/`stringify`: add `ignoreQueryPrefix`/`addQueryPrefix` options, respectively (#213)
-- [Fix] Handle stringifying empty objects with addQueryPrefix (#217)
-- [Fix] do not mutate `options` argument (#207)
-- [Refactor] `parse`: cache index to reuse in else statement (#182)
-- [Docs] add various badges to readme (#208)
-- [Dev Deps] update `eslint`, `browserify`, `iconv-lite`, `tape`
-- [Tests] up to `node` `v8.1`, `v7.10`, `v6.11`; npm v4.6 breaks on node < v1; npm v5+ breaks on node < v4
-- [Tests] add `editorconfig-tools`
-
## **6.4.0**
- [New] `qs.stringify`: add `encodeValuesOnly` option
- [Fix] follow `allowPrototypes` option during merge (#201, #201)
@@ -33,13 +7,6 @@
- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
- [eslint] reduce warnings
-## **6.3.2**
-- [Fix] follow `allowPrototypes` option during merge (#201, #200)
-- [Dev Deps] update `eslint`
-- [Fix] chmod a-x
-- [Fix] support keys starting with brackets (#202, #200)
-- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
-
## **6.3.1**
- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties (thanks, @snyk!)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `iconv-lite`, `qs-iconv`, `tape`
@@ -66,12 +33,6 @@
- [Tests] skip Object.create tests when null objects are not available
- [Tests] Turn on eslint for test files (#175)
-## **6.2.3**
-- [Fix] follow `allowPrototypes` option during merge (#201, #200)
-- [Fix] chmod a-x
-- [Fix] support keys starting with brackets (#202, #200)
-- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
-
## **6.2.2**
- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties
@@ -87,12 +48,6 @@
- [New] add "encoder" and "decoder" options, for custom param encoding/decoding (#160)
- [Fix] fix compacting of nested sparse arrays (#150)
-## **6.1.2
-- [Fix] follow `allowPrototypes` option during merge (#201, #200)
-- [Fix] chmod a-x
-- [Fix] support keys starting with brackets (#202, #200)
-- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
-
## **6.1.1**
- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties
@@ -101,12 +56,6 @@
- [Fix] "sort" option should work at a depth of 3 or more (#151)
- [Fix] Restore `dist` directory; will be removed in v7 (#148)
-## **6.0.4**
-- [Fix] follow `allowPrototypes` option during merge (#201, #200)
-- [Fix] chmod a-x
-- [Fix] support keys starting with brackets (#202, #200)
-- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
-
## **6.0.3**
- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties
- [Fix] Restore `dist` directory; will be removed in v7 (#148)
diff --git a/deps/npm/node_modules/qs/README.md b/deps/npm/node_modules/qs/README.md
index d81196662b..32fc3123fe 100644
--- a/deps/npm/node_modules/qs/README.md
+++ b/deps/npm/node_modules/qs/README.md
@@ -1,15 +1,9 @@
-# qs <sup>[![Version Badge][2]][1]</sup>
-
-[![Build Status][3]][4]
-[![dependency status][5]][6]
-[![dev dependency status][7]][8]
-[![License][license-image]][license-url]
-[![Downloads][downloads-image]][downloads-url]
-
-[![npm badge][11]][1]
+# qs
A querystring parsing and stringifying library with some added security.
+[![Build Status](https://api.travis-ci.org/ljharb/qs.svg)](http://travis-ci.org/ljharb/qs)
+
Lead Maintainer: [Jordan Harband](https://github.com/ljharb)
The **qs** module was originally created and maintained by [TJ Holowaychuk](https://github.com/visionmedia/node-querystring).
@@ -39,9 +33,9 @@ For example, the string `'foo[bar]=baz'` converts to:
```javascript
assert.deepEqual(qs.parse('foo[bar]=baz'), {
- foo: {
- bar: 'baz'
- }
+ foo: {
+ bar: 'baz'
+ }
});
```
@@ -63,7 +57,7 @@ URI encoded strings work too:
```javascript
assert.deepEqual(qs.parse('a%5Bb%5D=c'), {
- a: { b: 'c' }
+ a: { b: 'c' }
});
```
@@ -71,11 +65,11 @@ You can also nest your objects, like `'foo[bar][baz]=foobarbaz'`:
```javascript
assert.deepEqual(qs.parse('foo[bar][baz]=foobarbaz'), {
- foo: {
- bar: {
- baz: 'foobarbaz'
- }
+ foo: {
+ bar: {
+ baz: 'foobarbaz'
}
+ }
});
```
@@ -84,19 +78,19 @@ By default, when nesting objects **qs** will only parse up to 5 children deep. T
```javascript
var expected = {
- a: {
- b: {
- c: {
- d: {
- e: {
- f: {
- '[g][h][i]': 'j'
- }
- }
- }
+ a: {
+ b: {
+ c: {
+ d: {
+ e: {
+ f: {
+ '[g][h][i]': 'j'
}
+ }
}
+ }
}
+ }
};
var string = 'a[b][c][d][e][f][g][h][i]=j';
assert.deepEqual(qs.parse(string), expected);
@@ -118,13 +112,6 @@ var limited = qs.parse('a=b&c=d', { parameterLimit: 1 });
assert.deepEqual(limited, { a: 'b' });
```
-To bypass the leading question mark, use `ignoreQueryPrefix`:
-
-```javascript
-var prefixed = qs.parse('?a=b&c=d', { ignoreQueryPrefix: true });
-assert.deepEqual(prefixed, { a: 'b', c: 'd' });
-```
-
An optional delimiter can also be passed:
```javascript
@@ -240,10 +227,10 @@ assert.equal(unencoded, 'a[b]=c');
Encoding can be disabled for keys by setting the `encodeValuesOnly` option to `true`:
```javascript
-var encodedValues = qs.stringify(
- { a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] },
- { encodeValuesOnly: true }
-);
+var encodedValues = qs.stringify(
+ { a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] },
+ { encodeValuesOnly: true }
+)
assert.equal(encodedValues,'a=b&c[0]=d&c[1]=e%3Df&f[0][0]=g&f[1][0]=h');
```
@@ -251,8 +238,8 @@ This encoding can also be replaced by a custom encoding method set as `encoder`
```javascript
var encoded = qs.stringify({ a: { b: 'c' } }, { encoder: function (str) {
- // Passed in values `a`, `b`, `c`
- return // Return encoded string
+ // Passed in values `a`, `b`, `c`
+ return // Return encoded string
}})
```
@@ -262,8 +249,8 @@ Analogue to the `encoder` there is a `decoder` option for `parse` to override de
```javascript
var decoded = qs.parse('x=z', { decoder: function (str) {
- // Passed in values `x`, `z`
- return // Return decoded string
+ // Passed in values `x`, `z`
+ return // Return decoded string
}})
```
@@ -330,12 +317,6 @@ Properties that are set to `undefined` will be omitted entirely:
assert.equal(qs.stringify({ a: null, b: undefined }), 'a=');
```
-The query string may optionally be prepended with a question mark:
-
-```javascript
-assert.equal(qs.stringify({ a: 'b', c: 'd' }, { addQueryPrefix: true }), '?a=b&c=d');
-```
-
The delimiter may be overridden with stringify as well:
```javascript
@@ -357,7 +338,7 @@ You may use the `sort` option to affect the order of parameter keys:
```javascript
function alphabeticalSort(a, b) {
- return a.localeCompare(b);
+ return a.localeCompare(b);
}
assert.equal(qs.stringify({ a: 'c', z: 'y', b : 'f' }, { sort: alphabeticalSort }), 'a=c&b=f&z=y');
```
@@ -368,17 +349,17 @@ pass an array, it will be used to select properties and array indices for string
```javascript
function filterFunc(prefix, value) {
- if (prefix == 'b') {
- // Return an `undefined` value to omit a property.
- return;
- }
- if (prefix == 'e[f]') {
- return value.getTime();
- }
- if (prefix == 'e[g][0]') {
- return value * 2;
- }
- return value;
+ if (prefix == 'b') {
+ // Return an `undefined` value to omit a property.
+ return;
+ }
+ if (prefix == 'e[f]') {
+ return value.getTime();
+ }
+ if (prefix == 'e[g][0]') {
+ return value * 2;
+ }
+ return value;
}
qs.stringify({ a: 'b', c: 'd', e: { f: new Date(123), g: [2] } }, { filter: filterFunc });
// 'a=b&c=d&e[f]=123&e[g][0]=4'
@@ -457,19 +438,3 @@ assert.equal(qs.stringify({ a: 'b c' }), 'a=b%20c');
assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC3986' }), 'a=b%20c');
assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC1738' }), 'a=b+c');
```
-
-[1]: https://npmjs.org/package/qs
-[2]: http://versionbadg.es/ljharb/qs.svg
-[3]: https://api.travis-ci.org/ljharb/qs.svg
-[4]: https://travis-ci.org/ljharb/qs
-[5]: https://david-dm.org/ljharb/qs.svg
-[6]: https://david-dm.org/ljharb/qs
-[7]: https://david-dm.org/ljharb/qs/dev-status.svg
-[8]: https://david-dm.org/ljharb/qs?type=dev
-[9]: https://ci.testling.com/ljharb/qs.png
-[10]: https://ci.testling.com/ljharb/qs
-[11]: https://nodei.co/npm/qs.png?downloads=true&stars=true
-[license-image]: http://img.shields.io/npm/l/qs.svg
-[license-url]: LICENSE
-[downloads-image]: http://img.shields.io/npm/dm/qs.svg
-[downloads-url]: http://npm-stat.com/charts.html?package=qs
diff --git a/deps/npm/node_modules/qs/dist/qs.js b/deps/npm/node_modules/qs/dist/qs.js
index ecf7ba44cf..2d0d63ff26 100644
--- a/deps/npm/node_modules/qs/dist/qs.js
+++ b/deps/npm/node_modules/qs/dist/qs.js
@@ -1,4 +1,4 @@
-(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.Qs = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
+(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.Qs = 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';
var replace = String.prototype.replace;
@@ -52,23 +52,19 @@ var defaults = {
var parseValues = function parseQueryStringValues(str, options) {
var obj = {};
- var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
- var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
- var parts = cleanStr.split(options.delimiter, limit);
+ var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit);
for (var i = 0; i < parts.length; ++i) {
var part = parts[i];
-
- var bracketEqualsPos = part.indexOf(']=');
- var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
+ var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1;
var key, val;
if (pos === -1) {
- key = options.decoder(part, defaults.decoder);
+ key = options.decoder(part);
val = options.strictNullHandling ? null : '';
} else {
- key = options.decoder(part.slice(0, pos), defaults.decoder);
- val = options.decoder(part.slice(pos + 1), defaults.decoder);
+ key = options.decoder(part.slice(0, pos));
+ val = options.decoder(part.slice(pos + 1));
}
if (has.call(obj, key)) {
obj[key] = [].concat(obj[key]).concat(val);
@@ -80,38 +76,36 @@ var parseValues = function parseQueryStringValues(str, options) {
return obj;
};
-var parseObject = function (chain, val, options) {
- var leaf = val;
+var parseObject = function parseObjectRecursive(chain, val, options) {
+ if (!chain.length) {
+ return val;
+ }
- for (var i = chain.length - 1; i >= 0; --i) {
- var obj;
- var root = chain[i];
+ var root = chain.shift();
- if (root === '[]') {
+ var obj;
+ if (root === '[]') {
+ obj = [];
+ obj = obj.concat(parseObject(chain, val, options));
+ } else {
+ obj = options.plainObjects ? Object.create(null) : {};
+ var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
+ var index = parseInt(cleanRoot, 10);
+ if (
+ !isNaN(index) &&
+ root !== cleanRoot &&
+ String(index) === cleanRoot &&
+ index >= 0 &&
+ (options.parseArrays && index <= options.arrayLimit)
+ ) {
obj = [];
- obj = obj.concat(leaf);
+ obj[index] = parseObject(chain, val, options);
} else {
- obj = options.plainObjects ? Object.create(null) : {};
- var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
- var index = parseInt(cleanRoot, 10);
- if (
- !isNaN(index)
- && root !== cleanRoot
- && String(index) === cleanRoot
- && index >= 0
- && (options.parseArrays && index <= options.arrayLimit)
- ) {
- obj = [];
- obj[index] = leaf;
- } else {
- obj[cleanRoot] = leaf;
- }
+ obj[cleanRoot] = parseObject(chain, val, options);
}
-
- leaf = obj;
}
- return leaf;
+ return obj;
};
var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
@@ -170,13 +164,12 @@ var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
};
module.exports = function (str, opts) {
- var options = opts ? utils.assign({}, opts) : {};
+ var options = opts || {};
if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') {
throw new TypeError('Decoder has to be a function.');
}
- options.ignoreQueryPrefix = options.ignoreQueryPrefix === true;
options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;
options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth;
options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit;
@@ -260,7 +253,7 @@ var stringify = function stringify( // eslint-disable-line func-name-matching
obj = serializeDate(obj);
} else if (obj === null) {
if (strictNullHandling) {
- return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix;
+ return encoder && !encodeValuesOnly ? encoder(prefix) : prefix;
}
obj = '';
@@ -268,8 +261,8 @@ var stringify = function stringify( // eslint-disable-line func-name-matching
if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) {
if (encoder) {
- var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder);
- return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder))];
+ var keyValue = encodeValuesOnly ? prefix : encoder(prefix);
+ return [formatter(keyValue) + '=' + formatter(encoder(obj))];
}
return [formatter(prefix) + '=' + formatter(String(obj))];
}
@@ -333,7 +326,7 @@ var stringify = function stringify( // eslint-disable-line func-name-matching
module.exports = function (object, opts) {
var obj = object;
- var options = opts ? utils.assign({}, opts) : {};
+ var options = opts || {};
if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') {
throw new TypeError('Encoder has to be a function.');
@@ -349,7 +342,7 @@ module.exports = function (object, opts) {
var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate;
var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly;
if (typeof options.format === 'undefined') {
- options.format = formats['default'];
+ options.format = formats.default;
} else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) {
throw new TypeError('Unknown format option provided.');
}
@@ -413,10 +406,7 @@ module.exports = function (object, opts) {
));
}
- var joined = keys.join(delimiter);
- var prefix = options.addQueryPrefix === true ? '?' : '';
-
- return joined.length > 0 ? prefix + joined : '';
+ return keys.join(delimiter);
};
},{"./formats":1,"./utils":5}],5:[function(require,module,exports){
@@ -433,30 +423,7 @@ var hexTable = (function () {
return array;
}());
-var compactQueue = function compactQueue(queue) {
- var obj;
-
- while (queue.length) {
- var item = queue.pop();
- obj = item.obj[item.prop];
-
- if (Array.isArray(obj)) {
- var compacted = [];
-
- for (var j = 0; j < obj.length; ++j) {
- if (typeof obj[j] !== 'undefined') {
- compacted.push(obj[j]);
- }
- }
-
- item.obj[item.prop] = compacted;
- }
- }
-
- return obj;
-};
-
-var arrayToObject = function arrayToObject(source, options) {
+exports.arrayToObject = function (source, options) {
var obj = options && options.plainObjects ? Object.create(null) : {};
for (var i = 0; i < source.length; ++i) {
if (typeof source[i] !== 'undefined') {
@@ -467,7 +434,7 @@ var arrayToObject = function arrayToObject(source, options) {
return obj;
};
-var merge = function merge(target, source, options) {
+exports.merge = function (target, source, options) {
if (!source) {
return target;
}
@@ -492,14 +459,14 @@ var merge = function merge(target, source, options) {
var mergeTarget = target;
if (Array.isArray(target) && !Array.isArray(source)) {
- mergeTarget = arrayToObject(target, options);
+ mergeTarget = exports.arrayToObject(target, options);
}
if (Array.isArray(target) && Array.isArray(source)) {
source.forEach(function (item, i) {
if (has.call(target, i)) {
if (target[i] && typeof target[i] === 'object') {
- target[i] = merge(target[i], item, options);
+ target[i] = exports.merge(target[i], item, options);
} else {
target.push(item);
}
@@ -513,8 +480,8 @@ var merge = function merge(target, source, options) {
return Object.keys(source).reduce(function (acc, key) {
var value = source[key];
- if (has.call(acc, key)) {
- acc[key] = merge(acc[key], value, options);
+ if (Object.prototype.hasOwnProperty.call(acc, key)) {
+ acc[key] = exports.merge(acc[key], value, options);
} else {
acc[key] = value;
}
@@ -522,14 +489,7 @@ var merge = function merge(target, source, options) {
}, mergeTarget);
};
-var assign = function assignSingleSource(target, source) {
- return Object.keys(source).reduce(function (acc, key) {
- acc[key] = source[key];
- return acc;
- }, target);
-};
-
-var decode = function (str) {
+exports.decode = function (str) {
try {
return decodeURIComponent(str.replace(/\+/g, ' '));
} catch (e) {
@@ -537,7 +497,7 @@ var decode = function (str) {
}
};
-var encode = function encode(str) {
+exports.encode = function (str) {
// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
// It has been adapted here for stricter adherence to RFC 3986
if (str.length === 0) {
@@ -551,13 +511,13 @@ var encode = function encode(str) {
var c = string.charCodeAt(i);
if (
- c === 0x2D // -
- || c === 0x2E // .
- || c === 0x5F // _
- || c === 0x7E // ~
- || (c >= 0x30 && c <= 0x39) // 0-9
- || (c >= 0x41 && c <= 0x5A) // a-z
- || (c >= 0x61 && c <= 0x7A) // A-Z
+ c === 0x2D || // -
+ c === 0x2E || // .
+ c === 0x5F || // _
+ c === 0x7E || // ~
+ (c >= 0x30 && c <= 0x39) || // 0-9
+ (c >= 0x41 && c <= 0x5A) || // a-z
+ (c >= 0x61 && c <= 0x7A) // A-Z
) {
out += string.charAt(i);
continue;
@@ -580,42 +540,52 @@ var encode = function encode(str) {
i += 1;
c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
- out += hexTable[0xF0 | (c >> 18)]
- + hexTable[0x80 | ((c >> 12) & 0x3F)]
- + hexTable[0x80 | ((c >> 6) & 0x3F)]
- + hexTable[0x80 | (c & 0x3F)];
+ out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; // eslint-disable-line max-len
}
return out;
};
-var compact = function compact(value) {
- var queue = [{ obj: { o: value }, prop: 'o' }];
- var refs = [];
+exports.compact = function (obj, references) {
+ if (typeof obj !== 'object' || obj === null) {
+ return obj;
+ }
+
+ var refs = references || [];
+ var lookup = refs.indexOf(obj);
+ if (lookup !== -1) {
+ return refs[lookup];
+ }
- for (var i = 0; i < queue.length; ++i) {
- var item = queue[i];
- var obj = item.obj[item.prop];
+ refs.push(obj);
- var keys = Object.keys(obj);
- for (var j = 0; j < keys.length; ++j) {
- var key = keys[j];
- var val = obj[key];
- if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
- queue.push({ obj: obj, prop: key });
- refs.push(val);
+ if (Array.isArray(obj)) {
+ var compacted = [];
+
+ for (var i = 0; i < obj.length; ++i) {
+ if (obj[i] && typeof obj[i] === 'object') {
+ compacted.push(exports.compact(obj[i], refs));
+ } else if (typeof obj[i] !== 'undefined') {
+ compacted.push(obj[i]);
}
}
+
+ return compacted;
}
- return compactQueue(queue);
+ var keys = Object.keys(obj);
+ keys.forEach(function (key) {
+ obj[key] = exports.compact(obj[key], refs);
+ });
+
+ return obj;
};
-var isRegExp = function isRegExp(obj) {
+exports.isRegExp = function (obj) {
return Object.prototype.toString.call(obj) === '[object RegExp]';
};
-var isBuffer = function isBuffer(obj) {
+exports.isBuffer = function (obj) {
if (obj === null || typeof obj === 'undefined') {
return false;
}
@@ -623,16 +593,5 @@ var isBuffer = function isBuffer(obj) {
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
};
-module.exports = {
- arrayToObject: arrayToObject,
- assign: assign,
- compact: compact,
- decode: decode,
- encode: encode,
- isBuffer: isBuffer,
- isRegExp: isRegExp,
- merge: merge
-};
-
},{}]},{},[2])(2)
-});
+}); \ No newline at end of file
diff --git a/deps/npm/node_modules/qs/lib/parse.js b/deps/npm/node_modules/qs/lib/parse.js
index 8c9872ecc6..1307e9d797 100644
--- a/deps/npm/node_modules/qs/lib/parse.js
+++ b/deps/npm/node_modules/qs/lib/parse.js
@@ -18,23 +18,19 @@ var defaults = {
var parseValues = function parseQueryStringValues(str, options) {
var obj = {};
- var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
- var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
- var parts = cleanStr.split(options.delimiter, limit);
+ var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit);
for (var i = 0; i < parts.length; ++i) {
var part = parts[i];
-
- var bracketEqualsPos = part.indexOf(']=');
- var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
+ var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1;
var key, val;
if (pos === -1) {
- key = options.decoder(part, defaults.decoder);
+ key = options.decoder(part);
val = options.strictNullHandling ? null : '';
} else {
- key = options.decoder(part.slice(0, pos), defaults.decoder);
- val = options.decoder(part.slice(pos + 1), defaults.decoder);
+ key = options.decoder(part.slice(0, pos));
+ val = options.decoder(part.slice(pos + 1));
}
if (has.call(obj, key)) {
obj[key] = [].concat(obj[key]).concat(val);
@@ -46,38 +42,36 @@ var parseValues = function parseQueryStringValues(str, options) {
return obj;
};
-var parseObject = function (chain, val, options) {
- var leaf = val;
-
- for (var i = chain.length - 1; i >= 0; --i) {
- var obj;
- var root = chain[i];
+var parseObject = function parseObjectRecursive(chain, val, options) {
+ if (!chain.length) {
+ return val;
+ }
- if (root === '[]') {
+ var root = chain.shift();
+
+ var obj;
+ if (root === '[]') {
+ obj = [];
+ obj = obj.concat(parseObject(chain, val, options));
+ } else {
+ obj = options.plainObjects ? Object.create(null) : {};
+ var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
+ var index = parseInt(cleanRoot, 10);
+ if (
+ !isNaN(index) &&
+ root !== cleanRoot &&
+ String(index) === cleanRoot &&
+ index >= 0 &&
+ (options.parseArrays && index <= options.arrayLimit)
+ ) {
obj = [];
- obj = obj.concat(leaf);
+ obj[index] = parseObject(chain, val, options);
} else {
- obj = options.plainObjects ? Object.create(null) : {};
- var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
- var index = parseInt(cleanRoot, 10);
- if (
- !isNaN(index)
- && root !== cleanRoot
- && String(index) === cleanRoot
- && index >= 0
- && (options.parseArrays && index <= options.arrayLimit)
- ) {
- obj = [];
- obj[index] = leaf;
- } else {
- obj[cleanRoot] = leaf;
- }
+ obj[cleanRoot] = parseObject(chain, val, options);
}
-
- leaf = obj;
}
- return leaf;
+ return obj;
};
var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
@@ -136,13 +130,12 @@ var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
};
module.exports = function (str, opts) {
- var options = opts ? utils.assign({}, opts) : {};
+ var options = opts || {};
if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') {
throw new TypeError('Decoder has to be a function.');
}
- options.ignoreQueryPrefix = options.ignoreQueryPrefix === true;
options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;
options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth;
options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit;
diff --git a/deps/npm/node_modules/qs/lib/stringify.js b/deps/npm/node_modules/qs/lib/stringify.js
index ab915ac463..7694988c09 100644
--- a/deps/npm/node_modules/qs/lib/stringify.js
+++ b/deps/npm/node_modules/qs/lib/stringify.js
@@ -50,7 +50,7 @@ var stringify = function stringify( // eslint-disable-line func-name-matching
obj = serializeDate(obj);
} else if (obj === null) {
if (strictNullHandling) {
- return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix;
+ return encoder && !encodeValuesOnly ? encoder(prefix) : prefix;
}
obj = '';
@@ -58,8 +58,8 @@ var stringify = function stringify( // eslint-disable-line func-name-matching
if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) {
if (encoder) {
- var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder);
- return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder))];
+ var keyValue = encodeValuesOnly ? prefix : encoder(prefix);
+ return [formatter(keyValue) + '=' + formatter(encoder(obj))];
}
return [formatter(prefix) + '=' + formatter(String(obj))];
}
@@ -123,7 +123,7 @@ var stringify = function stringify( // eslint-disable-line func-name-matching
module.exports = function (object, opts) {
var obj = object;
- var options = opts ? utils.assign({}, opts) : {};
+ var options = opts || {};
if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') {
throw new TypeError('Encoder has to be a function.');
@@ -139,7 +139,7 @@ module.exports = function (object, opts) {
var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate;
var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly;
if (typeof options.format === 'undefined') {
- options.format = formats['default'];
+ options.format = formats.default;
} else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) {
throw new TypeError('Unknown format option provided.');
}
@@ -203,8 +203,5 @@ module.exports = function (object, opts) {
));
}
- var joined = keys.join(delimiter);
- var prefix = options.addQueryPrefix === true ? '?' : '';
-
- return joined.length > 0 ? prefix + joined : '';
+ return keys.join(delimiter);
};
diff --git a/deps/npm/node_modules/qs/lib/utils.js b/deps/npm/node_modules/qs/lib/utils.js
index 8775a3270c..b214332376 100644
--- a/deps/npm/node_modules/qs/lib/utils.js
+++ b/deps/npm/node_modules/qs/lib/utils.js
@@ -11,30 +11,7 @@ var hexTable = (function () {
return array;
}());
-var compactQueue = function compactQueue(queue) {
- var obj;
-
- while (queue.length) {
- var item = queue.pop();
- obj = item.obj[item.prop];
-
- if (Array.isArray(obj)) {
- var compacted = [];
-
- for (var j = 0; j < obj.length; ++j) {
- if (typeof obj[j] !== 'undefined') {
- compacted.push(obj[j]);
- }
- }
-
- item.obj[item.prop] = compacted;
- }
- }
-
- return obj;
-};
-
-var arrayToObject = function arrayToObject(source, options) {
+exports.arrayToObject = function (source, options) {
var obj = options && options.plainObjects ? Object.create(null) : {};
for (var i = 0; i < source.length; ++i) {
if (typeof source[i] !== 'undefined') {
@@ -45,7 +22,7 @@ var arrayToObject = function arrayToObject(source, options) {
return obj;
};
-var merge = function merge(target, source, options) {
+exports.merge = function (target, source, options) {
if (!source) {
return target;
}
@@ -70,14 +47,14 @@ var merge = function merge(target, source, options) {
var mergeTarget = target;
if (Array.isArray(target) && !Array.isArray(source)) {
- mergeTarget = arrayToObject(target, options);
+ mergeTarget = exports.arrayToObject(target, options);
}
if (Array.isArray(target) && Array.isArray(source)) {
source.forEach(function (item, i) {
if (has.call(target, i)) {
if (target[i] && typeof target[i] === 'object') {
- target[i] = merge(target[i], item, options);
+ target[i] = exports.merge(target[i], item, options);
} else {
target.push(item);
}
@@ -91,8 +68,8 @@ var merge = function merge(target, source, options) {
return Object.keys(source).reduce(function (acc, key) {
var value = source[key];
- if (has.call(acc, key)) {
- acc[key] = merge(acc[key], value, options);
+ if (Object.prototype.hasOwnProperty.call(acc, key)) {
+ acc[key] = exports.merge(acc[key], value, options);
} else {
acc[key] = value;
}
@@ -100,14 +77,7 @@ var merge = function merge(target, source, options) {
}, mergeTarget);
};
-var assign = function assignSingleSource(target, source) {
- return Object.keys(source).reduce(function (acc, key) {
- acc[key] = source[key];
- return acc;
- }, target);
-};
-
-var decode = function (str) {
+exports.decode = function (str) {
try {
return decodeURIComponent(str.replace(/\+/g, ' '));
} catch (e) {
@@ -115,7 +85,7 @@ var decode = function (str) {
}
};
-var encode = function encode(str) {
+exports.encode = function (str) {
// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
// It has been adapted here for stricter adherence to RFC 3986
if (str.length === 0) {
@@ -129,13 +99,13 @@ var encode = function encode(str) {
var c = string.charCodeAt(i);
if (
- c === 0x2D // -
- || c === 0x2E // .
- || c === 0x5F // _
- || c === 0x7E // ~
- || (c >= 0x30 && c <= 0x39) // 0-9
- || (c >= 0x41 && c <= 0x5A) // a-z
- || (c >= 0x61 && c <= 0x7A) // A-Z
+ c === 0x2D || // -
+ c === 0x2E || // .
+ c === 0x5F || // _
+ c === 0x7E || // ~
+ (c >= 0x30 && c <= 0x39) || // 0-9
+ (c >= 0x41 && c <= 0x5A) || // a-z
+ (c >= 0x61 && c <= 0x7A) // A-Z
) {
out += string.charAt(i);
continue;
@@ -158,56 +128,55 @@ var encode = function encode(str) {
i += 1;
c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
- out += hexTable[0xF0 | (c >> 18)]
- + hexTable[0x80 | ((c >> 12) & 0x3F)]
- + hexTable[0x80 | ((c >> 6) & 0x3F)]
- + hexTable[0x80 | (c & 0x3F)];
+ out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; // eslint-disable-line max-len
}
return out;
};
-var compact = function compact(value) {
- var queue = [{ obj: { o: value }, prop: 'o' }];
- var refs = [];
-
- for (var i = 0; i < queue.length; ++i) {
- var item = queue[i];
- var obj = item.obj[item.prop];
-
- var keys = Object.keys(obj);
- for (var j = 0; j < keys.length; ++j) {
- var key = keys[j];
- var val = obj[key];
- if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
- queue.push({ obj: obj, prop: key });
- refs.push(val);
+exports.compact = function (obj, references) {
+ if (typeof obj !== 'object' || obj === null) {
+ return obj;
+ }
+
+ var refs = references || [];
+ var lookup = refs.indexOf(obj);
+ if (lookup !== -1) {
+ return refs[lookup];
+ }
+
+ refs.push(obj);
+
+ if (Array.isArray(obj)) {
+ var compacted = [];
+
+ for (var i = 0; i < obj.length; ++i) {
+ if (obj[i] && typeof obj[i] === 'object') {
+ compacted.push(exports.compact(obj[i], refs));
+ } else if (typeof obj[i] !== 'undefined') {
+ compacted.push(obj[i]);
}
}
+
+ return compacted;
}
- return compactQueue(queue);
+ var keys = Object.keys(obj);
+ keys.forEach(function (key) {
+ obj[key] = exports.compact(obj[key], refs);
+ });
+
+ return obj;
};
-var isRegExp = function isRegExp(obj) {
+exports.isRegExp = function (obj) {
return Object.prototype.toString.call(obj) === '[object RegExp]';
};
-var isBuffer = function isBuffer(obj) {
+exports.isBuffer = function (obj) {
if (obj === null || typeof obj === 'undefined') {
return false;
}
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
};
-
-module.exports = {
- arrayToObject: arrayToObject,
- assign: assign,
- compact: compact,
- decode: decode,
- encode: encode,
- isBuffer: isBuffer,
- isRegExp: isRegExp,
- merge: merge
-};
diff --git a/deps/npm/node_modules/qs/package.json b/deps/npm/node_modules/qs/package.json
index fbdc0277c7..d209537edd 100644
--- a/deps/npm/node_modules/qs/package.json
+++ b/deps/npm/node_modules/qs/package.json
@@ -1,27 +1,27 @@
{
- "_from": "qs@~6.5.1",
- "_id": "qs@6.5.2",
+ "_from": "qs@~6.4.0",
+ "_id": "qs@6.4.0",
"_inBundle": false,
- "_integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
+ "_integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=",
"_location": "/qs",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "qs@~6.5.1",
+ "raw": "qs@~6.4.0",
"name": "qs",
"escapedName": "qs",
- "rawSpec": "~6.5.1",
+ "rawSpec": "~6.4.0",
"saveSpec": null,
- "fetchSpec": "~6.5.1"
+ "fetchSpec": "~6.4.0"
},
"_requiredBy": [
"/request"
],
- "_resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
- "_shasum": "cb3ae806e8740444584ef154ce8ee98d403f3e36",
- "_spec": "qs@~6.5.1",
- "_where": "/Users/rebecca/code/npm/node_modules/request",
+ "_resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz",
+ "_shasum": "13e26d28ad6b0ffaa91312cd3bf708ed351e7233",
+ "_spec": "qs@~6.4.0",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/request",
"bugs": {
"url": "https://github.com/ljharb/qs/issues"
},
@@ -37,18 +37,17 @@
"deprecated": false,
"description": "A querystring parser that supports nesting and arrays, with a depth limit",
"devDependencies": {
- "@ljharb/eslint-config": "^12.2.1",
- "browserify": "^16.2.0",
+ "@ljharb/eslint-config": "^11.0.0",
+ "browserify": "^14.1.0",
"covert": "^1.1.0",
- "editorconfig-tools": "^0.1.1",
- "eslint": "^4.19.1",
+ "eslint": "^3.17.0",
"evalmd": "^0.0.17",
- "iconv-lite": "^0.4.21",
+ "iconv-lite": "^0.4.15",
"mkdirp": "^0.5.1",
+ "parallelshell": "^2.0.0",
"qs-iconv": "^1.0.4",
"safe-publish-latest": "^1.1.1",
- "safer-buffer": "^2.1.2",
- "tape": "^4.9.0"
+ "tape": "^4.6.3"
},
"engines": {
"node": ">=0.6"
@@ -69,12 +68,11 @@
"coverage": "covert test",
"dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js",
"lint": "eslint lib/*.js test/*.js",
- "prelint": "editorconfig-tools check * lib/* test/*",
"prepublish": "safe-publish-latest && npm run dist",
"pretest": "npm run --silent readme && npm run --silent lint",
"readme": "evalmd README.md",
"test": "npm run --silent coverage",
"tests-only": "node test"
},
- "version": "6.5.2"
+ "version": "6.4.0"
}
diff --git a/deps/npm/node_modules/qs/test/parse.js b/deps/npm/node_modules/qs/test/parse.js
index 0f8fe4578a..e451e91fe3 100644
--- a/deps/npm/node_modules/qs/test/parse.js
+++ b/deps/npm/node_modules/qs/test/parse.js
@@ -2,9 +2,7 @@
var test = require('tape');
var qs = require('../');
-var utils = require('../lib/utils');
var iconv = require('iconv-lite');
-var SaferBuffer = require('safer-buffer').Buffer;
test('parse()', function (t) {
t.test('parses a simple string', function (st) {
@@ -232,7 +230,7 @@ test('parse()', function (t) {
});
t.test('parses buffers correctly', function (st) {
- var b = SaferBuffer.from('test');
+ var b = new Buffer('test');
st.deepEqual(qs.parse({ a: b }), { a: b });
st.end();
});
@@ -306,13 +304,6 @@ test('parse()', function (t) {
st.end();
});
- t.test('allows for query string prefix', function (st) {
- st.deepEqual(qs.parse('?foo=bar', { ignoreQueryPrefix: true }), { foo: 'bar' });
- st.deepEqual(qs.parse('foo=bar', { ignoreQueryPrefix: true }), { foo: 'bar' });
- st.deepEqual(qs.parse('?foo=bar', { ignoreQueryPrefix: false }), { '?foo': 'bar' });
- st.end();
- });
-
t.test('parses an object', function (st) {
var input = {
'user[name]': { 'pop[bob]': 3 },
@@ -397,33 +388,6 @@ test('parse()', function (t) {
st.end();
});
- t.test('does not crash when parsing deep objects', function (st) {
- var parsed;
- var str = 'foo';
-
- for (var i = 0; i < 5000; i++) {
- str += '[p]';
- }
-
- str += '=bar';
-
- st.doesNotThrow(function () {
- parsed = qs.parse(str, { depth: 5000 });
- });
-
- st.equal('foo' in parsed, true, 'parsed has "foo" property');
-
- var depth = 0;
- var ref = parsed.foo;
- while ((ref = ref.p)) {
- depth += 1;
- }
-
- st.equal(depth, 5000, 'parsed is 5000 properties deep');
-
- st.end();
- });
-
t.test('parses null objects correctly', { skip: !Object.create }, function (st) {
var a = Object.create(null);
a.b = 'c';
@@ -540,35 +504,16 @@ test('parse()', function (t) {
result.push(parseInt(parts[1], 16));
parts = reg.exec(str);
}
- return iconv.decode(SaferBuffer.from(result), 'shift_jis').toString();
+ return iconv.decode(new Buffer(result), 'shift_jis').toString();
}
}), { 県: '大阪府' });
st.end();
});
- t.test('receives the default decoder as a second argument', function (st) {
- st.plan(1);
- qs.parse('a', {
- decoder: function (str, defaultDecoder) {
- st.equal(defaultDecoder, utils.decode);
- }
- });
- st.end();
- });
-
t.test('throws error with wrong decoder', function (st) {
- st['throws'](function () {
+ st.throws(function () {
qs.parse({}, { decoder: 'string' });
}, new TypeError('Decoder has to be a function.'));
st.end();
});
-
- t.test('does not mutate the options argument', function (st) {
- var options = {};
- qs.parse('a[b]=true', options);
- st.deepEqual(options, {});
- st.end();
- });
-
- t.end();
});
diff --git a/deps/npm/node_modules/qs/test/stringify.js b/deps/npm/node_modules/qs/test/stringify.js
index 165ac621fe..711dae507d 100644
--- a/deps/npm/node_modules/qs/test/stringify.js
+++ b/deps/npm/node_modules/qs/test/stringify.js
@@ -2,9 +2,7 @@
var test = require('tape');
var qs = require('../');
-var utils = require('../lib/utils');
var iconv = require('iconv-lite');
-var SaferBuffer = require('safer-buffer').Buffer;
test('stringify()', function (t) {
t.test('stringifies a querystring object', function (st) {
@@ -19,16 +17,6 @@ test('stringify()', function (t) {
st.end();
});
- t.test('adds query prefix', function (st) {
- st.equal(qs.stringify({ a: 'b' }, { addQueryPrefix: true }), '?a=b');
- st.end();
- });
-
- t.test('with query prefix, outputs blank string given an empty object', function (st) {
- st.equal(qs.stringify({}, { addQueryPrefix: true }), '');
- st.end();
- });
-
t.test('stringifies a nested object', function (st) {
st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c');
st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }), 'a%5Bb%5D%5Bc%5D%5Bd%5D=e');
@@ -337,8 +325,8 @@ test('stringify()', function (t) {
});
t.test('stringifies buffer values', function (st) {
- st.equal(qs.stringify({ a: SaferBuffer.from('test') }), 'a=test');
- st.equal(qs.stringify({ a: { b: SaferBuffer.from('test') } }), 'a%5Bb%5D=test');
+ st.equal(qs.stringify({ a: new Buffer('test') }), 'a=test');
+ st.equal(qs.stringify({ a: { b: new Buffer('test') } }), 'a%5Bb%5D=test');
st.end();
});
@@ -464,25 +452,15 @@ test('stringify()', function (t) {
st.end();
});
- t.test('receives the default encoder as a second argument', function (st) {
- st.plan(2);
- qs.stringify({ a: 1 }, {
- encoder: function (str, defaultEncoder) {
- st.equal(defaultEncoder, utils.encode);
- }
- });
- st.end();
- });
-
t.test('throws error with wrong encoder', function (st) {
- st['throws'](function () {
+ st.throws(function () {
qs.stringify({}, { encoder: 'string' });
}, new TypeError('Encoder has to be a function.'));
st.end();
});
t.test('can use custom encoder for a buffer object', { skip: typeof Buffer === 'undefined' }, function (st) {
- st.equal(qs.stringify({ a: SaferBuffer.from([1]) }, {
+ st.equal(qs.stringify({ a: new Buffer([1]) }, {
encoder: function (buffer) {
if (typeof buffer === 'string') {
return buffer;
@@ -505,7 +483,7 @@ test('stringify()', function (t) {
mutatedDate.toISOString = function () {
throw new SyntaxError();
};
- st['throws'](function () {
+ st.throws(function () {
mutatedDate.toISOString();
}, SyntaxError);
st.equal(
@@ -547,7 +525,7 @@ test('stringify()', function (t) {
t.test('Edge cases and unknown formats', function (st) {
['UFO1234', false, 1234, null, {}, []].forEach(
function (format) {
- st['throws'](
+ st.throws(
function () {
qs.stringify({ a: 'b c' }, { format: format });
},
@@ -586,12 +564,4 @@ test('stringify()', function (t) {
st.end();
});
- t.test('does not mutate the options argument', function (st) {
- var options = {};
- qs.stringify({}, options);
- st.deepEqual(options, {});
- st.end();
- });
-
- t.end();
});
diff --git a/deps/npm/node_modules/qs/test/utils.js b/deps/npm/node_modules/qs/test/utils.js
index eff4011a40..0721dd8ec6 100644
--- a/deps/npm/node_modules/qs/test/utils.js
+++ b/deps/npm/node_modules/qs/test/utils.js
@@ -20,15 +20,3 @@ test('merge()', function (t) {
t.end();
});
-
-test('assign()', function (t) {
- var target = { a: 1, b: 2 };
- var source = { b: 3, c: 4 };
- var result = utils.assign(target, source);
-
- t.equal(result, target, 'returns the target');
- t.deepEqual(target, { a: 1, b: 3, c: 4 }, 'target and source are merged');
- t.deepEqual(source, { b: 3, c: 4 }, 'source is untouched');
-
- t.end();
-});
diff --git a/deps/npm/node_modules/request/CHANGELOG.md b/deps/npm/node_modules/request/CHANGELOG.md
index 059d98d2fe..af76719b4b 100644
--- a/deps/npm/node_modules/request/CHANGELOG.md
+++ b/deps/npm/node_modules/request/CHANGELOG.md
@@ -1,38 +1,7 @@
## Change Log
-### v2.86.0 (2018/05/15)
-- [#2885](https://github.com/request/request/pull/2885) Remove redundant code (for Node.js 0.9.4 and below) and dependency (@ChALkeR)
-- [#2942](https://github.com/request/request/pull/2942) Make Test GREEN Again! (@simov)
-- [#2923](https://github.com/request/request/pull/2923) Alterations for failing CI tests (@gareth-robinson)
-
-### v2.85.0 (2018/03/12)
-- [#2880](https://github.com/request/request/pull/2880) Revert "Update hawk to 7.0.7 (#2880)" (@simov)
-
-### v2.84.0 (2018/03/12)
-- [#2793](https://github.com/request/request/pull/2793) Fixed calculation of oauth_body_hash, issue #2792 (@dvishniakov)
-- [#2880](https://github.com/request/request/pull/2880) Update hawk to 7.0.7 (#2880) (@kornel-kedzierski)
-
-### v2.83.0 (2017/09/27)
-- [#2776](https://github.com/request/request/pull/2776) Updating tough-cookie due to security fix. (#2776) (@karlnorling)
-
-### v2.82.0 (2017/09/19)
-- [#2703](https://github.com/request/request/pull/2703) Add Node.js v8 to Travis CI (@ryysud)
-- [#2751](https://github.com/request/request/pull/2751) Update of hawk and qs to latest version (#2751) (@Olivier-Moreau)
-- [#2658](https://github.com/request/request/pull/2658) Fixed some text in README.md (#2658) (@Marketionist)
-- [#2635](https://github.com/request/request/pull/2635) chore(package): update aws-sign2 to version 0.7.0 (#2635) (@greenkeeperio-bot)
-- [#2641](https://github.com/request/request/pull/2641) Update README to simplify & update convenience methods (#2641) (@FredKSchott)
-- [#2541](https://github.com/request/request/pull/2541) Add convenience method for HTTP OPTIONS (#2541) (@jamesseanwright)
-- [#2605](https://github.com/request/request/pull/2605) Add promise support section to README (#2605) (@FredKSchott)
-- [#2579](https://github.com/request/request/pull/2579) refactor(lint): replace eslint with standard (#2579) (@ahmadnassri)
-- [#2598](https://github.com/request/request/pull/2598) Update codecov to version 2.0.2 🚀 (@greenkeeperio-bot)
-- [#2590](https://github.com/request/request/pull/2590) Adds test-timing keepAlive test (@nicjansma)
-- [#2589](https://github.com/request/request/pull/2589) fix tabulation on request example README.MD (@odykyi)
-- [#2594](https://github.com/request/request/pull/2594) chore(dependencies): har-validator to 5.x [removes babel dep] (@ahmadnassri)
-
### v2.81.0 (2017/03/09)
- [#2584](https://github.com/request/request/pull/2584) Security issue: Upgrade qs to version 6.4.0 (@sergejmueller)
-- [#2578](https://github.com/request/request/pull/2578) safe-buffer doesn't zero-fill by default, its just a polyfill. (#2578) (@mikeal)
-- [#2566](https://github.com/request/request/pull/2566) Timings: Tracks 'lookup', adds 'wait' time, fixes connection re-use (#2566) (@nicjansma)
- [#2574](https://github.com/request/request/pull/2574) Migrating to safe-buffer for improved security. (@mikeal)
- [#2573](https://github.com/request/request/pull/2573) fixes #2572 (@ahmadnassri)
@@ -217,8 +186,7 @@
- [#1687](https://github.com/request/request/pull/1687) Fix caseless bug - content-type not being set for multipart/form-data (@simov, @garymathews)
### v2.59.0 (2015/07/20)
-- [#1671](https://github.com/request/request/pull/1671) Add tests and docs for using the agent, agentClass, agentOptions and forever options.
- Forever option defaults to using http(s).Agent in node 0.12+ (@simov)
+- [#1671](https://github.com/request/request/pull/1671) Add tests and docs for using the agent, agentClass, agentOptions and forever options. Forever option defaults to using http(s).Agent in node 0.12+ (@simov)
- [#1679](https://github.com/request/request/pull/1679) Fix - do not remove OAuth param when using OAuth realm (@simov, @jhalickman)
- [#1668](https://github.com/request/request/pull/1668) updated dependencies (@deamme)
- [#1656](https://github.com/request/request/pull/1656) Fix form method (@simov)
diff --git a/deps/npm/node_modules/request/README.md b/deps/npm/node_modules/request/README.md
index 81ffd95efd..2317391149 100644
--- a/deps/npm/node_modules/request/README.md
+++ b/deps/npm/node_modules/request/README.md
@@ -28,7 +28,6 @@ request('http://www.google.com', function (error, response, body) {
## Table of contents
- [Streaming](#streaming)
-- [Promises & Async/Await](#promises--asyncawait)
- [Forms](#forms)
- [HTTP Authentication](#http-authentication)
- [Custom HTTP Headers](#custom-http-headers)
@@ -143,22 +142,6 @@ You can still use intermediate proxies, the requests will still follow HTTP forw
---
-## Promises & Async/Await
-
-`request` supports both streaming and callback interfaces natively. If you'd like `request` to return a Promise instead, you can use an alternative interface wrapper for `request`. These wrappers can be useful if you prefer to work with Promises, or if you'd like to use `async`/`await` in ES2017.
-
-Several alternative interfaces are provided by the request team, including:
-- [`request-promise`](https://github.com/request/request-promise) (uses [Bluebird](https://github.com/petkaantonov/bluebird) Promises)
-- [`request-promise-native`](https://github.com/request/request-promise-native) (uses native Promises)
-- [`request-promise-any`](https://github.com/request/request-promise-any) (uses [any-promise](https://www.npmjs.com/package/any-promise) Promises)
-
-
-[back to top](#table-of-contents)
-
-
----
-
-
## Forms
`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API.
@@ -187,7 +170,7 @@ var formData = {
// Pass a simple key-value pair
my_field: 'my_value',
// Pass data via Buffers
- my_buffer: Buffer.from([1, 2, 3]),
+ my_buffer: new Buffer([1, 2, 3]),
// Pass data via Streams
my_file: fs.createReadStream(__dirname + '/unicycle.jpg'),
// Pass multiple values /w an Array
@@ -221,7 +204,7 @@ For advanced cases, you can access the form-data object itself via `r.form()`. T
var r = request.post('http://service.com/upload', function optionalCallback(err, httpResponse, body) {...})
var form = r.form();
form.append('my_field', 'my_value');
-form.append('my_buffer', Buffer.from([1, 2, 3]));
+form.append('my_buffer', new Buffer([1, 2, 3]));
form.append('custom_file', fs.createReadStream(__dirname + '/unicycle.jpg'), {filename: 'unicycle.jpg'});
```
See the [form-data README](https://github.com/form-data/form-data) for more information & examples.
@@ -625,7 +608,7 @@ request.get(options);
### Using `options.agentOptions`
-In the example below, we call an API that requires client side SSL certificate
+In the example below, we call an API requires client side SSL certificate
(in PEM format) with passphrase protected private key (in PEM format) and disable the SSLv3 protocol:
```js
@@ -684,7 +667,7 @@ request.get({
The `options.har` property will override the values: `url`, `method`, `qs`, `headers`, `form`, `formData`, `body`, `json`, as well as construct multipart data and read files from disk when `request.postData.params[].fileName` is present without a matching `value`.
-A validation step will check if the HAR Request format matches the latest spec (v1.2) and will skip parsing if not matching.
+a validation step will check if the HAR Request format matches the latest spec (v1.2) and will skip parsing if not matching.
```js
var request = require('request')
@@ -743,7 +726,7 @@ The first argument can be either a `url` or an `options` object. The only requir
- `qs` - object containing querystring values to be appended to the `uri`
- `qsParseOptions` - object containing options to pass to the [qs.parse](https://github.com/hapijs/qs#parsing-objects) method. Alternatively pass options to the [querystring.parse](https://nodejs.org/docs/v0.12.0/api/querystring.html#querystring_querystring_parse_str_sep_eq_options) method using this format `{sep:';', eq:':', options:{}}`
- `qsStringifyOptions` - object containing options to pass to the [qs.stringify](https://github.com/hapijs/qs#stringifying) method. Alternatively pass options to the [querystring.stringify](https://nodejs.org/docs/v0.12.0/api/querystring.html#querystring_querystring_stringify_obj_sep_eq_options) method using this format `{sep:';', eq:':', options:{}}`. For example, to change the way arrays are converted to query strings using the `qs` module pass the `arrayFormat` option with one of `indices|brackets|repeat`
-- `useQuerystring` - if true, use `querystring` to stringify and parse
+- `useQuerystring` - If true, use `querystring` to stringify and parse
querystrings, otherwise use `qs` (default: `false`). Set this option to
`true` if you need arrays to be serialized as `foo=bar&foo=baz` instead of the
default `foo[0]=bar&foo[1]=baz`.
@@ -752,7 +735,7 @@ The first argument can be either a `url` or an `options` object. The only requir
- `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer`, `String` or `ReadStream`. If `json` is `true`, then `body` must be a JSON-serializable object.
- `form` - when passed an object or a querystring, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded` header. When passed no options, a `FormData` instance is returned (and is piped to request). See "Forms" section above.
-- `formData` - data to pass for a `multipart/form-data` request. See
+- `formData` - Data to pass for a `multipart/form-data` request. See
[Forms](#forms) section above.
- `multipart` - array of objects which contain their own headers and `body`
attributes. Sends a `multipart/related` request. See [Forms](#forms) section
@@ -769,11 +752,11 @@ The first argument can be either a `url` or an `options` object. The only requir
---
-- `auth` - a hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). See documentation above.
-- `oauth` - options for OAuth HMAC-SHA1 signing. See documentation above.
-- `hawk` - options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).
+- `auth` - A hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). See documentation above.
+- `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above.
+- `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).
- `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`, and optionally `session` (note that this only works for services that require session as part of the canonical string). Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services). If you want to use AWS sign version 4 use the parameter `sign_version` with value `4` otherwise the default is version 2. **Note:** you need to `npm install aws4` first.
-- `httpSignature` - options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.
+- `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.
---
@@ -785,9 +768,9 @@ The first argument can be either a `url` or an `options` object. The only requir
---
-- `encoding` - encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`. Anything else **(including the default value of `undefined`)** will be passed as the [encoding](http://nodejs.org/api/buffer.html#buffer_buffer) parameter to `toString()` (meaning this is effectively `utf8` by default). (**Note:** if you expect binary data, you should set `encoding: null`.)
-- `gzip` - if `true`, add an `Accept-Encoding` header to request compressed content encodings from the server (if not already present) and decode supported content encodings in the response. **Note:** Automatic decoding of the response content is performed on the body data returned through `request` (both through the `request` stream and passed to the callback function) but is not performed on the `response` stream (available from the `response` event) which is the unmodified `http.IncomingMessage` object which may contain compressed data. See example below.
-- `jar` - if `true`, remember cookies for future use (or define your custom cookie jar; see examples section)
+- `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`. Anything else **(including the default value of `undefined`)** will be passed as the [encoding](http://nodejs.org/api/buffer.html#buffer_buffer) parameter to `toString()` (meaning this is effectively `utf8` by default). (**Note:** if you expect binary data, you should set `encoding: null`.)
+- `gzip` - If `true`, add an `Accept-Encoding` header to request compressed content encodings from the server (if not already present) and decode supported content encodings in the response. **Note:** Automatic decoding of the response content is performed on the body data returned through `request` (both through the `request` stream and passed to the callback function) but is not performed on the `response` stream (available from the `response` event) which is the unmodified `http.IncomingMessage` object which may contain compressed data. See example below.
+- `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section)
---
@@ -795,14 +778,14 @@ The first argument can be either a `url` or an `options` object. The only requir
- `agentClass` - alternatively specify your agent's class name
- `agentOptions` - and pass its options. **Note:** for HTTPS see [tls API doc for TLS/SSL options](http://nodejs.org/api/tls.html#tls_tls_connect_options_callback) and the [documentation above](#using-optionsagentoptions).
- `forever` - set to `true` to use the [forever-agent](https://github.com/request/forever-agent) **Note:** Defaults to `http(s).Agent({keepAlive:true})` in node 0.12+
-- `pool` - an object describing which agents to use for the request. If this option is omitted the request will use the global agent (as long as your options allow for it). Otherwise, request will search the pool for your custom agent. If no custom agent is found, a new agent will be created and added to the pool. **Note:** `pool` is used only when the `agent` option is not specified.
+- `pool` - An object describing which agents to use for the request. If this option is omitted the request will use the global agent (as long as your options allow for it). Otherwise, request will search the pool for your custom agent. If no custom agent is found, a new agent will be created and added to the pool. **Note:** `pool` is used only when the `agent` option is not specified.
- A `maxSockets` property can also be provided on the `pool` object to set the max number of sockets for all agents created (ex: `pool: {maxSockets: Infinity}`).
- Note that if you are sending multiple requests in a loop and creating
multiple new `pool` objects, `maxSockets` will not work as intended. To
work around this, either use [`request.defaults`](#requestdefaultsoptions)
with your pool options or create the pool object with the `maxSockets`
property outside of the loop.
-- `timeout` - integer containing the number of milliseconds to wait for a
+- `timeout` - Integer containing the number of milliseconds to wait for a
server to send response headers (and start the response body) before aborting
the request. Note that if the underlying TCP connection cannot be established,
the OS-wide TCP connection timeout will overrule the `timeout` option ([the
@@ -812,9 +795,9 @@ default in Linux can be anywhere from 20-120 seconds][linux-timeout]).
---
-- `localAddress` - local interface to bind for network connections.
-- `proxy` - an HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`)
-- `strictSSL` - if `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option.
+- `localAddress` - Local interface to bind for network connections.
+- `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`)
+- `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option.
- `tunnel` - controls the behavior of
[HTTP `CONNECT` tunneling](https://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_tunneling)
as follows:
@@ -822,14 +805,14 @@ default in Linux can be anywhere from 20-120 seconds][linux-timeout]).
- `true` - always tunnel to the destination by making a `CONNECT` request to
the proxy
- `false` - request the destination as a `GET` request.
-- `proxyHeaderWhiteList` - a whitelist of headers to send to a
+- `proxyHeaderWhiteList` - A whitelist of headers to send to a
tunneling proxy.
-- `proxyHeaderExclusiveList` - a whitelist of headers to send
+- `proxyHeaderExclusiveList` - A whitelist of headers to send
exclusively to a tunneling proxy and not to destination.
---
-- `time` - if `true`, the request-response cycle (including all redirects) is timed at millisecond resolution. When set, the following properties are added to the response object:
+- `time` - If `true`, the request-response cycle (including all redirects) is timed at millisecond resolution. When set, the following properties are added to the response object:
- `elapsedTime` Duration of the entire request/response in milliseconds (*deprecated*).
- `responseStartTime` Timestamp when the response began (in Unix Epoch milliseconds) (*deprecated*).
- `timingStart` Timestamp of the start of the request (in Unix Epoch milliseconds).
@@ -847,7 +830,7 @@ default in Linux can be anywhere from 20-120 seconds][linux-timeout]).
- `download`: Duration of HTTP download (`timings.end` - `timings.response`)
- `total`: Duration entire HTTP round-trip (`timings.end`)
-- `har` - a [HAR 1.2 Request Object](http://www.softwareishard.com/blog/har-12-spec/#request), will be processed from HAR format into options overwriting matching values *(see the [HAR 1.2 section](#support-for-har-1.2) for details)*
+- `har` - A [HAR 1.2 Request Object](http://www.softwareishard.com/blog/har-12-spec/#request), will be processed from HAR format into options overwriting matching values *(see the [HAR 1.2 section](#support-for-har-1.2) for details)*
- `callback` - alternatively pass the request's callback in the options object
The callback argument gets 3 arguments:
@@ -891,19 +874,55 @@ var specialRequest = baseRequest.defaults({
})
```
-### request.METHOD()
+### request.put
-These HTTP method convenience functions act just like `request()` but with a default method already set for you:
+Same as `request()`, but defaults to `method: "PUT"`.
-- *request.get()*: Defaults to `method: "GET"`.
-- *request.post()*: Defaults to `method: "POST"`.
-- *request.put()*: Defaults to `method: "PUT"`.
-- *request.patch()*: Defaults to `method: "PATCH"`.
-- *request.del() / request.delete()*: Defaults to `method: "DELETE"`.
-- *request.head()*: Defaults to `method: "HEAD"`.
-- *request.options()*: Defaults to `method: "OPTIONS"`.
+```js
+request.put(url)
+```
+
+### request.patch
-### request.cookie()
+Same as `request()`, but defaults to `method: "PATCH"`.
+
+```js
+request.patch(url)
+```
+
+### request.post
+
+Same as `request()`, but defaults to `method: "POST"`.
+
+```js
+request.post(url)
+```
+
+### request.head
+
+Same as `request()`, but defaults to `method: "HEAD"`.
+
+```js
+request.head(url)
+```
+
+### request.del / request.delete
+
+Same as `request()`, but defaults to `method: "DELETE"`.
+
+```js
+request.del(url)
+request.delete(url)
+```
+
+### request.get
+
+Same as `request()` (for uniformity).
+
+```js
+request.get(url)
+```
+### request.cookie
Function that creates a new cookie.
@@ -1017,8 +1036,7 @@ the server sent a compressed response.
console.log('server encoded the data as: ' + (response.headers['content-encoding'] || 'identity'))
console.log('the decoded data is: ' + body)
}
- )
- .on('data', function(data) {
+ ).on('data', function(data) {
// decompressed data as it is received
console.log('decoded chunk: ' + data)
})
diff --git a/deps/npm/node_modules/request/index.js b/deps/npm/node_modules/request/index.js
index f9b480a1d0..9ec65ea268 100755
--- a/deps/npm/node_modules/request/index.js
+++ b/deps/npm/node_modules/request/index.js
@@ -14,14 +14,15 @@
'use strict'
-var extend = require('extend')
-var cookies = require('./lib/cookies')
-var helpers = require('./lib/helpers')
+var extend = require('extend')
+ , cookies = require('./lib/cookies')
+ , helpers = require('./lib/helpers')
var paramsHaveRequestBody = helpers.paramsHaveRequestBody
+
// organize params for patch, post, put, head, del
-function initParams (uri, options, callback) {
+function initParams(uri, options, callback) {
if (typeof options === 'function') {
callback = options
}
@@ -65,7 +66,6 @@ function verbFunc (verb) {
// define like this to please codeintel/intellisense IDEs
request.get = verbFunc('get')
request.head = verbFunc('head')
-request.options = verbFunc('options')
request.post = verbFunc('post')
request.put = verbFunc('put')
request.patch = verbFunc('patch')
@@ -81,6 +81,7 @@ request.cookie = function (str) {
}
function wrapRequestMethod (method, options, requester, verb) {
+
return function (uri, opts, callback) {
var params = initParams(uri, opts, callback)
@@ -111,15 +112,15 @@ request.defaults = function (options, requester) {
options = {}
}
- var defaults = wrapRequestMethod(self, options, requester)
+ var defaults = wrapRequestMethod(self, options, requester)
var verbs = ['get', 'head', 'post', 'put', 'patch', 'del', 'delete']
- verbs.forEach(function (verb) {
- defaults[verb] = wrapRequestMethod(self[verb], options, requester, verb)
+ verbs.forEach(function(verb) {
+ defaults[verb] = wrapRequestMethod(self[verb], options, requester, verb)
})
- defaults.cookie = wrapRequestMethod(self.cookie, options, requester)
- defaults.jar = self.jar
+ defaults.cookie = wrapRequestMethod(self.cookie, options, requester)
+ defaults.jar = self.jar
defaults.defaults = self.defaults
return defaults
}
@@ -145,11 +146,11 @@ request.initParams = initParams
// Backwards compatibility for request.debug
Object.defineProperty(request, 'debug', {
- enumerable: true,
- get: function () {
+ enumerable : true,
+ get : function() {
return request.Request.debug
},
- set: function (debug) {
+ set : function(debug) {
request.Request.debug = debug
}
})
diff --git a/deps/npm/node_modules/request/lib/auth.js b/deps/npm/node_modules/request/lib/auth.js
index 42f9adaec7..559ca57be9 100644
--- a/deps/npm/node_modules/request/lib/auth.js
+++ b/deps/npm/node_modules/request/lib/auth.js
@@ -1,11 +1,12 @@
'use strict'
var caseless = require('caseless')
-var uuid = require('uuid')
-var helpers = require('./helpers')
+ , uuid = require('uuid')
+ , helpers = require('./helpers')
var md5 = helpers.md5
-var toBase64 = helpers.toBase64
+ , toBase64 = helpers.toBase64
+
function Auth (request) {
// define all public properties here
@@ -125,7 +126,7 @@ Auth.prototype.digest = function (method, path, authHeader) {
Auth.prototype.onRequest = function (user, pass, sendImmediately, bearer) {
var self = this
- var request = self.request
+ , request = self.request
var authHeader
if (bearer === undefined && user === undefined) {
@@ -142,7 +143,7 @@ Auth.prototype.onRequest = function (user, pass, sendImmediately, bearer) {
Auth.prototype.onResponse = function (response) {
var self = this
- var request = self.request
+ , request = self.request
if (!self.hasAuth || self.sentAuth) { return null }
diff --git a/deps/npm/node_modules/request/lib/cookies.js b/deps/npm/node_modules/request/lib/cookies.js
index bd5d46bead..412c07d63b 100644
--- a/deps/npm/node_modules/request/lib/cookies.js
+++ b/deps/npm/node_modules/request/lib/cookies.js
@@ -3,9 +3,10 @@
var tough = require('tough-cookie')
var Cookie = tough.Cookie
-var CookieJar = tough.CookieJar
+ , CookieJar = tough.CookieJar
-exports.parse = function (str) {
+
+exports.parse = function(str) {
if (str && str.uri) {
str = str.uri
}
@@ -16,23 +17,23 @@ exports.parse = function (str) {
}
// Adapt the sometimes-Async api of tough.CookieJar to our requirements
-function RequestJar (store) {
+function RequestJar(store) {
var self = this
self._jar = new CookieJar(store, {looseMode: true})
}
-RequestJar.prototype.setCookie = function (cookieOrStr, uri, options) {
+RequestJar.prototype.setCookie = function(cookieOrStr, uri, options) {
var self = this
return self._jar.setCookieSync(cookieOrStr, uri, options || {})
}
-RequestJar.prototype.getCookieString = function (uri) {
+RequestJar.prototype.getCookieString = function(uri) {
var self = this
return self._jar.getCookieStringSync(uri)
}
-RequestJar.prototype.getCookies = function (uri) {
+RequestJar.prototype.getCookies = function(uri) {
var self = this
return self._jar.getCookiesSync(uri)
}
-exports.jar = function (store) {
+exports.jar = function(store) {
return new RequestJar(store)
}
diff --git a/deps/npm/node_modules/request/lib/getProxyFromURI.js b/deps/npm/node_modules/request/lib/getProxyFromURI.js
index 4633ba5f63..c2013a6e12 100644
--- a/deps/npm/node_modules/request/lib/getProxyFromURI.js
+++ b/deps/npm/node_modules/request/lib/getProxyFromURI.js
@@ -1,33 +1,33 @@
'use strict'
-function formatHostname (hostname) {
+function formatHostname(hostname) {
// canonicalize the hostname, so that 'oogle.com' won't match 'google.com'
return hostname.replace(/^\.*/, '.').toLowerCase()
}
-function parseNoProxyZone (zone) {
+function parseNoProxyZone(zone) {
zone = zone.trim().toLowerCase()
var zoneParts = zone.split(':', 2)
- var zoneHost = formatHostname(zoneParts[0])
- var zonePort = zoneParts[1]
- var hasPort = zone.indexOf(':') > -1
+ , zoneHost = formatHostname(zoneParts[0])
+ , zonePort = zoneParts[1]
+ , hasPort = zone.indexOf(':') > -1
return {hostname: zoneHost, port: zonePort, hasPort: hasPort}
}
-function uriInNoProxy (uri, noProxy) {
+function uriInNoProxy(uri, noProxy) {
var port = uri.port || (uri.protocol === 'https:' ? '443' : '80')
- var hostname = formatHostname(uri.hostname)
- var noProxyList = noProxy.split(',')
+ , hostname = formatHostname(uri.hostname)
+ , noProxyList = noProxy.split(',')
// iterate through the noProxyList until it finds a match.
- return noProxyList.map(parseNoProxyZone).some(function (noProxyZone) {
+ return noProxyList.map(parseNoProxyZone).some(function(noProxyZone) {
var isMatchedAt = hostname.indexOf(noProxyZone.hostname)
- var hostnameMatched = (
- isMatchedAt > -1 &&
- (isMatchedAt === hostname.length - noProxyZone.hostname.length)
- )
+ , hostnameMatched = (
+ isMatchedAt > -1 &&
+ (isMatchedAt === hostname.length - noProxyZone.hostname.length)
+ )
if (noProxyZone.hasPort) {
return (port === noProxyZone.port) && hostnameMatched
@@ -37,7 +37,7 @@ function uriInNoProxy (uri, noProxy) {
})
}
-function getProxyFromURI (uri) {
+function getProxyFromURI(uri) {
// Decide the proper request proxy to use based on the request URI object and the
// environmental variables (NO_PROXY, HTTP_PROXY, etc.)
// respect NO_PROXY environment variables (see: http://lynx.isc.org/current/breakout/lynx_help/keystrokes/environments.html)
@@ -60,14 +60,14 @@ function getProxyFromURI (uri) {
if (uri.protocol === 'http:') {
return process.env.HTTP_PROXY ||
- process.env.http_proxy || null
+ process.env.http_proxy || null
}
if (uri.protocol === 'https:') {
return process.env.HTTPS_PROXY ||
- process.env.https_proxy ||
- process.env.HTTP_PROXY ||
- process.env.http_proxy || null
+ process.env.https_proxy ||
+ process.env.HTTP_PROXY ||
+ process.env.http_proxy || null
}
// if none of that works, return null
diff --git a/deps/npm/node_modules/request/lib/har.js b/deps/npm/node_modules/request/lib/har.js
index 2f660309d8..3059574878 100644
--- a/deps/npm/node_modules/request/lib/har.js
+++ b/deps/npm/node_modules/request/lib/har.js
@@ -71,10 +71,14 @@ Har.prototype.prep = function (data) {
'multipart/related',
'multipart/form-data',
'multipart/alternative'])) {
+
// reset values
data.postData.mimeType = 'multipart/form-data'
- } else if (some([
+ }
+
+ else if (some([
'application/x-www-form-urlencoded'])) {
+
if (!data.postData.params) {
data.postData.text = ''
} else {
@@ -83,11 +87,14 @@ Har.prototype.prep = function (data) {
// always overwrite
data.postData.text = qs.stringify(data.postData.paramsObj)
}
- } else if (some([
+ }
+
+ else if (some([
'text/json',
'text/x-json',
'application/json',
'application/x-json'])) {
+
data.postData.mimeType = 'application/json'
if (data.postData.text) {
@@ -161,12 +168,14 @@ Har.prototype.options = function (options) {
}
if (test('application/x-www-form-urlencoded')) {
options.form = req.postData.paramsObj
- } else if (test('application/json')) {
+ }
+ else if (test('application/json')) {
if (req.postData.jsonObj) {
options.body = req.postData.jsonObj
options.json = true
}
- } else if (test('multipart/form-data')) {
+ }
+ else if (test('multipart/form-data')) {
options.formData = {}
req.postData.params.forEach(function (param) {
@@ -193,7 +202,8 @@ Har.prototype.options = function (options) {
options.formData[param.name] = attachment
})
- } else {
+ }
+ else {
if (req.postData.text) {
options.body = req.postData.text
}
diff --git a/deps/npm/node_modules/request/lib/helpers.js b/deps/npm/node_modules/request/lib/helpers.js
index 8b2a7e6ebf..05c77a0bdd 100644
--- a/deps/npm/node_modules/request/lib/helpers.js
+++ b/deps/npm/node_modules/request/lib/helpers.js
@@ -1,14 +1,14 @@
'use strict'
var jsonSafeStringify = require('json-stringify-safe')
-var crypto = require('crypto')
-var Buffer = require('safe-buffer').Buffer
+ , crypto = require('crypto')
+ , Buffer = require('safe-buffer').Buffer
var defer = typeof setImmediate === 'undefined'
? process.nextTick
: setImmediate
-function paramsHaveRequestBody (params) {
+function paramsHaveRequestBody(params) {
return (
params.body ||
params.requestBodyStream ||
@@ -57,10 +57,10 @@ function version () {
}
exports.paramsHaveRequestBody = paramsHaveRequestBody
-exports.safeStringify = safeStringify
-exports.md5 = md5
-exports.isReadStream = isReadStream
-exports.toBase64 = toBase64
-exports.copy = copy
-exports.version = version
-exports.defer = defer
+exports.safeStringify = safeStringify
+exports.md5 = md5
+exports.isReadStream = isReadStream
+exports.toBase64 = toBase64
+exports.copy = copy
+exports.version = version
+exports.defer = defer
diff --git a/deps/npm/node_modules/request/lib/multipart.js b/deps/npm/node_modules/request/lib/multipart.js
index d6b9812777..fc7b50276e 100644
--- a/deps/npm/node_modules/request/lib/multipart.js
+++ b/deps/npm/node_modules/request/lib/multipart.js
@@ -1,9 +1,10 @@
'use strict'
var uuid = require('uuid')
-var CombinedStream = require('combined-stream')
-var isstream = require('isstream')
-var Buffer = require('safe-buffer').Buffer
+ , CombinedStream = require('combined-stream')
+ , isstream = require('isstream')
+ , Buffer = require('safe-buffer').Buffer
+
function Multipart (request) {
this.request = request
@@ -14,8 +15,8 @@ function Multipart (request) {
Multipart.prototype.isChunked = function (options) {
var self = this
- var chunked = false
- var parts = options.data || options
+ , chunked = false
+ , parts = options.data || options
if (!parts.forEach) {
self.request.emit('error', new Error('Argument error, options.multipart.'))
@@ -102,7 +103,7 @@ Multipart.prototype.onRequest = function (options) {
var self = this
var chunked = self.isChunked(options)
- var parts = options.data || options
+ , parts = options.data || options
self.setHeaders(chunked)
self.chunked = chunked
diff --git a/deps/npm/node_modules/request/lib/oauth.js b/deps/npm/node_modules/request/lib/oauth.js
index 01c6262827..13b693773e 100644
--- a/deps/npm/node_modules/request/lib/oauth.js
+++ b/deps/npm/node_modules/request/lib/oauth.js
@@ -1,12 +1,13 @@
'use strict'
var url = require('url')
-var qs = require('qs')
-var caseless = require('caseless')
-var uuid = require('uuid')
-var oauth = require('oauth-sign')
-var crypto = require('crypto')
-var Buffer = require('safe-buffer').Buffer
+ , qs = require('qs')
+ , caseless = require('caseless')
+ , uuid = require('uuid')
+ , oauth = require('oauth-sign')
+ , crypto = require('crypto')
+ , Buffer = require('safe-buffer').Buffer
+
function OAuth (request) {
this.request = request
@@ -22,7 +23,7 @@ OAuth.prototype.buildParams = function (_oauth, uri, method, query, form, qsLib)
oa.oauth_version = '1.0'
}
if (!oa.oauth_timestamp) {
- oa.oauth_timestamp = Math.floor(Date.now() / 1000).toString()
+ oa.oauth_timestamp = Math.floor( Date.now() / 1000 ).toString()
}
if (!oa.oauth_nonce) {
oa.oauth_nonce = uuid().replace(/-/g, '')
@@ -31,11 +32,11 @@ OAuth.prototype.buildParams = function (_oauth, uri, method, query, form, qsLib)
oa.oauth_signature_method = 'HMAC-SHA1'
}
- var consumer_secret_or_private_key = oa.oauth_consumer_secret || oa.oauth_private_key // eslint-disable-line camelcase
+ var consumer_secret_or_private_key = oa.oauth_consumer_secret || oa.oauth_private_key
delete oa.oauth_consumer_secret
delete oa.oauth_private_key
- var token_secret = oa.oauth_token_secret // eslint-disable-line camelcase
+ var token_secret = oa.oauth_token_secret
delete oa.oauth_token_secret
var realm = oa.oauth_realm
@@ -50,9 +51,8 @@ OAuth.prototype.buildParams = function (_oauth, uri, method, query, form, qsLib)
method,
baseurl,
params,
- consumer_secret_or_private_key, // eslint-disable-line camelcase
- token_secret // eslint-disable-line camelcase
- )
+ consumer_secret_or_private_key,
+ token_secret)
if (realm) {
oa.realm = realm
@@ -61,7 +61,7 @@ OAuth.prototype.buildParams = function (_oauth, uri, method, query, form, qsLib)
return oa
}
-OAuth.prototype.buildBodyHash = function (_oauth, body) {
+OAuth.prototype.buildBodyHash = function(_oauth, body) {
if (['HMAC-SHA1', 'RSA-SHA1'].indexOf(_oauth.signature_method || 'HMAC-SHA1') < 0) {
this.request.emit('error', new Error('oauth: ' + _oauth.signature_method +
' signature_method not supported with body_hash signing.'))
@@ -71,7 +71,7 @@ OAuth.prototype.buildBodyHash = function (_oauth, body) {
shasum.update(body || '')
var sha1 = shasum.digest('hex')
- return Buffer.from(sha1, 'hex').toString('base64')
+ return Buffer.from(sha1).toString('base64')
}
OAuth.prototype.concatParams = function (oa, sep, wrap) {
@@ -96,16 +96,16 @@ OAuth.prototype.onRequest = function (_oauth) {
self.params = _oauth
var uri = self.request.uri || {}
- var method = self.request.method || ''
- var headers = caseless(self.request.headers)
- var body = self.request.body || ''
- var qsLib = self.request.qsLib || qs
+ , method = self.request.method || ''
+ , headers = caseless(self.request.headers)
+ , body = self.request.body || ''
+ , qsLib = self.request.qsLib || qs
var form
- var query
- var contentType = headers.get('content-type') || ''
- var formContentType = 'application/x-www-form-urlencoded'
- var transport = _oauth.transport_method || 'header'
+ , query
+ , contentType = headers.get('content-type') || ''
+ , formContentType = 'application/x-www-form-urlencoded'
+ , transport = _oauth.transport_method || 'header'
if (contentType.slice(0, formContentType.length) === formContentType) {
contentType = formContentType
diff --git a/deps/npm/node_modules/request/lib/querystring.js b/deps/npm/node_modules/request/lib/querystring.js
index 4a32cd1491..baf5e8021f 100644
--- a/deps/npm/node_modules/request/lib/querystring.js
+++ b/deps/npm/node_modules/request/lib/querystring.js
@@ -1,7 +1,8 @@
'use strict'
var qs = require('qs')
-var querystring = require('querystring')
+ , querystring = require('querystring')
+
function Querystring (request) {
this.request = request
@@ -12,7 +13,7 @@ function Querystring (request) {
}
Querystring.prototype.init = function (options) {
- if (this.lib) { return }
+ if (this.lib) {return}
this.useQuerystring = options.useQuerystring
this.lib = (this.useQuerystring ? querystring : qs)
diff --git a/deps/npm/node_modules/request/lib/redirect.js b/deps/npm/node_modules/request/lib/redirect.js
index b9150e77c7..f8604491f3 100644
--- a/deps/npm/node_modules/request/lib/redirect.js
+++ b/deps/npm/node_modules/request/lib/redirect.js
@@ -9,7 +9,7 @@ function Redirect (request) {
this.followRedirects = true
this.followAllRedirects = false
this.followOriginalHttpMethod = false
- this.allowRedirect = function () { return true }
+ this.allowRedirect = function () {return true}
this.maxRedirects = 10
this.redirects = []
this.redirectsFollowed = 0
@@ -44,7 +44,7 @@ Redirect.prototype.onRequest = function (options) {
Redirect.prototype.redirectTo = function (response) {
var self = this
- var request = self.request
+ , request = self.request
var redirectTo = null
if (response.statusCode >= 300 && response.statusCode < 400 && response.caseless.has('location')) {
@@ -78,7 +78,7 @@ Redirect.prototype.redirectTo = function (response) {
Redirect.prototype.onResponse = function (response) {
var self = this
- var request = self.request
+ , request = self.request
var redirectTo = self.redirectTo(response)
if (!redirectTo || !self.allowRedirect.call(request, response)) {
@@ -112,10 +112,13 @@ Redirect.prototype.onResponse = function (response) {
delete request.agent
}
- self.redirects.push({ statusCode: response.statusCode, redirectUri: redirectTo })
-
- if (self.followAllRedirects && request.method !== 'HEAD' &&
- response.statusCode !== 401 && response.statusCode !== 307) {
+ self.redirects.push(
+ { statusCode : response.statusCode
+ , redirectUri: redirectTo
+ }
+ )
+ if (self.followAllRedirects && request.method !== 'HEAD'
+ && response.statusCode !== 401 && response.statusCode !== 307) {
request.method = self.followOriginalHttpMethod ? request.method : 'GET'
}
// request.method = 'GET' // Force all redirects to use GET || commented out fixes #215
diff --git a/deps/npm/node_modules/request/lib/tunnel.js b/deps/npm/node_modules/request/lib/tunnel.js
index 4479003f69..bf96a8fec5 100644
--- a/deps/npm/node_modules/request/lib/tunnel.js
+++ b/deps/npm/node_modules/request/lib/tunnel.js
@@ -1,7 +1,7 @@
'use strict'
var url = require('url')
-var tunnel = require('tunnel-agent')
+ , tunnel = require('tunnel-agent')
var defaultProxyHeaderWhiteList = [
'accept',
@@ -31,10 +31,10 @@ var defaultProxyHeaderExclusiveList = [
'proxy-authorization'
]
-function constructProxyHost (uriObject) {
+function constructProxyHost(uriObject) {
var port = uriObject.port
- var protocol = uriObject.protocol
- var proxyHost = uriObject.hostname + ':'
+ , protocol = uriObject.protocol
+ , proxyHost = uriObject.hostname + ':'
if (port) {
proxyHost += port
@@ -47,7 +47,7 @@ function constructProxyHost (uriObject) {
return proxyHost
}
-function constructProxyHeaderWhiteList (headers, proxyHeaderWhiteList) {
+function constructProxyHeaderWhiteList(headers, proxyHeaderWhiteList) {
var whiteList = proxyHeaderWhiteList
.reduce(function (set, header) {
set[header.toLowerCase()] = true
@@ -68,40 +68,41 @@ function constructTunnelOptions (request, proxyHeaders) {
var proxy = request.proxy
var tunnelOptions = {
- proxy: {
- host: proxy.hostname,
- port: +proxy.port,
- proxyAuth: proxy.auth,
- headers: proxyHeaders
+ proxy : {
+ host : proxy.hostname,
+ port : +proxy.port,
+ proxyAuth : proxy.auth,
+ headers : proxyHeaders
},
- headers: request.headers,
- ca: request.ca,
- cert: request.cert,
- key: request.key,
- passphrase: request.passphrase,
- pfx: request.pfx,
- ciphers: request.ciphers,
- rejectUnauthorized: request.rejectUnauthorized,
- secureOptions: request.secureOptions,
- secureProtocol: request.secureProtocol
+ headers : request.headers,
+ ca : request.ca,
+ cert : request.cert,
+ key : request.key,
+ passphrase : request.passphrase,
+ pfx : request.pfx,
+ ciphers : request.ciphers,
+ rejectUnauthorized : request.rejectUnauthorized,
+ secureOptions : request.secureOptions,
+ secureProtocol : request.secureProtocol
}
return tunnelOptions
}
-function constructTunnelFnName (uri, proxy) {
+function constructTunnelFnName(uri, proxy) {
var uriProtocol = (uri.protocol === 'https:' ? 'https' : 'http')
var proxyProtocol = (proxy.protocol === 'https:' ? 'Https' : 'Http')
return [uriProtocol, proxyProtocol].join('Over')
}
-function getTunnelFn (request) {
+function getTunnelFn(request) {
var uri = request.uri
var proxy = request.proxy
var tunnelFnName = constructTunnelFnName(uri, proxy)
return tunnel[tunnelFnName]
}
+
function Tunnel (request) {
this.request = request
this.proxyHeaderWhiteList = defaultProxyHeaderWhiteList
@@ -113,8 +114,8 @@ function Tunnel (request) {
Tunnel.prototype.isEnabled = function () {
var self = this
- var request = self.request
- // Tunnel HTTPS by default. Allow the user to override this setting.
+ , request = self.request
+ // Tunnel HTTPS by default. Allow the user to override this setting.
// If self.tunnelOverride is set (the user specified a value), use it.
if (typeof self.tunnelOverride !== 'undefined') {
@@ -132,7 +133,7 @@ Tunnel.prototype.isEnabled = function () {
Tunnel.prototype.setup = function (options) {
var self = this
- var request = self.request
+ , request = self.request
options = options || {}
diff --git a/deps/npm/node_modules/request/package.json b/deps/npm/node_modules/request/package.json
index 5ab26dd307..8f492a21e7 100644
--- a/deps/npm/node_modules/request/package.json
+++ b/deps/npm/node_modules/request/package.json
@@ -1,38 +1,32 @@
{
- "_args": [
- [
- "request@2.86.0",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "request@2.86.0",
- "_id": "request@2.86.0",
+ "_from": "request@2.81.0",
+ "_id": "request@2.81.0",
"_inBundle": false,
- "_integrity": "sha512-BQZih67o9r+Ys94tcIW4S7Uu8pthjrQVxhsZ/weOwHbDfACxvIyvnAbzFQxjy1jMtvFSzv5zf4my6cZsJBbVzw==",
+ "_integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=",
"_location": "/request",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "request@2.86.0",
+ "raw": "request@2.81.0",
"name": "request",
"escapedName": "request",
- "rawSpec": "2.86.0",
+ "rawSpec": "2.81.0",
"saveSpec": null,
- "fetchSpec": "2.86.0"
+ "fetchSpec": "2.81.0"
},
"_requiredBy": [
+ "#USER",
"/",
- "/cloudant-follow",
"/couchapp",
"/coveralls",
- "/nano",
"/node-gyp",
"/npm-registry-client"
],
- "_resolved": "https://registry.npmjs.org/request/-/request-2.86.0.tgz",
- "_spec": "2.86.0",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz",
+ "_shasum": "c6928946a0e06c5f8d6f8a9333469ffda46298a0",
+ "_spec": "request@2.81.0",
+ "_where": "/Users/zkat/Documents/code/work/npm",
"author": {
"name": "Mikeal Rogers",
"email": "mikeal.rogers@gmail.com"
@@ -40,37 +34,41 @@
"bugs": {
"url": "http://github.com/request/request/issues"
},
+ "bundleDependencies": false,
"dependencies": {
- "aws-sign2": "~0.7.0",
- "aws4": "^1.6.0",
+ "aws-sign2": "~0.6.0",
+ "aws4": "^1.2.1",
"caseless": "~0.12.0",
"combined-stream": "~1.0.5",
- "extend": "~3.0.1",
+ "extend": "~3.0.0",
"forever-agent": "~0.6.1",
- "form-data": "~2.3.1",
- "har-validator": "~5.0.3",
- "hawk": "~6.0.2",
- "http-signature": "~1.2.0",
+ "form-data": "~2.1.1",
+ "har-validator": "~4.2.1",
+ "hawk": "~3.1.3",
+ "http-signature": "~1.1.0",
"is-typedarray": "~1.0.0",
"isstream": "~0.1.2",
"json-stringify-safe": "~5.0.1",
- "mime-types": "~2.1.17",
- "oauth-sign": "~0.8.2",
- "performance-now": "^2.1.0",
- "qs": "~6.5.1",
- "safe-buffer": "^5.1.1",
- "tough-cookie": "~2.3.3",
+ "mime-types": "~2.1.7",
+ "oauth-sign": "~0.8.1",
+ "performance-now": "^0.2.0",
+ "qs": "~6.4.0",
+ "safe-buffer": "^5.0.1",
+ "stringstream": "~0.0.4",
+ "tough-cookie": "~2.3.0",
"tunnel-agent": "^0.6.0",
- "uuid": "^3.1.0"
+ "uuid": "^3.0.0"
},
+ "deprecated": false,
"description": "Simplified HTTP request client.",
"devDependencies": {
"bluebird": "^3.2.1",
"browserify": "^13.0.1",
"browserify-istanbul": "^2.0.0",
"buffer-equal": "^1.0.0",
- "codecov": "^2.0.2",
+ "codecov": "^1.0.1",
"coveralls": "^2.11.4",
+ "eslint": "^2.5.3",
"function-bind": "^1.0.2",
"istanbul": "^0.4.0",
"karma": "^1.1.1",
@@ -82,7 +80,6 @@
"phantomjs-prebuilt": "^2.1.3",
"rimraf": "^2.2.8",
"server-destroy": "^1.0.1",
- "standard": "^9.0.0",
"tape": "^4.6.0",
"taper": "^0.5.0"
},
@@ -96,6 +93,7 @@
],
"greenkeeper": {
"ignore": [
+ "eslint",
"hawk",
"har-validator"
]
@@ -115,11 +113,11 @@
"url": "git+https://github.com/request/request.git"
},
"scripts": {
- "lint": "standard",
+ "lint": "eslint lib/ *.js tests/ && echo Lint passed.",
"test": "npm run lint && npm run test-ci && npm run test-browser",
"test-browser": "node tests/browser/start.js",
"test-ci": "taper tests/test-*.js",
"test-cov": "istanbul cover tape tests/test-*.js"
},
- "version": "2.86.0"
+ "version": "2.81.0"
}
diff --git a/deps/npm/node_modules/request/request.js b/deps/npm/node_modules/request/request.js
index c93258b3b2..467524ba4e 100644
--- a/deps/npm/node_modules/request/request.js
+++ b/deps/npm/node_modules/request/request.js
@@ -1,46 +1,48 @@
'use strict'
var http = require('http')
-var https = require('https')
-var url = require('url')
-var util = require('util')
-var stream = require('stream')
-var zlib = require('zlib')
-var hawk = require('hawk')
-var aws2 = require('aws-sign2')
-var aws4 = require('aws4')
-var httpSignature = require('http-signature')
-var mime = require('mime-types')
-var caseless = require('caseless')
-var ForeverAgent = require('forever-agent')
-var FormData = require('form-data')
-var extend = require('extend')
-var isstream = require('isstream')
-var isTypedArray = require('is-typedarray').strict
-var helpers = require('./lib/helpers')
-var cookies = require('./lib/cookies')
-var getProxyFromURI = require('./lib/getProxyFromURI')
-var Querystring = require('./lib/querystring').Querystring
-var Har = require('./lib/har').Har
-var Auth = require('./lib/auth').Auth
-var OAuth = require('./lib/oauth').OAuth
-var Multipart = require('./lib/multipart').Multipart
-var Redirect = require('./lib/redirect').Redirect
-var Tunnel = require('./lib/tunnel').Tunnel
-var now = require('performance-now')
-var Buffer = require('safe-buffer').Buffer
+ , https = require('https')
+ , url = require('url')
+ , util = require('util')
+ , stream = require('stream')
+ , zlib = require('zlib')
+ , hawk = require('hawk')
+ , aws2 = require('aws-sign2')
+ , aws4 = require('aws4')
+ , httpSignature = require('http-signature')
+ , mime = require('mime-types')
+ , stringstream = require('stringstream')
+ , caseless = require('caseless')
+ , ForeverAgent = require('forever-agent')
+ , FormData = require('form-data')
+ , extend = require('extend')
+ , isstream = require('isstream')
+ , isTypedArray = require('is-typedarray').strict
+ , helpers = require('./lib/helpers')
+ , cookies = require('./lib/cookies')
+ , getProxyFromURI = require('./lib/getProxyFromURI')
+ , Querystring = require('./lib/querystring').Querystring
+ , Har = require('./lib/har').Har
+ , Auth = require('./lib/auth').Auth
+ , OAuth = require('./lib/oauth').OAuth
+ , Multipart = require('./lib/multipart').Multipart
+ , Redirect = require('./lib/redirect').Redirect
+ , Tunnel = require('./lib/tunnel').Tunnel
+ , now = require('performance-now')
+ , Buffer = require('safe-buffer').Buffer
var safeStringify = helpers.safeStringify
-var isReadStream = helpers.isReadStream
-var toBase64 = helpers.toBase64
-var defer = helpers.defer
-var copy = helpers.copy
-var version = helpers.version
-var globalCookieJar = cookies.jar()
+ , isReadStream = helpers.isReadStream
+ , toBase64 = helpers.toBase64
+ , defer = helpers.defer
+ , copy = helpers.copy
+ , version = helpers.version
+ , globalCookieJar = cookies.jar()
+
var globalPool = {}
-function filterForNonReserved (reserved, options) {
+function filterForNonReserved(reserved, options) {
// Filter out properties that are not reserved.
// Reserved values are passed in at call site.
@@ -54,7 +56,7 @@ function filterForNonReserved (reserved, options) {
return object
}
-function filterOutReservedFunctions (reserved, options) {
+function filterOutReservedFunctions(reserved, options) {
// Filter out properties that are functions and are reserved.
// Reserved values are passed in at call site.
@@ -67,10 +69,11 @@ function filterOutReservedFunctions (reserved, options) {
}
}
return object
+
}
// Return a simpler request object to allow serialization
-function requestToJSON () {
+function requestToJSON() {
var self = this
return {
uri: self.uri,
@@ -80,7 +83,7 @@ function requestToJSON () {
}
// Return a simpler response object to allow serialization
-function responseToJSON () {
+function responseToJSON() {
var self = this
return {
statusCode: self.statusCode,
@@ -131,7 +134,7 @@ util.inherits(Request, stream.Stream)
// Debugging
Request.debug = process.env.NODE_DEBUG && /\brequest\b/.test(process.env.NODE_DEBUG)
-function debug () {
+function debug() {
if (Request.debug) {
console.error('REQUEST %s', util.format.apply(util, arguments))
}
@@ -255,7 +258,7 @@ Request.prototype.init = function (options) {
self.rejectUnauthorized = false
}
- if (!self.uri.pathname) { self.uri.pathname = '/' }
+ if (!self.uri.pathname) {self.uri.pathname = '/'}
if (!(self.uri.host || (self.uri.hostname && self.uri.port)) && !self.uri.isUnix) {
// Invalid URI: it may generate lot of bad errors, like 'TypeError: Cannot call method `indexOf` of undefined' in CookieJar
@@ -297,7 +300,8 @@ Request.prototype.init = function (options) {
self.jar(self._jar || options.jar)
if (!self.uri.port) {
- if (self.uri.protocol === 'http:') { self.uri.port = 80 } else if (self.uri.protocol === 'https:') { self.uri.port = 443 }
+ if (self.uri.protocol === 'http:') {self.uri.port = 80}
+ else if (self.uri.protocol === 'https:') {self.uri.port = 443}
}
if (self.proxy && !self.tunnel) {
@@ -384,12 +388,12 @@ Request.prototype.init = function (options) {
}
if (self.uri.auth && !self.hasHeader('authorization')) {
- var uriAuthPieces = self.uri.auth.split(':').map(function (item) { return self._qs.unescape(item) })
+ var uriAuthPieces = self.uri.auth.split(':').map(function(item) {return self._qs.unescape(item)})
self.auth(uriAuthPieces[0], uriAuthPieces.slice(1).join(':'), true)
}
if (!self.tunnel && self.proxy && self.proxy.auth && !self.hasHeader('proxy-authorization')) {
- var proxyAuthPieces = self.proxy.auth.split(':').map(function (item) { return self._qs.unescape(item) })
+ var proxyAuthPieces = self.proxy.auth.split(':').map(function(item) {return self._qs.unescape(item)})
var authHeader = 'Basic ' + toBase64(proxyAuthPieces.join(':'))
self.setHeader('proxy-authorization', authHeader)
}
@@ -421,9 +425,11 @@ Request.prototype.init = function (options) {
var length
if (typeof self.body === 'string') {
length = Buffer.byteLength(self.body)
- } else if (Array.isArray(self.body)) {
- length = self.body.reduce(function (a, b) { return a + b.length }, 0)
- } else {
+ }
+ else if (Array.isArray(self.body)) {
+ length = self.body.reduce(function (a, b) {return a + b.length}, 0)
+ }
+ else {
length = self.body.length
}
@@ -445,8 +451,8 @@ Request.prototype.init = function (options) {
}
var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol
- var defaultModules = {'http:': http, 'https:': https}
- var httpModules = self.httpModules || {}
+ , defaultModules = {'http:':http, 'https:':https}
+ , httpModules = self.httpModules || {}
self.httpModule = httpModules[protocol] || defaultModules[protocol]
@@ -511,9 +517,9 @@ Request.prototype.init = function (options) {
}
}
- // self.on('pipe', function () {
- // console.error('You have already piped to this stream. Pipeing twice is likely to break the request.')
- // })
+ // self.on('pipe', function () {
+ // console.error('You have already piped to this stream. Pipeing twice is likely to break the request.')
+ // })
})
defer(function () {
@@ -525,7 +531,8 @@ Request.prototype.init = function (options) {
if (self._form) {
if (!self._auth.hasAuth) {
self._form.pipe(self)
- } else if (self._auth.hasAuth && self._auth.sentAuth) {
+ }
+ else if (self._auth.hasAuth && self._auth.sentAuth) {
self._form.pipe(self)
}
}
@@ -576,6 +583,7 @@ Request.prototype.init = function (options) {
self.ntick = true
})
+
}
Request.prototype.getNewAgent = function () {
@@ -770,22 +778,21 @@ Request.prototype.start = function () {
self.req.on('response', self.onRequestResponse.bind(self))
self.req.on('error', self.onRequestError.bind(self))
- self.req.on('drain', function () {
+ self.req.on('drain', function() {
self.emit('drain')
})
-
- self.req.on('socket', function (socket) {
+ self.req.on('socket', function(socket) {
// `._connecting` was the old property which was made public in node v6.1.0
var isConnecting = socket._connecting || socket.connecting
if (self.timing) {
self.timings.socket = now() - self.startTimeNow
if (isConnecting) {
- var onLookupTiming = function () {
+ var onLookupTiming = function() {
self.timings.lookup = now() - self.startTimeNow
}
- var onConnectTiming = function () {
+ var onConnectTiming = function() {
self.timings.connect = now() - self.startTimeNow
}
@@ -793,14 +800,14 @@ Request.prototype.start = function () {
socket.once('connect', onConnectTiming)
// clean up timing event listeners if needed on error
- self.req.once('error', function () {
+ self.req.once('error', function() {
socket.removeListener('lookup', onLookupTiming)
socket.removeListener('connect', onConnectTiming)
})
}
}
- var setReqTimeout = function () {
+ var setReqTimeout = function() {
// This timeout sets the amount of time to wait *between* bytes sent
// from the server once connected.
//
@@ -822,7 +829,7 @@ Request.prototype.start = function () {
// keep-alive connection) do not bother. This is important since we won't
// get a 'connect' event for an already connected socket.
if (isConnecting) {
- var onReqSockConnect = function () {
+ var onReqSockConnect = function() {
socket.removeListener('connect', onReqSockConnect)
clearTimeout(self.timeoutTimer)
self.timeoutTimer = null
@@ -831,7 +838,7 @@ Request.prototype.start = function () {
socket.on('connect', onReqSockConnect)
- self.req.on('error', function (err) { // eslint-disable-line handle-callback-err
+ self.req.on('error', function(err) {
socket.removeListener('connect', onReqSockConnect)
})
@@ -863,8 +870,8 @@ Request.prototype.onRequestError = function (error) {
if (self._aborted) {
return
}
- if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET' &&
- self.agent.addRequestNoreuse) {
+ if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET'
+ && self.agent.addRequestNoreuse) {
self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) }
self.start()
self.req.end()
@@ -885,7 +892,7 @@ Request.prototype.onRequestResponse = function (response) {
}
debug('onRequestResponse', self.uri.href, response.statusCode, response.headers)
- response.on('end', function () {
+ response.on('end', function() {
if (self.timing) {
self.timings.end = now() - self.startTimeNow
response.timingStart = self.startTime
@@ -941,8 +948,8 @@ Request.prototype.onRequestResponse = function (response) {
// XXX This is different on 0.10, because SSL is strict by default
if (self.httpModule === https &&
- self.strictSSL && (!response.hasOwnProperty('socket') ||
- !response.socket.authorized)) {
+ self.strictSSL && (!response.hasOwnProperty('socket') ||
+ !response.socket.authorized)) {
debug('strict ssl error', self.uri.href)
var sslErr = response.hasOwnProperty('socket') ? response.socket.authorizationError : self.uri.href + ' does not support SSL'
self.emit('error', new Error('SSL Error: ' + sslErr))
@@ -967,7 +974,7 @@ Request.prototype.onRequestResponse = function (response) {
var targetCookieJar = (self._jar && self._jar.setCookie) ? self._jar : globalCookieJar
var addCookie = function (cookie) {
- // set the cookie if it's domain in the href's domain.
+ //set the cookie if it's domain in the href's domain.
try {
targetCookieJar.setCookie(cookie, self.uri.href, {ignoreError: true})
} catch (e) {
@@ -1003,13 +1010,13 @@ Request.prototype.onRequestResponse = function (response) {
var noBody = function (code) {
return (
- self.method === 'HEAD' ||
+ self.method === 'HEAD'
// Informational
- (code >= 100 && code < 200) ||
+ || (code >= 100 && code < 200)
// No Content
- code === 204 ||
+ || code === 204
// Not Modified
- code === 304
+ || code === 304
)
}
@@ -1023,8 +1030,8 @@ Request.prototype.onRequestResponse = function (response) {
// by common browsers.
// Always using Z_SYNC_FLUSH is what cURL does.
var zlibOptions = {
- flush: zlib.Z_SYNC_FLUSH,
- finishFlush: zlib.Z_SYNC_FLUSH
+ flush: zlib.Z_SYNC_FLUSH
+ , finishFlush: zlib.Z_SYNC_FLUSH
}
if (contentEncoding === 'gzip') {
@@ -1048,8 +1055,13 @@ Request.prototype.onRequestResponse = function (response) {
if (self.encoding) {
if (self.dests.length !== 0) {
console.error('Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.')
- } else {
+ } else if (responseContent.setEncoding) {
responseContent.setEncoding(self.encoding)
+ } else {
+ // Should only occur on node pre-v0.9.4 (joyent/node@9b5abe5) with
+ // zlib streams.
+ // If/When support for 0.9.4 is dropped, this should be unnecessary.
+ responseContent = responseContent.pipe(stringstream(self.encoding))
}
}
@@ -1081,11 +1093,13 @@ Request.prototype.onRequestResponse = function (response) {
responseContent.on('error', function (error) {
self.emit('error', error)
})
- responseContent.on('close', function () { self.emit('close') })
+ responseContent.on('close', function () {self.emit('close')})
if (self.callback) {
self.readResponseBody(response)
- } else { // if no callback
+ }
+ //if no callback
+ else {
self.on('end', function () {
if (self._aborted) {
debug('aborted', self.uri.href)
@@ -1100,10 +1114,10 @@ Request.prototype.onRequestResponse = function (response) {
Request.prototype.readResponseBody = function (response) {
var self = this
- debug("reading response's body")
+ debug('reading response\'s body')
var buffers = []
- var bufferLength = 0
- var strings = []
+ , bufferLength = 0
+ , strings = []
self.on('data', function (chunk) {
if (!Buffer.isBuffer(chunk)) {
@@ -1164,7 +1178,8 @@ Request.prototype.abort = function () {
if (self.req) {
self.req.abort()
- } else if (self.response) {
+ }
+ else if (self.response) {
self.response.destroy()
}
@@ -1180,7 +1195,8 @@ Request.prototype.pipeDest = function (dest) {
var ctname = response.caseless.has('content-type')
if (dest.setHeader) {
dest.setHeader(ctname, response.headers[ctname])
- } else {
+ }
+ else {
dest.headers[ctname] = response.headers[ctname]
}
}
@@ -1251,7 +1267,7 @@ Request.prototype.form = function (form) {
}
// create form-data object
self._form = new FormData()
- self._form.on('error', function (err) {
+ self._form.on('error', function(err) {
err.message = 'form-data: ' + err.message
self.emit('error', err)
self.abort()
@@ -1326,8 +1342,8 @@ Request.prototype.getHeader = function (name, headers) {
Request.prototype.enableUnixSocket = function () {
// Get the socket & request paths from the URL
var unixParts = this.uri.path.split(':')
- var host = unixParts[0]
- var path = unixParts[1]
+ , host = unixParts[0]
+ , path = unixParts[1]
// Apply unix properties to request
this.socketPath = host
this.uri.pathname = path
@@ -1337,6 +1353,7 @@ Request.prototype.enableUnixSocket = function () {
this.uri.isUnix = true
}
+
Request.prototype.auth = function (user, pass, sendImmediately, bearer) {
var self = this
@@ -1352,7 +1369,7 @@ Request.prototype.aws = function (opts, now) {
return self
}
- if (opts.sign_version === 4 || opts.sign_version === '4') {
+ if (opts.sign_version == 4 || opts.sign_version == '4') {
// use aws4
var options = {
host: self.uri.host,
@@ -1373,19 +1390,20 @@ Request.prototype.aws = function (opts, now) {
if (signRes.headers['X-Amz-Security-Token']) {
self.setHeader('x-amz-security-token', signRes.headers['X-Amz-Security-Token'])
}
- } else {
+ }
+ else {
// default: use aws-sign2
var date = new Date()
self.setHeader('date', date.toUTCString())
- var auth = {
- key: opts.key,
- secret: opts.secret,
- verb: self.method.toUpperCase(),
- date: date,
- contentType: self.getHeader('content-type') || '',
- md5: self.getHeader('content-md5') || '',
- amazonHeaders: aws2.canonicalizeHeaders(self.headers)
- }
+ var auth =
+ { key: opts.key
+ , secret: opts.secret
+ , verb: self.method.toUpperCase()
+ , date: date
+ , contentType: self.getHeader('content-type') || ''
+ , md5: self.getHeader('content-md5') || ''
+ , amazonHeaders: aws2.canonicalizeHeaders(self.headers)
+ }
var path = self.uri.path
if (opts.bucket && path) {
auth.resource = '/' + opts.bucket + path
@@ -1405,10 +1423,10 @@ Request.prototype.aws = function (opts, now) {
Request.prototype.httpSignature = function (opts) {
var self = this
httpSignature.signRequest({
- getHeader: function (header) {
+ getHeader: function(header) {
return self.getHeader(header, self.headers)
},
- setHeader: function (header, value) {
+ setHeader: function(header, value) {
self.setHeader(header, value)
},
method: self.method,
@@ -1445,13 +1463,13 @@ Request.prototype.jar = function (jar) {
} else {
var targetCookieJar = (jar && jar.getCookieString) ? jar : globalCookieJar
var urihref = self.uri.href
- // fetch cookie in the Specified host
+ //fetch cookie in the Specified host
if (targetCookieJar) {
cookies = targetCookieJar.getCookieString(urihref)
}
}
- // if need cookie and cookie is not empty
+ //if need cookie and cookie is not empty
if (cookies && cookies.length) {
if (self.originalCookieHeader) {
// Don't overwrite existing Cookie header
@@ -1464,6 +1482,7 @@ Request.prototype.jar = function (jar) {
return self
}
+
// Stream API
Request.prototype.pipe = function (dest, opts) {
var self = this
@@ -1486,7 +1505,7 @@ Request.prototype.pipe = function (dest, opts) {
}
Request.prototype.write = function () {
var self = this
- if (self._aborted) { return }
+ if (self._aborted) {return}
if (!self._started) {
self.start()
@@ -1497,7 +1516,7 @@ Request.prototype.write = function () {
}
Request.prototype.end = function (chunk) {
var self = this
- if (self._aborted) { return }
+ if (self._aborted) {return}
if (chunk) {
self.write(chunk)
diff --git a/deps/npm/node_modules/sntp/.npmignore b/deps/npm/node_modules/sntp/.npmignore
index adac8ad9c6..b0939eabe3 100755..100644
--- a/deps/npm/node_modules/sntp/.npmignore
+++ b/deps/npm/node_modules/sntp/.npmignore
@@ -1,3 +1,17 @@
-*
-!lib/**
-!.npmignore
+.idea
+*.iml
+npm-debug.log
+dump.rdb
+node_modules
+results.tap
+results.xml
+npm-shrinkwrap.json
+config.json
+.DS_Store
+*/.DS_Store
+*/*/.DS_Store
+._*
+*/._*
+*/*/._*
+coverage.*
+lib-cov
diff --git a/deps/npm/node_modules/sntp/.travis.yml b/deps/npm/node_modules/sntp/.travis.yml
new file mode 100755
index 0000000000..77795c6a9b
--- /dev/null
+++ b/deps/npm/node_modules/sntp/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+
+node_js:
+ - 0.10
diff --git a/deps/npm/node_modules/sntp/LICENSE b/deps/npm/node_modules/sntp/LICENSE
index 6dc3e82d3c..b0d877439e 100755
--- a/deps/npm/node_modules/sntp/LICENSE
+++ b/deps/npm/node_modules/sntp/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2012-2016, Eran Hammer and Project contributors
+Copyright (c) 2012-2014, Eran Hammer and other contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/deps/npm/node_modules/sntp/Makefile b/deps/npm/node_modules/sntp/Makefile
new file mode 100755
index 0000000000..43189de8e3
--- /dev/null
+++ b/deps/npm/node_modules/sntp/Makefile
@@ -0,0 +1,8 @@
+test:
+ @node node_modules/lab/bin/lab
+test-cov:
+ @node node_modules/lab/bin/lab -t 100 -m 3000
+test-cov-html:
+ @node node_modules/lab/bin/lab -r html -o coverage.html
+
+.PHONY: test test-cov test-cov-html
diff --git a/deps/npm/node_modules/sntp/examples/offset.js b/deps/npm/node_modules/sntp/examples/offset.js
new file mode 100755
index 0000000000..58f3cf93e0
--- /dev/null
+++ b/deps/npm/node_modules/sntp/examples/offset.js
@@ -0,0 +1,15 @@
+var Sntp = require('../lib');
+
+// Request offset once
+
+Sntp.offset(function (err, offset) {
+
+ console.log(offset); // New (served fresh)
+
+ // Request offset again
+
+ Sntp.offset(function (err, offset) {
+
+ console.log(offset); // Identical (served from cache)
+ });
+});
diff --git a/deps/npm/node_modules/sntp/examples/time.js b/deps/npm/node_modules/sntp/examples/time.js
new file mode 100755
index 0000000000..ff2589f75e
--- /dev/null
+++ b/deps/npm/node_modules/sntp/examples/time.js
@@ -0,0 +1,24 @@
+var Sntp = require('../lib');
+
+// All options are optional
+
+var options = {
+ host: 'nist1-sj.ustiming.org', // Defaults to pool.ntp.org
+ port: 123, // Defaults to 123 (NTP)
+ resolveReference: true, // Default to false (not resolving)
+ timeout: 1000 // Defaults to zero (no timeout)
+};
+
+// Request server time
+
+Sntp.time(options, function (err, time) {
+
+ if (err) {
+ console.log('Failed: ' + err.message);
+ process.exit(1);
+ }
+
+ console.log(time);
+ console.log('Local clock is off by: ' + time.t + ' milliseconds');
+ process.exit(0);
+});
diff --git a/deps/npm/node_modules/sntp/index.js b/deps/npm/node_modules/sntp/index.js
new file mode 100755
index 0000000000..4cc88b3587
--- /dev/null
+++ b/deps/npm/node_modules/sntp/index.js
@@ -0,0 +1 @@
+module.exports = require('./lib'); \ No newline at end of file
diff --git a/deps/npm/node_modules/sntp/lib/index.js b/deps/npm/node_modules/sntp/lib/index.js
index 83eb4585aa..e91718b4ff 100755
--- a/deps/npm/node_modules/sntp/lib/index.js
+++ b/deps/npm/node_modules/sntp/lib/index.js
@@ -1,16 +1,13 @@
-'use strict';
-
// Load modules
-const Dgram = require('dgram');
-const Dns = require('dns');
-
-const Hoek = require('hoek');
+var Dgram = require('dgram');
+var Dns = require('dns');
+var Hoek = require('hoek');
// Declare internals
-const internals = {};
+var internals = {};
exports.time = function (options, callback) {
@@ -20,55 +17,49 @@ exports.time = function (options, callback) {
options = {};
}
- const settings = Hoek.clone(options);
- settings.host = settings.host || 'time.google.com';
+ var settings = Hoek.clone(options);
+ settings.host = settings.host || 'pool.ntp.org';
settings.port = settings.port || 123;
settings.resolveReference = settings.resolveReference || false;
// Declare variables used by callback
- let timeoutId = null;
- let sent = 0;
+ var timeoutId = 0;
+ var sent = 0;
// Ensure callback is only called once
- const finish = Hoek.once((err, result) => {
-
- clearTimeout(timeoutId);
+ var finish = function (err, result) {
- socket.removeAllListeners();
- socket.once('error', Hoek.ignore);
-
- try {
- socket.close();
+ if (timeoutId) {
+ clearTimeout(timeoutId);
+ timeoutId = 0;
}
- catch (ignoreErr) { } // Ignore errors if the socket is already closed
+ socket.removeAllListeners();
+ socket.once('error', internals.ignore);
+ socket.close();
return callback(err, result);
- });
-
- // Set timeout
-
- if (settings.timeout) {
- timeoutId = setTimeout(() => {
+ };
- return finish(new Error('Timeout'));
- }, settings.timeout);
- }
+ finish = Hoek.once(finish);
// Create UDP socket
- const socket = Dgram.createSocket('udp4');
+ var socket = Dgram.createSocket('udp4');
+
+ socket.once('error', function (err) {
- socket.once('error', (err) => finish(err));
+ return finish(err);
+ });
// Listen to incoming messages
- socket.on('message', (buffer, rinfo) => {
+ socket.on('message', function (buffer, rinfo) {
- const received = Date.now();
+ var received = Date.now();
- const message = new internals.NtpMessage(buffer);
+ var message = new internals.NtpMessage(buffer);
if (!message.isValid) {
return finish(new Error('Invalid server response'), message);
}
@@ -88,10 +79,10 @@ exports.time = function (options, callback) {
//
// d = (T4 - T1) - (T3 - T2) t = ((T2 - T1) + (T3 - T4)) / 2
- const T1 = message.originateTimestamp;
- const T2 = message.receiveTimestamp;
- const T3 = message.transmitTimestamp;
- const T4 = received;
+ var T1 = message.originateTimestamp;
+ var T2 = message.receiveTimestamp;
+ var T3 = message.transmitTimestamp;
+ var T4 = received;
message.d = (T4 - T1) - (T3 - T2);
message.t = ((T2 - T1) + (T3 - T4)) / 2;
@@ -105,7 +96,7 @@ exports.time = function (options, callback) {
// Resolve reference IP address
- Dns.reverse(message.referenceId, (err, domains) => {
+ Dns.reverse(message.referenceId, function (err, domains) {
if (/* $lab:coverage:off$ */ !err /* $lab:coverage:on$ */) {
message.referenceHost = domains[0];
@@ -115,20 +106,30 @@ exports.time = function (options, callback) {
});
});
+ // Set timeout
+
+ if (settings.timeout) {
+ timeoutId = setTimeout(function () {
+
+ timeoutId = 0;
+ return finish(new Error('Timeout'));
+ }, settings.timeout);
+ }
+
// Construct NTP message
- const message = new Buffer(48);
- for (let i = 0; i < 48; ++i) { // Zero message
+ var message = new Buffer(48);
+ for (var i = 0; i < 48; i++) { // Zero message
message[i] = 0;
}
- message[0] = (0 << 6) + (4 << 3) + (3 << 0); // Set version number to 4 and Mode to 3 (client)
+ message[0] = (0 << 6) + (4 << 3) + (3 << 0) // Set version number to 4 and Mode to 3 (client)
sent = Date.now();
- internals.fromMsecs(sent, message, 40); // Set transmit timestamp (returns as originate)
+ internals.fromMsecs(sent, message, 40); // Set transmit timestamp (returns as originate)
// Send NTP request
- socket.send(message, 0, message.length, settings.port, settings.host, (err, bytes) => {
+ socket.send(message, 0, message.length, settings.port, settings.host, function (err, bytes) {
if (err ||
bytes !== 48) {
@@ -151,7 +152,7 @@ internals.NtpMessage = function (buffer) {
// Leap indicator
- const li = (buffer[0] >> 6);
+ var li = (buffer[0] >> 6);
switch (li) {
case 0: this.leapIndicator = 'no-warning'; break;
case 1: this.leapIndicator = 'last-minute-61'; break;
@@ -161,12 +162,12 @@ internals.NtpMessage = function (buffer) {
// Version
- const vn = ((buffer[0] & 0x38) >> 3);
+ var vn = ((buffer[0] & 0x38) >> 3);
this.version = vn;
// Mode
- const mode = (buffer[0] & 0x7);
+ var mode = (buffer[0] & 0x7);
switch (mode) {
case 1: this.mode = 'symmetric-active'; break;
case 2: this.mode = 'symmetric-passive'; break;
@@ -180,7 +181,7 @@ internals.NtpMessage = function (buffer) {
// Stratum
- const stratum = buffer[1];
+ var stratum = buffer[1];
if (stratum === 0) {
this.stratum = 'death';
}
@@ -204,7 +205,7 @@ internals.NtpMessage = function (buffer) {
// Root delay (msecs)
- const rootDelay = 256 * (256 * (256 * buffer[4] + buffer[5]) + buffer[6]) + buffer[7];
+ var rootDelay = 256 * (256 * (256 * buffer[4] + buffer[5]) + buffer[6]) + buffer[7];
this.rootDelay = 1000 * (rootDelay / 0x10000);
// Root dispersion (msecs)
@@ -258,14 +259,14 @@ internals.NtpMessage = function (buffer) {
internals.toMsecs = function (buffer, offset) {
- let seconds = 0;
- let fraction = 0;
+ var seconds = 0;
+ var fraction = 0;
- for (let i = 0; i < 4; ++i) {
+ for (var i = 0; i < 4; ++i) {
seconds = (seconds * 256) + buffer[offset + i];
}
- for (let i = 4; i < 8; ++i) {
+ for (i = 4; i < 8; ++i) {
fraction = (fraction * 256) + buffer[offset + i];
}
@@ -275,8 +276,8 @@ internals.toMsecs = function (buffer, offset) {
internals.fromMsecs = function (ts, buffer, offset) {
- const seconds = Math.floor(ts / 1000) + 2208988800;
- const fraction = Math.round((ts % 1000) / 1000 * Math.pow(2, 32));
+ var seconds = Math.floor(ts / 1000) + 2208988800;
+ var fraction = Math.round((ts % 1000) / 1000 * Math.pow(2, 32));
buffer[offset + 0] = (seconds & 0xFF000000) >> 24;
buffer[offset + 1] = (seconds & 0x00FF0000) >> 16;
@@ -307,19 +308,23 @@ exports.offset = function (options, callback) {
options = {};
}
- const now = Date.now();
- const clockSyncRefresh = options.clockSyncRefresh || 24 * 60 * 60 * 1000; // Daily
+ var now = Date.now();
+ var clockSyncRefresh = options.clockSyncRefresh || 24 * 60 * 60 * 1000; // Daily
if (internals.last.offset &&
internals.last.host === options.host &&
internals.last.port === options.port &&
now < internals.last.expires) {
- process.nextTick(() => callback(null, internals.last.offset));
+ process.nextTick(function () {
+
+ callback(null, internals.last.offset);
+ });
+
return;
}
- exports.time(options, (err, time) => {
+ exports.time(options, function (err, time) {
if (err) {
return callback(err, 0);
@@ -340,8 +345,7 @@ exports.offset = function (options, callback) {
// Now singleton
internals.now = {
- started: false,
- intervalId: null
+ intervalId: 0
};
@@ -352,28 +356,20 @@ exports.start = function (options, callback) {
options = {};
}
- if (internals.now.started) {
- process.nextTick(() => callback());
- return;
- }
-
- const report = (err) => {
+ if (internals.now.intervalId) {
+ process.nextTick(function () {
- if (err &&
- options.onError) {
-
- options.onError(err);
- }
- };
+ callback();
+ });
- internals.now.started = true;
- exports.offset(options, (err, offset) => {
+ return;
+ }
- report(err);
+ exports.offset(options, function (err, offset) {
- internals.now.intervalId = setInterval(() => {
+ internals.now.intervalId = setInterval(function () {
- exports.offset(options, report);
+ exports.offset(options, function () { });
}, options.clockSyncRefresh || 24 * 60 * 60 * 1000); // Daily
return callback();
@@ -383,25 +379,24 @@ exports.start = function (options, callback) {
exports.stop = function () {
- if (!internals.now.started) {
+ if (!internals.now.intervalId) {
return;
}
clearInterval(internals.now.intervalId);
- internals.now.started = false;
- internals.now.intervalId = null;
+ internals.now.intervalId = 0;
};
exports.isLive = function () {
- return internals.now.started;
+ return !!internals.now.intervalId;
};
exports.now = function () {
- const now = Date.now();
+ var now = Date.now();
if (!exports.isLive() ||
now >= internals.last.expires) {
@@ -410,3 +405,8 @@ exports.now = function () {
return now + internals.last.offset;
};
+
+
+internals.ignore = function () {
+
+};
diff --git a/deps/npm/node_modules/sntp/package.json b/deps/npm/node_modules/sntp/package.json
index 8a3d895d51..3da9843d01 100755
--- a/deps/npm/node_modules/sntp/package.json
+++ b/deps/npm/node_modules/sntp/package.json
@@ -1,27 +1,27 @@
{
- "_from": "sntp@2.x.x",
- "_id": "sntp@2.1.0",
+ "_from": "sntp@1.x.x",
+ "_id": "sntp@1.0.9",
"_inBundle": false,
- "_integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==",
+ "_integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=",
"_location": "/sntp",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "sntp@2.x.x",
+ "raw": "sntp@1.x.x",
"name": "sntp",
"escapedName": "sntp",
- "rawSpec": "2.x.x",
+ "rawSpec": "1.x.x",
"saveSpec": null,
- "fetchSpec": "2.x.x"
+ "fetchSpec": "1.x.x"
},
"_requiredBy": [
"/hawk"
],
- "_resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz",
- "_shasum": "2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8",
- "_spec": "sntp@2.x.x",
- "_where": "/Users/rebecca/code/npm/node_modules/hawk",
+ "_resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz",
+ "_shasum": "6541184cc90aeea6c6e7b35e2659082443c66198",
+ "_spec": "sntp@1.x.x",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/hawk",
"author": {
"name": "Eran Hammer",
"email": "eran@hammer.io",
@@ -31,17 +31,17 @@
"url": "https://github.com/hueniverse/sntp/issues"
},
"bundleDependencies": false,
+ "contributors": [],
"dependencies": {
- "hoek": "4.x.x"
+ "hoek": "2.x.x"
},
"deprecated": false,
"description": "SNTP Client",
"devDependencies": {
- "code": "4.x.x",
- "lab": "14.x.x"
+ "lab": "4.x.x"
},
"engines": {
- "node": ">=4.0.0"
+ "node": ">=0.8.0"
},
"homepage": "https://github.com/hueniverse/sntp#readme",
"keywords": [
@@ -49,16 +49,20 @@
"ntp",
"time"
],
- "license": "BSD-3-Clause",
- "main": "lib/index.js",
+ "licenses": [
+ {
+ "type": "BSD",
+ "url": "http://github.com/hueniverse/sntp/raw/master/LICENSE"
+ }
+ ],
+ "main": "index",
"name": "sntp",
"repository": {
"type": "git",
"url": "git://github.com/hueniverse/sntp.git"
},
"scripts": {
- "test": "lab -a code -t 100 -L -m 20000",
- "test-cov-html": "lab -a code -r html -o coverage.html -m 20000"
+ "test": "make test-cov"
},
- "version": "2.1.0"
+ "version": "1.0.9"
}
diff --git a/deps/npm/node_modules/sntp/test/index.js b/deps/npm/node_modules/sntp/test/index.js
new file mode 100755
index 0000000000..2b8a1c256e
--- /dev/null
+++ b/deps/npm/node_modules/sntp/test/index.js
@@ -0,0 +1,434 @@
+// Load modules
+
+var Dns = require('dns');
+var Dgram = require('dgram');
+var Lab = require('lab');
+var Sntp = require('../lib');
+
+
+// Declare internals
+
+var internals = {};
+
+
+// Test shortcuts
+
+var lab = exports.lab = Lab.script();
+var before = lab.before;
+var after = lab.after;
+var describe = lab.experiment;
+var it = lab.test;
+var expect = Lab.expect;
+
+
+describe('SNTP', function () {
+
+ describe('#time', function () {
+
+ it('returns consistent result over multiple tries', function (done) {
+
+ Sntp.time(function (err, time) {
+
+ expect(err).to.not.exist;
+ expect(time).to.exist;
+ var t1 = time.t;
+
+ Sntp.time(function (err, time) {
+
+ expect(err).to.not.exist;
+ expect(time).to.exist;
+ var t2 = time.t;
+ expect(Math.abs(t1 - t2)).is.below(200);
+ done();
+ });
+ });
+ });
+
+ it('resolves reference IP', function (done) {
+
+ Sntp.time({ host: 'ntp.exnet.com', resolveReference: true }, function (err, time) {
+
+ expect(err).to.not.exist;
+ expect(time).to.exist;
+ expect(time.referenceHost).to.exist;
+ done();
+ });
+ });
+
+ it('times out on no response', function (done) {
+
+ Sntp.time({ port: 124, timeout: 100 }, function (err, time) {
+
+ expect(err).to.exist;
+ expect(time).to.not.exist;
+ expect(err.message).to.equal('Timeout');
+ done();
+ });
+ });
+
+ it('errors on error event', { parallel: false }, function (done) {
+
+ var orig = Dgram.createSocket;
+ Dgram.createSocket = function (type) {
+
+ Dgram.createSocket = orig;
+ var socket = Dgram.createSocket(type);
+ setImmediate(function () { socket.emit('error', new Error('Fake')) });
+ return socket;
+ };
+
+ Sntp.time(function (err, time) {
+
+ expect(err).to.exist;
+ expect(time).to.not.exist;
+ expect(err.message).to.equal('Fake');
+ done();
+ });
+ });
+
+ it('errors on incorrect sent size', { parallel: false }, function (done) {
+
+ var orig = Dgram.Socket.prototype.send;
+ Dgram.Socket.prototype.send = function (buf, offset, length, port, address, callback) {
+
+ Dgram.Socket.prototype.send = orig;
+ return callback(null, 40);
+ };
+
+ Sntp.time(function (err, time) {
+
+ expect(err).to.exist;
+ expect(time).to.not.exist;
+ expect(err.message).to.equal('Could not send entire message');
+ done();
+ });
+ });
+
+ it('times out on invalid host', function (done) {
+
+ Sntp.time({ host: 'error', timeout: 10000 }, function (err, time) {
+
+ expect(err).to.exist;
+ expect(time).to.not.exist;
+ expect(err.message).to.contain('getaddrinfo');
+ done();
+ });
+ });
+
+ it('fails on bad response buffer size', function (done) {
+
+ var server = Dgram.createSocket('udp4');
+ server.on('message', function (message, remote) {
+ var message = new Buffer(10);
+ server.send(message, 0, message.length, remote.port, remote.address, function (err, bytes) {
+
+ server.close();
+ });
+ });
+
+ server.bind(49123);
+
+ Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
+
+ expect(err).to.exist;
+ expect(err.message).to.equal('Invalid server response');
+ done();
+ });
+ });
+
+ var messup = function (bytes) {
+
+ var server = Dgram.createSocket('udp4');
+ server.on('message', function (message, remote) {
+
+ var message = new Buffer([
+ 0x24, 0x01, 0x00, 0xe3,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x41, 0x43, 0x54, 0x53,
+ 0xd4, 0xa8, 0x2d, 0xc7,
+ 0x1c, 0x5d, 0x49, 0x1b,
+ 0xd4, 0xa8, 0x2d, 0xe6,
+ 0x67, 0xef, 0x9d, 0xb2,
+ 0xd4, 0xa8, 0x2d, 0xe6,
+ 0x71, 0xed, 0xb5, 0xfb,
+ 0xd4, 0xa8, 0x2d, 0xe6,
+ 0x71, 0xee, 0x6c, 0xc5
+ ]);
+
+ for (var i = 0, il = bytes.length; i < il; ++i) {
+ message[bytes[i][0]] = bytes[i][1];
+ }
+
+ server.send(message, 0, message.length, remote.port, remote.address, function (err, bytes) {
+
+ server.close();
+ });
+ });
+
+ server.bind(49123);
+ };
+
+ it('fails on bad version', function (done) {
+
+ messup([[0, (0 << 6) + (3 << 3) + (4 << 0)]]);
+
+ Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
+
+ expect(err).to.exist;
+ expect(time.version).to.equal(3);
+ expect(err.message).to.equal('Invalid server response');
+ done();
+ });
+ });
+
+ it('fails on bad originateTimestamp', function (done) {
+
+ messup([[24, 0x83], [25, 0xaa], [26, 0x7e], [27, 0x80], [28, 0], [29, 0], [30, 0], [31, 0]]);
+
+ Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
+
+ expect(err).to.exist;
+ expect(err.message).to.equal('Invalid server response');
+ done();
+ });
+ });
+
+ it('fails on bad receiveTimestamp', function (done) {
+
+ messup([[32, 0x83], [33, 0xaa], [34, 0x7e], [35, 0x80], [36, 0], [37, 0], [38, 0], [39, 0]]);
+
+ Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
+
+ expect(err).to.exist;
+ expect(err.message).to.equal('Invalid server response');
+ done();
+ });
+ });
+
+ it('fails on bad originate timestamp and alarm li', function (done) {
+
+ messup([[0, (3 << 6) + (4 << 3) + (4 << 0)]]);
+
+ Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
+
+ expect(err).to.exist;
+ expect(err.message).to.equal('Wrong originate timestamp');
+ expect(time.leapIndicator).to.equal('alarm');
+ done();
+ });
+ });
+
+ it('returns time with death stratum and last61 li', function (done) {
+
+ messup([[0, (1 << 6) + (4 << 3) + (4 << 0)], [1, 0]]);
+
+ Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
+
+ expect(time.stratum).to.equal('death');
+ expect(time.leapIndicator).to.equal('last-minute-61');
+ done();
+ });
+ });
+
+ it('returns time with reserved stratum and last59 li', function (done) {
+
+ messup([[0, (2 << 6) + (4 << 3) + (4 << 0)], [1, 0x1f]]);
+
+ Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
+
+ expect(time.stratum).to.equal('reserved');
+ expect(time.leapIndicator).to.equal('last-minute-59');
+ done();
+ });
+ });
+
+ it('fails on bad mode (symmetric-active)', function (done) {
+
+ messup([[0, (0 << 6) + (4 << 3) + (1 << 0)]]);
+
+ Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
+
+ expect(err).to.exist;
+ expect(time.mode).to.equal('symmetric-active');
+ done();
+ });
+ });
+
+ it('fails on bad mode (symmetric-passive)', function (done) {
+
+ messup([[0, (0 << 6) + (4 << 3) + (2 << 0)]]);
+
+ Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
+
+ expect(err).to.exist;
+ expect(time.mode).to.equal('symmetric-passive');
+ done();
+ });
+ });
+
+ it('fails on bad mode (client)', function (done) {
+
+ messup([[0, (0 << 6) + (4 << 3) + (3 << 0)]]);
+
+ Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
+
+ expect(err).to.exist;
+ expect(time.mode).to.equal('client');
+ done();
+ });
+ });
+
+ it('fails on bad mode (broadcast)', function (done) {
+
+ messup([[0, (0 << 6) + (4 << 3) + (5 << 0)]]);
+
+ Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
+
+ expect(err).to.exist;
+ expect(time.mode).to.equal('broadcast');
+ done();
+ });
+ });
+
+ it('fails on bad mode (reserved)', function (done) {
+
+ messup([[0, (0 << 6) + (4 << 3) + (6 << 0)]]);
+
+ Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
+
+ expect(err).to.exist;
+ expect(time.mode).to.equal('reserved');
+ done();
+ });
+ });
+ });
+
+ describe('#offset', function () {
+
+ it('gets the current offset', function (done) {
+
+ Sntp.offset(function (err, offset) {
+
+ expect(err).to.not.exist;
+ expect(offset).to.not.equal(0);
+ done();
+ });
+ });
+
+ it('gets the current offset from cache', function (done) {
+
+ Sntp.offset(function (err, offset) {
+
+ expect(err).to.not.exist;
+ expect(offset).to.not.equal(0);
+ var offset1 = offset;
+ Sntp.offset({}, function (err, offset) {
+
+ expect(err).to.not.exist;
+ expect(offset).to.equal(offset1);
+ done();
+ });
+ });
+ });
+
+ it('gets the new offset on different server', function (done) {
+
+ Sntp.offset(function (err, offset) {
+
+ expect(err).to.not.exist;
+ expect(offset).to.not.equal(0);
+ var offset1 = offset;
+ Sntp.offset({ host: 'nist1-sj.ustiming.org' }, function (err, offset) {
+
+ expect(err).to.not.exist;
+ expect(offset).to.not.equal(offset1);
+ done();
+ });
+ });
+ });
+
+ it('gets the new offset on different server', function (done) {
+
+ Sntp.offset(function (err, offset) {
+
+ expect(err).to.not.exist;
+ expect(offset).to.not.equal(0);
+ var offset1 = offset;
+ Sntp.offset({ port: 123 }, function (err, offset) {
+
+ expect(err).to.not.exist;
+ expect(offset).to.not.equal(offset1);
+ done();
+ });
+ });
+ });
+
+ it('fails getting the current offset on invalid server', function (done) {
+
+ Sntp.offset({ host: 'error' }, function (err, offset) {
+
+ expect(err).to.exist;
+ expect(offset).to.equal(0);
+ done();
+ });
+ });
+ });
+
+ describe('#now', function () {
+
+ it('starts auto-sync, gets now, then stops', function (done) {
+
+ Sntp.stop();
+
+ var before = Sntp.now();
+ expect(before).to.equal(Date.now());
+
+ Sntp.start(function () {
+
+ var now = Sntp.now();
+ expect(now).to.not.equal(Date.now());
+ Sntp.stop();
+
+ done();
+ });
+ });
+
+ it('starts twice', function (done) {
+
+ Sntp.start(function () {
+
+ Sntp.start(function () {
+
+ var now = Sntp.now();
+ expect(now).to.not.equal(Date.now());
+ Sntp.stop();
+
+ done();
+ });
+ });
+ });
+
+ it('starts auto-sync, gets now, waits, gets again after timeout', function (done) {
+
+ Sntp.stop();
+
+ var before = Sntp.now();
+ expect(before).to.equal(Date.now());
+
+ Sntp.start({ clockSyncRefresh: 100 }, function () {
+
+ var now = Sntp.now();
+ expect(now).to.not.equal(Date.now());
+ expect(now).to.equal(Sntp.now());
+
+ setTimeout(function () {
+
+ expect(Sntp.now()).to.not.equal(now);
+ Sntp.stop();
+ done();
+ }, 110);
+ });
+ });
+ });
+});
diff --git a/deps/npm/node_modules/sshpk/bin/sshpk-verify b/deps/npm/node_modules/sshpk/bin/sshpk-verify
index a1669f409d..fc71a82c81 100755
--- a/deps/npm/node_modules/sshpk/bin/sshpk-verify
+++ b/deps/npm/node_modules/sshpk/bin/sshpk-verify
@@ -7,6 +7,7 @@ var dashdash = require('dashdash');
var sshpk = require('../lib/index');
var fs = require('fs');
var path = require('path');
+var Buffer = require('safer-buffer').Buffer;
var options = [
{
@@ -93,7 +94,7 @@ if (require.main === module) {
}
var fmt = opts.format || 'asn1';
- var sigData = new Buffer(opts.signature, 'base64');
+ var sigData = Buffer.from(opts.signature, 'base64');
var sig;
try {
diff --git a/deps/npm/node_modules/sshpk/lib/algs.js b/deps/npm/node_modules/sshpk/lib/algs.js
index da5d0c780a..3b01e7d1d3 100644
--- a/deps/npm/node_modules/sshpk/lib/algs.js
+++ b/deps/npm/node_modules/sshpk/lib/algs.js
@@ -1,5 +1,7 @@
// Copyright 2015 Joyent, Inc.
+var Buffer = require('safer-buffer').Buffer;
+
var algInfo = {
'dsa': {
parts: ['p', 'q', 'g', 'y'],
@@ -52,27 +54,27 @@ var curves = {
'nistp256': {
size: 256,
pkcs8oid: '1.2.840.10045.3.1.7',
- p: new Buffer(('00' +
+ p: Buffer.from(('00' +
'ffffffff 00000001 00000000 00000000' +
'00000000 ffffffff ffffffff ffffffff').
replace(/ /g, ''), 'hex'),
- a: new Buffer(('00' +
+ a: Buffer.from(('00' +
'FFFFFFFF 00000001 00000000 00000000' +
'00000000 FFFFFFFF FFFFFFFF FFFFFFFC').
replace(/ /g, ''), 'hex'),
- b: new Buffer((
+ b: Buffer.from((
'5ac635d8 aa3a93e7 b3ebbd55 769886bc' +
'651d06b0 cc53b0f6 3bce3c3e 27d2604b').
replace(/ /g, ''), 'hex'),
- s: new Buffer(('00' +
+ s: Buffer.from(('00' +
'c49d3608 86e70493 6a6678e1 139d26b7' +
'819f7e90').
replace(/ /g, ''), 'hex'),
- n: new Buffer(('00' +
+ n: Buffer.from(('00' +
'ffffffff 00000000 ffffffff ffffffff' +
'bce6faad a7179e84 f3b9cac2 fc632551').
replace(/ /g, ''), 'hex'),
- G: new Buffer(('04' +
+ G: Buffer.from(('04' +
'6b17d1f2 e12c4247 f8bce6e5 63a440f2' +
'77037d81 2deb33a0 f4a13945 d898c296' +
'4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16' +
@@ -82,31 +84,31 @@ var curves = {
'nistp384': {
size: 384,
pkcs8oid: '1.3.132.0.34',
- p: new Buffer(('00' +
+ p: Buffer.from(('00' +
'ffffffff ffffffff ffffffff ffffffff' +
'ffffffff ffffffff ffffffff fffffffe' +
'ffffffff 00000000 00000000 ffffffff').
replace(/ /g, ''), 'hex'),
- a: new Buffer(('00' +
+ a: Buffer.from(('00' +
'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +
'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE' +
'FFFFFFFF 00000000 00000000 FFFFFFFC').
replace(/ /g, ''), 'hex'),
- b: new Buffer((
+ b: Buffer.from((
'b3312fa7 e23ee7e4 988e056b e3f82d19' +
'181d9c6e fe814112 0314088f 5013875a' +
'c656398d 8a2ed19d 2a85c8ed d3ec2aef').
replace(/ /g, ''), 'hex'),
- s: new Buffer(('00' +
+ s: Buffer.from(('00' +
'a335926a a319a27a 1d00896a 6773a482' +
'7acdac73').
replace(/ /g, ''), 'hex'),
- n: new Buffer(('00' +
+ n: Buffer.from(('00' +
'ffffffff ffffffff ffffffff ffffffff' +
'ffffffff ffffffff c7634d81 f4372ddf' +
'581a0db2 48b0a77a ecec196a ccc52973').
replace(/ /g, ''), 'hex'),
- G: new Buffer(('04' +
+ G: Buffer.from(('04' +
'aa87ca22 be8b0537 8eb1c71e f320ad74' +
'6e1d3b62 8ba79b98 59f741e0 82542a38' +
'5502f25d bf55296c 3a545e38 72760ab7' +
@@ -118,34 +120,34 @@ var curves = {
'nistp521': {
size: 521,
pkcs8oid: '1.3.132.0.35',
- p: new Buffer((
+ p: Buffer.from((
'01ffffff ffffffff ffffffff ffffffff' +
'ffffffff ffffffff ffffffff ffffffff' +
'ffffffff ffffffff ffffffff ffffffff' +
'ffffffff ffffffff ffffffff ffffffff' +
'ffff').replace(/ /g, ''), 'hex'),
- a: new Buffer(('01FF' +
+ a: Buffer.from(('01FF' +
'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +
'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +
'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +
'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFC').
replace(/ /g, ''), 'hex'),
- b: new Buffer(('51' +
+ b: Buffer.from(('51' +
'953eb961 8e1c9a1f 929a21a0 b68540ee' +
'a2da725b 99b315f3 b8b48991 8ef109e1' +
'56193951 ec7e937b 1652c0bd 3bb1bf07' +
'3573df88 3d2c34f1 ef451fd4 6b503f00').
replace(/ /g, ''), 'hex'),
- s: new Buffer(('00' +
+ s: Buffer.from(('00' +
'd09e8800 291cb853 96cc6717 393284aa' +
'a0da64ba').replace(/ /g, ''), 'hex'),
- n: new Buffer(('01ff' +
+ n: Buffer.from(('01ff' +
'ffffffff ffffffff ffffffff ffffffff' +
'ffffffff ffffffff ffffffff fffffffa' +
'51868783 bf2f966b 7fcc0148 f709a5d0' +
'3bb5c9b8 899c47ae bb6fb71e 91386409').
replace(/ /g, ''), 'hex'),
- G: new Buffer(('04' +
+ G: Buffer.from(('04' +
'00c6 858e06b7 0404e9cd 9e3ecb66 2395b442' +
'9c648139 053fb521 f828af60 6b4d3dba' +
'a14b5e77 efe75928 fe1dc127 a2ffa8de' +
diff --git a/deps/npm/node_modules/sshpk/lib/certificate.js b/deps/npm/node_modules/sshpk/lib/certificate.js
index f6b25c9140..f08d66ac55 100644
--- a/deps/npm/node_modules/sshpk/lib/certificate.js
+++ b/deps/npm/node_modules/sshpk/lib/certificate.js
@@ -3,6 +3,7 @@
module.exports = Certificate;
var assert = require('assert-plus');
+var Buffer = require('safer-buffer').Buffer;
var algs = require('./algs');
var crypto = require('crypto');
var Fingerprint = require('./fingerprint');
@@ -185,7 +186,7 @@ Certificate.createSelfSigned = function (subjectOrSubjects, key, options) {
assert.optionalBuffer(options.serial, 'options.serial');
var serial = options.serial;
if (serial === undefined)
- serial = new Buffer('0000000000000001', 'hex');
+ serial = Buffer.from('0000000000000001', 'hex');
var purposes = options.purposes;
if (purposes === undefined)
@@ -283,7 +284,7 @@ Certificate.create =
assert.optionalBuffer(options.serial, 'options.serial');
var serial = options.serial;
if (serial === undefined)
- serial = new Buffer('0000000000000001', 'hex');
+ serial = Buffer.from('0000000000000001', 'hex');
var purposes = options.purposes;
if (purposes === undefined)
diff --git a/deps/npm/node_modules/sshpk/lib/dhe.js b/deps/npm/node_modules/sshpk/lib/dhe.js
index 2e844e73c6..de0a10a72c 100644
--- a/deps/npm/node_modules/sshpk/lib/dhe.js
+++ b/deps/npm/node_modules/sshpk/lib/dhe.js
@@ -8,6 +8,7 @@ module.exports = {
var assert = require('assert-plus');
var crypto = require('crypto');
+var Buffer = require('safer-buffer').Buffer;
var algs = require('./algs');
var utils = require('./utils');
var nacl;
@@ -189,7 +190,7 @@ DiffieHellman.prototype.computeSecret = function (otherpk) {
var secret = nacl.box.before(new Uint8Array(pub),
new Uint8Array(priv));
- return (new Buffer(secret));
+ return (Buffer.from(secret));
}
throw (new Error('Invalid algorithm: ' + this._algo));
@@ -218,7 +219,7 @@ DiffieHellman.prototype.generateKey = function () {
this._dh.generateKeys();
parts.push({name: 'curve',
- data: new Buffer(this._curve)});
+ data: Buffer.from(this._curve)});
parts.push({name: 'Q', data: this._dh.getPublicKey()});
parts.push({name: 'd', data: this._dh.getPrivateKey()});
this._key = new PrivateKey({
@@ -236,14 +237,14 @@ DiffieHellman.prototype.generateKey = function () {
priv = r.mod(n1).add(jsbn.ONE);
pub = this._ecParams.getG().multiply(priv);
- priv = new Buffer(priv.toByteArray());
- pub = new Buffer(this._ecParams.getCurve().
+ priv = Buffer.from(priv.toByteArray());
+ pub = Buffer.from(this._ecParams.getCurve().
encodePointHex(pub), 'hex');
this._priv = new ECPrivate(this._ecParams, priv);
parts.push({name: 'curve',
- data: new Buffer(this._curve)});
+ data: Buffer.from(this._curve)});
parts.push({name: 'Q', data: pub});
parts.push({name: 'd', data: priv});
@@ -258,8 +259,8 @@ DiffieHellman.prototype.generateKey = function () {
} else if (this._algo === 'curve25519') {
var pair = nacl.box.keyPair();
- priv = new Buffer(pair.secretKey);
- pub = new Buffer(pair.publicKey);
+ priv = Buffer.from(pair.secretKey);
+ pub = Buffer.from(pair.publicKey);
priv = Buffer.concat([priv, pub]);
assert.strictEqual(priv.length, 64);
assert.strictEqual(pub.length, 32);
@@ -316,7 +317,7 @@ function ECPrivate(params, buffer) {
ECPrivate.prototype.deriveSharedSecret = function (pubKey) {
assert.ok(pubKey instanceof ECPublic);
var S = pubKey._pub.multiply(this._priv);
- return (new Buffer(S.getX().toBigInteger().toByteArray()));
+ return (Buffer.from(S.getX().toBigInteger().toByteArray()));
};
function generateED25519() {
@@ -324,8 +325,8 @@ function generateED25519() {
nacl = require('tweetnacl');
var pair = nacl.sign.keyPair();
- var priv = new Buffer(pair.secretKey);
- var pub = new Buffer(pair.publicKey);
+ var priv = Buffer.from(pair.secretKey);
+ var pub = Buffer.from(pair.publicKey);
assert.strictEqual(priv.length, 64);
assert.strictEqual(pub.length, 32);
@@ -362,7 +363,7 @@ function generateECDSA(curve) {
dh.generateKeys();
parts.push({name: 'curve',
- data: new Buffer(curve)});
+ data: Buffer.from(curve)});
parts.push({name: 'Q', data: dh.getPublicKey()});
parts.push({name: 'd', data: dh.getPrivateKey()});
@@ -395,11 +396,11 @@ function generateECDSA(curve) {
var priv = c.mod(n1).add(jsbn.ONE);
var pub = ecParams.getG().multiply(priv);
- priv = new Buffer(priv.toByteArray());
- pub = new Buffer(ecParams.getCurve().
+ priv = Buffer.from(priv.toByteArray());
+ pub = Buffer.from(ecParams.getCurve().
encodePointHex(pub), 'hex');
- parts.push({name: 'curve', data: new Buffer(curve)});
+ parts.push({name: 'curve', data: Buffer.from(curve)});
parts.push({name: 'Q', data: pub});
parts.push({name: 'd', data: priv});
diff --git a/deps/npm/node_modules/sshpk/lib/ed-compat.js b/deps/npm/node_modules/sshpk/lib/ed-compat.js
index 6d906b78bb..129c2fc307 100644
--- a/deps/npm/node_modules/sshpk/lib/ed-compat.js
+++ b/deps/npm/node_modules/sshpk/lib/ed-compat.js
@@ -9,6 +9,7 @@ var nacl;
var stream = require('stream');
var util = require('util');
var assert = require('assert-plus');
+var Buffer = require('safer-buffer').Buffer;
var Signature = require('./signature');
function Verifier(key, hashAlgo) {
@@ -33,7 +34,7 @@ Verifier.prototype._write = function (chunk, enc, cb) {
Verifier.prototype.update = function (chunk) {
if (typeof (chunk) === 'string')
- chunk = new Buffer(chunk, 'binary');
+ chunk = Buffer.from(chunk, 'binary');
this.chunks.push(chunk);
};
@@ -45,7 +46,7 @@ Verifier.prototype.verify = function (signature, fmt) {
sig = signature.toBuffer('raw');
} else if (typeof (signature) === 'string') {
- sig = new Buffer(signature, 'base64');
+ sig = Buffer.from(signature, 'base64');
} else if (Signature.isSignature(signature, [1, 0])) {
throw (new Error('signature was created by too old ' +
@@ -81,7 +82,7 @@ Signer.prototype._write = function (chunk, enc, cb) {
Signer.prototype.update = function (chunk) {
if (typeof (chunk) === 'string')
- chunk = new Buffer(chunk, 'binary');
+ chunk = Buffer.from(chunk, 'binary');
this.chunks.push(chunk);
};
@@ -90,7 +91,7 @@ Signer.prototype.sign = function () {
new Uint8Array(Buffer.concat(this.chunks)),
new Uint8Array(Buffer.concat([
this.key.part.k.data, this.key.part.A.data])));
- var sigBuf = new Buffer(sig);
+ var sigBuf = Buffer.from(sig);
var sigObj = Signature.parse(sigBuf, 'ed25519', 'raw');
sigObj.hashAlgorithm = 'sha512';
return (sigObj);
diff --git a/deps/npm/node_modules/sshpk/lib/fingerprint.js b/deps/npm/node_modules/sshpk/lib/fingerprint.js
index 7ed7e51304..4e75e6667f 100644
--- a/deps/npm/node_modules/sshpk/lib/fingerprint.js
+++ b/deps/npm/node_modules/sshpk/lib/fingerprint.js
@@ -3,6 +3,7 @@
module.exports = Fingerprint;
var assert = require('assert-plus');
+var Buffer = require('safer-buffer').Buffer;
var algs = require('./algs');
var crypto = require('crypto');
var errs = require('./errors');
@@ -90,7 +91,7 @@ Fingerprint.parse = function (fp, options) {
if (!base64RE.test(parts[1]))
throw (new FingerprintFormatError(fp));
try {
- hash = new Buffer(parts[1], 'base64');
+ hash = Buffer.from(parts[1], 'base64');
} catch (e) {
throw (new FingerprintFormatError(fp));
}
@@ -104,7 +105,7 @@ Fingerprint.parse = function (fp, options) {
if (!md5RE.test(parts))
throw (new FingerprintFormatError(fp));
try {
- hash = new Buffer(parts, 'hex');
+ hash = Buffer.from(parts, 'hex');
} catch (e) {
throw (new FingerprintFormatError(fp));
}
diff --git a/deps/npm/node_modules/sshpk/lib/formats/auto.js b/deps/npm/node_modules/sshpk/lib/formats/auto.js
index 39865710aa..56e430d5a7 100644
--- a/deps/npm/node_modules/sshpk/lib/formats/auto.js
+++ b/deps/npm/node_modules/sshpk/lib/formats/auto.js
@@ -6,6 +6,7 @@ module.exports = {
};
var assert = require('assert-plus');
+var Buffer = require('safer-buffer').Buffer;
var utils = require('../utils');
var Key = require('../key');
var PrivateKey = require('../private-key');
@@ -27,7 +28,7 @@ function read(buf, options) {
return (ssh.read(buf, options));
if (findDNSSECHeader(buf))
return (dnssec.read(buf, options));
- buf = new Buffer(buf, 'binary');
+ buf = Buffer.from(buf, 'binary');
} else {
assert.buffer(buf);
if (findPEMHeader(buf))
diff --git a/deps/npm/node_modules/sshpk/lib/formats/dnssec.js b/deps/npm/node_modules/sshpk/lib/formats/dnssec.js
index 1eb4b5b413..a74ea9ce0d 100644
--- a/deps/npm/node_modules/sshpk/lib/formats/dnssec.js
+++ b/deps/npm/node_modules/sshpk/lib/formats/dnssec.js
@@ -6,6 +6,7 @@ module.exports = {
};
var assert = require('assert-plus');
+var Buffer = require('safer-buffer').Buffer;
var Key = require('../key');
var PrivateKey = require('../private-key');
var utils = require('../utils');
@@ -66,7 +67,7 @@ function readRFC3110(keyString) {
if (!supportedAlgosById[algorithm])
throw (new Error('Unsupported algorithm: ' + algorithm));
var base64key = elems.slice(6, elems.length).join();
- var keyBuffer = new Buffer(base64key, 'base64');
+ var keyBuffer = Buffer.from(base64key, 'base64');
if (supportedAlgosById[algorithm].match(/^RSA-/)) {
// join the rest of the body into a single base64-blob
var publicExponentLen = keyBuffer.readUInt8(0);
@@ -101,7 +102,7 @@ function readRFC3110(keyString) {
curve: curve,
size: size,
parts: [
- {name: 'curve', data: new Buffer(curve) },
+ {name: 'curve', data: Buffer.from(curve) },
{name: 'Q', data: utils.ecNormalize(keyBuffer) }
]
};
@@ -112,7 +113,7 @@ function readRFC3110(keyString) {
}
function elementToBuf(e) {
- return (new Buffer(e.split(' ')[1], 'base64'));
+ return (Buffer.from(e.split(' ')[1], 'base64'));
}
function readDNSSECRSAPrivateKey(elements) {
@@ -161,7 +162,7 @@ function readDNSSECPrivateKey(alg, elements) {
}
if (supportedAlgosById[alg] === 'ECDSA-P384-SHA384' ||
supportedAlgosById[alg] === 'ECDSA-P256-SHA256') {
- var d = new Buffer(elements[0].split(' ')[1], 'base64');
+ var d = Buffer.from(elements[0].split(' ')[1], 'base64');
var curve = 'nistp384';
var size = 384;
if (supportedAlgosById[alg] === 'ECDSA-P256-SHA256') {
@@ -176,7 +177,7 @@ function readDNSSECPrivateKey(alg, elements) {
curve: curve,
size: size,
parts: [
- {name: 'curve', data: new Buffer(curve) },
+ {name: 'curve', data: Buffer.from(curve) },
{name: 'd', data: d },
{name: 'Q', data: Q }
]
@@ -237,7 +238,7 @@ function writeRSA(key, options) {
out += 'Created: ' + dnssecTimestamp(timestamp) + '\n';
out += 'Publish: ' + dnssecTimestamp(timestamp) + '\n';
out += 'Activate: ' + dnssecTimestamp(timestamp) + '\n';
- return (new Buffer(out, 'ascii'));
+ return (Buffer.from(out, 'ascii'));
}
function writeECDSA(key, options) {
@@ -260,7 +261,7 @@ function writeECDSA(key, options) {
out += 'Publish: ' + dnssecTimestamp(timestamp) + '\n';
out += 'Activate: ' + dnssecTimestamp(timestamp) + '\n';
- return (new Buffer(out, 'ascii'));
+ return (Buffer.from(out, 'ascii'));
}
function write(key, options) {
diff --git a/deps/npm/node_modules/sshpk/lib/formats/openssh-cert.js b/deps/npm/node_modules/sshpk/lib/formats/openssh-cert.js
index b68155e887..0b95e89049 100644
--- a/deps/npm/node_modules/sshpk/lib/formats/openssh-cert.js
+++ b/deps/npm/node_modules/sshpk/lib/formats/openssh-cert.js
@@ -15,6 +15,7 @@ module.exports = {
var assert = require('assert-plus');
var SSHBuffer = require('../ssh-buffer');
var crypto = require('crypto');
+var Buffer = require('safer-buffer').Buffer;
var algs = require('../algs');
var Key = require('../key');
var PrivateKey = require('../private-key');
@@ -50,7 +51,7 @@ function read(buf, options) {
var algo = parts[0];
var data = parts[1];
- data = new Buffer(data, 'base64');
+ data = Buffer.from(data, 'base64');
return (fromBuffer(data, algo));
}
@@ -164,7 +165,7 @@ function dateToInt64(date) {
var i = Math.round(date.getTime() / 1000);
var upper = Math.floor(i / 4294967296);
var lower = Math.floor(i % 4294967296);
- var buf = new Buffer(8);
+ var buf = Buffer.alloc(8);
buf.writeUInt32BE(upper, 0);
buf.writeUInt32BE(lower, 4);
return (buf);
@@ -278,15 +279,15 @@ function toBuffer(cert, noSig) {
buf.writeInt64(dateToInt64(cert.validUntil));
if (sig.critical === undefined)
- sig.critical = new Buffer(0);
+ sig.critical = Buffer.alloc(0);
buf.writeBuffer(sig.critical);
if (sig.exts === undefined)
- sig.exts = new Buffer(0);
+ sig.exts = Buffer.alloc(0);
buf.writeBuffer(sig.exts);
/* reserved */
- buf.writeBuffer(new Buffer(0));
+ buf.writeBuffer(Buffer.alloc(0));
sub = rfc4253.write(cert.issuerKey);
buf.writeBuffer(sub);
diff --git a/deps/npm/node_modules/sshpk/lib/formats/pem.js b/deps/npm/node_modules/sshpk/lib/formats/pem.js
index 9196449b8d..859cfa13fc 100644
--- a/deps/npm/node_modules/sshpk/lib/formats/pem.js
+++ b/deps/npm/node_modules/sshpk/lib/formats/pem.js
@@ -8,6 +8,7 @@ module.exports = {
var assert = require('assert-plus');
var asn1 = require('asn1');
var crypto = require('crypto');
+var Buffer = require('safer-buffer').Buffer;
var algs = require('../algs');
var utils = require('../utils');
var Key = require('../key');
@@ -67,7 +68,7 @@ function read(buf, options, forceType) {
var parts = headers['proc-type'].split(',');
if (parts[0] === '4' && parts[1] === 'ENCRYPTED') {
if (typeof (options.passphrase) === 'string') {
- options.passphrase = new Buffer(
+ options.passphrase = Buffer.from(
options.passphrase, 'utf-8');
}
if (!Buffer.isBuffer(options.passphrase)) {
@@ -77,7 +78,7 @@ function read(buf, options, forceType) {
parts = headers['dek-info'].split(',');
assert.ok(parts.length === 2);
cipher = parts[0].toLowerCase();
- iv = new Buffer(parts[1], 'hex');
+ iv = Buffer.from(parts[1], 'hex');
key = utils.opensslKeyDeriv(cipher, iv,
options.passphrase, 1).key;
}
@@ -86,7 +87,7 @@ function read(buf, options, forceType) {
/* Chop off the first and last lines */
lines = lines.slice(0, -1).join('');
- buf = new Buffer(lines, 'base64');
+ buf = Buffer.from(lines, 'base64');
if (cipher && key && iv) {
var cipherStream = crypto.createDecipheriv(cipher, key, iv);
@@ -174,7 +175,7 @@ function write(key, options, type) {
var tmp = der.buffer.toString('base64');
var len = tmp.length + (tmp.length / 64) +
18 + 16 + header.length*2 + 10;
- var buf = new Buffer(len);
+ var buf = Buffer.alloc(len);
var o = 0;
o += buf.write('-----BEGIN ' + header + '-----\n', o);
for (var i = 0; i < tmp.length; ) {
diff --git a/deps/npm/node_modules/sshpk/lib/formats/pkcs1.js b/deps/npm/node_modules/sshpk/lib/formats/pkcs1.js
index 9d7246d41d..bc48550025 100644
--- a/deps/npm/node_modules/sshpk/lib/formats/pkcs1.js
+++ b/deps/npm/node_modules/sshpk/lib/formats/pkcs1.js
@@ -9,6 +9,7 @@ module.exports = {
var assert = require('assert-plus');
var asn1 = require('asn1');
+var Buffer = require('safer-buffer').Buffer;
var algs = require('../algs');
var utils = require('../utils');
@@ -209,7 +210,7 @@ function readPkcs1ECDSAPublic(der) {
var key = {
type: 'ecdsa',
parts: [
- { name: 'curve', data: new Buffer(curve) },
+ { name: 'curve', data: Buffer.from(curve) },
{ name: 'Q', data: Q }
]
};
@@ -235,7 +236,7 @@ function readPkcs1ECDSAPrivate(der) {
var key = {
type: 'ecdsa',
parts: [
- { name: 'curve', data: new Buffer(curve) },
+ { name: 'curve', data: Buffer.from(curve) },
{ name: 'Q', data: Q },
{ name: 'd', data: d }
]
@@ -285,8 +286,7 @@ function writePkcs1RSAPublic(der, key) {
}
function writePkcs1RSAPrivate(der, key) {
- var ver = new Buffer(1);
- ver[0] = 0;
+ var ver = Buffer.from([0]);
der.writeBuffer(ver, asn1.Ber.Integer);
der.writeBuffer(key.part.n.data, asn1.Ber.Integer);
@@ -302,8 +302,7 @@ function writePkcs1RSAPrivate(der, key) {
}
function writePkcs1DSAPrivate(der, key) {
- var ver = new Buffer(1);
- ver[0] = 0;
+ var ver = Buffer.from([0]);
der.writeBuffer(ver, asn1.Ber.Integer);
der.writeBuffer(key.part.p.data, asn1.Ber.Integer);
@@ -336,8 +335,7 @@ function writePkcs1ECDSAPublic(der, key) {
}
function writePkcs1ECDSAPrivate(der, key) {
- var ver = new Buffer(1);
- ver[0] = 1;
+ var ver = Buffer.from([1]);
der.writeBuffer(ver, asn1.Ber.Integer);
der.writeBuffer(key.part.d.data, asn1.Ber.OctetString);
@@ -356,8 +354,7 @@ function writePkcs1ECDSAPrivate(der, key) {
}
function writePkcs1EdDSAPrivate(der, key) {
- var ver = new Buffer(1);
- ver[0] = 1;
+ var ver = Buffer.from([1]);
der.writeBuffer(ver, asn1.Ber.Integer);
der.writeBuffer(key.part.k.data, asn1.Ber.OctetString);
diff --git a/deps/npm/node_modules/sshpk/lib/formats/pkcs8.js b/deps/npm/node_modules/sshpk/lib/formats/pkcs8.js
index 0838b76962..aa27427c17 100644
--- a/deps/npm/node_modules/sshpk/lib/formats/pkcs8.js
+++ b/deps/npm/node_modules/sshpk/lib/formats/pkcs8.js
@@ -12,6 +12,7 @@ module.exports = {
var assert = require('assert-plus');
var asn1 = require('asn1');
+var Buffer = require('safer-buffer').Buffer;
var algs = require('../algs');
var utils = require('../utils');
var Key = require('../key');
@@ -307,7 +308,7 @@ function readPkcs8ECDSAPrivate(der) {
var key = {
type: 'ecdsa',
parts: [
- { name: 'curve', data: new Buffer(curveName) },
+ { name: 'curve', data: Buffer.from(curveName) },
{ name: 'Q', data: Q },
{ name: 'd', data: d }
]
@@ -326,7 +327,7 @@ function readPkcs8ECDSAPublic(der) {
var key = {
type: 'ecdsa',
parts: [
- { name: 'curve', data: new Buffer(curveName) },
+ { name: 'curve', data: Buffer.from(curveName) },
{ name: 'Q', data: Q }
]
};
@@ -415,8 +416,7 @@ function writePkcs8(der, key) {
der.startSequence();
if (PrivateKey.isPrivateKey(key)) {
- var sillyInt = new Buffer(1);
- sillyInt[0] = 0x0;
+ var sillyInt = Buffer.from([0]);
der.writeBuffer(sillyInt, asn1.Ber.Integer);
}
@@ -464,8 +464,7 @@ function writePkcs8RSAPrivate(key, der) {
der.startSequence(asn1.Ber.OctetString);
der.startSequence();
- var version = new Buffer(1);
- version[0] = 0;
+ var version = Buffer.from([0]);
der.writeBuffer(version, asn1.Ber.Integer);
der.writeBuffer(key.part.n.data, asn1.Ber.Integer);
@@ -536,8 +535,7 @@ function writeECDSACurve(key, der) {
// ECParameters sequence
der.startSequence();
- var version = new Buffer(1);
- version.writeUInt8(1, 0);
+ var version = Buffer.from([1]);
der.writeBuffer(version, asn1.Ber.Integer);
// FieldID sequence
@@ -560,8 +558,7 @@ function writeECDSACurve(key, der) {
der.writeBuffer(curve.n, asn1.Ber.Integer);
var h = curve.h;
if (!h) {
- h = new Buffer(1);
- h[0] = 1;
+ h = Buffer.from([1]);
}
der.writeBuffer(h, asn1.Ber.Integer);
@@ -585,8 +582,7 @@ function writePkcs8ECDSAPrivate(key, der) {
der.startSequence(asn1.Ber.OctetString);
der.startSequence();
- var version = new Buffer(1);
- version[0] = 1;
+ var version = Buffer.from([1]);
der.writeBuffer(version, asn1.Ber.Integer);
der.writeBuffer(key.part.d.data, asn1.Ber.OctetString);
diff --git a/deps/npm/node_modules/sshpk/lib/formats/rfc4253.js b/deps/npm/node_modules/sshpk/lib/formats/rfc4253.js
index 56b7682934..52fddcb6b6 100644
--- a/deps/npm/node_modules/sshpk/lib/formats/rfc4253.js
+++ b/deps/npm/node_modules/sshpk/lib/formats/rfc4253.js
@@ -14,6 +14,7 @@ module.exports = {
};
var assert = require('assert-plus');
+var Buffer = require('safer-buffer').Buffer;
var algs = require('../algs');
var utils = require('../utils');
var Key = require('../key');
@@ -54,7 +55,7 @@ function keyTypeToAlg(key) {
function read(partial, type, buf, options) {
if (typeof (buf) === 'string')
- buf = new Buffer(buf);
+ buf = Buffer.from(buf);
assert.buffer(buf, 'buf');
var key = {};
diff --git a/deps/npm/node_modules/sshpk/lib/formats/ssh-private.js b/deps/npm/node_modules/sshpk/lib/formats/ssh-private.js
index 2fcf71990c..5e7eed887a 100644
--- a/deps/npm/node_modules/sshpk/lib/formats/ssh-private.js
+++ b/deps/npm/node_modules/sshpk/lib/formats/ssh-private.js
@@ -8,6 +8,7 @@ module.exports = {
var assert = require('assert-plus');
var asn1 = require('asn1');
+var Buffer = require('safer-buffer').Buffer;
var algs = require('../algs');
var utils = require('../utils');
var crypto = require('crypto');
@@ -70,7 +71,7 @@ function readSSHPrivate(type, buf, options) {
}
if (typeof (options.passphrase) === 'string') {
- options.passphrase = new Buffer(options.passphrase,
+ options.passphrase = Buffer.from(options.passphrase,
'utf-8');
}
if (!Buffer.isBuffer(options.passphrase)) {
@@ -88,7 +89,7 @@ function readSSHPrivate(type, buf, options) {
throw (new Error('bcrypt_pbkdf function returned ' +
'failure, parameters invalid'));
}
- out = new Buffer(out);
+ out = Buffer.from(out);
var ckey = out.slice(0, cinf.keySize);
var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize);
var cipherStream = crypto.createDecipheriv(cinf.opensslName,
@@ -142,13 +143,13 @@ function write(key, options) {
var cipher = 'none';
var kdf = 'none';
- var kdfopts = new Buffer(0);
+ var kdfopts = Buffer.alloc(0);
var cinf = { blockSize: 8 };
var passphrase;
if (options !== undefined) {
passphrase = options.passphrase;
if (typeof (passphrase) === 'string')
- passphrase = new Buffer(passphrase, 'utf-8');
+ passphrase = Buffer.from(passphrase, 'utf-8');
if (passphrase !== undefined) {
assert.buffer(passphrase, 'options.passphrase');
assert.optionalString(options.cipher, 'options.cipher');
@@ -199,7 +200,7 @@ function write(key, options) {
throw (new Error('bcrypt_pbkdf function returned ' +
'failure, parameters invalid'));
}
- out = new Buffer(out);
+ out = Buffer.from(out);
var ckey = out.slice(0, cinf.keySize);
var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize);
@@ -244,7 +245,7 @@ function write(key, options) {
var tmp = buf.toString('base64');
var len = tmp.length + (tmp.length / 70) +
18 + 16 + header.length*2 + 10;
- buf = new Buffer(len);
+ buf = Buffer.alloc(len);
var o = 0;
o += buf.write('-----BEGIN ' + header + '-----\n', o);
for (var i = 0; i < tmp.length; ) {
diff --git a/deps/npm/node_modules/sshpk/lib/formats/ssh.js b/deps/npm/node_modules/sshpk/lib/formats/ssh.js
index 7f88ceb916..c8e9c93105 100644
--- a/deps/npm/node_modules/sshpk/lib/formats/ssh.js
+++ b/deps/npm/node_modules/sshpk/lib/formats/ssh.js
@@ -6,6 +6,7 @@ module.exports = {
};
var assert = require('assert-plus');
+var Buffer = require('safer-buffer').Buffer;
var rfc4253 = require('./rfc4253');
var utils = require('../utils');
var Key = require('../key');
@@ -31,7 +32,7 @@ function read(buf, options) {
assert.ok(m, 'key must match regex');
var type = rfc4253.algToKeyType(m[1]);
- var kbuf = new Buffer(m[2], 'base64');
+ var kbuf = Buffer.from(m[2], 'base64');
/*
* This is a bit tricky. If we managed to parse the key and locate the
@@ -50,7 +51,7 @@ function read(buf, options) {
} catch (e) {
m = trimmed.match(SSHKEY_RE2);
assert.ok(m, 'key must match regex');
- kbuf = new Buffer(m[2], 'base64');
+ kbuf = Buffer.from(m[2], 'base64');
key = rfc4253.readInternal(ret, 'public', kbuf);
}
} else {
@@ -110,5 +111,5 @@ function write(key, options) {
if (key.comment)
parts.push(key.comment);
- return (new Buffer(parts.join(' ')));
+ return (Buffer.from(parts.join(' ')));
}
diff --git a/deps/npm/node_modules/sshpk/lib/formats/x509-pem.js b/deps/npm/node_modules/sshpk/lib/formats/x509-pem.js
index c59c7d5ff0..56d78eb583 100644
--- a/deps/npm/node_modules/sshpk/lib/formats/x509-pem.js
+++ b/deps/npm/node_modules/sshpk/lib/formats/x509-pem.js
@@ -11,6 +11,7 @@ module.exports = {
var assert = require('assert-plus');
var asn1 = require('asn1');
+var Buffer = require('safer-buffer').Buffer;
var algs = require('../algs');
var utils = require('../utils');
var Key = require('../key');
@@ -48,7 +49,7 @@ function read(buf, options) {
/* Chop off the first and last lines */
lines = lines.slice(0, -1).join('');
- buf = new Buffer(lines, 'base64');
+ buf = Buffer.from(lines, 'base64');
return (x509.read(buf, options));
}
@@ -60,7 +61,7 @@ function write(cert, options) {
var tmp = dbuf.toString('base64');
var len = tmp.length + (tmp.length / 64) +
18 + 16 + header.length*2 + 10;
- var buf = new Buffer(len);
+ var buf = Buffer.alloc(len);
var o = 0;
o += buf.write('-----BEGIN ' + header + '-----\n', o);
for (var i = 0; i < tmp.length; ) {
diff --git a/deps/npm/node_modules/sshpk/lib/formats/x509.js b/deps/npm/node_modules/sshpk/lib/formats/x509.js
index cad74b529b..219953c4e0 100644
--- a/deps/npm/node_modules/sshpk/lib/formats/x509.js
+++ b/deps/npm/node_modules/sshpk/lib/formats/x509.js
@@ -10,6 +10,7 @@ module.exports = {
var assert = require('assert-plus');
var asn1 = require('asn1');
+var Buffer = require('safer-buffer').Buffer;
var algs = require('../algs');
var utils = require('../utils');
var Key = require('../key');
@@ -89,7 +90,7 @@ var EXTS = {
function read(buf, options) {
if (typeof (buf) === 'string') {
- buf = new Buffer(buf, 'binary');
+ buf = Buffer.from(buf, 'binary');
}
assert.buffer(buf, 'buf');
@@ -500,7 +501,7 @@ function write(cert, options) {
der.endSequence();
var sigData = sig.signature.toBuffer('asn1');
- var data = new Buffer(sigData.length + 1);
+ var data = Buffer.alloc(sigData.length + 1);
data[0] = 0;
sigData.copy(data, 1);
der.writeBuffer(data, asn1.Ber.BitString);
@@ -710,8 +711,7 @@ function writeBitField(setBits, bitIndex) {
var bitLen = bitIndex.length;
var blen = Math.ceil(bitLen / 8);
var unused = blen * 8 - bitLen;
- var bits = new Buffer(1 + blen);
- bits.fill(0);
+ var bits = Buffer.alloc(1 + blen); // zero-filled
bits[0] = unused;
for (var i = 0; i < bitLen; ++i) {
var byteN = 1 + Math.floor(i / 8);
diff --git a/deps/npm/node_modules/sshpk/lib/identity.js b/deps/npm/node_modules/sshpk/lib/identity.js
index e7e7c22b75..495b83a6cf 100644
--- a/deps/npm/node_modules/sshpk/lib/identity.js
+++ b/deps/npm/node_modules/sshpk/lib/identity.js
@@ -11,6 +11,7 @@ var errs = require('./errors');
var util = require('util');
var utils = require('./utils');
var asn1 = require('asn1');
+var Buffer = require('safer-buffer').Buffer;
/*JSSTYLED*/
var DNS_NAME_RE = /^([*]|[a-z0-9][a-z0-9\-]{0,62})(?:\.([*]|[a-z0-9][a-z0-9\-]{0,62}))*$/i;
@@ -143,7 +144,7 @@ Identity.prototype.toAsn1 = function (der, tag) {
*/
if (c.asn1type === asn1.Ber.Utf8String ||
c.value.match(NOT_IA5)) {
- var v = new Buffer(c.value, 'utf8');
+ var v = Buffer.from(c.value, 'utf8');
der.writeBuffer(v, asn1.Ber.Utf8String);
} else if (c.asn1type === asn1.Ber.IA5String ||
diff --git a/deps/npm/node_modules/sshpk/lib/private-key.js b/deps/npm/node_modules/sshpk/lib/private-key.js
index 4c98be22a4..77f667cd2a 100644
--- a/deps/npm/node_modules/sshpk/lib/private-key.js
+++ b/deps/npm/node_modules/sshpk/lib/private-key.js
@@ -3,6 +3,7 @@
module.exports = PrivateKey;
var assert = require('assert-plus');
+var Buffer = require('safer-buffer').Buffer;
var algs = require('./algs');
var crypto = require('crypto');
var Fingerprint = require('./fingerprint');
@@ -97,7 +98,7 @@ PrivateKey.prototype.derive = function (newType) {
priv = priv.slice(1);
pair = nacl.box.keyPair.fromSecretKey(new Uint8Array(priv));
- pub = new Buffer(pair.publicKey);
+ pub = Buffer.from(pair.publicKey);
return (new PrivateKey({
type: 'curve25519',
@@ -115,7 +116,7 @@ PrivateKey.prototype.derive = function (newType) {
priv = priv.slice(1);
pair = nacl.sign.keyPair.fromSeed(new Uint8Array(priv));
- pub = new Buffer(pair.publicKey);
+ pub = Buffer.from(pair.publicKey);
return (new PrivateKey({
type: 'ed25519',
@@ -166,7 +167,7 @@ PrivateKey.prototype.createSign = function (hashAlgo) {
v.sign = function () {
var sig = oldSign(key);
if (typeof (sig) === 'string')
- sig = new Buffer(sig, 'binary');
+ sig = Buffer.from(sig, 'binary');
sig = Signature.parse(sig, type, 'asn1');
sig.hashAlgorithm = hashAlgo;
sig.curve = curve;
diff --git a/deps/npm/node_modules/sshpk/lib/signature.js b/deps/npm/node_modules/sshpk/lib/signature.js
index 333bb5d39e..aa8fdbb878 100644
--- a/deps/npm/node_modules/sshpk/lib/signature.js
+++ b/deps/npm/node_modules/sshpk/lib/signature.js
@@ -3,6 +3,7 @@
module.exports = Signature;
var assert = require('assert-plus');
+var Buffer = require('safer-buffer').Buffer;
var algs = require('./algs');
var crypto = require('crypto');
var errs = require('./errors');
@@ -141,7 +142,7 @@ Signature.prototype.toString = function (format) {
Signature.parse = function (data, type, format) {
if (typeof (data) === 'string')
- data = new Buffer(data, 'base64');
+ data = Buffer.from(data, 'base64');
assert.buffer(data, 'data');
assert.string(format, 'format');
assert.string(type, 'type');
diff --git a/deps/npm/node_modules/sshpk/lib/ssh-buffer.js b/deps/npm/node_modules/sshpk/lib/ssh-buffer.js
index 8fc2cb8785..1dd286c8d2 100644
--- a/deps/npm/node_modules/sshpk/lib/ssh-buffer.js
+++ b/deps/npm/node_modules/sshpk/lib/ssh-buffer.js
@@ -3,6 +3,7 @@
module.exports = SSHBuffer;
var assert = require('assert-plus');
+var Buffer = require('safer-buffer').Buffer;
function SSHBuffer(opts) {
assert.object(opts, 'options');
@@ -10,7 +11,7 @@ function SSHBuffer(opts) {
assert.buffer(opts.buffer, 'options.buffer');
this._size = opts.buffer ? opts.buffer.length : 1024;
- this._buffer = opts.buffer || (new Buffer(this._size));
+ this._buffer = opts.buffer || Buffer.alloc(this._size);
this._offset = 0;
}
@@ -32,7 +33,7 @@ SSHBuffer.prototype.skip = function (n) {
SSHBuffer.prototype.expand = function () {
this._size *= 2;
- var buf = new Buffer(this._size);
+ var buf = Buffer.alloc(this._size);
this._buffer.copy(buf, 0);
this._buffer = buf;
};
@@ -96,7 +97,7 @@ SSHBuffer.prototype.writeBuffer = function (buf) {
};
SSHBuffer.prototype.writeString = function (str) {
- this.writeBuffer(new Buffer(str, 'utf8'));
+ this.writeBuffer(Buffer.from(str, 'utf8'));
};
SSHBuffer.prototype.writeCString = function (str) {
diff --git a/deps/npm/node_modules/sshpk/lib/utils.js b/deps/npm/node_modules/sshpk/lib/utils.js
index d2e9c0d6a1..4dcaf9c7a9 100644
--- a/deps/npm/node_modules/sshpk/lib/utils.js
+++ b/deps/npm/node_modules/sshpk/lib/utils.js
@@ -21,6 +21,7 @@ module.exports = {
};
var assert = require('assert-plus');
+var Buffer = require('safer-buffer').Buffer;
var PrivateKey = require('./private-key');
var Key = require('./key');
var crypto = require('crypto');
@@ -101,7 +102,7 @@ function opensslKeyDeriv(cipher, salt, passphrase, count) {
salt = salt.slice(0, PKCS5_SALT_LEN);
var D, D_prev, bufs;
- var material = new Buffer(0);
+ var material = Buffer.alloc(0);
while (material.length < clen.key + clen.iv) {
bufs = [];
if (D_prev)
@@ -185,7 +186,7 @@ function ecNormalize(buf, addZero) {
if (!addZero)
return (buf);
}
- var b = new Buffer(buf.length + 1);
+ var b = Buffer.alloc(buf.length + 1);
b[0] = 0x0;
buf.copy(b, 1);
return (b);
@@ -203,7 +204,7 @@ function readBitString(der, tag) {
function writeBitString(der, buf, tag) {
if (tag === undefined)
tag = asn1.Ber.BitString;
- var b = new Buffer(buf.length + 1);
+ var b = Buffer.alloc(buf.length + 1);
b[0] = 0x00;
buf.copy(b, 1);
der.writeBuffer(b, tag);
@@ -214,7 +215,7 @@ function mpNormalize(buf) {
while (buf.length > 1 && buf[0] === 0x00 && (buf[1] & 0x80) === 0x00)
buf = buf.slice(1);
if ((buf[0] & 0x80) === 0x80) {
- var b = new Buffer(buf.length + 1);
+ var b = Buffer.alloc(buf.length + 1);
b[0] = 0x00;
buf.copy(b, 1);
buf = b;
@@ -237,7 +238,7 @@ function zeroPadToLength(buf, len) {
buf = buf.slice(1);
}
while (buf.length < len) {
- var b = new Buffer(buf.length + 1);
+ var b = Buffer.alloc(buf.length + 1);
b[0] = 0x00;
buf.copy(b, 1);
buf = b;
@@ -246,7 +247,7 @@ function zeroPadToLength(buf, len) {
}
function bigintToMpBuf(bigint) {
- var buf = new Buffer(bigint.toByteArray());
+ var buf = Buffer.from(bigint.toByteArray());
buf = mpNormalize(buf);
return (buf);
}
@@ -276,7 +277,7 @@ function calculateED25519Public(k) {
nacl = require('tweetnacl');
var kp = nacl.sign.keyPair.fromSeed(new Uint8Array(k));
- return (new Buffer(kp.publicKey));
+ return (Buffer.from(kp.publicKey));
}
function calculateX25519Public(k) {
@@ -286,7 +287,7 @@ function calculateX25519Public(k) {
nacl = require('tweetnacl');
var kp = nacl.box.keyPair.fromSeed(new Uint8Array(k));
- return (new Buffer(kp.publicKey));
+ return (Buffer.from(kp.publicKey));
}
function addRSAMissing(key) {
@@ -336,10 +337,10 @@ function publicFromPrivateECDSA(curveName, priv) {
var d = new jsbn(mpNormalize(priv));
var pub = G.multiply(d);
- pub = new Buffer(curve.encodePointHex(pub), 'hex');
+ pub = Buffer.from(curve.encodePointHex(pub), 'hex');
var parts = [];
- parts.push({name: 'curve', data: new Buffer(curveName)});
+ parts.push({name: 'curve', data: Buffer.from(curveName)});
parts.push({name: 'Q', data: pub});
var key = new Key({type: 'ecdsa', curve: curve, parts: parts});
diff --git a/deps/npm/node_modules/sshpk/node_modules/assert-plus/AUTHORS b/deps/npm/node_modules/sshpk/node_modules/assert-plus/AUTHORS
new file mode 100644
index 0000000000..1923524fe4
--- /dev/null
+++ b/deps/npm/node_modules/sshpk/node_modules/assert-plus/AUTHORS
@@ -0,0 +1,6 @@
+Dave Eddy <dave@daveeddy.com>
+Fred Kuo <fred.kuo@joyent.com>
+Lars-Magnus Skog <ralphtheninja@riseup.net>
+Mark Cavage <mcavage@gmail.com>
+Patrick Mooney <pmooney@pfmooney.com>
+Rob Gulewich <robert.gulewich@joyent.com>
diff --git a/deps/npm/node_modules/sshpk/node_modules/assert-plus/CHANGES.md b/deps/npm/node_modules/sshpk/node_modules/assert-plus/CHANGES.md
new file mode 100644
index 0000000000..57d92bfdb9
--- /dev/null
+++ b/deps/npm/node_modules/sshpk/node_modules/assert-plus/CHANGES.md
@@ -0,0 +1,14 @@
+# assert-plus Changelog
+
+## 1.0.0
+
+- *BREAKING* assert.number (and derivatives) now accept Infinity as valid input
+- Add assert.finite check. Previous assert.number callers should use this if
+ they expect Infinity inputs to throw.
+
+## 0.2.0
+
+- Fix `assert.object(null)` so it throws
+- Fix optional/arrayOf exports for non-type-of asserts
+- Add optiona/arrayOf exports for Stream/Date/Regex/uuid
+- Add basic unit test coverage
diff --git a/deps/npm/node_modules/sshpk/node_modules/assert-plus/README.md b/deps/npm/node_modules/sshpk/node_modules/assert-plus/README.md
new file mode 100644
index 0000000000..ec200d161e
--- /dev/null
+++ b/deps/npm/node_modules/sshpk/node_modules/assert-plus/README.md
@@ -0,0 +1,162 @@
+# assert-plus
+
+This library is a super small wrapper over node's assert module that has two
+things: (1) the ability to disable assertions with the environment variable
+NODE\_NDEBUG, and (2) some API wrappers for argument testing. Like
+`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks
+like this:
+
+```javascript
+ var assert = require('assert-plus');
+
+ function fooAccount(options, callback) {
+ assert.object(options, 'options');
+ assert.number(options.id, 'options.id');
+ assert.bool(options.isManager, 'options.isManager');
+ assert.string(options.name, 'options.name');
+ assert.arrayOfString(options.email, 'options.email');
+ assert.func(callback, 'callback');
+
+ // Do stuff
+ callback(null, {});
+ }
+```
+
+# API
+
+All methods that *aren't* part of node's core assert API are simply assumed to
+take an argument, and then a string 'name' that's not a message; `AssertionError`
+will be thrown if the assertion fails with a message like:
+
+ AssertionError: foo (string) is required
+ at test (/home/mark/work/foo/foo.js:3:9)
+ at Object.<anonymous> (/home/mark/work/foo/foo.js:15:1)
+ at Module._compile (module.js:446:26)
+ at Object..js (module.js:464:10)
+ at Module.load (module.js:353:31)
+ at Function._load (module.js:311:12)
+ at Array.0 (module.js:484:10)
+ at EventEmitter._tickCallback (node.js:190:38)
+
+from:
+
+```javascript
+ function test(foo) {
+ assert.string(foo, 'foo');
+ }
+```
+
+There you go. You can check that arrays are of a homogeneous type with `Arrayof$Type`:
+
+```javascript
+ function test(foo) {
+ assert.arrayOfString(foo, 'foo');
+ }
+```
+
+You can assert IFF an argument is not `undefined` (i.e., an optional arg):
+
+```javascript
+ assert.optionalString(foo, 'foo');
+```
+
+Lastly, you can opt-out of assertion checking altogether by setting the
+environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have
+lots of assertions, and don't want to pay `typeof ()` taxes to v8 in
+production. Be advised: The standard functions re-exported from `assert` are
+also disabled in assert-plus if NDEBUG is specified. Using them directly from
+the `assert` module avoids this behavior.
+
+The complete list of APIs is:
+
+* assert.array
+* assert.bool
+* assert.buffer
+* assert.func
+* assert.number
+* assert.finite
+* assert.object
+* assert.string
+* assert.stream
+* assert.date
+* assert.regexp
+* assert.uuid
+* assert.arrayOfArray
+* assert.arrayOfBool
+* assert.arrayOfBuffer
+* assert.arrayOfFunc
+* assert.arrayOfNumber
+* assert.arrayOfFinite
+* assert.arrayOfObject
+* assert.arrayOfString
+* assert.arrayOfStream
+* assert.arrayOfDate
+* assert.arrayOfRegexp
+* assert.arrayOfUuid
+* assert.optionalArray
+* assert.optionalBool
+* assert.optionalBuffer
+* assert.optionalFunc
+* assert.optionalNumber
+* assert.optionalFinite
+* assert.optionalObject
+* assert.optionalString
+* assert.optionalStream
+* assert.optionalDate
+* assert.optionalRegexp
+* assert.optionalUuid
+* assert.optionalArrayOfArray
+* assert.optionalArrayOfBool
+* assert.optionalArrayOfBuffer
+* assert.optionalArrayOfFunc
+* assert.optionalArrayOfNumber
+* assert.optionalArrayOfFinite
+* assert.optionalArrayOfObject
+* assert.optionalArrayOfString
+* assert.optionalArrayOfStream
+* assert.optionalArrayOfDate
+* assert.optionalArrayOfRegexp
+* assert.optionalArrayOfUuid
+* assert.AssertionError
+* assert.fail
+* assert.ok
+* assert.equal
+* assert.notEqual
+* assert.deepEqual
+* assert.notDeepEqual
+* assert.strictEqual
+* assert.notStrictEqual
+* assert.throws
+* assert.doesNotThrow
+* assert.ifError
+
+# Installation
+
+ npm install assert-plus
+
+## License
+
+The MIT License (MIT)
+Copyright (c) 2012 Mark Cavage
+
+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.
+
+## Bugs
+
+See <https://github.com/mcavage/node-assert-plus/issues>.
diff --git a/deps/npm/node_modules/sshpk/node_modules/assert-plus/assert.js b/deps/npm/node_modules/sshpk/node_modules/assert-plus/assert.js
new file mode 100644
index 0000000000..26f944eec3
--- /dev/null
+++ b/deps/npm/node_modules/sshpk/node_modules/assert-plus/assert.js
@@ -0,0 +1,211 @@
+// Copyright (c) 2012, Mark Cavage. All rights reserved.
+// Copyright 2015 Joyent, Inc.
+
+var assert = require('assert');
+var Stream = require('stream').Stream;
+var util = require('util');
+
+
+///--- Globals
+
+/* JSSTYLED */
+var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
+
+
+///--- Internal
+
+function _capitalize(str) {
+ return (str.charAt(0).toUpperCase() + str.slice(1));
+}
+
+function _toss(name, expected, oper, arg, actual) {
+ throw new assert.AssertionError({
+ message: util.format('%s (%s) is required', name, expected),
+ actual: (actual === undefined) ? typeof (arg) : actual(arg),
+ expected: expected,
+ operator: oper || '===',
+ stackStartFunction: _toss.caller
+ });
+}
+
+function _getClass(arg) {
+ return (Object.prototype.toString.call(arg).slice(8, -1));
+}
+
+function noop() {
+ // Why even bother with asserts?
+}
+
+
+///--- Exports
+
+var types = {
+ bool: {
+ check: function (arg) { return typeof (arg) === 'boolean'; }
+ },
+ func: {
+ check: function (arg) { return typeof (arg) === 'function'; }
+ },
+ string: {
+ check: function (arg) { return typeof (arg) === 'string'; }
+ },
+ object: {
+ check: function (arg) {
+ return typeof (arg) === 'object' && arg !== null;
+ }
+ },
+ number: {
+ check: function (arg) {
+ return typeof (arg) === 'number' && !isNaN(arg);
+ }
+ },
+ finite: {
+ check: function (arg) {
+ return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg);
+ }
+ },
+ buffer: {
+ check: function (arg) { return Buffer.isBuffer(arg); },
+ operator: 'Buffer.isBuffer'
+ },
+ array: {
+ check: function (arg) { return Array.isArray(arg); },
+ operator: 'Array.isArray'
+ },
+ stream: {
+ check: function (arg) { return arg instanceof Stream; },
+ operator: 'instanceof',
+ actual: _getClass
+ },
+ date: {
+ check: function (arg) { return arg instanceof Date; },
+ operator: 'instanceof',
+ actual: _getClass
+ },
+ regexp: {
+ check: function (arg) { return arg instanceof RegExp; },
+ operator: 'instanceof',
+ actual: _getClass
+ },
+ uuid: {
+ check: function (arg) {
+ return typeof (arg) === 'string' && UUID_REGEXP.test(arg);
+ },
+ operator: 'isUUID'
+ }
+};
+
+function _setExports(ndebug) {
+ var keys = Object.keys(types);
+ var out;
+
+ /* re-export standard assert */
+ if (process.env.NODE_NDEBUG) {
+ out = noop;
+ } else {
+ out = function (arg, msg) {
+ if (!arg) {
+ _toss(msg, 'true', arg);
+ }
+ };
+ }
+
+ /* standard checks */
+ keys.forEach(function (k) {
+ if (ndebug) {
+ out[k] = noop;
+ return;
+ }
+ var type = types[k];
+ out[k] = function (arg, msg) {
+ if (!type.check(arg)) {
+ _toss(msg, k, type.operator, arg, type.actual);
+ }
+ };
+ });
+
+ /* optional checks */
+ keys.forEach(function (k) {
+ var name = 'optional' + _capitalize(k);
+ if (ndebug) {
+ out[name] = noop;
+ return;
+ }
+ var type = types[k];
+ out[name] = function (arg, msg) {
+ if (arg === undefined || arg === null) {
+ return;
+ }
+ if (!type.check(arg)) {
+ _toss(msg, k, type.operator, arg, type.actual);
+ }
+ };
+ });
+
+ /* arrayOf checks */
+ keys.forEach(function (k) {
+ var name = 'arrayOf' + _capitalize(k);
+ if (ndebug) {
+ out[name] = noop;
+ return;
+ }
+ var type = types[k];
+ var expected = '[' + k + ']';
+ out[name] = function (arg, msg) {
+ if (!Array.isArray(arg)) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ var i;
+ for (i = 0; i < arg.length; i++) {
+ if (!type.check(arg[i])) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ }
+ };
+ });
+
+ /* optionalArrayOf checks */
+ keys.forEach(function (k) {
+ var name = 'optionalArrayOf' + _capitalize(k);
+ if (ndebug) {
+ out[name] = noop;
+ return;
+ }
+ var type = types[k];
+ var expected = '[' + k + ']';
+ out[name] = function (arg, msg) {
+ if (arg === undefined || arg === null) {
+ return;
+ }
+ if (!Array.isArray(arg)) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ var i;
+ for (i = 0; i < arg.length; i++) {
+ if (!type.check(arg[i])) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ }
+ };
+ });
+
+ /* re-export built-in assertions */
+ Object.keys(assert).forEach(function (k) {
+ if (k === 'AssertionError') {
+ out[k] = assert[k];
+ return;
+ }
+ if (ndebug) {
+ out[k] = noop;
+ return;
+ }
+ out[k] = assert[k];
+ });
+
+ /* export ourselves (for unit tests _only_) */
+ out._setExports = _setExports;
+
+ return out;
+}
+
+module.exports = _setExports(process.env.NODE_NDEBUG);
diff --git a/deps/npm/node_modules/sshpk/node_modules/assert-plus/package.json b/deps/npm/node_modules/sshpk/node_modules/assert-plus/package.json
new file mode 100644
index 0000000000..487937d615
--- /dev/null
+++ b/deps/npm/node_modules/sshpk/node_modules/assert-plus/package.json
@@ -0,0 +1,82 @@
+{
+ "_from": "assert-plus@^1.0.0",
+ "_id": "assert-plus@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+ "_location": "/sshpk/assert-plus",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "assert-plus@^1.0.0",
+ "name": "assert-plus",
+ "escapedName": "assert-plus",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/sshpk"
+ ],
+ "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+ "_shasum": "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525",
+ "_spec": "assert-plus@^1.0.0",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/sshpk",
+ "author": {
+ "name": "Mark Cavage",
+ "email": "mcavage@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/mcavage/node-assert-plus/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Dave Eddy",
+ "email": "dave@daveeddy.com"
+ },
+ {
+ "name": "Fred Kuo",
+ "email": "fred.kuo@joyent.com"
+ },
+ {
+ "name": "Lars-Magnus Skog",
+ "email": "ralphtheninja@riseup.net"
+ },
+ {
+ "name": "Mark Cavage",
+ "email": "mcavage@gmail.com"
+ },
+ {
+ "name": "Patrick Mooney",
+ "email": "pmooney@pfmooney.com"
+ },
+ {
+ "name": "Rob Gulewich",
+ "email": "robert.gulewich@joyent.com"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Extra assertions on top of node's assert module",
+ "devDependencies": {
+ "faucet": "0.0.1",
+ "tape": "4.2.2"
+ },
+ "engines": {
+ "node": ">=0.8"
+ },
+ "homepage": "https://github.com/mcavage/node-assert-plus#readme",
+ "license": "MIT",
+ "main": "./assert.js",
+ "name": "assert-plus",
+ "optionalDependencies": {},
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mcavage/node-assert-plus.git"
+ },
+ "scripts": {
+ "test": "tape tests/*.js | ./node_modules/.bin/faucet"
+ },
+ "version": "1.0.0"
+}
diff --git a/deps/npm/node_modules/sshpk/package.json b/deps/npm/node_modules/sshpk/package.json
index ae4bcb7f92..14d6658ceb 100644
--- a/deps/npm/node_modules/sshpk/package.json
+++ b/deps/npm/node_modules/sshpk/package.json
@@ -1,8 +1,8 @@
{
"_from": "sshpk@^1.7.0",
- "_id": "sshpk@1.14.1",
+ "_id": "sshpk@1.14.2",
"_inBundle": false,
- "_integrity": "sha1-Ew9Zde3a2WPx1W+SuaxsUfqfg+s=",
+ "_integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=",
"_location": "/sshpk",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/http-signature"
],
- "_resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.1.tgz",
- "_shasum": "130f5975eddad963f1d56f92b9ac6c51fa9f83eb",
+ "_resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz",
+ "_shasum": "c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98",
"_spec": "sshpk@^1.7.0",
"_where": "/Users/rebecca/code/npm/node_modules/http-signature",
"author": {
@@ -56,6 +56,7 @@
"ecc-jsbn": "~0.1.1",
"getpass": "^0.1.1",
"jsbn": "~0.1.0",
+ "safer-buffer": "^2.0.2",
"tweetnacl": "~0.14.0"
},
"deprecated": false,
@@ -96,5 +97,5 @@
"scripts": {
"test": "tape test/*.js"
},
- "version": "1.14.1"
+ "version": "1.14.2"
}
diff --git a/deps/npm/node_modules/string-width/node_modules/ansi-regex/index.js b/deps/npm/node_modules/string-width/node_modules/ansi-regex/index.js
new file mode 100644
index 0000000000..c4aaecf505
--- /dev/null
+++ b/deps/npm/node_modules/string-width/node_modules/ansi-regex/index.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = () => {
+ const pattern = [
+ '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)',
+ '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'
+ ].join('|');
+
+ return new RegExp(pattern, 'g');
+};
diff --git a/deps/npm/node_modules/string-width/node_modules/ansi-regex/license b/deps/npm/node_modules/string-width/node_modules/ansi-regex/license
new file mode 100644
index 0000000000..e7af2f7710
--- /dev/null
+++ b/deps/npm/node_modules/string-width/node_modules/ansi-regex/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+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/deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/package.json b/deps/npm/node_modules/string-width/node_modules/ansi-regex/package.json
index efd217c446..d7910419da 100644
--- a/deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/package.json
+++ b/deps/npm/node_modules/string-width/node_modules/ansi-regex/package.json
@@ -1,27 +1,27 @@
{
- "_from": "ansi-regex@^2.0.0",
- "_id": "ansi-regex@2.1.1",
+ "_from": "ansi-regex@^3.0.0",
+ "_id": "ansi-regex@3.0.0",
"_inBundle": false,
- "_integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
- "_location": "/wrap-ansi/ansi-regex",
+ "_integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+ "_location": "/string-width/ansi-regex",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "ansi-regex@^2.0.0",
+ "raw": "ansi-regex@^3.0.0",
"name": "ansi-regex",
"escapedName": "ansi-regex",
- "rawSpec": "^2.0.0",
+ "rawSpec": "^3.0.0",
"saveSpec": null,
- "fetchSpec": "^2.0.0"
+ "fetchSpec": "^3.0.0"
},
"_requiredBy": [
- "/wrap-ansi/strip-ansi"
+ "/string-width/strip-ansi"
],
- "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df",
- "_spec": "ansi-regex@^2.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/wrap-ansi/node_modules/strip-ansi",
+ "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
+ "_shasum": "ed0317c322064f79466c02966bddb605ab37d998",
+ "_spec": "ansi-regex@^3.0.0",
+ "_where": "/Users/rebecca/code/npm/node_modules/string-width/node_modules/strip-ansi",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
@@ -34,11 +34,11 @@
"deprecated": false,
"description": "Regular expression for matching ANSI escape codes",
"devDependencies": {
- "ava": "0.17.0",
- "xo": "0.16.0"
+ "ava": "*",
+ "xo": "*"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">=4"
},
"files": [
"index.js"
@@ -72,37 +72,14 @@
"pattern"
],
"license": "MIT",
- "maintainers": [
- {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- {
- "name": "Joshua Appelman",
- "email": "jappelman@xebia.com",
- "url": "jbnicolai.com"
- },
- {
- "name": "JD Ballard",
- "email": "i.am.qix@gmail.com",
- "url": "github.com/qix-"
- }
- ],
"name": "ansi-regex",
"repository": {
"type": "git",
"url": "git+https://github.com/chalk/ansi-regex.git"
},
"scripts": {
- "test": "xo && ava --verbose",
+ "test": "xo && ava",
"view-supported": "node fixtures/view-codes.js"
},
- "version": "2.1.1",
- "xo": {
- "rules": {
- "guard-for-in": 0,
- "no-loop-func": 0
- }
- }
+ "version": "3.0.0"
}
diff --git a/deps/npm/node_modules/cli-table2/node_modules/ansi-regex/readme.md b/deps/npm/node_modules/string-width/node_modules/ansi-regex/readme.md
index 6a928edf0f..22db1c3405 100644
--- a/deps/npm/node_modules/cli-table2/node_modules/ansi-regex/readme.md
+++ b/deps/npm/node_modules/string-width/node_modules/ansi-regex/readme.md
@@ -1,12 +1,12 @@
# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex)
-> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
+> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
## Install
```
-$ npm install --save ansi-regex
+$ npm install ansi-regex
```
@@ -15,25 +15,32 @@ $ npm install --save ansi-regex
```js
const ansiRegex = require('ansi-regex');
-ansiRegex().test('\u001b[4mcake\u001b[0m');
+ansiRegex().test('\u001B[4mcake\u001B[0m');
//=> true
ansiRegex().test('cake');
//=> false
-'\u001b[4mcake\u001b[0m'.match(ansiRegex());
-//=> ['\u001b[4m', '\u001b[0m']
+'\u001B[4mcake\u001B[0m'.match(ansiRegex());
+//=> ['\u001B[4m', '\u001B[0m']
```
+
## FAQ
### Why do you test for codes not in the ECMA 48 standard?
-Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
+Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+
## License
-MIT © [Sindre Sorhus](http://sindresorhus.com)
+MIT
diff --git a/deps/npm/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js b/deps/npm/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js
new file mode 100644
index 0000000000..d506327c3e
--- /dev/null
+++ b/deps/npm/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js
@@ -0,0 +1,46 @@
+'use strict';
+/* eslint-disable yoda */
+module.exports = x => {
+ if (Number.isNaN(x)) {
+ return false;
+ }
+
+ // code points are derived from:
+ // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
+ if (
+ x >= 0x1100 && (
+ x <= 0x115f || // Hangul Jamo
+ x === 0x2329 || // LEFT-POINTING ANGLE BRACKET
+ x === 0x232a || // RIGHT-POINTING ANGLE BRACKET
+ // CJK Radicals Supplement .. Enclosed CJK Letters and Months
+ (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) ||
+ // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
+ (0x3250 <= x && x <= 0x4dbf) ||
+ // CJK Unified Ideographs .. Yi Radicals
+ (0x4e00 <= x && x <= 0xa4c6) ||
+ // Hangul Jamo Extended-A
+ (0xa960 <= x && x <= 0xa97c) ||
+ // Hangul Syllables
+ (0xac00 <= x && x <= 0xd7a3) ||
+ // CJK Compatibility Ideographs
+ (0xf900 <= x && x <= 0xfaff) ||
+ // Vertical Forms
+ (0xfe10 <= x && x <= 0xfe19) ||
+ // CJK Compatibility Forms .. Small Form Variants
+ (0xfe30 <= x && x <= 0xfe6b) ||
+ // Halfwidth and Fullwidth Forms
+ (0xff01 <= x && x <= 0xff60) ||
+ (0xffe0 <= x && x <= 0xffe6) ||
+ // Kana Supplement
+ (0x1b000 <= x && x <= 0x1b001) ||
+ // Enclosed Ideographic Supplement
+ (0x1f200 <= x && x <= 0x1f251) ||
+ // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
+ (0x20000 <= x && x <= 0x3fffd)
+ )
+ ) {
+ return true;
+ }
+
+ return false;
+};
diff --git a/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/license b/deps/npm/node_modules/string-width/node_modules/is-fullwidth-code-point/license
index 654d0bfe94..654d0bfe94 100644
--- a/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/license
+++ b/deps/npm/node_modules/string-width/node_modules/is-fullwidth-code-point/license
diff --git a/deps/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/package.json b/deps/npm/node_modules/string-width/node_modules/is-fullwidth-code-point/package.json
index 08f31e91e2..7704c72b16 100644
--- a/deps/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/package.json
+++ b/deps/npm/node_modules/string-width/node_modules/is-fullwidth-code-point/package.json
@@ -1,27 +1,27 @@
{
- "_from": "is-fullwidth-code-point@^1.0.0",
- "_id": "is-fullwidth-code-point@1.0.0",
+ "_from": "is-fullwidth-code-point@^2.0.0",
+ "_id": "is-fullwidth-code-point@2.0.0",
"_inBundle": false,
- "_integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
- "_location": "/gauge/is-fullwidth-code-point",
+ "_integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "_location": "/string-width/is-fullwidth-code-point",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "is-fullwidth-code-point@^1.0.0",
+ "raw": "is-fullwidth-code-point@^2.0.0",
"name": "is-fullwidth-code-point",
"escapedName": "is-fullwidth-code-point",
- "rawSpec": "^1.0.0",
+ "rawSpec": "^2.0.0",
"saveSpec": null,
- "fetchSpec": "^1.0.0"
+ "fetchSpec": "^2.0.0"
},
"_requiredBy": [
- "/gauge/string-width"
+ "/string-width"
],
- "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
- "_shasum": "ef9e31386f031a7f0d643af82fde50c457ef00cb",
- "_spec": "is-fullwidth-code-point@^1.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/gauge/node_modules/string-width",
+ "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "_shasum": "a3b30a5c4f199183167aaab93beefae3ddfb654f",
+ "_spec": "is-fullwidth-code-point@^2.0.0",
+ "_where": "/Users/rebecca/code/npm/node_modules/string-width",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
@@ -31,17 +31,14 @@
"url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues"
},
"bundleDependencies": false,
- "dependencies": {
- "number-is-nan": "^1.0.0"
- },
"deprecated": false,
"description": "Check if the character represented by a given Unicode code point is fullwidth",
"devDependencies": {
- "ava": "0.0.4",
- "code-point-at": "^1.0.0"
+ "ava": "*",
+ "xo": "*"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">=4"
},
"files": [
"index.js"
@@ -71,7 +68,10 @@
"url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git"
},
"scripts": {
- "test": "node test.js"
+ "test": "xo && ava"
},
- "version": "1.0.0"
+ "version": "2.0.0",
+ "xo": {
+ "esnext": true
+ }
}
diff --git a/deps/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/readme.md b/deps/npm/node_modules/string-width/node_modules/is-fullwidth-code-point/readme.md
index 4936464b1b..093b0281b2 100644
--- a/deps/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/readme.md
+++ b/deps/npm/node_modules/string-width/node_modules/is-fullwidth-code-point/readme.md
@@ -13,7 +13,7 @@ $ npm install --save is-fullwidth-code-point
## Usage
```js
-var isFullwidthCodePoint = require('is-fullwidth-code-point');
+const isFullwidthCodePoint = require('is-fullwidth-code-point');
isFullwidthCodePoint('谢'.codePointAt());
//=> true
@@ -36,4 +36,4 @@ Type: `number`
## License
-MIT © [Sindre Sorhus](http://sindresorhus.com)
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/deps/npm/node_modules/string-width/node_modules/strip-ansi/index.js b/deps/npm/node_modules/string-width/node_modules/strip-ansi/index.js
new file mode 100644
index 0000000000..96e0292c8e
--- /dev/null
+++ b/deps/npm/node_modules/string-width/node_modules/strip-ansi/index.js
@@ -0,0 +1,4 @@
+'use strict';
+const ansiRegex = require('ansi-regex');
+
+module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input;
diff --git a/deps/npm/node_modules/string-width/node_modules/strip-ansi/license b/deps/npm/node_modules/string-width/node_modules/strip-ansi/license
new file mode 100644
index 0000000000..e7af2f7710
--- /dev/null
+++ b/deps/npm/node_modules/string-width/node_modules/strip-ansi/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+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/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/package.json b/deps/npm/node_modules/string-width/node_modules/strip-ansi/package.json
index bdfb065981..f855085296 100644
--- a/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/package.json
+++ b/deps/npm/node_modules/string-width/node_modules/strip-ansi/package.json
@@ -1,27 +1,27 @@
{
- "_from": "strip-ansi@^3.0.1",
- "_id": "strip-ansi@3.0.1",
+ "_from": "strip-ansi@^4.0.0",
+ "_id": "strip-ansi@4.0.0",
"_inBundle": false,
- "_integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
- "_location": "/cli-columns/strip-ansi",
+ "_integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
+ "_location": "/string-width/strip-ansi",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "strip-ansi@^3.0.1",
+ "raw": "strip-ansi@^4.0.0",
"name": "strip-ansi",
"escapedName": "strip-ansi",
- "rawSpec": "^3.0.1",
+ "rawSpec": "^4.0.0",
"saveSpec": null,
- "fetchSpec": "^3.0.1"
+ "fetchSpec": "^4.0.0"
},
"_requiredBy": [
- "/cli-columns"
+ "/string-width"
],
- "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "_shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf",
- "_spec": "strip-ansi@^3.0.1",
- "_where": "/Users/rebecca/code/npm/node_modules/cli-columns",
+ "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
+ "_shasum": "a8479022eb1ac368a871389b635262c505ee368f",
+ "_spec": "strip-ansi@^4.0.0",
+ "_where": "/Users/rebecca/code/npm/node_modules/string-width",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
@@ -32,7 +32,7 @@
},
"bundleDependencies": false,
"dependencies": {
- "ansi-regex": "^2.0.0"
+ "ansi-regex": "^3.0.0"
},
"deprecated": false,
"description": "Strip ANSI escape codes",
@@ -41,7 +41,7 @@
"xo": "*"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">=4"
},
"files": [
"index.js"
@@ -72,23 +72,6 @@
"text"
],
"license": "MIT",
- "maintainers": [
- {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- {
- "name": "Joshua Boy Nicolai Appelman",
- "email": "joshua@jbna.nl",
- "url": "jbna.nl"
- },
- {
- "name": "JD Ballard",
- "email": "i.am.qix@gmail.com",
- "url": "github.com/qix-"
- }
- ],
"name": "strip-ansi",
"repository": {
"type": "git",
@@ -97,5 +80,5 @@
"scripts": {
"test": "xo && ava"
},
- "version": "3.0.1"
+ "version": "4.0.0"
}
diff --git a/deps/npm/node_modules/cli-table2/node_modules/strip-ansi/readme.md b/deps/npm/node_modules/string-width/node_modules/strip-ansi/readme.md
index cb7d9ff7ee..dc76f0cb1a 100644
--- a/deps/npm/node_modules/cli-table2/node_modules/strip-ansi/readme.md
+++ b/deps/npm/node_modules/string-width/node_modules/strip-ansi/readme.md
@@ -1,22 +1,22 @@
# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi)
-> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
+> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
## Install
```
-$ npm install --save strip-ansi
+$ npm install strip-ansi
```
## Usage
```js
-var stripAnsi = require('strip-ansi');
+const stripAnsi = require('strip-ansi');
-stripAnsi('\u001b[4mcake\u001b[0m');
-//=> 'cake'
+stripAnsi('\u001B[4mUnicorn\u001B[0m');
+//=> 'Unicorn'
```
@@ -28,6 +28,12 @@ stripAnsi('\u001b[4mcake\u001b[0m');
- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+
## License
-MIT © [Sindre Sorhus](http://sindresorhus.com)
+MIT
diff --git a/deps/npm/node_modules/stringstream/.travis.yml b/deps/npm/node_modules/stringstream/.travis.yml
new file mode 100644
index 0000000000..f1d0f13c8a
--- /dev/null
+++ b/deps/npm/node_modules/stringstream/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - 0.4
+ - 0.6
diff --git a/deps/npm/node_modules/stringstream/LICENSE.txt b/deps/npm/node_modules/stringstream/LICENSE.txt
new file mode 100644
index 0000000000..ab861acdc1
--- /dev/null
+++ b/deps/npm/node_modules/stringstream/LICENSE.txt
@@ -0,0 +1,22 @@
+Copyright (c) 2012 Michael Hart (michael.hart.au@gmail.com)
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/stringstream/README.md b/deps/npm/node_modules/stringstream/README.md
new file mode 100644
index 0000000000..32fc982556
--- /dev/null
+++ b/deps/npm/node_modules/stringstream/README.md
@@ -0,0 +1,38 @@
+# Decode streams into strings The Right Way(tm)
+
+```javascript
+var fs = require('fs')
+var zlib = require('zlib')
+var strs = require('stringstream')
+
+var utf8Stream = fs.createReadStream('massiveLogFile.gz')
+ .pipe(zlib.createGunzip())
+ .pipe(strs('utf8'))
+```
+
+No need to deal with `setEncoding()` weirdness, just compose streams
+like they were supposed to be!
+
+Handles input and output encoding:
+
+```javascript
+// Stream from utf8 to hex to base64... Why not, ay.
+var hex64Stream = fs.createReadStream('myFile')
+ .pipe(strs('utf8', 'hex'))
+ .pipe(strs('hex', 'base64'))
+```
+
+Also deals with `base64` output correctly by aligning each emitted data
+chunk so that there are no dangling `=` characters:
+
+```javascript
+var stream = fs.createReadStream('myFile').pipe(strs('base64'))
+
+var base64Str = ''
+
+stream.on('data', function(data) { base64Str += data })
+stream.on('end', function() {
+ console.log('My base64 encoded file is: ' + base64Str) // Wouldn't work with setEncoding()
+ console.log('Original file is: ' + new Buffer(base64Str, 'base64'))
+})
+```
diff --git a/deps/npm/node_modules/stringstream/example.js b/deps/npm/node_modules/stringstream/example.js
new file mode 100644
index 0000000000..f82b85edc7
--- /dev/null
+++ b/deps/npm/node_modules/stringstream/example.js
@@ -0,0 +1,27 @@
+var fs = require('fs')
+var zlib = require('zlib')
+var strs = require('stringstream')
+
+var utf8Stream = fs.createReadStream('massiveLogFile.gz')
+ .pipe(zlib.createGunzip())
+ .pipe(strs('utf8'))
+
+utf8Stream.pipe(process.stdout)
+
+// Stream from utf8 to hex to base64... Why not, ay.
+var hex64Stream = fs.createReadStream('myFile')
+ .pipe(strs('utf8', 'hex'))
+ .pipe(strs('hex', 'base64'))
+
+hex64Stream.pipe(process.stdout)
+
+// Deals with base64 correctly by aligning chunks
+var stream = fs.createReadStream('myFile').pipe(strs('base64'))
+
+var base64Str = ''
+
+stream.on('data', function(data) { base64Str += data })
+stream.on('end', function() {
+ console.log('My base64 encoded file is: ' + base64Str) // Wouldn't work with setEncoding()
+ console.log('Original file is: ' + new Buffer(base64Str, 'base64'))
+})
diff --git a/deps/npm/node_modules/stringstream/package.json b/deps/npm/node_modules/stringstream/package.json
new file mode 100644
index 0000000000..d2c7b8f128
--- /dev/null
+++ b/deps/npm/node_modules/stringstream/package.json
@@ -0,0 +1,51 @@
+{
+ "_from": "stringstream@~0.0.4",
+ "_id": "stringstream@0.0.6",
+ "_inBundle": false,
+ "_integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==",
+ "_location": "/stringstream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "stringstream@~0.0.4",
+ "name": "stringstream",
+ "escapedName": "stringstream",
+ "rawSpec": "~0.0.4",
+ "saveSpec": null,
+ "fetchSpec": "~0.0.4"
+ },
+ "_requiredBy": [
+ "/request"
+ ],
+ "_resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz",
+ "_shasum": "7880225b0d4ad10e30927d167a1d6f2fd3b33a72",
+ "_spec": "stringstream@~0.0.4",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/request",
+ "author": {
+ "name": "Michael Hart",
+ "email": "michael.hart.au@gmail.com",
+ "url": "http://github.com/mhart"
+ },
+ "bugs": {
+ "url": "https://github.com/mhart/StringStream/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Encode and decode streams into string streams",
+ "homepage": "https://github.com/mhart/StringStream#readme",
+ "keywords": [
+ "string",
+ "stream",
+ "base64",
+ "gzip"
+ ],
+ "license": "MIT",
+ "main": "stringstream.js",
+ "name": "stringstream",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mhart/StringStream.git"
+ },
+ "version": "0.0.6"
+}
diff --git a/deps/npm/node_modules/stringstream/stringstream.js b/deps/npm/node_modules/stringstream/stringstream.js
new file mode 100644
index 0000000000..6732b9d94d
--- /dev/null
+++ b/deps/npm/node_modules/stringstream/stringstream.js
@@ -0,0 +1,102 @@
+var util = require('util')
+var Stream = require('stream')
+var StringDecoder = require('string_decoder').StringDecoder
+
+module.exports = StringStream
+module.exports.AlignedStringDecoder = AlignedStringDecoder
+
+function StringStream(from, to) {
+ if (!(this instanceof StringStream)) return new StringStream(from, to)
+
+ Stream.call(this)
+
+ if (from == null) from = 'utf8'
+
+ this.readable = this.writable = true
+ this.paused = false
+ this.toEncoding = (to == null ? from : to)
+ this.fromEncoding = (to == null ? '' : from)
+ this.decoder = new AlignedStringDecoder(this.toEncoding)
+}
+util.inherits(StringStream, Stream)
+
+StringStream.prototype.write = function(data) {
+ if (!this.writable) {
+ var err = new Error('stream not writable')
+ err.code = 'EPIPE'
+ this.emit('error', err)
+ return false
+ }
+ if (this.fromEncoding) {
+ if (Buffer.isBuffer(data) || typeof data === 'number') data = data.toString()
+ data = new Buffer(data, this.fromEncoding)
+ }
+ var string = this.decoder.write(data)
+ if (string.length) this.emit('data', string)
+ return !this.paused
+}
+
+StringStream.prototype.flush = function() {
+ if (this.decoder.flush) {
+ var string = this.decoder.flush()
+ if (string.length) this.emit('data', string)
+ }
+}
+
+StringStream.prototype.end = function() {
+ if (!this.writable && !this.readable) return
+ this.flush()
+ this.emit('end')
+ this.writable = this.readable = false
+ this.destroy()
+}
+
+StringStream.prototype.destroy = function() {
+ this.decoder = null
+ this.writable = this.readable = false
+ this.emit('close')
+}
+
+StringStream.prototype.pause = function() {
+ this.paused = true
+}
+
+StringStream.prototype.resume = function () {
+ if (this.paused) this.emit('drain')
+ this.paused = false
+}
+
+function AlignedStringDecoder(encoding) {
+ StringDecoder.call(this, encoding)
+
+ switch (this.encoding) {
+ case 'base64':
+ this.write = alignedWrite
+ this.alignedBuffer = new Buffer(3)
+ this.alignedBytes = 0
+ break
+ }
+}
+util.inherits(AlignedStringDecoder, StringDecoder)
+
+AlignedStringDecoder.prototype.flush = function() {
+ if (!this.alignedBuffer || !this.alignedBytes) return ''
+ var leftover = this.alignedBuffer.toString(this.encoding, 0, this.alignedBytes)
+ this.alignedBytes = 0
+ return leftover
+}
+
+function alignedWrite(buffer) {
+ var rem = (this.alignedBytes + buffer.length) % this.alignedBuffer.length
+ if (!rem && !this.alignedBytes) return buffer.toString(this.encoding)
+
+ var returnBuffer = new Buffer(this.alignedBytes + buffer.length - rem)
+
+ this.alignedBuffer.copy(returnBuffer, 0, 0, this.alignedBytes)
+ buffer.copy(returnBuffer, this.alignedBytes, 0, buffer.length - rem)
+
+ buffer.copy(this.alignedBuffer, 0, buffer.length - rem, buffer.length)
+ this.alignedBytes = rem
+
+ return returnBuffer.toString(this.encoding)
+}
diff --git a/deps/npm/node_modules/strip-ansi/index.js b/deps/npm/node_modules/strip-ansi/index.js
index 96e0292c8e..099480fbfc 100644
--- a/deps/npm/node_modules/strip-ansi/index.js
+++ b/deps/npm/node_modules/strip-ansi/index.js
@@ -1,4 +1,6 @@
'use strict';
-const ansiRegex = require('ansi-regex');
+var ansiRegex = require('ansi-regex')();
-module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input;
+module.exports = function (str) {
+ return typeof str === 'string' ? str.replace(ansiRegex, '') : str;
+};
diff --git a/deps/npm/node_modules/strip-ansi/license b/deps/npm/node_modules/strip-ansi/license
index e7af2f7710..654d0bfe94 100644
--- a/deps/npm/node_modules/strip-ansi/license
+++ b/deps/npm/node_modules/strip-ansi/license
@@ -1,9 +1,21 @@
-MIT License
+The MIT License (MIT)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/strip-ansi/package.json b/deps/npm/node_modules/strip-ansi/package.json
index 3a8175f7b7..659626834d 100644
--- a/deps/npm/node_modules/strip-ansi/package.json
+++ b/deps/npm/node_modules/strip-ansi/package.json
@@ -1,35 +1,37 @@
{
- "_args": [
- [
- "strip-ansi@4.0.0",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "strip-ansi@4.0.0",
- "_id": "strip-ansi@4.0.0",
+ "_from": "strip-ansi@3.0.1",
+ "_id": "strip-ansi@3.0.1",
"_inBundle": false,
- "_integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
+ "_integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"_location": "/strip-ansi",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "strip-ansi@4.0.0",
+ "raw": "strip-ansi@3.0.1",
"name": "strip-ansi",
"escapedName": "strip-ansi",
- "rawSpec": "4.0.0",
+ "rawSpec": "3.0.1",
"saveSpec": null,
- "fetchSpec": "4.0.0"
+ "fetchSpec": "3.0.1"
},
"_requiredBy": [
+ "#USER",
"/",
- "/cliui",
- "/eslint",
- "/inquirer",
- "/string-width"
+ "/babel-code-frame/chalk",
+ "/cli-columns",
+ "/cli-table2/string-width",
+ "/columnify",
+ "/gauge",
+ "/gauge/string-width",
+ "/unicode-length",
+ "/wide-align/string-width",
+ "/wrap-ansi",
+ "/wrap-ansi/string-width"
],
- "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
- "_spec": "4.0.0",
+ "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+ "_shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf",
+ "_spec": "strip-ansi@3.0.1",
"_where": "/Users/rebecca/code/npm",
"author": {
"name": "Sindre Sorhus",
@@ -39,16 +41,18 @@
"bugs": {
"url": "https://github.com/chalk/strip-ansi/issues"
},
+ "bundleDependencies": false,
"dependencies": {
- "ansi-regex": "^3.0.0"
+ "ansi-regex": "^2.0.0"
},
+ "deprecated": false,
"description": "Strip ANSI escape codes",
"devDependencies": {
"ava": "*",
"xo": "*"
},
"engines": {
- "node": ">=4"
+ "node": ">=0.10.0"
},
"files": [
"index.js"
@@ -79,6 +83,23 @@
"text"
],
"license": "MIT",
+ "maintainers": [
+ {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ {
+ "name": "Joshua Boy Nicolai Appelman",
+ "email": "joshua@jbna.nl",
+ "url": "jbna.nl"
+ },
+ {
+ "name": "JD Ballard",
+ "email": "i.am.qix@gmail.com",
+ "url": "github.com/qix-"
+ }
+ ],
"name": "strip-ansi",
"repository": {
"type": "git",
@@ -87,5 +108,5 @@
"scripts": {
"test": "xo && ava"
},
- "version": "4.0.0"
+ "version": "3.0.1"
}
diff --git a/deps/npm/node_modules/strip-ansi/readme.md b/deps/npm/node_modules/strip-ansi/readme.md
index dc76f0cb1a..cb7d9ff7ee 100644
--- a/deps/npm/node_modules/strip-ansi/readme.md
+++ b/deps/npm/node_modules/strip-ansi/readme.md
@@ -1,22 +1,22 @@
# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi)
-> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
+> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
## Install
```
-$ npm install strip-ansi
+$ npm install --save strip-ansi
```
## Usage
```js
-const stripAnsi = require('strip-ansi');
+var stripAnsi = require('strip-ansi');
-stripAnsi('\u001B[4mUnicorn\u001B[0m');
-//=> 'Unicorn'
+stripAnsi('\u001b[4mcake\u001b[0m');
+//=> 'cake'
```
@@ -28,12 +28,6 @@ stripAnsi('\u001B[4mUnicorn\u001B[0m');
- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
-## Maintainers
-
-- [Sindre Sorhus](https://github.com/sindresorhus)
-- [Josh Junon](https://github.com/qix-)
-
-
## License
-MIT
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/tar/README.md b/deps/npm/node_modules/tar/README.md
index ea98e0b21b..fc55bc36fe 100644
--- a/deps/npm/node_modules/tar/README.md
+++ b/deps/npm/node_modules/tar/README.md
@@ -534,7 +534,6 @@ The following options are supported:
- `mtime` Set to a `Date` object to force a specific `mtime` for
everything added to the archive. Overridden by `noMtime`.
-
#### add(path)
Adds an entry to the archive. Returns the Pack stream.
@@ -784,6 +783,9 @@ The following options are supported:
- `noMtime` Set to true to omit writing `mtime` values for entries.
Note that this prevents using other mtime-based features like
`tar.update` or the `keepNewer` option with the resulting tar archive.
+- `umask` Set to restrict the modes on the entries in the archive,
+ somewhat like how umask works on file creation. Defaults to
+ `process.umask()` on unix systems, or `0o22` on Windows.
#### warn(message, data)
diff --git a/deps/npm/node_modules/tar/lib/header.js b/deps/npm/node_modules/tar/lib/header.js
index 31cde8b5cb..cad4aec255 100644
--- a/deps/npm/node_modules/tar/lib/header.js
+++ b/deps/npm/node_modules/tar/lib/header.js
@@ -6,7 +6,7 @@
const Buffer = require('./buffer.js')
const types = require('./types.js')
-const pathModule = require('path')
+const pathModule = require('path').posix
const large = require('./large-numbers.js')
const TYPE = Symbol('type')
diff --git a/deps/npm/node_modules/tar/lib/mode-fix.js b/deps/npm/node_modules/tar/lib/mode-fix.js
new file mode 100644
index 0000000000..3363a3b151
--- /dev/null
+++ b/deps/npm/node_modules/tar/lib/mode-fix.js
@@ -0,0 +1,14 @@
+'use strict'
+module.exports = (mode, isDir) => {
+ mode &= 0o7777
+ // if dirs are readable, then they should be listable
+ if (isDir) {
+ if (mode & 0o400)
+ mode |= 0o100
+ if (mode & 0o40)
+ mode |= 0o10
+ if (mode & 0o4)
+ mode |= 0o1
+ }
+ return mode
+}
diff --git a/deps/npm/node_modules/tar/lib/pack.js b/deps/npm/node_modules/tar/lib/pack.js
index 180e332e9c..857cea9105 100644
--- a/deps/npm/node_modules/tar/lib/pack.js
+++ b/deps/npm/node_modules/tar/lib/pack.js
@@ -71,6 +71,7 @@ const Pack = warner(class Pack extends MiniPass {
this.linkCache = opt.linkCache || new Map()
this.statCache = opt.statCache || new Map()
this.readdirCache = opt.readdirCache || new Map()
+
this[WRITEENTRYCLASS] = WriteEntry
if (typeof opt.onwarn === 'function')
this.on('warn', opt.onwarn)
diff --git a/deps/npm/node_modules/tar/lib/write-entry.js b/deps/npm/node_modules/tar/lib/write-entry.js
index 7b43ebcd35..3a4c99b9eb 100644
--- a/deps/npm/node_modules/tar/lib/write-entry.js
+++ b/deps/npm/node_modules/tar/lib/write-entry.js
@@ -23,9 +23,12 @@ const ONREADLINK = Symbol('onreadlink')
const OPENFILE = Symbol('openfile')
const ONOPENFILE = Symbol('onopenfile')
const CLOSE = Symbol('close')
+const MODE = Symbol('mode')
const warner = require('./warn-mixin.js')
const winchars = require('./winchars.js')
+const modeFix = require('./mode-fix.js')
+
const WriteEntry = warner(class WriteEntry extends MiniPass {
constructor (p, opt) {
opt = opt || {}
@@ -104,6 +107,10 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
}
}
+ [MODE] (mode) {
+ return modeFix(mode, this.type === 'Directory')
+ }
+
[HEADER] () {
if (this.type === 'Directory' && this.portable)
this.noMtime = true
@@ -113,7 +120,7 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
linkpath: this.linkpath,
// only the permissions and setuid/setgid/sticky bitflags
// not the higher-order bits that specify file type
- mode: this.stat.mode & 0o7777,
+ mode: this[MODE](this.stat.mode),
uid: this.portable ? null : this.stat.uid,
gid: this.portable ? null : this.stat.gid,
size: this.stat.size,
@@ -312,9 +319,7 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
this.noMtime = true
this.path = readEntry.path
- this.mode = readEntry.mode
- if (this.mode)
- this.mode = this.mode & 0o7777
+ this.mode = this[MODE](readEntry.mode)
this.uid = this.portable ? null : readEntry.uid
this.gid = this.portable ? null : readEntry.gid
this.uname = this.portable ? null : readEntry.uname
@@ -376,6 +381,10 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
readEntry.pipe(this)
}
+ [MODE] (mode) {
+ return modeFix(mode, this.type === 'Directory')
+ }
+
write (data) {
const writeLen = data.length
if (writeLen > this.blockRemain)
diff --git a/deps/npm/node_modules/tar/package.json b/deps/npm/node_modules/tar/package.json
index b3a1816bfe..a4b9e0053f 100644
--- a/deps/npm/node_modules/tar/package.json
+++ b/deps/npm/node_modules/tar/package.json
@@ -1,32 +1,28 @@
{
- "_args": [
- [
- "tar@4.4.3",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "tar@4.4.3",
- "_id": "tar@4.4.3",
+ "_from": "tar@4.4.4",
+ "_id": "tar@4.4.4",
"_inBundle": false,
- "_integrity": "sha512-LBw+tcY+/iCCTvF4i3SjqKWIgixSs/dB+Elg3BaY0MXh03D9jWclYskg3BiOkgg414NqpFI3nRgr2Qnw5jJs7Q==",
+ "_integrity": "sha512-mq9ixIYfNF9SK0IS/h2HKMu8Q2iaCuhDDsZhdEag/FHv8fOaYld4vN7ouMgcSSt5WKZzPs8atclTcJm36OTh4w==",
"_location": "/tar",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "tar@4.4.3",
+ "raw": "tar@4.4.4",
"name": "tar",
"escapedName": "tar",
- "rawSpec": "4.4.3",
+ "rawSpec": "4.4.4",
"saveSpec": null,
- "fetchSpec": "4.4.3"
+ "fetchSpec": "4.4.4"
},
"_requiredBy": [
+ "#USER",
"/",
"/pacote"
],
- "_resolved": "https://registry.npmjs.org/tar/-/tar-4.4.3.tgz",
- "_spec": "4.4.3",
+ "_resolved": "https://registry.npmjs.org/tar/-/tar-4.4.4.tgz",
+ "_shasum": "ec8409fae9f665a4355cc3b4087d0820232bb8cd",
+ "_spec": "tar@4.4.4",
"_where": "/Users/rebecca/code/npm",
"author": {
"name": "Isaac Z. Schlueter",
@@ -36,6 +32,7 @@
"bugs": {
"url": "https://github.com/npm/node-tar/issues"
},
+ "bundleDependencies": false,
"dependencies": {
"chownr": "^1.0.1",
"fs-minipass": "^1.2.5",
@@ -45,6 +42,7 @@
"safe-buffer": "^5.1.2",
"yallist": "^3.0.2"
},
+ "deprecated": false,
"description": "tar for node",
"devDependencies": {
"chmodr": "^1.0.2",
@@ -78,5 +76,5 @@
"preversion": "npm test",
"test": "tap test/*.js --100 -J --coverage-report=text -c"
},
- "version": "4.4.3"
+ "version": "4.4.4"
}
diff --git a/deps/npm/node_modules/uuid/CHANGELOG.md b/deps/npm/node_modules/uuid/CHANGELOG.md
index d9fe59c150..f29d3991e0 100644
--- a/deps/npm/node_modules/uuid/CHANGELOG.md
+++ b/deps/npm/node_modules/uuid/CHANGELOG.md
@@ -2,8 +2,44 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+<a name="3.3.2"></a>
+## [3.3.2](https://github.com/kelektiv/node-uuid/compare/v3.3.1...v3.3.2) (2018-06-28)
+
+
+### Bug Fixes
+
+* typo ([305d877](https://github.com/kelektiv/node-uuid/commit/305d877))
+
+
+
+<a name="3.3.1"></a>
+## [3.3.1](https://github.com/kelektiv/node-uuid/compare/v3.3.0...v3.3.1) (2018-06-28)
+
+
+### Bug Fixes
+
+* fix [#284](https://github.com/kelektiv/node-uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/kelektiv/node-uuid/commit/f2a60f2))
+
+
+
+<a name="3.3.0"></a>
+# [3.3.0](https://github.com/kelektiv/node-uuid/compare/v3.2.1...v3.3.0) (2018-06-22)
+
+
+### Bug Fixes
+
+* assignment to readonly property to allow running in strict mode ([#270](https://github.com/kelektiv/node-uuid/issues/270)) ([d062fdc](https://github.com/kelektiv/node-uuid/commit/d062fdc))
+* fix [#229](https://github.com/kelektiv/node-uuid/issues/229) ([c9684d4](https://github.com/kelektiv/node-uuid/commit/c9684d4))
+* Get correct version of IE11 crypto ([#274](https://github.com/kelektiv/node-uuid/issues/274)) ([153d331](https://github.com/kelektiv/node-uuid/commit/153d331))
+* mem issue when generating uuid ([#267](https://github.com/kelektiv/node-uuid/issues/267)) ([c47702c](https://github.com/kelektiv/node-uuid/commit/c47702c))
+
+### Features
+
+* enforce Conventional Commit style commit messages ([#282](https://github.com/kelektiv/node-uuid/issues/282)) ([cc9a182](https://github.com/kelektiv/node-uuid/commit/cc9a182))
+
+
<a name="3.2.1"></a>
-## [3.2.1](https://github.com/kelektiv/node-uuid/compare/v3.1.0...v3.2.1) (2018-01-16)
+## [3.2.1](https://github.com/kelektiv/node-uuid/compare/v3.2.0...v3.2.1) (2018-01-16)
### Bug Fixes
@@ -27,31 +63,48 @@ All notable changes to this project will be documented in this file. See [standa
* Add v3 Support ([#217](https://github.com/kelektiv/node-uuid/issues/217)) ([d94f726](https://github.com/kelektiv/node-uuid/commit/d94f726))
+# [3.1.0](https://github.com/kelektiv/node-uuid/compare/v3.1.0...v3.0.1) (2017-06-17)
+
+### Bug Fixes
+
+* (fix) Add .npmignore file to exclude test/ and other non-essential files from packing. (#183)
+* Fix typo (#178)
+* Simple typo fix (#165)
+
+### Features
+* v5 support in CLI (#197)
+* V5 support (#188)
+
# 3.0.1 (2016-11-28)
- * split uuid versions into separate files
+* split uuid versions into separate files
+
# 3.0.0 (2016-11-17)
- * remove .parse and .unparse
+* remove .parse and .unparse
+
# 2.0.0
- * Removed uuid.BufferClass
+* Removed uuid.BufferClass
+
# 1.4.0
- * Improved module context detection
- * Removed public RNG functions
+* Improved module context detection
+* Removed public RNG functions
+
# 1.3.2
- * Improve tests and handling of v1() options (Issue #24)
- * Expose RNG option to allow for perf testing with different generators
+* Improve tests and handling of v1() options (Issue #24)
+* Expose RNG option to allow for perf testing with different generators
+
# 1.3.0
- * Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!
- * Support for node.js crypto API
- * De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code
+* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!
+* Support for node.js crypto API
+* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code
diff --git a/deps/npm/node_modules/uuid/README.md b/deps/npm/node_modules/uuid/README.md
index cddaa14469..9cbe1ac184 100644
--- a/deps/npm/node_modules/uuid/README.md
+++ b/deps/npm/node_modules/uuid/README.md
@@ -28,7 +28,7 @@ Version 1 (timestamp):
```javascript
const uuidv1 = require('uuid/v1');
-uuidv1(); // ⇨ 'f64f2940-fae4-11e7-8c5f-ef356f279131'
+uuidv1(); // ⇨ '45745c60-7b1a-11e8-9c9c-2d42b21b1a3e'
```
@@ -56,7 +56,7 @@ Version 4 (random):
```javascript
const uuidv4 = require('uuid/v4');
-uuidv4(); // ⇨ '416ac246-e7ac-49ff-93b4-f7e94d997e6b'
+uuidv4(); // ⇨ '10ba038e-48da-487b-96e8-8d3b99b6d18a'
```
@@ -167,8 +167,8 @@ Example: In-place generation of two binary IDs
```javascript
// Generate two ids in an array
const arr = new Array();
-uuidv1(null, arr, 0); // ⇨ [ 246, 87, 141, 176, 250, 228, 17, 231, 146, 52, 239, 53, 111, 39, 145, 49 ]
-uuidv1(null, arr, 16); // ⇨ [ 246, 87, 141, 176, 250, 228, 17, 231, 146, 52, 239, 53, 111, 39, 145, 49, 246, 87, 180, 192, 250, 228, 17, 231, 146, 52, 239, 53, 111, 39, 145, 49 ]
+uuidv1(null, arr, 0); // ⇨ [ 69, 117, 109, 208, 123, 26, 17, 232, 146, 52, 45, 66, 178, 27, 26, 62 ]
+uuidv1(null, arr, 16); // ⇨ [ 69, 117, 109, 208, 123, 26, 17, 232, 146, 52, 45, 66, 178, 27, 26, 62, 69, 117, 109, 209, 123, 26, 17, 232, 146, 52, 45, 66, 178, 27, 26, 62 ]
```
@@ -237,8 +237,8 @@ Example: Generate two IDs in a single buffer
```javascript
const buffer = new Array();
-uuidv4(null, buffer, 0); // ⇨ [ 175, 10, 162, 184, 217, 255, 77, 139, 161, 80, 41, 200, 70, 238, 196, 250 ]
-uuidv4(null, buffer, 16); // ⇨ [ 175, 10, 162, 184, 217, 255, 77, 139, 161, 80, 41, 200, 70, 238, 196, 250, 75, 162, 105, 153, 48, 238, 77, 58, 169, 56, 158, 207, 106, 160, 47, 239 ]
+uuidv4(null, buffer, 0); // ⇨ [ 54, 122, 218, 70, 45, 70, 65, 24, 171, 53, 95, 130, 83, 195, 242, 45 ]
+uuidv4(null, buffer, 16); // ⇨ [ 54, 122, 218, 70, 45, 70, 65, 24, 171, 53, 95, 130, 83, 195, 242, 45, 108, 204, 255, 103, 171, 86, 76, 94, 178, 225, 188, 236, 150, 20, 151, 87 ]
```
diff --git a/deps/npm/node_modules/uuid/lib/bytesToUuid.js b/deps/npm/node_modules/uuid/lib/bytesToUuid.js
index 2c9a22309a..f201a88854 100644
--- a/deps/npm/node_modules/uuid/lib/bytesToUuid.js
+++ b/deps/npm/node_modules/uuid/lib/bytesToUuid.js
@@ -10,14 +10,15 @@ for (var i = 0; i < 256; ++i) {
function bytesToUuid(buf, offset) {
var i = offset || 0;
var bth = byteToHex;
- return bth[buf[i++]] + bth[buf[i++]] +
- bth[buf[i++]] + bth[buf[i++]] + '-' +
- bth[buf[i++]] + bth[buf[i++]] + '-' +
- bth[buf[i++]] + bth[buf[i++]] + '-' +
- bth[buf[i++]] + bth[buf[i++]] + '-' +
- bth[buf[i++]] + bth[buf[i++]] +
- bth[buf[i++]] + bth[buf[i++]] +
- bth[buf[i++]] + bth[buf[i++]];
+ // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
+ return ([bth[buf[i++]], bth[buf[i++]],
+ bth[buf[i++]], bth[buf[i++]], '-',
+ bth[buf[i++]], bth[buf[i++]], '-',
+ bth[buf[i++]], bth[buf[i++]], '-',
+ bth[buf[i++]], bth[buf[i++]], '-',
+ bth[buf[i++]], bth[buf[i++]],
+ bth[buf[i++]], bth[buf[i++]],
+ bth[buf[i++]], bth[buf[i++]]]).join('');
}
module.exports = bytesToUuid;
diff --git a/deps/npm/node_modules/uuid/lib/rng-browser.js b/deps/npm/node_modules/uuid/lib/rng-browser.js
index 14d21170d5..6361fb8147 100644
--- a/deps/npm/node_modules/uuid/lib/rng-browser.js
+++ b/deps/npm/node_modules/uuid/lib/rng-browser.js
@@ -3,9 +3,11 @@
// and inconsistent support for the `crypto` API. We do the best we can via
// feature-detection
-// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
-var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues.bind(crypto)) ||
- (typeof(msCrypto) != 'undefined' && msCrypto.getRandomValues.bind(msCrypto));
+// getRandomValues needs to be invoked in a context where "this" is a Crypto
+// implementation. Also, find the complete implementation of crypto on IE11.
+var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||
+ (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));
+
if (getRandomValues) {
// WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
diff --git a/deps/npm/node_modules/uuid/lib/v35.js b/deps/npm/node_modules/uuid/lib/v35.js
index 842c60ea2b..8b066cc5e3 100644
--- a/deps/npm/node_modules/uuid/lib/v35.js
+++ b/deps/npm/node_modules/uuid/lib/v35.js
@@ -43,7 +43,11 @@ module.exports = function(name, version, hashfunc) {
return buf || bytesToUuid(bytes);
};
- generateUUID.name = name;
+ // Function#name is not settable on some platforms (#270)
+ try {
+ generateUUID.name = name;
+ } catch (err) {
+ }
// Pre-defined namespaces, per Appendix C
generateUUID.DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
diff --git a/deps/npm/node_modules/uuid/package.json b/deps/npm/node_modules/uuid/package.json
index ec24a56720..81ea5a2682 100644
--- a/deps/npm/node_modules/uuid/package.json
+++ b/deps/npm/node_modules/uuid/package.json
@@ -1,33 +1,29 @@
{
- "_args": [
- [
- "uuid@3.2.1",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "uuid@3.2.1",
- "_id": "uuid@3.2.1",
+ "_from": "uuid@3.3.2",
+ "_id": "uuid@3.3.2",
"_inBundle": false,
- "_integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==",
+ "_integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==",
"_location": "/uuid",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "uuid@3.2.1",
+ "raw": "uuid@3.3.2",
"name": "uuid",
"escapedName": "uuid",
- "rawSpec": "3.2.1",
+ "rawSpec": "3.3.2",
"saveSpec": null,
- "fetchSpec": "3.2.1"
+ "fetchSpec": "3.3.2"
},
"_requiredBy": [
+ "#USER",
"/",
"/request"
],
- "_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz",
- "_spec": "3.2.1",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
+ "_shasum": "1b4af4955eb3077c501c23872fc6513811587131",
+ "_spec": "uuid@3.3.2",
+ "_where": "/Users/zkat/Documents/code/work/npm",
"bin": {
"uuid": "./bin/uuid"
},
@@ -39,6 +35,12 @@
"bugs": {
"url": "https://github.com/kelektiv/node-uuid/issues"
},
+ "bundleDependencies": false,
+ "commitlint": {
+ "extends": [
+ "@commitlint/config-conventional"
+ ]
+ },
"contributors": [
{
"name": "Robert Kieffer",
@@ -61,13 +63,16 @@
"email": "shtylman@gmail.com"
}
],
- "dependencies": {},
+ "deprecated": false,
"description": "RFC4122 (v1, v4, and v5) UUIDs",
"devDependencies": {
- "eslint": "4.5.0",
- "mocha": "3.1.2",
+ "@commitlint/cli": "7.0.0",
+ "@commitlint/config-conventional": "7.0.1",
+ "eslint": "4.19.1",
+ "husky": "0.14.3",
+ "mocha": "5.2.0",
"runmd": "1.0.1",
- "standard-version": "4.2.0"
+ "standard-version": "4.4.0"
},
"homepage": "https://github.com/kelektiv/node-uuid#readme",
"keywords": [
@@ -82,10 +87,11 @@
"url": "git+https://github.com/kelektiv/node-uuid.git"
},
"scripts": {
+ "commitmsg": "commitlint -E GIT_PARAMS",
"md": "runmd --watch --output=README.md README_js.md",
"prepare": "runmd --output=README.md README_js.md",
"release": "standard-version",
"test": "mocha test/test.js"
},
- "version": "3.2.1"
+ "version": "3.3.2"
}
diff --git a/deps/npm/node_modules/verror/node_modules/assert-plus/AUTHORS b/deps/npm/node_modules/verror/node_modules/assert-plus/AUTHORS
new file mode 100644
index 0000000000..1923524fe4
--- /dev/null
+++ b/deps/npm/node_modules/verror/node_modules/assert-plus/AUTHORS
@@ -0,0 +1,6 @@
+Dave Eddy <dave@daveeddy.com>
+Fred Kuo <fred.kuo@joyent.com>
+Lars-Magnus Skog <ralphtheninja@riseup.net>
+Mark Cavage <mcavage@gmail.com>
+Patrick Mooney <pmooney@pfmooney.com>
+Rob Gulewich <robert.gulewich@joyent.com>
diff --git a/deps/npm/node_modules/verror/node_modules/assert-plus/CHANGES.md b/deps/npm/node_modules/verror/node_modules/assert-plus/CHANGES.md
new file mode 100644
index 0000000000..57d92bfdb9
--- /dev/null
+++ b/deps/npm/node_modules/verror/node_modules/assert-plus/CHANGES.md
@@ -0,0 +1,14 @@
+# assert-plus Changelog
+
+## 1.0.0
+
+- *BREAKING* assert.number (and derivatives) now accept Infinity as valid input
+- Add assert.finite check. Previous assert.number callers should use this if
+ they expect Infinity inputs to throw.
+
+## 0.2.0
+
+- Fix `assert.object(null)` so it throws
+- Fix optional/arrayOf exports for non-type-of asserts
+- Add optiona/arrayOf exports for Stream/Date/Regex/uuid
+- Add basic unit test coverage
diff --git a/deps/npm/node_modules/verror/node_modules/assert-plus/README.md b/deps/npm/node_modules/verror/node_modules/assert-plus/README.md
new file mode 100644
index 0000000000..ec200d161e
--- /dev/null
+++ b/deps/npm/node_modules/verror/node_modules/assert-plus/README.md
@@ -0,0 +1,162 @@
+# assert-plus
+
+This library is a super small wrapper over node's assert module that has two
+things: (1) the ability to disable assertions with the environment variable
+NODE\_NDEBUG, and (2) some API wrappers for argument testing. Like
+`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks
+like this:
+
+```javascript
+ var assert = require('assert-plus');
+
+ function fooAccount(options, callback) {
+ assert.object(options, 'options');
+ assert.number(options.id, 'options.id');
+ assert.bool(options.isManager, 'options.isManager');
+ assert.string(options.name, 'options.name');
+ assert.arrayOfString(options.email, 'options.email');
+ assert.func(callback, 'callback');
+
+ // Do stuff
+ callback(null, {});
+ }
+```
+
+# API
+
+All methods that *aren't* part of node's core assert API are simply assumed to
+take an argument, and then a string 'name' that's not a message; `AssertionError`
+will be thrown if the assertion fails with a message like:
+
+ AssertionError: foo (string) is required
+ at test (/home/mark/work/foo/foo.js:3:9)
+ at Object.<anonymous> (/home/mark/work/foo/foo.js:15:1)
+ at Module._compile (module.js:446:26)
+ at Object..js (module.js:464:10)
+ at Module.load (module.js:353:31)
+ at Function._load (module.js:311:12)
+ at Array.0 (module.js:484:10)
+ at EventEmitter._tickCallback (node.js:190:38)
+
+from:
+
+```javascript
+ function test(foo) {
+ assert.string(foo, 'foo');
+ }
+```
+
+There you go. You can check that arrays are of a homogeneous type with `Arrayof$Type`:
+
+```javascript
+ function test(foo) {
+ assert.arrayOfString(foo, 'foo');
+ }
+```
+
+You can assert IFF an argument is not `undefined` (i.e., an optional arg):
+
+```javascript
+ assert.optionalString(foo, 'foo');
+```
+
+Lastly, you can opt-out of assertion checking altogether by setting the
+environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have
+lots of assertions, and don't want to pay `typeof ()` taxes to v8 in
+production. Be advised: The standard functions re-exported from `assert` are
+also disabled in assert-plus if NDEBUG is specified. Using them directly from
+the `assert` module avoids this behavior.
+
+The complete list of APIs is:
+
+* assert.array
+* assert.bool
+* assert.buffer
+* assert.func
+* assert.number
+* assert.finite
+* assert.object
+* assert.string
+* assert.stream
+* assert.date
+* assert.regexp
+* assert.uuid
+* assert.arrayOfArray
+* assert.arrayOfBool
+* assert.arrayOfBuffer
+* assert.arrayOfFunc
+* assert.arrayOfNumber
+* assert.arrayOfFinite
+* assert.arrayOfObject
+* assert.arrayOfString
+* assert.arrayOfStream
+* assert.arrayOfDate
+* assert.arrayOfRegexp
+* assert.arrayOfUuid
+* assert.optionalArray
+* assert.optionalBool
+* assert.optionalBuffer
+* assert.optionalFunc
+* assert.optionalNumber
+* assert.optionalFinite
+* assert.optionalObject
+* assert.optionalString
+* assert.optionalStream
+* assert.optionalDate
+* assert.optionalRegexp
+* assert.optionalUuid
+* assert.optionalArrayOfArray
+* assert.optionalArrayOfBool
+* assert.optionalArrayOfBuffer
+* assert.optionalArrayOfFunc
+* assert.optionalArrayOfNumber
+* assert.optionalArrayOfFinite
+* assert.optionalArrayOfObject
+* assert.optionalArrayOfString
+* assert.optionalArrayOfStream
+* assert.optionalArrayOfDate
+* assert.optionalArrayOfRegexp
+* assert.optionalArrayOfUuid
+* assert.AssertionError
+* assert.fail
+* assert.ok
+* assert.equal
+* assert.notEqual
+* assert.deepEqual
+* assert.notDeepEqual
+* assert.strictEqual
+* assert.notStrictEqual
+* assert.throws
+* assert.doesNotThrow
+* assert.ifError
+
+# Installation
+
+ npm install assert-plus
+
+## License
+
+The MIT License (MIT)
+Copyright (c) 2012 Mark Cavage
+
+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.
+
+## Bugs
+
+See <https://github.com/mcavage/node-assert-plus/issues>.
diff --git a/deps/npm/node_modules/verror/node_modules/assert-plus/assert.js b/deps/npm/node_modules/verror/node_modules/assert-plus/assert.js
new file mode 100644
index 0000000000..26f944eec3
--- /dev/null
+++ b/deps/npm/node_modules/verror/node_modules/assert-plus/assert.js
@@ -0,0 +1,211 @@
+// Copyright (c) 2012, Mark Cavage. All rights reserved.
+// Copyright 2015 Joyent, Inc.
+
+var assert = require('assert');
+var Stream = require('stream').Stream;
+var util = require('util');
+
+
+///--- Globals
+
+/* JSSTYLED */
+var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
+
+
+///--- Internal
+
+function _capitalize(str) {
+ return (str.charAt(0).toUpperCase() + str.slice(1));
+}
+
+function _toss(name, expected, oper, arg, actual) {
+ throw new assert.AssertionError({
+ message: util.format('%s (%s) is required', name, expected),
+ actual: (actual === undefined) ? typeof (arg) : actual(arg),
+ expected: expected,
+ operator: oper || '===',
+ stackStartFunction: _toss.caller
+ });
+}
+
+function _getClass(arg) {
+ return (Object.prototype.toString.call(arg).slice(8, -1));
+}
+
+function noop() {
+ // Why even bother with asserts?
+}
+
+
+///--- Exports
+
+var types = {
+ bool: {
+ check: function (arg) { return typeof (arg) === 'boolean'; }
+ },
+ func: {
+ check: function (arg) { return typeof (arg) === 'function'; }
+ },
+ string: {
+ check: function (arg) { return typeof (arg) === 'string'; }
+ },
+ object: {
+ check: function (arg) {
+ return typeof (arg) === 'object' && arg !== null;
+ }
+ },
+ number: {
+ check: function (arg) {
+ return typeof (arg) === 'number' && !isNaN(arg);
+ }
+ },
+ finite: {
+ check: function (arg) {
+ return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg);
+ }
+ },
+ buffer: {
+ check: function (arg) { return Buffer.isBuffer(arg); },
+ operator: 'Buffer.isBuffer'
+ },
+ array: {
+ check: function (arg) { return Array.isArray(arg); },
+ operator: 'Array.isArray'
+ },
+ stream: {
+ check: function (arg) { return arg instanceof Stream; },
+ operator: 'instanceof',
+ actual: _getClass
+ },
+ date: {
+ check: function (arg) { return arg instanceof Date; },
+ operator: 'instanceof',
+ actual: _getClass
+ },
+ regexp: {
+ check: function (arg) { return arg instanceof RegExp; },
+ operator: 'instanceof',
+ actual: _getClass
+ },
+ uuid: {
+ check: function (arg) {
+ return typeof (arg) === 'string' && UUID_REGEXP.test(arg);
+ },
+ operator: 'isUUID'
+ }
+};
+
+function _setExports(ndebug) {
+ var keys = Object.keys(types);
+ var out;
+
+ /* re-export standard assert */
+ if (process.env.NODE_NDEBUG) {
+ out = noop;
+ } else {
+ out = function (arg, msg) {
+ if (!arg) {
+ _toss(msg, 'true', arg);
+ }
+ };
+ }
+
+ /* standard checks */
+ keys.forEach(function (k) {
+ if (ndebug) {
+ out[k] = noop;
+ return;
+ }
+ var type = types[k];
+ out[k] = function (arg, msg) {
+ if (!type.check(arg)) {
+ _toss(msg, k, type.operator, arg, type.actual);
+ }
+ };
+ });
+
+ /* optional checks */
+ keys.forEach(function (k) {
+ var name = 'optional' + _capitalize(k);
+ if (ndebug) {
+ out[name] = noop;
+ return;
+ }
+ var type = types[k];
+ out[name] = function (arg, msg) {
+ if (arg === undefined || arg === null) {
+ return;
+ }
+ if (!type.check(arg)) {
+ _toss(msg, k, type.operator, arg, type.actual);
+ }
+ };
+ });
+
+ /* arrayOf checks */
+ keys.forEach(function (k) {
+ var name = 'arrayOf' + _capitalize(k);
+ if (ndebug) {
+ out[name] = noop;
+ return;
+ }
+ var type = types[k];
+ var expected = '[' + k + ']';
+ out[name] = function (arg, msg) {
+ if (!Array.isArray(arg)) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ var i;
+ for (i = 0; i < arg.length; i++) {
+ if (!type.check(arg[i])) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ }
+ };
+ });
+
+ /* optionalArrayOf checks */
+ keys.forEach(function (k) {
+ var name = 'optionalArrayOf' + _capitalize(k);
+ if (ndebug) {
+ out[name] = noop;
+ return;
+ }
+ var type = types[k];
+ var expected = '[' + k + ']';
+ out[name] = function (arg, msg) {
+ if (arg === undefined || arg === null) {
+ return;
+ }
+ if (!Array.isArray(arg)) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ var i;
+ for (i = 0; i < arg.length; i++) {
+ if (!type.check(arg[i])) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ }
+ };
+ });
+
+ /* re-export built-in assertions */
+ Object.keys(assert).forEach(function (k) {
+ if (k === 'AssertionError') {
+ out[k] = assert[k];
+ return;
+ }
+ if (ndebug) {
+ out[k] = noop;
+ return;
+ }
+ out[k] = assert[k];
+ });
+
+ /* export ourselves (for unit tests _only_) */
+ out._setExports = _setExports;
+
+ return out;
+}
+
+module.exports = _setExports(process.env.NODE_NDEBUG);
diff --git a/deps/npm/node_modules/verror/node_modules/assert-plus/package.json b/deps/npm/node_modules/verror/node_modules/assert-plus/package.json
new file mode 100644
index 0000000000..b4ad6e24fc
--- /dev/null
+++ b/deps/npm/node_modules/verror/node_modules/assert-plus/package.json
@@ -0,0 +1,82 @@
+{
+ "_from": "assert-plus@^1.0.0",
+ "_id": "assert-plus@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+ "_location": "/verror/assert-plus",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "assert-plus@^1.0.0",
+ "name": "assert-plus",
+ "escapedName": "assert-plus",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/verror"
+ ],
+ "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+ "_shasum": "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525",
+ "_spec": "assert-plus@^1.0.0",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/verror",
+ "author": {
+ "name": "Mark Cavage",
+ "email": "mcavage@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/mcavage/node-assert-plus/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Dave Eddy",
+ "email": "dave@daveeddy.com"
+ },
+ {
+ "name": "Fred Kuo",
+ "email": "fred.kuo@joyent.com"
+ },
+ {
+ "name": "Lars-Magnus Skog",
+ "email": "ralphtheninja@riseup.net"
+ },
+ {
+ "name": "Mark Cavage",
+ "email": "mcavage@gmail.com"
+ },
+ {
+ "name": "Patrick Mooney",
+ "email": "pmooney@pfmooney.com"
+ },
+ {
+ "name": "Rob Gulewich",
+ "email": "robert.gulewich@joyent.com"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Extra assertions on top of node's assert module",
+ "devDependencies": {
+ "faucet": "0.0.1",
+ "tape": "4.2.2"
+ },
+ "engines": {
+ "node": ">=0.8"
+ },
+ "homepage": "https://github.com/mcavage/node-assert-plus#readme",
+ "license": "MIT",
+ "main": "./assert.js",
+ "name": "assert-plus",
+ "optionalDependencies": {},
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mcavage/node-assert-plus.git"
+ },
+ "scripts": {
+ "test": "tape tests/*.js | ./node_modules/.bin/faucet"
+ },
+ "version": "1.0.0"
+}
diff --git a/deps/npm/node_modules/which/CHANGELOG.md b/deps/npm/node_modules/which/CHANGELOG.md
index 367acb12a2..3d83d26948 100644
--- a/deps/npm/node_modules/which/CHANGELOG.md
+++ b/deps/npm/node_modules/which/CHANGELOG.md
@@ -1,6 +1,11 @@
# Changes
+## 1.3.1
+
+* update deps
+* update travis
+
## v1.3.0
* Add nothrow option to which.sync
diff --git a/deps/npm/node_modules/which/package.json b/deps/npm/node_modules/which/package.json
index 5ff586789d..9a8a8b765a 100644
--- a/deps/npm/node_modules/which/package.json
+++ b/deps/npm/node_modules/which/package.json
@@ -1,27 +1,22 @@
{
- "_args": [
- [
- "which@1.3.0",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "which@1.3.0",
- "_id": "which@1.3.0",
+ "_from": "which@1.3.1",
+ "_id": "which@1.3.1",
"_inBundle": false,
- "_integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==",
+ "_integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"_location": "/which",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "which@1.3.0",
+ "raw": "which@1.3.1",
"name": "which",
"escapedName": "which",
- "rawSpec": "1.3.0",
+ "rawSpec": "1.3.1",
"saveSpec": null,
- "fetchSpec": "1.3.0"
+ "fetchSpec": "1.3.1"
},
"_requiredBy": [
+ "#USER",
"/",
"/cross-spawn",
"/foreground-child/cross-spawn",
@@ -30,8 +25,9 @@
"/npm-lifecycle",
"/pacote"
],
- "_resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz",
- "_spec": "1.3.0",
+ "_resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+ "_shasum": "a45043d54f5805316da8d62f9f50918d3da70b0a",
+ "_spec": "which@1.3.1",
"_where": "/Users/rebecca/code/npm",
"author": {
"name": "Isaac Z. Schlueter",
@@ -44,14 +40,16 @@
"bugs": {
"url": "https://github.com/isaacs/node-which/issues"
},
+ "bundleDependencies": false,
"dependencies": {
"isexe": "^2.0.0"
},
+ "deprecated": false,
"description": "Like which(1) unix command. Find the first instance of an executable in the PATH.",
"devDependencies": {
"mkdirp": "^0.5.0",
- "rimraf": "^2.3.3",
- "tap": "^10.7.0"
+ "rimraf": "^2.6.2",
+ "tap": "^12.0.1"
},
"files": [
"which.js",
@@ -70,5 +68,5 @@
"postversion": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}",
"test": "tap test/*.js --cov"
},
- "version": "1.3.0"
+ "version": "1.3.1"
}
diff --git a/deps/npm/node_modules/wide-align/node_modules/ansi-regex/index.js b/deps/npm/node_modules/wide-align/node_modules/ansi-regex/index.js
deleted file mode 100644
index b9574ed7e8..0000000000
--- a/deps/npm/node_modules/wide-align/node_modules/ansi-regex/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-module.exports = function () {
- return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g;
-};
diff --git a/deps/npm/node_modules/wide-align/node_modules/ansi-regex/license b/deps/npm/node_modules/wide-align/node_modules/ansi-regex/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/wide-align/node_modules/ansi-regex/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/wide-align/node_modules/ansi-regex/package.json b/deps/npm/node_modules/wide-align/node_modules/ansi-regex/package.json
deleted file mode 100644
index e1e60b9d29..0000000000
--- a/deps/npm/node_modules/wide-align/node_modules/ansi-regex/package.json
+++ /dev/null
@@ -1,108 +0,0 @@
-{
- "_from": "ansi-regex@^2.0.0",
- "_id": "ansi-regex@2.1.1",
- "_inBundle": false,
- "_integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
- "_location": "/wide-align/ansi-regex",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "ansi-regex@^2.0.0",
- "name": "ansi-regex",
- "escapedName": "ansi-regex",
- "rawSpec": "^2.0.0",
- "saveSpec": null,
- "fetchSpec": "^2.0.0"
- },
- "_requiredBy": [
- "/wide-align/strip-ansi"
- ],
- "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df",
- "_spec": "ansi-regex@^2.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/wide-align/node_modules/strip-ansi",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/chalk/ansi-regex/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Regular expression for matching ANSI escape codes",
- "devDependencies": {
- "ava": "0.17.0",
- "xo": "0.16.0"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/chalk/ansi-regex#readme",
- "keywords": [
- "ansi",
- "styles",
- "color",
- "colour",
- "colors",
- "terminal",
- "console",
- "cli",
- "string",
- "tty",
- "escape",
- "formatting",
- "rgb",
- "256",
- "shell",
- "xterm",
- "command-line",
- "text",
- "regex",
- "regexp",
- "re",
- "match",
- "test",
- "find",
- "pattern"
- ],
- "license": "MIT",
- "maintainers": [
- {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- {
- "name": "Joshua Appelman",
- "email": "jappelman@xebia.com",
- "url": "jbnicolai.com"
- },
- {
- "name": "JD Ballard",
- "email": "i.am.qix@gmail.com",
- "url": "github.com/qix-"
- }
- ],
- "name": "ansi-regex",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/chalk/ansi-regex.git"
- },
- "scripts": {
- "test": "xo && ava --verbose",
- "view-supported": "node fixtures/view-codes.js"
- },
- "version": "2.1.1",
- "xo": {
- "rules": {
- "guard-for-in": 0,
- "no-loop-func": 0
- }
- }
-}
diff --git a/deps/npm/node_modules/wide-align/node_modules/ansi-regex/readme.md b/deps/npm/node_modules/wide-align/node_modules/ansi-regex/readme.md
deleted file mode 100644
index 6a928edf0f..0000000000
--- a/deps/npm/node_modules/wide-align/node_modules/ansi-regex/readme.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex)
-
-> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
-
-
-## Install
-
-```
-$ npm install --save ansi-regex
-```
-
-
-## Usage
-
-```js
-const ansiRegex = require('ansi-regex');
-
-ansiRegex().test('\u001b[4mcake\u001b[0m');
-//=> true
-
-ansiRegex().test('cake');
-//=> false
-
-'\u001b[4mcake\u001b[0m'.match(ansiRegex());
-//=> ['\u001b[4m', '\u001b[0m']
-```
-
-## FAQ
-
-### Why do you test for codes not in the ECMA 48 standard?
-
-Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
-
-On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/wide-align/node_modules/is-fullwidth-code-point/index.js b/deps/npm/node_modules/wide-align/node_modules/is-fullwidth-code-point/index.js
deleted file mode 100644
index a7d3e3855f..0000000000
--- a/deps/npm/node_modules/wide-align/node_modules/is-fullwidth-code-point/index.js
+++ /dev/null
@@ -1,46 +0,0 @@
-'use strict';
-var numberIsNan = require('number-is-nan');
-
-module.exports = function (x) {
- if (numberIsNan(x)) {
- return false;
- }
-
- // https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1369
-
- // code points are derived from:
- // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
- if (x >= 0x1100 && (
- x <= 0x115f || // Hangul Jamo
- 0x2329 === x || // LEFT-POINTING ANGLE BRACKET
- 0x232a === x || // RIGHT-POINTING ANGLE BRACKET
- // CJK Radicals Supplement .. Enclosed CJK Letters and Months
- (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) ||
- // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
- 0x3250 <= x && x <= 0x4dbf ||
- // CJK Unified Ideographs .. Yi Radicals
- 0x4e00 <= x && x <= 0xa4c6 ||
- // Hangul Jamo Extended-A
- 0xa960 <= x && x <= 0xa97c ||
- // Hangul Syllables
- 0xac00 <= x && x <= 0xd7a3 ||
- // CJK Compatibility Ideographs
- 0xf900 <= x && x <= 0xfaff ||
- // Vertical Forms
- 0xfe10 <= x && x <= 0xfe19 ||
- // CJK Compatibility Forms .. Small Form Variants
- 0xfe30 <= x && x <= 0xfe6b ||
- // Halfwidth and Fullwidth Forms
- 0xff01 <= x && x <= 0xff60 ||
- 0xffe0 <= x && x <= 0xffe6 ||
- // Kana Supplement
- 0x1b000 <= x && x <= 0x1b001 ||
- // Enclosed Ideographic Supplement
- 0x1f200 <= x && x <= 0x1f251 ||
- // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
- 0x20000 <= x && x <= 0x3fffd)) {
- return true;
- }
-
- return false;
-}
diff --git a/deps/npm/node_modules/wide-align/node_modules/is-fullwidth-code-point/license b/deps/npm/node_modules/wide-align/node_modules/is-fullwidth-code-point/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/wide-align/node_modules/is-fullwidth-code-point/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/wide-align/node_modules/is-fullwidth-code-point/package.json b/deps/npm/node_modules/wide-align/node_modules/is-fullwidth-code-point/package.json
deleted file mode 100644
index 4ccf5e8b35..0000000000
--- a/deps/npm/node_modules/wide-align/node_modules/is-fullwidth-code-point/package.json
+++ /dev/null
@@ -1,77 +0,0 @@
-{
- "_from": "is-fullwidth-code-point@^1.0.0",
- "_id": "is-fullwidth-code-point@1.0.0",
- "_inBundle": false,
- "_integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
- "_location": "/wide-align/is-fullwidth-code-point",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "is-fullwidth-code-point@^1.0.0",
- "name": "is-fullwidth-code-point",
- "escapedName": "is-fullwidth-code-point",
- "rawSpec": "^1.0.0",
- "saveSpec": null,
- "fetchSpec": "^1.0.0"
- },
- "_requiredBy": [
- "/wide-align/string-width"
- ],
- "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
- "_shasum": "ef9e31386f031a7f0d643af82fde50c457ef00cb",
- "_spec": "is-fullwidth-code-point@^1.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/wide-align/node_modules/string-width",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "number-is-nan": "^1.0.0"
- },
- "deprecated": false,
- "description": "Check if the character represented by a given Unicode code point is fullwidth",
- "devDependencies": {
- "ava": "0.0.4",
- "code-point-at": "^1.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/sindresorhus/is-fullwidth-code-point#readme",
- "keywords": [
- "fullwidth",
- "full-width",
- "full",
- "width",
- "unicode",
- "character",
- "char",
- "string",
- "str",
- "codepoint",
- "code",
- "point",
- "is",
- "detect",
- "check"
- ],
- "license": "MIT",
- "name": "is-fullwidth-code-point",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git"
- },
- "scripts": {
- "test": "node test.js"
- },
- "version": "1.0.0"
-}
diff --git a/deps/npm/node_modules/wide-align/node_modules/is-fullwidth-code-point/readme.md b/deps/npm/node_modules/wide-align/node_modules/is-fullwidth-code-point/readme.md
deleted file mode 100644
index 4936464b1b..0000000000
--- a/deps/npm/node_modules/wide-align/node_modules/is-fullwidth-code-point/readme.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# is-fullwidth-code-point [![Build Status](https://travis-ci.org/sindresorhus/is-fullwidth-code-point.svg?branch=master)](https://travis-ci.org/sindresorhus/is-fullwidth-code-point)
-
-> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms)
-
-
-## Install
-
-```
-$ npm install --save is-fullwidth-code-point
-```
-
-
-## Usage
-
-```js
-var isFullwidthCodePoint = require('is-fullwidth-code-point');
-
-isFullwidthCodePoint('谢'.codePointAt());
-//=> true
-
-isFullwidthCodePoint('a'.codePointAt());
-//=> false
-```
-
-
-## API
-
-### isFullwidthCodePoint(input)
-
-#### input
-
-Type: `number`
-
-[Code point](https://en.wikipedia.org/wiki/Code_point) of a character.
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/wide-align/node_modules/strip-ansi/index.js b/deps/npm/node_modules/wide-align/node_modules/strip-ansi/index.js
deleted file mode 100644
index 099480fbfc..0000000000
--- a/deps/npm/node_modules/wide-align/node_modules/strip-ansi/index.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-var ansiRegex = require('ansi-regex')();
-
-module.exports = function (str) {
- return typeof str === 'string' ? str.replace(ansiRegex, '') : str;
-};
diff --git a/deps/npm/node_modules/wide-align/node_modules/strip-ansi/license b/deps/npm/node_modules/wide-align/node_modules/strip-ansi/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/wide-align/node_modules/strip-ansi/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/wide-align/node_modules/strip-ansi/package.json b/deps/npm/node_modules/wide-align/node_modules/strip-ansi/package.json
deleted file mode 100644
index 1f4aa56b0f..0000000000
--- a/deps/npm/node_modules/wide-align/node_modules/strip-ansi/package.json
+++ /dev/null
@@ -1,101 +0,0 @@
-{
- "_from": "strip-ansi@^3.0.0",
- "_id": "strip-ansi@3.0.1",
- "_inBundle": false,
- "_integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
- "_location": "/wide-align/strip-ansi",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "strip-ansi@^3.0.0",
- "name": "strip-ansi",
- "escapedName": "strip-ansi",
- "rawSpec": "^3.0.0",
- "saveSpec": null,
- "fetchSpec": "^3.0.0"
- },
- "_requiredBy": [
- "/wide-align/string-width"
- ],
- "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "_shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf",
- "_spec": "strip-ansi@^3.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/wide-align/node_modules/string-width",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/chalk/strip-ansi/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "ansi-regex": "^2.0.0"
- },
- "deprecated": false,
- "description": "Strip ANSI escape codes",
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/chalk/strip-ansi#readme",
- "keywords": [
- "strip",
- "trim",
- "remove",
- "ansi",
- "styles",
- "color",
- "colour",
- "colors",
- "terminal",
- "console",
- "string",
- "tty",
- "escape",
- "formatting",
- "rgb",
- "256",
- "shell",
- "xterm",
- "log",
- "logging",
- "command-line",
- "text"
- ],
- "license": "MIT",
- "maintainers": [
- {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- {
- "name": "Joshua Boy Nicolai Appelman",
- "email": "joshua@jbna.nl",
- "url": "jbna.nl"
- },
- {
- "name": "JD Ballard",
- "email": "i.am.qix@gmail.com",
- "url": "github.com/qix-"
- }
- ],
- "name": "strip-ansi",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/chalk/strip-ansi.git"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "version": "3.0.1"
-}
diff --git a/deps/npm/node_modules/wide-align/node_modules/strip-ansi/readme.md b/deps/npm/node_modules/wide-align/node_modules/strip-ansi/readme.md
deleted file mode 100644
index cb7d9ff7ee..0000000000
--- a/deps/npm/node_modules/wide-align/node_modules/strip-ansi/readme.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi)
-
-> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
-
-
-## Install
-
-```
-$ npm install --save strip-ansi
-```
-
-
-## Usage
-
-```js
-var stripAnsi = require('strip-ansi');
-
-stripAnsi('\u001b[4mcake\u001b[0m');
-//=> 'cake'
-```
-
-
-## Related
-
-- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module
-- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
-- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
-- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/index.js b/deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/index.js
deleted file mode 100644
index b9574ed7e8..0000000000
--- a/deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-module.exports = function () {
- return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g;
-};
diff --git a/deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/license b/deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md b/deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md
deleted file mode 100644
index 6a928edf0f..0000000000
--- a/deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex)
-
-> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
-
-
-## Install
-
-```
-$ npm install --save ansi-regex
-```
-
-
-## Usage
-
-```js
-const ansiRegex = require('ansi-regex');
-
-ansiRegex().test('\u001b[4mcake\u001b[0m');
-//=> true
-
-ansiRegex().test('cake');
-//=> false
-
-'\u001b[4mcake\u001b[0m'.match(ansiRegex());
-//=> ['\u001b[4m', '\u001b[0m']
-```
-
-## FAQ
-
-### Why do you test for codes not in the ECMA 48 standard?
-
-Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
-
-On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.js b/deps/npm/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.js
deleted file mode 100644
index a7d3e3855f..0000000000
--- a/deps/npm/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.js
+++ /dev/null
@@ -1,46 +0,0 @@
-'use strict';
-var numberIsNan = require('number-is-nan');
-
-module.exports = function (x) {
- if (numberIsNan(x)) {
- return false;
- }
-
- // https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1369
-
- // code points are derived from:
- // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
- if (x >= 0x1100 && (
- x <= 0x115f || // Hangul Jamo
- 0x2329 === x || // LEFT-POINTING ANGLE BRACKET
- 0x232a === x || // RIGHT-POINTING ANGLE BRACKET
- // CJK Radicals Supplement .. Enclosed CJK Letters and Months
- (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) ||
- // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
- 0x3250 <= x && x <= 0x4dbf ||
- // CJK Unified Ideographs .. Yi Radicals
- 0x4e00 <= x && x <= 0xa4c6 ||
- // Hangul Jamo Extended-A
- 0xa960 <= x && x <= 0xa97c ||
- // Hangul Syllables
- 0xac00 <= x && x <= 0xd7a3 ||
- // CJK Compatibility Ideographs
- 0xf900 <= x && x <= 0xfaff ||
- // Vertical Forms
- 0xfe10 <= x && x <= 0xfe19 ||
- // CJK Compatibility Forms .. Small Form Variants
- 0xfe30 <= x && x <= 0xfe6b ||
- // Halfwidth and Fullwidth Forms
- 0xff01 <= x && x <= 0xff60 ||
- 0xffe0 <= x && x <= 0xffe6 ||
- // Kana Supplement
- 0x1b000 <= x && x <= 0x1b001 ||
- // Enclosed Ideographic Supplement
- 0x1f200 <= x && x <= 0x1f251 ||
- // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
- 0x20000 <= x && x <= 0x3fffd)) {
- return true;
- }
-
- return false;
-}
diff --git a/deps/npm/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/license b/deps/npm/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/package.json b/deps/npm/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/package.json
deleted file mode 100644
index 5544d02df1..0000000000
--- a/deps/npm/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/package.json
+++ /dev/null
@@ -1,77 +0,0 @@
-{
- "_from": "is-fullwidth-code-point@^1.0.0",
- "_id": "is-fullwidth-code-point@1.0.0",
- "_inBundle": false,
- "_integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
- "_location": "/wrap-ansi/is-fullwidth-code-point",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "is-fullwidth-code-point@^1.0.0",
- "name": "is-fullwidth-code-point",
- "escapedName": "is-fullwidth-code-point",
- "rawSpec": "^1.0.0",
- "saveSpec": null,
- "fetchSpec": "^1.0.0"
- },
- "_requiredBy": [
- "/wrap-ansi/string-width"
- ],
- "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
- "_shasum": "ef9e31386f031a7f0d643af82fde50c457ef00cb",
- "_spec": "is-fullwidth-code-point@^1.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/wrap-ansi/node_modules/string-width",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "number-is-nan": "^1.0.0"
- },
- "deprecated": false,
- "description": "Check if the character represented by a given Unicode code point is fullwidth",
- "devDependencies": {
- "ava": "0.0.4",
- "code-point-at": "^1.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/sindresorhus/is-fullwidth-code-point#readme",
- "keywords": [
- "fullwidth",
- "full-width",
- "full",
- "width",
- "unicode",
- "character",
- "char",
- "string",
- "str",
- "codepoint",
- "code",
- "point",
- "is",
- "detect",
- "check"
- ],
- "license": "MIT",
- "name": "is-fullwidth-code-point",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git"
- },
- "scripts": {
- "test": "node test.js"
- },
- "version": "1.0.0"
-}
diff --git a/deps/npm/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/readme.md b/deps/npm/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/readme.md
deleted file mode 100644
index 4936464b1b..0000000000
--- a/deps/npm/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/readme.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# is-fullwidth-code-point [![Build Status](https://travis-ci.org/sindresorhus/is-fullwidth-code-point.svg?branch=master)](https://travis-ci.org/sindresorhus/is-fullwidth-code-point)
-
-> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms)
-
-
-## Install
-
-```
-$ npm install --save is-fullwidth-code-point
-```
-
-
-## Usage
-
-```js
-var isFullwidthCodePoint = require('is-fullwidth-code-point');
-
-isFullwidthCodePoint('谢'.codePointAt());
-//=> true
-
-isFullwidthCodePoint('a'.codePointAt());
-//=> false
-```
-
-
-## API
-
-### isFullwidthCodePoint(input)
-
-#### input
-
-Type: `number`
-
-[Code point](https://en.wikipedia.org/wiki/Code_point) of a character.
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/index.js b/deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/index.js
deleted file mode 100644
index 099480fbfc..0000000000
--- a/deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/index.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-var ansiRegex = require('ansi-regex')();
-
-module.exports = function (str) {
- return typeof str === 'string' ? str.replace(ansiRegex, '') : str;
-};
diff --git a/deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/license b/deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/package.json b/deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/package.json
deleted file mode 100644
index 4c6900e4a9..0000000000
--- a/deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/package.json
+++ /dev/null
@@ -1,102 +0,0 @@
-{
- "_from": "strip-ansi@^3.0.1",
- "_id": "strip-ansi@3.0.1",
- "_inBundle": false,
- "_integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
- "_location": "/wrap-ansi/strip-ansi",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "strip-ansi@^3.0.1",
- "name": "strip-ansi",
- "escapedName": "strip-ansi",
- "rawSpec": "^3.0.1",
- "saveSpec": null,
- "fetchSpec": "^3.0.1"
- },
- "_requiredBy": [
- "/wrap-ansi",
- "/wrap-ansi/string-width"
- ],
- "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "_shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf",
- "_spec": "strip-ansi@^3.0.1",
- "_where": "/Users/rebecca/code/npm/node_modules/wrap-ansi",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/chalk/strip-ansi/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "ansi-regex": "^2.0.0"
- },
- "deprecated": false,
- "description": "Strip ANSI escape codes",
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/chalk/strip-ansi#readme",
- "keywords": [
- "strip",
- "trim",
- "remove",
- "ansi",
- "styles",
- "color",
- "colour",
- "colors",
- "terminal",
- "console",
- "string",
- "tty",
- "escape",
- "formatting",
- "rgb",
- "256",
- "shell",
- "xterm",
- "log",
- "logging",
- "command-line",
- "text"
- ],
- "license": "MIT",
- "maintainers": [
- {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- {
- "name": "Joshua Boy Nicolai Appelman",
- "email": "joshua@jbna.nl",
- "url": "jbna.nl"
- },
- {
- "name": "JD Ballard",
- "email": "i.am.qix@gmail.com",
- "url": "github.com/qix-"
- }
- ],
- "name": "strip-ansi",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/chalk/strip-ansi.git"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "version": "3.0.1"
-}
diff --git a/deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md b/deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md
deleted file mode 100644
index cb7d9ff7ee..0000000000
--- a/deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi)
-
-> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
-
-
-## Install
-
-```
-$ npm install --save strip-ansi
-```
-
-
-## Usage
-
-```js
-var stripAnsi = require('strip-ansi');
-
-stripAnsi('\u001b[4mcake\u001b[0m');
-//=> 'cake'
-```
-
-
-## Related
-
-- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module
-- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
-- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
-- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)